onc_certification_g10_test_kit 3.8.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/inferno/terminology/expected_manifest.yml +58 -53
  3. data/lib/inferno/terminology/fhir_package_manager.rb +2 -1
  4. data/lib/inferno/terminology/loader.rb +7 -3
  5. data/lib/inferno/terminology/tasks/check_built_terminology.rb +17 -1
  6. data/lib/inferno/terminology/tasks/download_fhir_terminology.rb +2 -1
  7. data/lib/inferno/terminology/tasks/download_umls.rb +2 -1
  8. data/lib/inferno/terminology/tasks/expand_value_set_to_file.rb +1 -1
  9. data/lib/inferno/terminology/tasks/run_umls_jar.rb +2 -1
  10. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +185 -0
  11. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +4 -0
  12. data/lib/onc_certification_g10_test_kit/g10_options.rb +8 -0
  13. data/lib/onc_certification_g10_test_kit/igs/CodeSystem-observation-category.json +83 -0
  14. data/lib/onc_certification_g10_test_kit/igs/StructureDefinition-condition-assertedDate.json +280 -0
  15. data/lib/onc_certification_g10_test_kit/igs/ValueSet-observation-category.json +48 -0
  16. data/lib/onc_certification_g10_test_kit/igs/ValueSet-servicerequest-category.json +69 -0
  17. data/lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb +5 -0
  18. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +10 -9
  19. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +10 -9
  20. data/lib/onc_certification_g10_test_kit/profile_selector.rb +72 -46
  21. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +118 -21
  22. data/lib/onc_certification_g10_test_kit/short_id_manager.rb +2 -0
  23. data/lib/onc_certification_g10_test_kit/short_id_map.yml +579 -0
  24. data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +2 -1
  25. data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +33 -18
  26. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +46 -24
  27. data/lib/onc_certification_g10_test_kit/single_patient_us_core_6_api_group.rb +203 -0
  28. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +14 -4
  29. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +106 -31
  30. data/lib/onc_certification_g10_test_kit/version.rb +1 -1
  31. data/lib/onc_certification_g10_test_kit/well_known_capabilities_test.rb +1 -1
  32. data/lib/onc_certification_g10_test_kit.rb +14 -1
  33. metadata +13 -8
@@ -0,0 +1,280 @@
1
+ {
2
+ "resourceType": "StructureDefinition",
3
+ "id": "condition-assertedDate",
4
+ "extension": [
5
+ {
6
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
7
+ "valueCode": "pc"
8
+ },
9
+ {
10
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
11
+ "valueInteger": 1
12
+ }
13
+ ],
14
+ "url": "http://hl7.org/fhir/StructureDefinition/condition-assertedDate",
15
+ "version": "4.0.1",
16
+ "name": "assertedDate",
17
+ "title": "assertedDate",
18
+ "status": "draft",
19
+ "date": "2015-02-21",
20
+ "publisher": "Health Level Seven, Inc. - FHIR WG",
21
+ "contact": [
22
+ {
23
+ "telecom": [
24
+ {
25
+ "system": "url",
26
+ "value": "HL7"
27
+ }
28
+ ]
29
+ }
30
+ ],
31
+ "description": "The date on which the existence of the Condition was first asserted or acknowledged.",
32
+ "fhirVersion": "4.0.1",
33
+ "mapping": [
34
+ {
35
+ "identity": "rim",
36
+ "uri": "http://hl7.org/v3",
37
+ "name": "RIM Mapping"
38
+ }
39
+ ],
40
+ "kind": "complex-type",
41
+ "abstract": false,
42
+ "context": [
43
+ {
44
+ "type": "element",
45
+ "expression": "Condition"
46
+ }
47
+ ],
48
+ "type": "Extension",
49
+ "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
50
+ "derivation": "constraint",
51
+ "snapshot": {
52
+ "element": [
53
+ {
54
+ "id": "Extension",
55
+ "path": "Extension",
56
+ "short": "Date the condition was first asserted",
57
+ "definition": "The date on which the existence of the Condition was first asserted or acknowledged.",
58
+ "comment": "The assertedDate is in the context of the recording practitioner and might not be the same as the recordedDate.",
59
+ "min": 0,
60
+ "max": "1",
61
+ "base": {
62
+ "path": "Extension",
63
+ "min": 0,
64
+ "max": "*"
65
+ },
66
+ "condition": [
67
+ "ele-1"
68
+ ],
69
+ "constraint": [
70
+ {
71
+ "key": "ele-1",
72
+ "severity": "error",
73
+ "human": "All FHIR elements must have a @value or children",
74
+ "expression": "hasValue() or (children().count() > id.count())",
75
+ "xpath": "@value|f:*|h:div",
76
+ "source": "http://hl7.org/fhir/StructureDefinition/Element"
77
+ },
78
+ {
79
+ "key": "ext-1",
80
+ "severity": "error",
81
+ "human": "Must have either extensions or value[x], not both",
82
+ "expression": "extension.exists() != value.exists()",
83
+ "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
84
+ "source": "http://hl7.org/fhir/StructureDefinition/Extension"
85
+ }
86
+ ],
87
+ "isModifier": false
88
+ },
89
+ {
90
+ "id": "Extension.id",
91
+ "path": "Extension.id",
92
+ "representation": [
93
+ "xmlAttr"
94
+ ],
95
+ "short": "Unique id for inter-element referencing",
96
+ "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
97
+ "min": 0,
98
+ "max": "1",
99
+ "base": {
100
+ "path": "Element.id",
101
+ "min": 0,
102
+ "max": "1"
103
+ },
104
+ "type": [
105
+ {
106
+ "extension": [
107
+ {
108
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
109
+ "valueUrl": "string"
110
+ }
111
+ ],
112
+ "code": "http://hl7.org/fhirpath/System.String"
113
+ }
114
+ ],
115
+ "isModifier": false,
116
+ "isSummary": false,
117
+ "mapping": [
118
+ {
119
+ "identity": "rim",
120
+ "map": "n/a"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "id": "Extension.extension",
126
+ "path": "Extension.extension",
127
+ "slicing": {
128
+ "discriminator": [
129
+ {
130
+ "type": "value",
131
+ "path": "url"
132
+ }
133
+ ],
134
+ "description": "Extensions are always sliced by (at least) url",
135
+ "rules": "open"
136
+ },
137
+ "short": "Extension",
138
+ "definition": "An Extension",
139
+ "min": 0,
140
+ "max": "0",
141
+ "base": {
142
+ "path": "Element.extension",
143
+ "min": 0,
144
+ "max": "*"
145
+ },
146
+ "type": [
147
+ {
148
+ "code": "Extension"
149
+ }
150
+ ],
151
+ "constraint": [
152
+ {
153
+ "key": "ele-1",
154
+ "severity": "error",
155
+ "human": "All FHIR elements must have a @value or children",
156
+ "expression": "hasValue() or (children().count() > id.count())",
157
+ "xpath": "@value|f:*|h:div",
158
+ "source": "http://hl7.org/fhir/StructureDefinition/Element"
159
+ },
160
+ {
161
+ "key": "ext-1",
162
+ "severity": "error",
163
+ "human": "Must have either extensions or value[x], not both",
164
+ "expression": "extension.exists() != value.exists()",
165
+ "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
166
+ "source": "http://hl7.org/fhir/StructureDefinition/Extension"
167
+ }
168
+ ],
169
+ "isModifier": false,
170
+ "isSummary": false
171
+ },
172
+ {
173
+ "id": "Extension.url",
174
+ "path": "Extension.url",
175
+ "representation": [
176
+ "xmlAttr"
177
+ ],
178
+ "short": "identifies the meaning of the extension",
179
+ "definition": "Source of the definition for the extension code - a logical name or a URL.",
180
+ "comment": "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.",
181
+ "min": 1,
182
+ "max": "1",
183
+ "base": {
184
+ "path": "Extension.url",
185
+ "min": 1,
186
+ "max": "1"
187
+ },
188
+ "type": [
189
+ {
190
+ "extension": [
191
+ {
192
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
193
+ "valueUrl": "uri"
194
+ }
195
+ ],
196
+ "code": "http://hl7.org/fhirpath/System.String"
197
+ }
198
+ ],
199
+ "fixedUri": "http://hl7.org/fhir/StructureDefinition/condition-assertedDate",
200
+ "isModifier": false,
201
+ "isSummary": false,
202
+ "mapping": [
203
+ {
204
+ "identity": "rim",
205
+ "map": "N/A"
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "id": "Extension.value[x]",
211
+ "path": "Extension.value[x]",
212
+ "short": "Value of extension",
213
+ "definition": "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/extensibility.html) for a list).",
214
+ "min": 1,
215
+ "max": "1",
216
+ "base": {
217
+ "path": "Extension.value[x]",
218
+ "min": 0,
219
+ "max": "1"
220
+ },
221
+ "type": [
222
+ {
223
+ "code": "dateTime"
224
+ }
225
+ ],
226
+ "constraint": [
227
+ {
228
+ "key": "ele-1",
229
+ "severity": "error",
230
+ "human": "All FHIR elements must have a @value or children",
231
+ "expression": "hasValue() or (children().count() > id.count())",
232
+ "xpath": "@value|f:*|h:div",
233
+ "source": "http://hl7.org/fhir/StructureDefinition/Element"
234
+ }
235
+ ],
236
+ "isModifier": false,
237
+ "isSummary": false,
238
+ "mapping": [
239
+ {
240
+ "identity": "rim",
241
+ "map": "N/A"
242
+ }
243
+ ]
244
+ }
245
+ ]
246
+ },
247
+ "differential": {
248
+ "element": [
249
+ {
250
+ "id": "Extension",
251
+ "path": "Extension",
252
+ "short": "Date the condition was first asserted",
253
+ "definition": "The date on which the existence of the Condition was first asserted or acknowledged.",
254
+ "comment": "The assertedDate is in the context of the recording practitioner and might not be the same as the recordedDate.",
255
+ "min": 0,
256
+ "max": "1"
257
+ },
258
+ {
259
+ "id": "Extension.extension",
260
+ "path": "Extension.extension",
261
+ "max": "0"
262
+ },
263
+ {
264
+ "id": "Extension.url",
265
+ "path": "Extension.url",
266
+ "fixedUri": "http://hl7.org/fhir/StructureDefinition/condition-assertedDate"
267
+ },
268
+ {
269
+ "id": "Extension.value[x]",
270
+ "path": "Extension.value[x]",
271
+ "min": 1,
272
+ "type": [
273
+ {
274
+ "code": "dateTime"
275
+ }
276
+ ]
277
+ }
278
+ ]
279
+ }
280
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "resourceType" : "ValueSet",
3
+ "id" : "observation-category",
4
+ "meta" : {
5
+ "lastUpdated" : "2019-11-01T09:29:23.356+11:00",
6
+ "profile" : ["http://hl7.org/fhir/StructureDefinition/shareablevalueset"]
7
+ },
8
+ "text" : {
9
+ "status" : "generated",
10
+ "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>Observation Category Codes</h2><div><p>Observation Category codes.</p>\n</div><p>This value set includes codes from the following code systems:</p><ul><li>Include all codes defined in <a href=\"codesystem-observation-category.html\"><code>http://terminology.hl7.org/CodeSystem/observation-category</code></a></li></ul></div>"
11
+ },
12
+ "extension" : [{
13
+ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
14
+ "valueCode" : "oo"
15
+ },
16
+ {
17
+ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
18
+ "valueCode" : "draft"
19
+ },
20
+ {
21
+ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
22
+ "valueInteger" : 1
23
+ }],
24
+ "url" : "http://hl7.org/fhir/ValueSet/observation-category",
25
+ "identifier" : [{
26
+ "system" : "urn:ietf:rfc:3986",
27
+ "value" : "urn:oid:2.16.840.1.113883.4.642.3.403"
28
+ }],
29
+ "version" : "4.0.1",
30
+ "name" : "ObservationCategoryCodes",
31
+ "title" : "Observation Category Codes",
32
+ "status" : "draft",
33
+ "experimental" : false,
34
+ "date" : "2019-11-01T09:29:23+11:00",
35
+ "publisher" : "FHIR Project team",
36
+ "contact" : [{
37
+ "telecom" : [{
38
+ "system" : "url",
39
+ "value" : "http://hl7.org/fhir"
40
+ }]
41
+ }],
42
+ "description" : "Observation Category codes.",
43
+ "compose" : {
44
+ "include" : [{
45
+ "system" : "http://terminology.hl7.org/CodeSystem/observation-category"
46
+ }]
47
+ }
48
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "resourceType" : "ValueSet",
3
+ "id" : "servicerequest-category",
4
+ "meta" : {
5
+ "lastUpdated" : "2019-11-01T09:29:23.356+11:00",
6
+ "profile" : ["http://hl7.org/fhir/StructureDefinition/shareablevalueset"]
7
+ },
8
+ "text" : {
9
+ "status" : "generated",
10
+ "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>Service Request Category Codes</h2><div><p>An example value set of SNOMED CT concepts that can classify a requested service</p>\n</div><p><b>Copyright Statement:</b></p><div><p>This specification includes content from SNOMED Clinical Terms® (SNOMED CT®) which is copyright of the International Health Terminology Standards Development Organisation (IHTSDO). Implementers of these specifications must have the appropriate SNOMED CT Affiliate license - for more information contact http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org.</p>\n</div><p>This value set includes codes from the following code systems:</p><ul><li>Include these codes as defined in <a href=\"http://www.snomed.org/\"><code>http://snomed.info/sct</code></a><table class=\"none\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td></tr><tr><td><a href=\"http://browser.ihtsdotools.org/?perspective=full&amp;conceptId1=108252007\">108252007</a></td><td>Laboratory procedure</td><td/></tr><tr><td><a href=\"http://browser.ihtsdotools.org/?perspective=full&amp;conceptId1=363679005\">363679005</a></td><td>Imaging</td><td/></tr><tr><td><a href=\"http://browser.ihtsdotools.org/?perspective=full&amp;conceptId1=409063005\">409063005</a></td><td>Counselling</td><td/></tr><tr><td><a href=\"http://browser.ihtsdotools.org/?perspective=full&amp;conceptId1=409073007\">409073007</a></td><td>Education</td><td/></tr><tr><td><a href=\"http://browser.ihtsdotools.org/?perspective=full&amp;conceptId1=387713003\">387713003</a></td><td>Surgical procedure</td><td/></tr></table></li></ul></div>"
11
+ },
12
+ "extension" : [{
13
+ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
14
+ "valueCode" : "oo"
15
+ },
16
+ {
17
+ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
18
+ "valueCode" : "draft"
19
+ },
20
+ {
21
+ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
22
+ "valueInteger" : 1
23
+ }],
24
+ "url" : "http://hl7.org/fhir/ValueSet/servicerequest-category",
25
+ "identifier" : [{
26
+ "system" : "urn:ietf:rfc:3986",
27
+ "value" : "urn:oid:2.16.840.1.113883.4.642.3.434"
28
+ }],
29
+ "version" : "4.0.1",
30
+ "name" : "ServiceRequestCategoryCodes",
31
+ "title" : "Service Request Category Codes",
32
+ "status" : "draft",
33
+ "experimental" : false,
34
+ "date" : "2019-11-01T09:29:23+11:00",
35
+ "publisher" : "Orders and Observations Workgroup",
36
+ "contact" : [{
37
+ "telecom" : [{
38
+ "system" : "url",
39
+ "value" : "http://www.hl7.org/Special/committees/orders/index.cfm"
40
+ }]
41
+ }],
42
+ "description" : "An example value set of SNOMED CT concepts that can classify a requested service",
43
+ "copyright" : "This specification includes content from SNOMED Clinical Terms® (SNOMED CT®) which is copyright of the International Health Terminology Standards Development Organisation (IHTSDO). Implementers of these specifications must have the appropriate SNOMED CT Affiliate license - for more information contact http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org.",
44
+ "compose" : {
45
+ "include" : [{
46
+ "system" : "http://snomed.info/sct",
47
+ "concept" : [{
48
+ "code" : "108252007",
49
+ "display" : "Laboratory procedure"
50
+ },
51
+ {
52
+ "code" : "363679005",
53
+ "display" : "Imaging"
54
+ },
55
+ {
56
+ "code" : "409063005",
57
+ "display" : "Counselling"
58
+ },
59
+ {
60
+ "code" : "409073007",
61
+ "display" : "Education"
62
+ },
63
+ {
64
+ "code" : "387713003",
65
+ "display" : "Surgical procedure"
66
+ }]
67
+ }]
68
+ }
69
+ }
@@ -34,9 +34,14 @@ module ONCCertificationG10TestKit
34
34
  V5_POSSIBLE_RESOURCES =
35
35
  (POSSIBLE_RESOURCES + ['Encounter', 'ServiceRequest']).freeze
36
36
 
37
+ V6_POSSIBLE_RESOURCES =
38
+ (V5_POSSIBLE_RESOURCES + ['Specimen', 'Coverage', 'MedicationDispense']).freeze
39
+
37
40
  def possible_resources
38
41
  return V5_POSSIBLE_RESOURCES if using_us_core_5?
39
42
 
43
+ return V6_POSSIBLE_RESOURCES if using_us_core_6?
44
+
40
45
  POSSIBLE_RESOURCES
41
46
  end
42
47
 
@@ -21,19 +21,20 @@ module ONCCertificationG10TestKit
21
21
  )
22
22
 
23
23
  description %(
24
- Demonstrate the ability to export clinical data for multiple patients in
25
- a group using [FHIR Bulk Data Access
26
- IG](http://hl7.org/fhir/uv/bulkdata/STU1.0.1/). This test uses [Backend Services
24
+ Demonstrate the ability to export clinical data for multiple patients in a
25
+ group using [FHIR Bulk Data Access
26
+ IG](http://hl7.org/fhir/uv/bulkdata/STU1.0.1/). This test uses [Backend
27
+ Services
27
28
  Authorization](http://hl7.org/fhir/uv/bulkdata/STU1.0.1/authorization/index.html)
28
29
  to obtain an access token from the server. After authorization, a group
29
30
  level bulk data export request is initialized. Finally, this test reads
30
- exported NDJSON files from the server and validates the resources in
31
- each file. To run the test successfully, the selected group export is
32
- required to have every type of resource mapped to [USCDI data
31
+ exported NDJSON files from the server and validates the resources in each
32
+ file. To run the test successfully, the selected group export is required
33
+ to have resources conforming to every profile mapped to [USCDI data
33
34
  elements](https://www.healthit.gov/isa/us-core-data-interoperability-uscdi).
34
- Additionally, it is expected the server will provide Encounter,
35
- Location, Organization, and Practitioner resources as they are
36
- referenced as must support elements in required resources.
35
+ Additionally, it is expected the server will provide Encounter, Location,
36
+ Organization, and Practitioner resources as they are referenced as must
37
+ support elements in required resources.
37
38
  )
38
39
  id :multi_patient_api
39
40
  run_as_group
@@ -21,19 +21,20 @@ module ONCCertificationG10TestKit
21
21
  )
22
22
 
23
23
  description %(
24
- Demonstrate the ability to export clinical data for multiple patients in
25
- a group using [FHIR Bulk Data Access
26
- IG](https://hl7.org/fhir/uv/bulkdata/STU2/). This test uses [Backend Services
24
+ Demonstrate the ability to export clinical data for multiple patients in a
25
+ group using [FHIR Bulk Data Access
26
+ IG](https://hl7.org/fhir/uv/bulkdata/STU2/). This test uses [Backend
27
+ Services
27
28
  Authorization](http://www.hl7.org/fhir/smart-app-launch/backend-services.html)
28
29
  to obtain an access token from the server. After authorization, a group
29
30
  level bulk data export request is initialized. Finally, this test reads
30
- exported NDJSON files from the server and validates the resources in
31
- each file. To run the test successfully, the selected group export is
32
- required to have every type of resource mapped to [USCDI data
31
+ exported NDJSON files from the server and validates the resources in each
32
+ file. To run the test successfully, the selected group export is required
33
+ to have resources conforming to every profile mapped to [USCDI data
33
34
  elements](https://www.healthit.gov/isa/us-core-data-interoperability-uscdi).
34
- Additionally, it is expected the server will provide Encounter,
35
- Location, Organization, and Practitioner resources as they are
36
- referenced as must support elements in required resources.
35
+ Additionally, it is expected the server will provide Encounter, Location,
36
+ Organization, and Practitioner resources as they are referenced as must
37
+ support elements in required resources.
37
38
  )
38
39
  id :multi_patient_api_stu2
39
40
  run_as_group