fhir_models 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +2 -2
- data/.travis.yml +1 -1
- data/fhir_models.gemspec +1 -1
- data/lib/fhir_models/bootstrap/hashable.rb +3 -3
- data/lib/fhir_models/bootstrap/model.rb +2 -2
- data/lib/fhir_models/definitions/schema/fhir-xhtml.xsd +0 -0
- data/lib/fhir_models/definitions/schema/xml.xsd +0 -0
- data/lib/fhir_models/definitions/schema/xmldsig-core-schema.xsd +0 -0
- data/lib/fhir_models/examples/json/appointmentresponse-example-req.json +0 -0
- data/lib/fhir_models/examples/json/appointmentresponse-example.json +0 -0
- data/lib/fhir_models/examples/json/basic-example-narrative.json +0 -0
- data/lib/fhir_models/examples/json/basic-example2.json +0 -0
- data/lib/fhir_models/examples/json/capabilitystatement-example.json +1 -1
- data/lib/fhir_models/examples/json/capabilitystatement-phr-example.json +0 -0
- data/lib/fhir_models/examples/json/claim-example-oral-contained-identifier.json +1 -1
- data/lib/fhir_models/examples/json/claim-example-oral-identifier.json +0 -0
- data/lib/fhir_models/examples/json/claim-example-pharmacy.json +0 -0
- data/lib/fhir_models/examples/json/claim-example-professional.json +0 -0
- data/lib/fhir_models/examples/json/claim-example-vision.json +0 -0
- data/lib/fhir_models/examples/json/claim-example.json +0 -0
- data/lib/fhir_models/examples/json/condition-example-stroke.json +0 -0
- data/lib/fhir_models/examples/json/condition-example.json +0 -0
- data/lib/fhir_models/examples/json/coverage-example-ehic.json +0 -0
- data/lib/fhir_models/examples/json/coverage-example-selfpay.json +0 -0
- data/lib/fhir_models/examples/json/dataelement-example.json +1 -1
- data/lib/fhir_models/examples/json/device-example-ihe-pcd.json +0 -0
- data/lib/fhir_models/examples/json/device-example-pacemaker.json +0 -0
- data/lib/fhir_models/examples/json/device-example-software.json +0 -0
- data/lib/fhir_models/examples/json/eligibilityrequest-example.json +0 -0
- data/lib/fhir_models/examples/json/endpoint-examples-general-template.json +9 -9
- data/lib/fhir_models/examples/json/enrollmentrequest-example.json +0 -0
- data/lib/fhir_models/examples/json/group-example-member.json +0 -0
- data/lib/fhir_models/examples/json/immunizationrecommendation-example.json +0 -0
- data/lib/fhir_models/examples/json/list-example-allergies.json +0 -0
- data/lib/fhir_models/examples/json/list-example-empty.json +0 -0
- data/lib/fhir_models/examples/json/list-example-medlist.json +0 -0
- data/lib/fhir_models/examples/json/list-example-simple-empty.json +0 -0
- data/lib/fhir_models/examples/json/list-example.json +0 -0
- data/lib/fhir_models/examples/json/location-example-ambulance.json +0 -0
- data/lib/fhir_models/examples/json/location-example-hl7hq.json +0 -0
- data/lib/fhir_models/examples/json/location-example-patients-home.json +0 -0
- data/lib/fhir_models/examples/json/location-example-ukpharmacy.json +0 -0
- data/lib/fhir_models/examples/json/location-example.json +0 -0
- data/lib/fhir_models/examples/json/media-example-sound.json +0 -0
- data/lib/fhir_models/examples/json/medicationexample1.json +0 -0
- data/lib/fhir_models/examples/json/namingsystem-example-id.json +0 -0
- data/lib/fhir_models/examples/json/namingsystem-example-replaced.json +0 -0
- data/lib/fhir_models/examples/json/namingsystem-example.json +0 -0
- data/lib/fhir_models/examples/json/operationoutcome-example-allok.json +0 -0
- data/lib/fhir_models/examples/json/operationoutcome-example-exception.json +0 -0
- data/lib/fhir_models/examples/json/operationoutcome-example-searchfail.json +0 -0
- data/lib/fhir_models/examples/json/organization-example-gastro.json +0 -0
- data/lib/fhir_models/examples/json/organization-example-good-health-care.json +0 -0
- data/lib/fhir_models/examples/json/organization-example-insurer.json +0 -0
- data/lib/fhir_models/examples/json/organization-example-lab.json +0 -0
- data/lib/fhir_models/examples/json/organization-example-mmanu.json +0 -0
- data/lib/fhir_models/examples/json/organization-example.json +0 -0
- data/lib/fhir_models/examples/json/parameters-example.json +0 -0
- data/lib/fhir_models/examples/json/patient-example-b.json +0 -0
- data/lib/fhir_models/examples/json/patient-example-c.json +0 -0
- data/lib/fhir_models/examples/json/patient-example-dicom.json +0 -0
- data/lib/fhir_models/examples/json/patient-example-ihe-pcd.json +0 -0
- data/lib/fhir_models/examples/json/patient-example-xcda.json +0 -0
- data/lib/fhir_models/examples/json/patient-example-xds.json +0 -0
- data/lib/fhir_models/examples/json/patient-examples-cypress-template.json +0 -0
- data/lib/fhir_models/examples/json/patient-examples-general.json +0 -0
- data/lib/fhir_models/examples/json/patient-genetics-example1.json +0 -0
- data/lib/fhir_models/examples/json/patient-glossy-example.json +0 -0
- data/lib/fhir_models/examples/json/person-example-f002-ariadne.json +0 -0
- data/lib/fhir_models/examples/json/person-example.json +0 -0
- data/lib/fhir_models/examples/json/practitioner-example-xcda-author.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example-poll-eob.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example-poll-exclusive.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example-poll-inclusive.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example-poll-payrec.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example-reprocess.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example-reverse.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example-status.json +0 -0
- data/lib/fhir_models/examples/json/processrequest-example.json +0 -0
- data/lib/fhir_models/examples/json/processresponse-example.json +0 -0
- data/lib/fhir_models/examples/json/provenance-example-sig.json +1 -1
- data/lib/fhir_models/examples/json/relatedperson-example-f001-sarah.json +0 -0
- data/lib/fhir_models/examples/json/relatedperson-example-f002-ariadne.json +0 -0
- data/lib/fhir_models/examples/json/researchstudy-example.json +0 -0
- data/lib/fhir_models/examples/json/researchsubject-example.json +0 -0
- data/lib/fhir_models/examples/json/riskassessment-example-population.json +0 -0
- data/lib/fhir_models/examples/json/searchparameter-example-extension.json +0 -0
- data/lib/fhir_models/examples/json/slot-example-busy.json +0 -0
- data/lib/fhir_models/examples/json/slot-example-tentative.json +0 -0
- data/lib/fhir_models/examples/json/slot-example-unavailable.json +0 -0
- data/lib/fhir_models/examples/json/valueset-example-yesnodontknow.json +0 -0
- data/lib/fhir_models/examples/xml/appointment-example-request.xml +0 -0
- data/lib/fhir_models/examples/xml/appointmentresponse-example-req.xml +0 -0
- data/lib/fhir_models/examples/xml/appointmentresponse-example.xml +0 -0
- data/lib/fhir_models/examples/xml/basic-example-narrative.xml +0 -0
- data/lib/fhir_models/examples/xml/basic-example2.xml +0 -0
- data/lib/fhir_models/examples/xml/capabilitystatement-example.xml +1 -1
- data/lib/fhir_models/examples/xml/capabilitystatement-phr-example.xml +0 -0
- data/lib/fhir_models/examples/xml/claim-example-oral-contained-identifier.xml +1 -1
- data/lib/fhir_models/examples/xml/claim-example-oral-identifier.xml +0 -0
- data/lib/fhir_models/examples/xml/claim-example-pharmacy.xml +0 -0
- data/lib/fhir_models/examples/xml/claim-example-professional.xml +0 -0
- data/lib/fhir_models/examples/xml/claim-example-vision.xml +0 -0
- data/lib/fhir_models/examples/xml/claim-example.xml +0 -0
- data/lib/fhir_models/examples/xml/condition-example-stroke.xml +0 -0
- data/lib/fhir_models/examples/xml/condition-example.xml +0 -0
- data/lib/fhir_models/examples/xml/coverage-example-ehic.xml +0 -0
- data/lib/fhir_models/examples/xml/coverage-example-selfpay.xml +0 -0
- data/lib/fhir_models/examples/xml/dataelement-example.xml +1 -1
- data/lib/fhir_models/examples/xml/device-example-ihe-pcd.xml +0 -0
- data/lib/fhir_models/examples/xml/device-example-pacemaker.xml +0 -0
- data/lib/fhir_models/examples/xml/device-example-software.xml +0 -0
- data/lib/fhir_models/examples/xml/eligibilityrequest-example.xml +0 -0
- data/lib/fhir_models/examples/xml/endpoint-examples-general-template.xml +9 -9
- data/lib/fhir_models/examples/xml/enrollmentrequest-example.xml +0 -0
- data/lib/fhir_models/examples/xml/group-example-member.xml +0 -0
- data/lib/fhir_models/examples/xml/immunizationrecommendation-example.xml +0 -0
- data/lib/fhir_models/examples/xml/list-example-allergies.xml +0 -0
- data/lib/fhir_models/examples/xml/list-example-empty.xml +0 -0
- data/lib/fhir_models/examples/xml/list-example-medlist.xml +0 -0
- data/lib/fhir_models/examples/xml/list-example-simple-empty.xml +0 -0
- data/lib/fhir_models/examples/xml/list-example.xml +0 -0
- data/lib/fhir_models/examples/xml/location-example-ambulance.xml +0 -0
- data/lib/fhir_models/examples/xml/location-example-hl7hq.xml +0 -0
- data/lib/fhir_models/examples/xml/location-example-patients-home.xml +0 -0
- data/lib/fhir_models/examples/xml/location-example-ukpharmacy.xml +0 -0
- data/lib/fhir_models/examples/xml/location-example.xml +0 -0
- data/lib/fhir_models/examples/xml/media-example-sound.xml +0 -0
- data/lib/fhir_models/examples/xml/medicationexample1.xml +0 -0
- data/lib/fhir_models/examples/xml/namingsystem-example-id.xml +0 -0
- data/lib/fhir_models/examples/xml/namingsystem-example-replaced.xml +0 -0
- data/lib/fhir_models/examples/xml/namingsystem-example.xml +0 -0
- data/lib/fhir_models/examples/xml/operationoutcome-example-allok.xml +0 -0
- data/lib/fhir_models/examples/xml/operationoutcome-example-exception.xml +0 -0
- data/lib/fhir_models/examples/xml/operationoutcome-example-searchfail.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-f001-burgers.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-f002-burgers-card.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-f003-burgers-ENT.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-gastro.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-good-health-care.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-insurer.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-lab.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example-mmanu.xml +0 -0
- data/lib/fhir_models/examples/xml/organization-example.xml +0 -0
- data/lib/fhir_models/examples/xml/parameters-example.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-example-b.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-example-c.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-example-dicom.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-example-ihe-pcd.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-example-xcda.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-example-xds.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-examples-cypress-template.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-examples-general.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-genetics-example1.xml +0 -0
- data/lib/fhir_models/examples/xml/patient-glossy-example.xml +0 -0
- data/lib/fhir_models/examples/xml/person-example-f002-ariadne.xml +0 -0
- data/lib/fhir_models/examples/xml/person-example.xml +0 -0
- data/lib/fhir_models/examples/xml/practitioner-example-xcda-author.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example-poll-eob.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example-poll-exclusive.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example-poll-inclusive.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example-poll-payrec.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example-reprocess.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example-reverse.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example-status.xml +0 -0
- data/lib/fhir_models/examples/xml/processrequest-example.xml +0 -0
- data/lib/fhir_models/examples/xml/processresponse-example.xml +0 -0
- data/lib/fhir_models/examples/xml/provenance-example-sig.xml +1 -1
- data/lib/fhir_models/examples/xml/relatedperson-example-f001-sarah.xml +0 -0
- data/lib/fhir_models/examples/xml/relatedperson-example-f002-ariadne.xml +0 -0
- data/lib/fhir_models/examples/xml/researchstudy-example.xml +0 -0
- data/lib/fhir_models/examples/xml/researchsubject-example.xml +0 -0
- data/lib/fhir_models/examples/xml/riskassessment-example-population.xml +0 -0
- data/lib/fhir_models/examples/xml/schedule-example.xml +0 -0
- data/lib/fhir_models/examples/xml/searchparameter-example-extension.xml +0 -0
- data/lib/fhir_models/examples/xml/slot-example-busy.xml +0 -0
- data/lib/fhir_models/examples/xml/slot-example-tentative.xml +0 -0
- data/lib/fhir_models/examples/xml/slot-example-unavailable.xml +0 -0
- data/lib/fhir_models/examples/xml/valueset-example-yesnodontknow.xml +0 -0
- data/lib/fhir_models/fhir_ext/structure_definition.rb +51 -2
- data/lib/fhir_models/tasks/tasks.rake +48 -0
- data/lib/fhir_models/version.rb +1 -1
- metadata +5 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a066b68471cc4a3c0a992618366b6079428e3d8fa6446d079cc7dd05d77edbf6
|
|
4
|
+
data.tar.gz: 61b0ae3ef6638cd5faed92bd479a63923bf2bda53ec8cddb522bc766044bbe47
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a0bd4ab336564cfceb8bd562199e439d496504d0b0b69096f3921530e01eda72f5dcdca51f40485eec4a98c644e9b9359900613285c1643ea808132a30f7f539
|
|
7
|
+
data.tar.gz: 780033deebc6af7ec05eb092b9279f5512f97b660fbe91320b9aa73060e0a4e09062c74f37e081189d75a7db2db0d52eb4e9d1616c6c4f66bd352c2602d3e182
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -27,7 +27,7 @@ Metrics/BlockLength:
|
|
|
27
27
|
# Offense count: 1
|
|
28
28
|
# Configuration parameters: CountBlocks.
|
|
29
29
|
Metrics/BlockNesting:
|
|
30
|
-
Max:
|
|
30
|
+
Max: 8
|
|
31
31
|
|
|
32
32
|
# Offense count: 5
|
|
33
33
|
# Configuration parameters: CountComments.
|
|
@@ -41,7 +41,7 @@ Metrics/CyclomaticComplexity:
|
|
|
41
41
|
# Offense count: 40
|
|
42
42
|
# Configuration parameters: CountComments.
|
|
43
43
|
Metrics/MethodLength:
|
|
44
|
-
Max:
|
|
44
|
+
Max: 150
|
|
45
45
|
|
|
46
46
|
# Offense count: 1
|
|
47
47
|
# Configuration parameters: CountComments.
|
data/.travis.yml
CHANGED
data/fhir_models.gemspec
CHANGED
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.add_dependency 'nokogiri', '>= 1.8.2'
|
|
24
24
|
spec.add_dependency 'date_time_precision', '>= 0.8'
|
|
25
25
|
spec.add_dependency 'bcp47', '>= 0.3'
|
|
26
|
-
spec.add_dependency 'mime-types', '>=
|
|
26
|
+
spec.add_dependency 'mime-types', '>= 3.0'
|
|
27
27
|
|
|
28
28
|
spec.add_development_dependency 'bundler'
|
|
29
29
|
spec.add_development_dependency 'rake'
|
|
@@ -51,7 +51,7 @@ module FHIR
|
|
|
51
51
|
if !klass.nil? && !value.nil?
|
|
52
52
|
# handle array of objects
|
|
53
53
|
if value.is_a?(Array)
|
|
54
|
-
value.map
|
|
54
|
+
value = value.map do |child|
|
|
55
55
|
obj = child
|
|
56
56
|
unless [FHIR::RESOURCES, FHIR::TYPES].flatten.include? child.class.name.gsub('FHIR::', '')
|
|
57
57
|
obj = make_child(child, klass)
|
|
@@ -68,7 +68,7 @@ module FHIR
|
|
|
68
68
|
FHIR.logger.error("Unhandled and unrecognized class/type: #{meta['type']}")
|
|
69
69
|
elsif value.is_a?(Array)
|
|
70
70
|
# array of primitives
|
|
71
|
-
value.map
|
|
71
|
+
value = value.map { |child| convert_primitive(child, meta) }
|
|
72
72
|
instance_variable_set("@#{local_name}", value)
|
|
73
73
|
else
|
|
74
74
|
# single primitive
|
|
@@ -111,7 +111,7 @@ module FHIR
|
|
|
111
111
|
elsif FHIR::PRIMITIVES.include?(meta['type'])
|
|
112
112
|
primitive_meta = FHIR::PRIMITIVES[meta['type']]
|
|
113
113
|
if primitive_meta['type'] == 'number'
|
|
114
|
-
rval = BigDecimal
|
|
114
|
+
rval = BigDecimal(value.to_s)
|
|
115
115
|
rval = rval.frac.zero? ? rval.to_i : rval.to_f
|
|
116
116
|
end # primitive is number
|
|
117
117
|
end # boolean else
|
|
@@ -200,8 +200,8 @@ module FHIR
|
|
|
200
200
|
else
|
|
201
201
|
errors[field] << "#{meta['path']}: expected Reference, found #{klassname}"
|
|
202
202
|
end
|
|
203
|
-
# if the data type is a particular resource or complex type
|
|
204
|
-
elsif FHIR::RESOURCES.include?(datatype) || FHIR::TYPES.include?(datatype)
|
|
203
|
+
# if the data type is a particular resource or complex type or BackBone element within this resource
|
|
204
|
+
elsif FHIR::RESOURCES.include?(datatype) || FHIR::TYPES.include?(datatype) || v.class.name.start_with?(self.class.name)
|
|
205
205
|
if datatype == klassname
|
|
206
206
|
validation = v.validate(contained_here)
|
|
207
207
|
errors[field] << validation unless validation.empty?
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"mode": "consumer",
|
|
217
217
|
"documentation": "Basic rules for all documents in the EHR system",
|
|
218
218
|
"profile": {
|
|
219
|
-
"reference": "http://fhir.hl7.org/
|
|
219
|
+
"reference": "http://fhir.hl7.org/StructureDefinition/Profilebc054d23-75e1-4dc6-aca5-838b6b1ac81d/_history/b5fdd9fc-b021-4ea1-911a-721a60663796"
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
}
|
|
200
200
|
],
|
|
201
201
|
"payloadMimeType": [
|
|
202
|
-
"
|
|
202
|
+
"application/pdf"
|
|
203
203
|
],
|
|
204
204
|
"address": "https://sqlonfhir-dstu2.azurewebsites.net/fhir"
|
|
205
205
|
}
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
}
|
|
233
233
|
],
|
|
234
234
|
"payloadMimeType": [
|
|
235
|
-
"
|
|
235
|
+
"application/fhir+json"
|
|
236
236
|
],
|
|
237
237
|
"address": "127.0.0.1"
|
|
238
238
|
}
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
}
|
|
266
266
|
],
|
|
267
267
|
"payloadMimeType": [
|
|
268
|
-
"
|
|
268
|
+
"application/xml"
|
|
269
269
|
],
|
|
270
270
|
"address": "https://open.epic.com/Interface/XDS.b"
|
|
271
271
|
}
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
}
|
|
299
299
|
],
|
|
300
300
|
"payloadMimeType": [
|
|
301
|
-
"
|
|
301
|
+
"application/dicom"
|
|
302
302
|
],
|
|
303
303
|
"address": "https://pacs.hospital.org/dicomweb"
|
|
304
304
|
}
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
}
|
|
332
332
|
],
|
|
333
333
|
"payloadMimeType": [
|
|
334
|
-
"
|
|
334
|
+
"application/dicom"
|
|
335
335
|
],
|
|
336
336
|
"address": "https://pacs.hospital.org/dicomweb"
|
|
337
337
|
}
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
}
|
|
365
365
|
],
|
|
366
366
|
"payloadMimeType": [
|
|
367
|
-
"
|
|
367
|
+
"application/dicom"
|
|
368
368
|
],
|
|
369
369
|
"address": "https://pacs.hospital.org/dicomweb"
|
|
370
370
|
}
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
}
|
|
398
398
|
],
|
|
399
399
|
"payloadMimeType": [
|
|
400
|
-
"
|
|
400
|
+
"application/dicom"
|
|
401
401
|
],
|
|
402
402
|
"address": "https://pacs.hospital.org/dicomweb"
|
|
403
403
|
}
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
}
|
|
431
431
|
],
|
|
432
432
|
"payloadMimeType": [
|
|
433
|
-
"
|
|
433
|
+
"application/dicom"
|
|
434
434
|
],
|
|
435
435
|
"address": "https://pacs.hospital.org/wadoUri"
|
|
436
436
|
}
|
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
}
|
|
464
464
|
],
|
|
465
465
|
"payloadMimeType": [
|
|
466
|
-
"
|
|
466
|
+
"application/dicom"
|
|
467
467
|
],
|
|
468
468
|
"address": "https://pacs.hospital.org/IHEInvokeImageDisplay"
|
|
469
469
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
<!-- this is the important element: a reference to a published document profile
|
|
212
212
|
note that this is a version specific reference. -->
|
|
213
213
|
<profile>
|
|
214
|
-
<reference value="http://fhir.hl7.org/
|
|
214
|
+
<reference value="http://fhir.hl7.org/StructureDefinition/Profilebc054d23-75e1-4dc6-aca5-838b6b1ac81d/_history/b5fdd9fc-b021-4ea1-911a-721a60663796"/>
|
|
215
215
|
</profile>
|
|
216
216
|
</document>
|
|
217
217
|
</CapabilityStatement>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
<code value="CDA-EventSummary"/>
|
|
210
210
|
</coding>
|
|
211
211
|
</payloadType>
|
|
212
|
-
<payloadMimeType value="
|
|
212
|
+
<payloadMimeType value="application/pdf"/>
|
|
213
213
|
<address value="https://sqlonfhir-dstu2.azurewebsites.net/fhir"/>
|
|
214
214
|
</Endpoint>
|
|
215
215
|
</resource>
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
<code value="REF-I12"/>
|
|
245
245
|
</coding>
|
|
246
246
|
</payloadType>
|
|
247
|
-
<payloadMimeType value="
|
|
247
|
+
<payloadMimeType value="application/fhir+json"/>
|
|
248
248
|
<address value="127.0.0.1"/>
|
|
249
249
|
</Endpoint>
|
|
250
250
|
</resource>
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
<code value="CDA-EventSummary"/>
|
|
280
280
|
</coding>
|
|
281
281
|
</payloadType>
|
|
282
|
-
<payloadMimeType value="
|
|
282
|
+
<payloadMimeType value="application/xml"/>
|
|
283
283
|
<address value="https://open.epic.com/Interface/XDS.b"/>
|
|
284
284
|
</Endpoint>
|
|
285
285
|
</resource>
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
<code value="varies (application/dicom, application/dicom+xml, image/jpeg, and many more)"/>
|
|
315
315
|
</coding>
|
|
316
316
|
</payloadType>
|
|
317
|
-
<payloadMimeType value="
|
|
317
|
+
<payloadMimeType value="application/dicom"/>
|
|
318
318
|
<address value="https://pacs.hospital.org/dicomweb"/>
|
|
319
319
|
</Endpoint>
|
|
320
320
|
</resource>
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
<code value="varies (application/dicom, application/dicom+xml, image/jpeg, and many more)"/>
|
|
350
350
|
</coding>
|
|
351
351
|
</payloadType>
|
|
352
|
-
<payloadMimeType value="
|
|
352
|
+
<payloadMimeType value="application/dicom"/>
|
|
353
353
|
<address value="https://pacs.hospital.org/dicomweb"/>
|
|
354
354
|
</Endpoint>
|
|
355
355
|
</resource>
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
<code value="varies (application/dicom, application/dicom+xml, image/jpeg, and many more)"/>
|
|
385
385
|
</coding>
|
|
386
386
|
</payloadType>
|
|
387
|
-
<payloadMimeType value="
|
|
387
|
+
<payloadMimeType value="application/dicom"/>
|
|
388
388
|
<address value="https://pacs.hospital.org/dicomweb"/>
|
|
389
389
|
</Endpoint>
|
|
390
390
|
</resource>
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
<code value="varies (application/dicom, application/dicom+xml, image/jpeg, and many more)"/>
|
|
420
420
|
</coding>
|
|
421
421
|
</payloadType>
|
|
422
|
-
<payloadMimeType value="
|
|
422
|
+
<payloadMimeType value="application/dicom"/>
|
|
423
423
|
<address value="https://pacs.hospital.org/dicomweb"/>
|
|
424
424
|
</Endpoint>
|
|
425
425
|
</resource>
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
<code value="varies (application/dicom, application/dicom+xml, image/jpeg, and many more)"/>
|
|
455
455
|
</coding>
|
|
456
456
|
</payloadType>
|
|
457
|
-
<payloadMimeType value="
|
|
457
|
+
<payloadMimeType value="application/dicom"/>
|
|
458
458
|
<address value="https://pacs.hospital.org/wadoUri"/>
|
|
459
459
|
</Endpoint>
|
|
460
460
|
</resource>
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
<code value="varies (application/dicom, application/dicom+xml, image/jpeg, and many more)"/>
|
|
490
490
|
</coding>
|
|
491
491
|
</payloadType>
|
|
492
|
-
<payloadMimeType value="
|
|
492
|
+
<payloadMimeType value="application/dicom"/>
|
|
493
493
|
<address value="https://pacs.hospital.org/IHEInvokeImageDisplay"/>
|
|
494
494
|
</Endpoint>
|
|
495
495
|
</resource>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<!-- very often, the user won't have a known system - these aren't available
|
|
37
37
|
for security system log ons. But where you can define it, you should.
|
|
38
38
|
Most of the time the userId is fully qualfied such as an email address -->
|
|
39
|
-
<whoUri value="mailto
|
|
39
|
+
<whoUri value="mailto:hhd@ssa.gov"/>
|
|
40
40
|
</agent>
|
|
41
41
|
<signature>
|
|
42
42
|
<!-- verification signature -->
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -15,6 +15,20 @@ module FHIR
|
|
|
15
15
|
# Profile Validation
|
|
16
16
|
# -------------------------------------------------------------------------
|
|
17
17
|
|
|
18
|
+
class << self; attr_accessor :vs_validators end
|
|
19
|
+
@vs_validators = {}
|
|
20
|
+
def self.validates_vs(valueset_uri, &validator_fn)
|
|
21
|
+
@vs_validators[valueset_uri] = validator_fn
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.clear_validates_vs(valueset_uri)
|
|
25
|
+
@vs_validators.delete valueset_uri
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.clear_all_validates_vs
|
|
29
|
+
@vs_validators = {}
|
|
30
|
+
end
|
|
31
|
+
|
|
18
32
|
def validates_resource?(resource)
|
|
19
33
|
validate_resource(resource).empty?
|
|
20
34
|
end
|
|
@@ -147,6 +161,7 @@ module FHIR
|
|
|
147
161
|
if !element.type.empty? && element.path != id
|
|
148
162
|
# element.type not being empty implies data_type_found != nil, for valid profiles
|
|
149
163
|
codeable_concept_pattern = element.pattern && element.pattern.is_a?(FHIR::CodeableConcept)
|
|
164
|
+
codeable_concept_binding = element.binding
|
|
150
165
|
matching_pattern = false
|
|
151
166
|
nodes.each do |value|
|
|
152
167
|
matching_type = 0
|
|
@@ -169,7 +184,7 @@ module FHIR
|
|
|
169
184
|
temp_messages += @errors
|
|
170
185
|
@errors = temp
|
|
171
186
|
end
|
|
172
|
-
if verified_extension || verified_data_type
|
|
187
|
+
if data_type_found && (verified_extension || verified_data_type)
|
|
173
188
|
matching_type += 1
|
|
174
189
|
if data_type_found == 'code' # then check the binding
|
|
175
190
|
unless element.binding.nil?
|
|
@@ -183,11 +198,45 @@ module FHIR
|
|
|
183
198
|
matching_pattern = true if vcoding.system == pcoding.system && vcoding.code == pcoding.code
|
|
184
199
|
end
|
|
185
200
|
end
|
|
201
|
+
elsif data_type_found == 'CodeableConcept' && codeable_concept_binding
|
|
202
|
+
binding_issues =
|
|
203
|
+
if element.binding.strength == 'extensible'
|
|
204
|
+
@warnings
|
|
205
|
+
elsif element.binding.strength == 'required'
|
|
206
|
+
@errors
|
|
207
|
+
else # e.g., example-strength or unspecified
|
|
208
|
+
[] # Drop issues errors on the floor, in throwaway array
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
valueset_uri = element.binding && element.binding.valueSetReference && element.binding.valueSetReference.reference
|
|
212
|
+
vcc = FHIR::CodeableConcept.new(value)
|
|
213
|
+
if valueset_uri && self.class.vs_validators[valueset_uri]
|
|
214
|
+
check_fn = self.class.vs_validators[valueset_uri]
|
|
215
|
+
has_valid_code = vcc.coding && vcc.coding.any? { |c| check_fn.call(c) }
|
|
216
|
+
unless has_valid_code
|
|
217
|
+
binding_issues << "#{describe_element(element)} has no codings from #{valueset_uri}. Codings evaluated: #{vcc.to_json}"
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
unless has_valid_code
|
|
222
|
+
vcc.coding.each do |c|
|
|
223
|
+
check_fn = self.class.vs_validators[c.system]
|
|
224
|
+
if check_fn && !check_fn.call(c)
|
|
225
|
+
binding_issues << "#{describe_element(element)} has no codings from it's specified system: #{c.system}. "\
|
|
226
|
+
"Codings evaluated: #{vcc.to_json}"
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
186
231
|
elsif data_type_found == 'String' && !element.maxLength.nil? && (value.size > element.maxLength)
|
|
187
232
|
@errors << "#{describe_element(element)} exceed maximum length of #{element.maxLength}: #{value}"
|
|
188
233
|
end
|
|
189
|
-
|
|
234
|
+
elsif data_type_found
|
|
190
235
|
temp_messages << "#{describe_element(element)} is not a valid #{data_type_found}: '#{value}'"
|
|
236
|
+
else
|
|
237
|
+
# we don't know the data type... so we say "OK"
|
|
238
|
+
matching_type += 1
|
|
239
|
+
@warnings >> "Unable to guess data type for #{describe_element(element)}"
|
|
191
240
|
end
|
|
192
241
|
|
|
193
242
|
if matching_type <= 0
|
|
@@ -38,6 +38,54 @@ namespace :fhir do
|
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
desc 'shrink implementation guide'
|
|
42
|
+
task :shrinkig, [:file_path] do |_t, args|
|
|
43
|
+
file_path = args[:file_path]
|
|
44
|
+
files = Dir.glob(File.join(file_path, '*.json'))
|
|
45
|
+
files.each do |filename|
|
|
46
|
+
# Load each file
|
|
47
|
+
start = File.size(filename)
|
|
48
|
+
json = File.open(filename, 'r:UTF-8', &:read)
|
|
49
|
+
hash = JSON.parse(json)
|
|
50
|
+
|
|
51
|
+
# process each file
|
|
52
|
+
FHIR::Boot::Preprocess.pre_process_structuredefinition(hash) if 'StructureDefinition' == hash['resourceType']
|
|
53
|
+
FHIR::Boot::Preprocess.pre_process_valueset(hash) if 'ValueSet' == hash['resourceType']
|
|
54
|
+
FHIR::Boot::Preprocess.pre_process_codesystem(hash) if 'CodeSystem' == hash['resourceType']
|
|
55
|
+
FHIR::Boot::Preprocess.pre_process_searchparam(hash) if 'SearchParameter' == hash['resourceType']
|
|
56
|
+
FHIR::Boot::Preprocess.remove_fhir_comments(hash)
|
|
57
|
+
|
|
58
|
+
# if BlueButton, fix URLs
|
|
59
|
+
if 'StructureDefinition' == hash['resourceType']
|
|
60
|
+
# hash['url'].gsub!('http://hl7.org/fhir/StructureDefinition/','https://bluebutton.cms.gov/assets/ig/StructureDefinition-')
|
|
61
|
+
fix_blue_button_urls(hash)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Output the post processed file
|
|
65
|
+
f = File.open(filename, 'w:UTF-8')
|
|
66
|
+
f.write(JSON.pretty_unparse(hash))
|
|
67
|
+
f.close
|
|
68
|
+
finish = File.size(filename)
|
|
69
|
+
puts " Removed #{(start - finish) / 1024} KB" if start != finish
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def self.fix_blue_button_urls(hash)
|
|
74
|
+
hash.each do |key, value|
|
|
75
|
+
if value.is_a?(String)
|
|
76
|
+
if value.start_with?('http://hl7.org/fhir/StructureDefinition/bluebutton')
|
|
77
|
+
hash[key] = value.gsub('http://hl7.org/fhir/StructureDefinition/bluebutton', 'https://bluebutton.cms.gov/assets/ig/StructureDefinition-bluebutton')
|
|
78
|
+
end
|
|
79
|
+
elsif value.is_a?(Hash)
|
|
80
|
+
fix_blue_button_urls(value)
|
|
81
|
+
elsif value.is_a?(Array)
|
|
82
|
+
value.each do |v|
|
|
83
|
+
fix_blue_button_urls(v) if v.is_a?(Hash)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
41
89
|
desc 'copy artifacts from FHIR build'
|
|
42
90
|
task :update, [:fhir_build_path] do |_t, args|
|
|
43
91
|
fhir_build_path = args[:fhir_build_path]
|
data/lib/fhir_models/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fhir_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Walonoski
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: exe
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: nokogiri
|
|
@@ -61,20 +61,14 @@ dependencies:
|
|
|
61
61
|
requirements:
|
|
62
62
|
- - ">="
|
|
63
63
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: '
|
|
65
|
-
- - "<"
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '3'
|
|
64
|
+
version: '3.0'
|
|
68
65
|
type: :runtime
|
|
69
66
|
prerelease: false
|
|
70
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
71
68
|
requirements:
|
|
72
69
|
- - ">="
|
|
73
70
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '
|
|
75
|
-
- - "<"
|
|
76
|
-
- !ruby/object:Gem::Version
|
|
77
|
-
version: '3'
|
|
71
|
+
version: '3.0'
|
|
78
72
|
- !ruby/object:Gem::Dependency
|
|
79
73
|
name: bundler
|
|
80
74
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -1634,7 +1628,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1634
1628
|
version: '0'
|
|
1635
1629
|
requirements: []
|
|
1636
1630
|
rubyforge_project:
|
|
1637
|
-
rubygems_version: 2.
|
|
1631
|
+
rubygems_version: 2.7.7
|
|
1638
1632
|
signing_key:
|
|
1639
1633
|
specification_version: 4
|
|
1640
1634
|
summary: A Gem for handling FHIR models in ruby
|