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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 684b1d3bb5e7e1b863449d65f09aab2f87050dbc3145e700b735e983ff1c363f
4
- data.tar.gz: 808259cb62b506e6c432ae2ef0d1878920131fff49e31cd70b43e8c05dce6fb8
3
+ metadata.gz: 2525b2baf952aee11b7ea83097aa3e90e7b41ce6a8e1f423a6c5c5449121f720
4
+ data.tar.gz: 7a6b0ba8da7ca7a63bb3faf2baadd6572efd5f56e98ca0f53145e4cfcd06cff4
5
5
  SHA512:
6
- metadata.gz: 430f9a8267a7fc1aaead33250a258fe7b6c99d6459dee03ecefb60af440668b7390ba2f09ee9a3d6953034d0da0094a09de4cc718602bdeb5466adac391f292e
7
- data.tar.gz: 523348bc9d83e1e12e72e4359607d38c4380c7b1fcb87101a83ff38299e625c907cad4cd62af1cd0a90fe0a04d24e56f5f1cef278bf40067065fc89185ede8b5
6
+ metadata.gz: 6a7dcb2f51e58c49e79ddf73c1e52bfee9e1f1b06ed20ded7c756604bbeaf1466df79380e240d9dd80963e2c03fc5be44d0ce9bf84dbc7fdeac35fd4cdcb0353
7
+ data.tar.gz: dc384fa0d44d2a1adf882626a5c92c5ee61872bcfd356020bcd5105fcc389f71d6830c3df93df8dd4ae08a4074e9a3baf4f89caf696aec703a8acffa1616487d
@@ -121,7 +121,7 @@
121
121
  - http://hl7.org/fhir/composition-status
122
122
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-documentreference-type
123
123
  :file: hl7_org_fhir_us_core_ValueSet_us-core-documentreference-type.msgpack
124
- :count: 11042
124
+ :count: 11418
125
125
  :type: bloom
126
126
  :code_systems:
127
127
  - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
@@ -134,7 +134,7 @@
134
134
  - http://hl7.org/fhir/document-relationship-type
135
135
  - :url: http://hl7.org/fhir/ValueSet/mimetypes
136
136
  :file: hl7_org_fhir_ValueSet_mimetypes.msgpack
137
- :count: 2382
137
+ :count: 2503
138
138
  :type: bloom
139
139
  :code_systems:
140
140
  - urn:ietf:bcp:13
@@ -354,30 +354,6 @@
354
354
  :code_systems:
355
355
  - http://terminology.hl7.org/CodeSystem/condition-category
356
356
  - http://hl7.org/fhir/us/core/CodeSystem/condition-category
357
- - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-diagnosticreport-category
358
- :file: hl7_org_fhir_us_core_ValueSet_us-core-diagnosticreport-category.msgpack
359
- :count: 3
360
- :type: bloom
361
- :code_systems:
362
- - http://loinc.org
363
- - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-documentreference-category
364
- :file: hl7_org_fhir_us_core_ValueSet_us-core-documentreference-category.msgpack
365
- :count: 1
366
- :type: bloom
367
- :code_systems:
368
- - http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category
369
- - :url: http://hl7.org/fhir/ValueSet/medicationrequest-category
370
- :file: hl7_org_fhir_ValueSet_medicationrequest-category.msgpack
371
- :count: 4
372
- :type: bloom
373
- :code_systems:
374
- - http://terminology.hl7.org/CodeSystem/medicationrequest-category
375
- - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-tags
376
- :file: hl7_org_fhir_us_core_ValueSet_us-core-tags.msgpack
377
- :count: 1
378
- :type: bloom
379
- :code_systems:
380
- - http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
381
357
  - :url: http://hl7.org/fhir/ValueSet/questionnaire-answers-status
382
358
  :file: hl7_org_fhir_ValueSet_questionnaire-answers-status.msgpack
383
359
  :count: 5
@@ -390,13 +366,37 @@
390
366
  :type: bloom
391
367
  :code_systems:
392
368
  - http://hl7.org/fhir/request-intent
393
- - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-servicerequest-category
394
- :file: hl7_org_fhir_us_core_ValueSet_us-core-servicerequest-category.msgpack
395
- :count: 8
369
+ - :url: http://hl7.org/fhir/ValueSet/fm-status
370
+ :file: hl7_org_fhir_ValueSet_fm-status.msgpack
371
+ :count: 4
372
+ :type: bloom
373
+ :code_systems:
374
+ - http://hl7.org/fhir/fm-status
375
+ - :url: http://hl7.org/fhir/ValueSet/medicationdispense-status
376
+ :file: hl7_org_fhir_ValueSet_medicationdispense-status.msgpack
377
+ :count: 9
378
+ :type: bloom
379
+ :code_systems:
380
+ - http://terminology.hl7.org/CodeSystem/medicationdispense-status
381
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-clinical-result-observation-category
382
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-clinical-result-observation-category.msgpack
383
+ :count: 7
384
+ :type: bloom
385
+ :code_systems:
386
+ - http://terminology.hl7.org/CodeSystem/observation-category
387
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1240.3
388
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_113762_1_4_1240_3.msgpack
389
+ :count: 4
396
390
  :type: bloom
397
391
  :code_systems:
398
- - http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
399
392
  - http://snomed.info/sct
393
+ - http://terminology.hl7.org/CodeSystem/data-absent-reason
394
+ - :url: http://hl7.org/fhir/ValueSet/specimen-status
395
+ :file: hl7_org_fhir_ValueSet_specimen-status.msgpack
396
+ :count: 4
397
+ :type: bloom
398
+ :code_systems:
399
+ - http://hl7.org/fhir/specimen-status
400
400
  - :url: http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
401
401
  :file: terminology_hl7_org_CodeSystem_allergyintolerance-clinical.msgpack
402
402
  :count: 3
@@ -504,7 +504,7 @@
504
504
  :code_systems: http://terminology.hl7.org/CodeSystem/v3-NullFlavor
505
505
  - :url: http://loinc.org
506
506
  :file: loinc_org.msgpack
507
- :count: 283408
507
+ :count: 287148
508
508
  :type: bloom
509
509
  :code_systems: http://loinc.org
510
510
  - :url: http://hl7.org/fhir/document-relationship-type
@@ -514,7 +514,7 @@
514
514
  :code_systems: http://hl7.org/fhir/document-relationship-type
515
515
  - :url: urn:ietf:bcp:13
516
516
  :file: urn_ietf_bcp_13.msgpack
517
- :count: 2382
517
+ :count: 2503
518
518
  :type: bloom
519
519
  :code_systems: urn:ietf:bcp:13
520
520
  - :url: http://hl7.org/fhir/identifier-use
@@ -597,11 +597,6 @@
597
597
  :count: 4
598
598
  :type: bloom
599
599
  :code_systems: http://hl7.org/fhir/quantity-comparator
600
- - :url: http://unitsofmeasure.org
601
- :file: unitsofmeasure_org.msgpack
602
- :count: 1443
603
- :type: bloom
604
- :code_systems: http://unitsofmeasure.org
605
600
  - :url: http://hl7.org/fhir/name-use
606
601
  :file: hl7_org_fhir_name-use.msgpack
607
602
  :count: 7
@@ -652,28 +647,38 @@
652
647
  :count: 2
653
648
  :type: bloom
654
649
  :code_systems: http://hl7.org/fhir/us/core/CodeSystem/condition-category
655
- - :url: http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category
656
- :file: hl7_org_fhir_us_core_CodeSystem_us-core-documentreference-category.msgpack
657
- :count: 1
658
- :type: bloom
659
- :code_systems: http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category
660
- - :url: http://terminology.hl7.org/CodeSystem/medicationrequest-category
661
- :file: terminology_hl7_org_CodeSystem_medicationrequest-category.msgpack
662
- :count: 4
663
- :type: bloom
664
- :code_systems: http://terminology.hl7.org/CodeSystem/medicationrequest-category
665
- - :url: http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
666
- :file: hl7_org_fhir_us_core_CodeSystem_us-core-tags.msgpack
667
- :count: 1
668
- :type: bloom
669
- :code_systems: http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
670
650
  - :url: http://hl7.org/fhir/questionnaire-answers-status
671
651
  :file: hl7_org_fhir_questionnaire-answers-status.msgpack
672
652
  :count: 5
673
653
  :type: bloom
674
654
  :code_systems: http://hl7.org/fhir/questionnaire-answers-status
655
+ - :url: http://hl7.org/fhir/fm-status
656
+ :file: hl7_org_fhir_fm-status.msgpack
657
+ :count: 4
658
+ :type: bloom
659
+ :code_systems: http://hl7.org/fhir/fm-status
660
+ - :url: http://terminology.hl7.org/CodeSystem/medicationdispense-status
661
+ :file: terminology_hl7_org_CodeSystem_medicationdispense-status.msgpack
662
+ :count: 9
663
+ :type: bloom
664
+ :code_systems: http://terminology.hl7.org/CodeSystem/medicationdispense-status
665
+ - :url: http://terminology.hl7.org/CodeSystem/observation-category
666
+ :file: terminology_hl7_org_CodeSystem_observation-category.msgpack
667
+ :count: 9
668
+ :type: bloom
669
+ :code_systems: http://terminology.hl7.org/CodeSystem/observation-category
675
670
  - :url: http://snomed.info/sct
676
671
  :file: snomed_info_sct.msgpack
677
- :count: 498684
672
+ :count: 508538
678
673
  :type: bloom
679
674
  :code_systems: http://snomed.info/sct
675
+ - :url: http://terminology.hl7.org/CodeSystem/data-absent-reason
676
+ :file: terminology_hl7_org_CodeSystem_data-absent-reason.msgpack
677
+ :count: 15
678
+ :type: bloom
679
+ :code_systems: http://terminology.hl7.org/CodeSystem/data-absent-reason
680
+ - :url: http://hl7.org/fhir/specimen-status
681
+ :file: hl7_org_fhir_specimen-status.msgpack
682
+ :count: 4
683
+ :type: bloom
684
+ :code_systems: http://hl7.org/fhir/specimen-status
@@ -18,7 +18,8 @@ module Inferno
18
18
  'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1',
19
19
  'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1021.102',
20
20
  'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1021.103',
21
- 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.2074.1.1.3'
21
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.2074.1.1.3',
22
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1240.3'
22
23
  # The ValueSets below are needed when building all of the terminology
23
24
  # rather than only the terminology for required bindings.
24
25
  # 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1186.8',
@@ -28,7 +28,10 @@ module Inferno
28
28
  'http://hl7.org/fhir/ValueSet/example-intensional', # Unhandled filter parent =
29
29
  'http://hl7.org/fhir/ValueSet/use-context', # ValueSet contains an unknown ValueSet
30
30
  'http://hl7.org/fhir/ValueSet/media-modality', # ValueSet contains an unknown ValueSet
31
- 'http://hl7.org/fhir/ValueSet/example-hierarchical' # Example valueset with fake codes
31
+ 'http://hl7.org/fhir/ValueSet/example-hierarchical', # Example valueset with fake codes
32
+ # We don't perform code system validation, this code system is no longer
33
+ # in UMLS, and this bloom filter was not being correctly generated anyway
34
+ 'http://unitsofmeasure.org'
32
35
  ].freeze
33
36
 
34
37
  @value_sets_repo = Inferno::Repositories::ValueSets.new
@@ -146,7 +149,7 @@ module Inferno
146
149
  Inferno.logger.warn "#{e.message} for CodeSystem #{cs_name}"
147
150
  next
148
151
  end
149
- end
152
+ end.compact
150
153
  validators = (vs_validators + cs_validators).compact
151
154
 
152
155
  # Write manifest for loading later
@@ -195,7 +198,8 @@ module Inferno
195
198
  all_metadata =
196
199
  USCoreTestKit::USCoreV311::USCoreTestSuite.metadata +
197
200
  USCoreTestKit::USCoreV400::USCoreTestSuite.metadata +
198
- USCoreTestKit::USCoreV501::USCoreTestSuite.metadata
201
+ USCoreTestKit::USCoreV501::USCoreTestSuite.metadata +
202
+ USCoreTestKit::USCoreV610::USCoreTestSuite.metadata
199
203
 
200
204
  all_metadata =
201
205
  all_metadata
@@ -34,6 +34,13 @@ module Inferno
34
34
  mismatched_value_sets.each do |value_set|
35
35
  Inferno.logger.info mismatched_value_set_message(value_set)
36
36
  end
37
+
38
+ return unless new_value_sets.present?
39
+
40
+ Inferno.logger.info("\nThe following unexpected value set validators were created:")
41
+ new_value_sets.each do |value_set|
42
+ Inferno.logger.info("#{value_set[:url]}: #{value_set[:count]} codes")
43
+ end
37
44
  end
38
45
 
39
46
  def expected_manifest
@@ -48,7 +55,7 @@ module Inferno
48
55
  def new_manifest
49
56
  return [] unless File.exist? new_manifest_path
50
57
 
51
- YAML.load_file(new_manifest_path)
58
+ @new_manifest ||= YAML.load_file(new_manifest_path)
52
59
  end
53
60
 
54
61
  def mismatched_value_sets
@@ -59,10 +66,19 @@ module Inferno
59
66
  end
60
67
  end
61
68
 
69
+ def new_value_sets
70
+ @new_value_sets ||=
71
+ new_manifest.reject { |value_set| old_value_set?(value_set[:url]) }
72
+ end
73
+
62
74
  def new_value_set(url)
63
75
  new_manifest.find { |value_set| value_set[:url] == url }
64
76
  end
65
77
 
78
+ def old_value_set?(url)
79
+ expected_manifest.any? { |value_set| value_set[:url] == url }
80
+ end
81
+
66
82
  def only_non_umls_mismatch?
67
83
  mismatched_value_sets.all? { |value_set| NON_UMLS_SYSTEMS.include? value_set[:url] }
68
84
  end
@@ -18,8 +18,9 @@ module Inferno
18
18
  FHIRPackageManager.get_package('hl7.fhir.us.core#3.1.1', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
19
19
  FHIRPackageManager.get_package('hl7.fhir.us.core#4.0.0', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
20
20
  FHIRPackageManager.get_package('hl7.fhir.us.core#5.0.1', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
21
+ FHIRPackageManager.get_package('hl7.fhir.us.core#6.1.0', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
21
22
  FHIRPackageManager.get_package(
22
- 'us.nlm.vsac#0.7.0', File.join(PACKAGE_DIR, 'vsac'), ['ValueSet', 'CodeSystem']
23
+ 'us.nlm.vsac#0.11.0', File.join(PACKAGE_DIR, 'vsac'), ['ValueSet', 'CodeSystem']
23
24
  )
24
25
  end
25
26
 
@@ -12,7 +12,8 @@ module Inferno
12
12
  '2019' => 'https://download.nlm.nih.gov/umls/kss/2019AB/umls-2019AB-full.zip',
13
13
  '2020' => 'https://download.nlm.nih.gov/umls/kss/2020AB/umls-2020AB-full.zip',
14
14
  '2021' => 'https://download.nlm.nih.gov/umls/kss/2021AA/umls-2021AA-full.zip',
15
- '2022' => 'https://download.nlm.nih.gov/umls/kss/2022AA/umls-2022AA-full.zip'
15
+ '2022' => 'https://download.nlm.nih.gov/umls/kss/2022AA/umls-2022AA-full.zip',
16
+ '2023' => 'https://download.nlm.nih.gov/umls/kss/2023AA/umls-2023AA-full.zip'
16
17
  }.freeze
17
18
  TICKET_GRANTING_TICKET_URL = 'https://utslogin.nlm.nih.gov/cas/v1/api-key'.freeze
18
19
 
@@ -16,7 +16,7 @@ module Inferno
16
16
  # Before writing the JSON to a file at the end
17
17
  end_vs = nil if type == 'json'
18
18
 
19
- %w[2022].each do |version|
19
+ %w[2023].each do |version|
20
20
  Loader.register_umls_db File.join(TEMP_DIR, version, 'umls.db')
21
21
  Loader.load_value_sets_from_directory(PACKAGE_DIR, true)
22
22
  vs = Repositories::ValueSets.new.find(value_set_url)
@@ -12,7 +12,8 @@ module Inferno
12
12
  '2019' => 'inferno_2019.prop',
13
13
  '2020' => 'inferno_2020.prop',
14
14
  '2021' => 'inferno_2021.prop',
15
- '2022' => 'inferno_2022.prop'
15
+ '2022' => 'inferno_2022.prop',
16
+ '2023' => 'inferno_2023.prop'
16
17
  }.freeze
17
18
 
18
19
  attr_reader :version
@@ -414,6 +414,26 @@ module ONCCertificationG10TestKit
414
414
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate
415
415
  * http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate
416
416
 
417
+ For US Core v6.1.0, this test expects evidence of the following US Core profiles
418
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
419
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-occupation
420
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancyintent
421
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancystatus
422
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-screening-assessment
423
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-sexual-orientation
424
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus
425
+ * http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile
426
+ * http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age
427
+ * http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height
428
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure
429
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-bmi
430
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-height
431
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature
432
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-weight
433
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-head-circumference
434
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate
435
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
436
+ * http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate
417
437
  DESCRIPTION
418
438
 
419
439
  include BulkExportValidationTester
@@ -658,5 +678,170 @@ module ONCCertificationG10TestKit
658
678
  perform_bulk_export_validation
659
679
  end
660
680
  end
681
+
682
+ test do
683
+ title 'ServiceRequest resources returned conform to the US Core ServiceRequest Profile'
684
+ description <<~DESCRIPTION
685
+ This test verifies that the resources returned from bulk data export
686
+ conform to the US Core ServiceRequest profile. This includes checking
687
+ for missing data elements and value set verification.
688
+ DESCRIPTION
689
+
690
+ id :g10_us_core_6_bulk_service_request_validation
691
+
692
+ required_suite_options G10Options::US_CORE_6_REQUIREMENT
693
+
694
+ include BulkExportValidationTester
695
+
696
+ def resource_type
697
+ 'ServiceRequest'
698
+ end
699
+
700
+ run do
701
+ perform_bulk_export_validation
702
+ end
703
+ end
704
+
705
+ test do
706
+ title 'RelatedPerson resources returned conform to the US Core RelatedPerson Profile'
707
+ description <<~DESCRIPTION
708
+ This test verifies that the resources returned from bulk data export
709
+ conform to the US Core RelatedPerson profile. This includes checking
710
+ for missing data elements and value set verification.
711
+ DESCRIPTION
712
+
713
+ required_suite_options G10Options::US_CORE_6_REQUIREMENT
714
+
715
+ id :g10_us_core_6_bulk_related_person_validation
716
+
717
+ include BulkExportValidationTester
718
+
719
+ def resource_type
720
+ 'RelatedPerson'
721
+ end
722
+
723
+ run do
724
+ perform_bulk_export_validation
725
+ end
726
+ end
727
+
728
+ test do
729
+ title 'QuestionnaireResponse resources returned conform to the US Core QuestionnaireResponse Profile if ' \
730
+ 'bulk data has QuestionnaireResponse resources'
731
+ description <<~DESCRIPTION
732
+ This test verifies that the resources returned from bulk data export
733
+ conform to the US Core QuestionnaireResponse profile. This includes checking for missing
734
+ data elements and value set verification. This test is omitted if bulk
735
+ data export does not return any QuestionnaireResponse resources.
736
+ DESCRIPTION
737
+
738
+ required_suite_options G10Options::US_CORE_6_REQUIREMENT
739
+
740
+ id :g10_us_core_6_bulk_questionnaire_response_validation
741
+
742
+ include BulkExportValidationTester
743
+
744
+ def resource_type
745
+ 'QuestionnaireResponse'
746
+ end
747
+
748
+ run do
749
+ perform_bulk_export_validation
750
+ end
751
+ end
752
+
753
+ test do
754
+ title 'PractionerRole resources returned conform to the US Core PractionerRole Profile if bulk data export ' \
755
+ 'has PractionerRole resources'
756
+ description <<~DESCRIPTION
757
+ This test verifies that the resources returned from bulk data export
758
+ conform to the US Core PractitionerRole profile. This includes checking for missing
759
+ data elements and value set verification. This test is omitted if bulk
760
+ data export does not return any resources.
761
+ DESCRIPTION
762
+
763
+ required_suite_options G10Options::US_CORE_6_REQUIREMENT
764
+
765
+ id :g10_us_core_6_bulk_practitioner_role_validation
766
+
767
+ include BulkExportValidationTester
768
+
769
+ def resource_type
770
+ 'PractitionerRole'
771
+ end
772
+
773
+ run do
774
+ perform_bulk_export_validation
775
+ end
776
+ end
777
+
778
+ test do
779
+ title 'Coverage resources returned conform to the US Core Coverage Profile'
780
+ description <<~DESCRIPTION
781
+ This test verifies that the resources returned from bulk data export
782
+ conform to the US Core Coverage profile. This includes checking
783
+ for missing data elements and value set verification.
784
+ DESCRIPTION
785
+
786
+ required_suite_options G10Options::US_CORE_6_REQUIREMENT
787
+
788
+ id :g10_us_core_6_bulk_coverage_validation
789
+
790
+ include BulkExportValidationTester
791
+
792
+ def resource_type
793
+ 'Coverage'
794
+ end
795
+
796
+ run do
797
+ perform_bulk_export_validation
798
+ end
799
+ end
800
+
801
+ test do
802
+ title 'MedicationDispense resources returned conform to the US Core MedicationDispense Profile'
803
+ description <<~DESCRIPTION
804
+ This test verifies that the resources returned from bulk data export
805
+ conform to the US Core MedicationDispense profile. This includes checking
806
+ for missing data elements and value set verification.
807
+ DESCRIPTION
808
+
809
+ required_suite_options G10Options::US_CORE_6_REQUIREMENT
810
+
811
+ id :g10_us_core_6_bulk_medication_dispense_validation
812
+
813
+ include BulkExportValidationTester
814
+
815
+ def resource_type
816
+ 'MedicationDispense'
817
+ end
818
+
819
+ run do
820
+ perform_bulk_export_validation
821
+ end
822
+ end
823
+
824
+ test do
825
+ title 'Specimen resources returned conform to the US Core Specimen Profile'
826
+ description <<~DESCRIPTION
827
+ This test verifies that the resources returned from bulk data export
828
+ conform to the US Core Specimen profile. This includes checking
829
+ for missing data elements and value set verification.
830
+ DESCRIPTION
831
+
832
+ required_suite_options G10Options::US_CORE_6_REQUIREMENT
833
+
834
+ id :g10_us_core_6_bulk_specimen_validation
835
+
836
+ include BulkExportValidationTester
837
+
838
+ def resource_type
839
+ 'Specimen'
840
+ end
841
+
842
+ run do
843
+ perform_bulk_export_validation
844
+ end
845
+ end
661
846
  end
662
847
  end
@@ -11,12 +11,16 @@ module ONCCertificationG10TestKit
11
11
  MAX_NUM_COLLECTED_LINES = 100
12
12
  MIN_RESOURCE_COUNT = 2
13
13
  OMIT_KLASS = ['Medication', 'Location', 'QuestionnaireResponse', 'PractitionerRole'].freeze
14
+ PROFILES_TO_SKIP = [
15
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-simple-observation'
16
+ ].freeze
14
17
 
15
18
  def metadata_list
16
19
  @metadata_list ||=
17
20
  versioned_us_core_module::USCoreTestSuite
18
21
  .metadata
19
22
  .select { |metadata| metadata.resource == resource_type }
23
+ .reject { |metadata| PROFILES_TO_SKIP.include? metadata.profile_url }
20
24
  end
21
25
 
22
26
  def resources_from_all_files
@@ -3,6 +3,7 @@ module ONCCertificationG10TestKit
3
3
  US_CORE_3 = 'us_core_3'.freeze
4
4
  US_CORE_4 = 'us_core_4'.freeze
5
5
  US_CORE_5 = 'us_core_5'.freeze
6
+ US_CORE_6 = 'us_core_6'.freeze
6
7
 
7
8
  BULK_DATA_1 = 'multi_patient_api_stu1'.freeze
8
9
  BULK_DATA_2 = 'multi_patient_api_stu2'.freeze
@@ -13,6 +14,7 @@ module ONCCertificationG10TestKit
13
14
  US_CORE_3_REQUIREMENT = { us_core_version: US_CORE_3 }.freeze
14
15
  US_CORE_4_REQUIREMENT = { us_core_version: US_CORE_4 }.freeze
15
16
  US_CORE_5_REQUIREMENT = { us_core_version: US_CORE_5 }.freeze
17
+ US_CORE_6_REQUIREMENT = { us_core_version: US_CORE_6 }.freeze
16
18
 
17
19
  BULK_DATA_1_REQUIREMENT = { multi_patient_version: BULK_DATA_1 }.freeze
18
20
  BULK_DATA_2_REQUIREMENT = { multi_patient_version: BULK_DATA_2 }.freeze
@@ -32,8 +34,14 @@ module ONCCertificationG10TestKit
32
34
  us_core_version == US_CORE_5
33
35
  end
34
36
 
37
+ def using_us_core_6?
38
+ us_core_version == US_CORE_6
39
+ end
40
+
35
41
  def versioned_us_core_module
36
42
  case us_core_version
43
+ when US_CORE_6
44
+ USCoreTestKit::USCoreV610
37
45
  when US_CORE_5
38
46
  USCoreTestKit::USCoreV501
39
47
  when US_CORE_4
@@ -0,0 +1,83 @@
1
+ {
2
+ "resourceType" : "CodeSystem",
3
+ "id" : "observation-category",
4
+ "meta" : {
5
+ "lastUpdated" : "2020-04-09T21:10:28.568+00:00",
6
+ "profile" : ["http://hl7.org/fhir/StructureDefinition/shareablecodesystem"]
7
+ },
8
+ "text" : {
9
+ "status" : "generated",
10
+ "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>This code system <code>http://terminology.hl7.org/CodeSystem/observation-category</code> defines the following codes:</p><table class=\"codes\"><tr><td style=\"white-space:nowrap\"><b>Code</b></td><td><b>Display</b></td><td><b>Definition</b></td></tr><tr><td style=\"white-space:nowrap\">social-history<a name=\"observation-category-social-history\"> </a></td><td>Social History</td><td>Social History Observations define the patient's occupational, personal (e.g., lifestyle), social, familial, and environmental history and health risk factors that may impact the patient's health.</td></tr><tr><td style=\"white-space:nowrap\">vital-signs<a name=\"observation-category-vital-signs\"> </a></td><td>Vital Signs</td><td>Clinical observations measure the body's basic functions such as blood pressure, heart rate, respiratory rate, height, weight, body mass index, head circumference, pulse oximetry, temperature, and body surface area.</td></tr><tr><td style=\"white-space:nowrap\">imaging<a name=\"observation-category-imaging\"> </a></td><td>Imaging</td><td>Observations generated by imaging. The scope includes observations regarding plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, and nuclear medicine.</td></tr><tr><td style=\"white-space:nowrap\">laboratory<a name=\"observation-category-laboratory\"> </a></td><td>Laboratory</td><td>The results of observations generated by laboratories. Laboratory results are typically generated by laboratories providing analytic services in areas such as chemistry, hematology, serology, histology, cytology, anatomic pathology (including digital pathology), microbiology, and/or virology. These observations are based on analysis of specimens obtained from the patient and submitted to the laboratory.</td></tr><tr><td style=\"white-space:nowrap\">procedure<a name=\"observation-category-procedure\"> </a></td><td>Procedure</td><td>Observations generated by other procedures. This category includes observations resulting from interventional and non-interventional procedures excluding laboratory and imaging (e.g., cardiology catheterization, endoscopy, electrodiagnostics, etc.). Procedure results are typically generated by a clinician to provide more granular information about component observations made during a procedure. An example would be when a gastroenterologist reports the size of a polyp observed during a colonoscopy.</td></tr><tr><td style=\"white-space:nowrap\">survey<a name=\"observation-category-survey\"> </a></td><td>Survey</td><td>Assessment tool/survey instrument observations (e.g., Apgar Scores, Montreal Cognitive Assessment (MoCA)).</td></tr><tr><td style=\"white-space:nowrap\">exam<a name=\"observation-category-exam\"> </a></td><td>Exam</td><td>Observations generated by physical exam findings including direct observations made by a clinician and use of simple instruments and the result of simple maneuvers performed directly on the patient's body.</td></tr><tr><td style=\"white-space:nowrap\">therapy<a name=\"observation-category-therapy\"> </a></td><td>Therapy</td><td>Observations generated by non-interventional treatment protocols (e.g. occupational, physical, radiation, nutritional and medication therapy)</td></tr><tr><td style=\"white-space:nowrap\">activity<a name=\"observation-category-activity\"> </a></td><td>Activity</td><td>Observations that measure or record any bodily activity that enhances or maintains physical fitness and overall health and wellness. Not under direct supervision of practitioner such as a physical therapist. (e.g., laps swum, steps, sleep data)</td></tr></table></div>"
11
+ },
12
+ "extension" : [{
13
+ "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
14
+ "valueCode" : "oo"
15
+ }],
16
+ "url" : "http://terminology.hl7.org/CodeSystem/observation-category",
17
+ "identifier" : [{
18
+ "system" : "urn:ietf:rfc:3986",
19
+ "value" : "urn:oid:2.16.840.1.113883.4.642.1.1125"
20
+ }],
21
+ "version" : "0.1.0",
22
+ "name" : "ObservationCategoryCodes",
23
+ "title" : "Observation Category Codes",
24
+ "status" : "draft",
25
+ "experimental" : false,
26
+ "date" : "2023-02-25T11:07:30-07:00",
27
+ "publisher" : "FHIR Project team",
28
+ "contact" : [{
29
+ "telecom" : [{
30
+ "system" : "url",
31
+ "value" : "http://hl7.org/fhir"
32
+ }]
33
+ }],
34
+ "description" : "Observation Category codes.",
35
+ "caseSensitive" : true,
36
+ "valueSet" : "http://terminology.hl7.org/ValueSet/observation-category",
37
+ "content" : "complete",
38
+ "concept" : [{
39
+ "code" : "social-history",
40
+ "display" : "Social History",
41
+ "definition" : "Social History Observations define the patient's occupational, personal (e.g., lifestyle), social, familial, and environmental history and health risk factors that may impact the patient's health."
42
+ },
43
+ {
44
+ "code" : "vital-signs",
45
+ "display" : "Vital Signs",
46
+ "definition" : "Clinical observations measure the body's basic functions such as blood pressure, heart rate, respiratory rate, height, weight, body mass index, head circumference, pulse oximetry, temperature, and body surface area."
47
+ },
48
+ {
49
+ "code" : "imaging",
50
+ "display" : "Imaging",
51
+ "definition" : "Observations generated by imaging. The scope includes observations regarding plain x-ray, ultrasound, CT, MRI, angiography, echocardiography, and nuclear medicine."
52
+ },
53
+ {
54
+ "code" : "laboratory",
55
+ "display" : "Laboratory",
56
+ "definition" : "The results of observations generated by laboratories. Laboratory results are typically generated by laboratories providing analytic services in areas such as chemistry, hematology, serology, histology, cytology, anatomic pathology (including digital pathology), microbiology, and/or virology. These observations are based on analysis of specimens obtained from the patient and submitted to the laboratory."
57
+ },
58
+ {
59
+ "code" : "procedure",
60
+ "display" : "Procedure",
61
+ "definition" : "Observations generated by other procedures. This category includes observations resulting from interventional and non-interventional procedures excluding laboratory and imaging (e.g., cardiology catheterization, endoscopy, electrodiagnostics, etc.). Procedure results are typically generated by a clinician to provide more granular information about component observations made during a procedure. An example would be when a gastroenterologist reports the size of a polyp observed during a colonoscopy."
62
+ },
63
+ {
64
+ "code" : "survey",
65
+ "display" : "Survey",
66
+ "definition" : "Assessment tool/survey instrument observations (e.g., Apgar Scores, Montreal Cognitive Assessment (MoCA))."
67
+ },
68
+ {
69
+ "code" : "exam",
70
+ "display" : "Exam",
71
+ "definition" : "Observations generated by physical exam findings including direct observations made by a clinician and use of simple instruments and the result of simple maneuvers performed directly on the patient's body."
72
+ },
73
+ {
74
+ "code" : "therapy",
75
+ "display" : "Therapy",
76
+ "definition" : "Observations generated by non-interventional treatment protocols (e.g. occupational, physical, radiation, nutritional and medication therapy)"
77
+ },
78
+ {
79
+ "code" : "activity",
80
+ "display" : "Activity",
81
+ "definition" : "Observations that measure or record any bodily activity that enhances or maintains physical fitness and overall health and wellness. Not under direct supervision of practitioner such as a physical therapist. (e.g., laps swum, steps, sleep data)"
82
+ }]
83
+ }