onc_certification_g10_test_kit 6.0.3 → 7.0.1
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 +4 -4
- data/lib/inferno/repositiories/validators.rb +0 -6
- data/lib/inferno/repositiories/value_sets.rb +1 -7
- data/lib/inferno/terminology/expected_manifest.yml +5 -5
- data/lib/inferno/terminology/fhir_package_manager.rb +13 -4
- data/lib/inferno/terminology/loader.rb +2 -1
- data/lib/inferno/terminology/tasks/download_fhir_terminology.rb +2 -1
- data/lib/inferno/terminology/tasks/download_umls.rb +2 -1
- data/lib/inferno/terminology/tasks/expand_value_set_to_file.rb +1 -1
- data/lib/inferno/terminology/tasks/run_umls_jar.rb +2 -1
- data/lib/inferno/terminology/validator.rb +1 -0
- data/lib/inferno/terminology/value_set.rb +2 -0
- data/lib/onc_certification_g10_test_kit/all_resources.rb +74 -0
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +361 -59
- data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +4 -3
- data/lib/onc_certification_g10_test_kit/g10_options.rb +20 -1
- data/lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb +4 -0
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +2 -1
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +2 -1
- data/lib/onc_certification_g10_test_kit/patient_scope_test.rb +1 -1
- data/lib/onc_certification_g10_test_kit/profile_selector.rb +40 -15
- data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +89 -2
- data/lib/onc_certification_g10_test_kit/short_id_map.yml +1417 -12
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_7_api_group.rb +219 -0
- data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +41 -1
- data/lib/onc_certification_g10_test_kit/smart_asymmetric_launch_group.rb +33 -1
- data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2_2.rb +128 -0
- data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +234 -0
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group_stu2_2.rb +188 -0
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group.rb +188 -0
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group_stu2_2.rb +188 -0
- data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_group.rb +67 -1
- data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +128 -1
- data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2_2.rb +162 -0
- data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +10 -2
- data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +159 -0
- data/lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb +117 -0
- data/lib/onc_certification_g10_test_kit/terminology_binding_validator.rb +5 -1
- data/lib/onc_certification_g10_test_kit/token_introspection_group_stu2_2.rb +97 -0
- data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +85 -31
- data/lib/onc_certification_g10_test_kit/version.rb +1 -1
- data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +171 -0
- data/lib/onc_certification_g10_test_kit/well_known_capabilities_test.rb +1 -1
- data/lib/onc_certification_g10_test_kit.rb +72 -5
- metadata +18 -10
@@ -8,7 +8,7 @@ module ONCCertificationG10TestKit
|
|
8
8
|
Verify that Group compartment export from the Bulk Data server follow US Core Implementation Guide
|
9
9
|
DESCRIPTION
|
10
10
|
|
11
|
-
id :
|
11
|
+
id :g10_bulk_data_group_export_validation
|
12
12
|
|
13
13
|
input :status_output, :requires_access_token, :bearer_token, :bulk_download_url
|
14
14
|
input :lines_to_validate,
|
@@ -203,7 +203,7 @@ module ONCCertificationG10TestKit
|
|
203
203
|
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition
|
204
204
|
|
205
205
|
|
206
|
-
For US Core v6.1.0, evidence of support for the following two profiles must be demonstrated:
|
206
|
+
For US Core v6.1.0 and v7.0.0, evidence of support for the following two profiles must be demonstrated:
|
207
207
|
|
208
208
|
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis
|
209
209
|
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-problems-health-concerns
|
@@ -351,63 +351,87 @@ module ONCCertificationG10TestKit
|
|
351
351
|
test do
|
352
352
|
title 'Observation resources returned conform to the relevant US Core Observation Profile'
|
353
353
|
description <<~DESCRIPTION
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
354
|
+
This test verifies that the resources returned from bulk data export
|
355
|
+
conform to the following US Core profiles, based on the category or code
|
356
|
+
associated with the Observation. This includes checking for missing data
|
357
|
+
elements and value set verification.
|
358
|
+
|
359
|
+
For US Core v3.1.1, this test expects evidence of the following US Core profiles
|
360
|
+
|
361
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age
|
362
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height
|
363
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
|
364
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
|
365
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus
|
366
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile
|
367
|
+
* http://hl7.org/fhir/StructureDefinition/bp
|
368
|
+
* http://hl7.org/fhir/StructureDefinition/bodyheight
|
369
|
+
* http://hl7.org/fhir/StructureDefinition/bodytemp
|
370
|
+
* http://hl7.org/fhir/StructureDefinition/bodyweight
|
371
|
+
* http://hl7.org/fhir/StructureDefinition/heartrate
|
372
|
+
* http://hl7.org/fhir/StructureDefinition/resprate
|
373
|
+
|
374
|
+
For US Core v4.0.0, this test expects evidence of the following US Core profiles
|
375
|
+
|
376
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age
|
377
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height
|
378
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
|
379
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
|
380
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus
|
381
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile
|
382
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure
|
383
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-bmi
|
384
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-head-circumference
|
385
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-height
|
386
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-weight
|
387
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature
|
388
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate
|
389
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate
|
390
|
+
|
391
|
+
For US Core v6.1.0, this test expects evidence of the following US Core profiles
|
392
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
|
393
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-occupation
|
394
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancyintent
|
395
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancystatus
|
396
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-screening-assessment
|
397
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-sexual-orientation
|
398
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus
|
399
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile
|
400
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age
|
401
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height
|
402
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure
|
403
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-bmi
|
404
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-height
|
405
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature
|
406
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-weight
|
407
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-head-circumference
|
408
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate
|
409
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
|
410
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate
|
411
|
+
|
412
|
+
For US Core v7.0.0, this test expects evidence of the following US Core profiles
|
413
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
|
414
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-occupation
|
415
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancyintent
|
416
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancystatus
|
417
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-screening-assessment
|
418
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-sexual-orientation
|
419
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus
|
420
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile
|
421
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age
|
422
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height
|
423
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure
|
424
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-bmi
|
425
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-height
|
426
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature
|
427
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-weight
|
428
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-head-circumference
|
429
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate
|
430
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
|
431
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate
|
432
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-treatment-intervention-preference
|
433
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-care-experience-preference
|
434
|
+
* http://hl7.org/fhir/us/core/StructureDefinition/us-core-average-blood-pressure
|
411
435
|
DESCRIPTION
|
412
436
|
|
413
437
|
include BulkExportValidationTester
|
@@ -532,6 +556,88 @@ module ONCCertificationG10TestKit
|
|
532
556
|
DESCRIPTION
|
533
557
|
# link 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-location'
|
534
558
|
|
559
|
+
required_suite_options G10Options::US_CORE_3_REQUIREMENT
|
560
|
+
|
561
|
+
id :g10_us_core_3_bulk_location_validation
|
562
|
+
|
563
|
+
include BulkExportValidationTester
|
564
|
+
|
565
|
+
def resource_type
|
566
|
+
'Location'
|
567
|
+
end
|
568
|
+
|
569
|
+
run do
|
570
|
+
perform_bulk_export_validation
|
571
|
+
end
|
572
|
+
end
|
573
|
+
|
574
|
+
test do
|
575
|
+
title 'Location resources returned conform to the HL7 FHIR Specification Location Resource if bulk data export ' \
|
576
|
+
'has Location resources'
|
577
|
+
description <<~DESCRIPTION
|
578
|
+
This test verifies that the resources returned from bulk data export
|
579
|
+
conform to the HL7 FHIR Specification Location Resource. This includes
|
580
|
+
checking for missing data elements and value set verification. This test
|
581
|
+
is omitted if bulk data export does not return any Location resources.
|
582
|
+
DESCRIPTION
|
583
|
+
# link 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-location'
|
584
|
+
|
585
|
+
required_suite_options G10Options::US_CORE_4_REQUIREMENT
|
586
|
+
|
587
|
+
id :g10_us_core_4_bulk_location_validation
|
588
|
+
|
589
|
+
include BulkExportValidationTester
|
590
|
+
|
591
|
+
def resource_type
|
592
|
+
'Location'
|
593
|
+
end
|
594
|
+
|
595
|
+
run do
|
596
|
+
perform_bulk_export_validation
|
597
|
+
end
|
598
|
+
end
|
599
|
+
|
600
|
+
test do
|
601
|
+
title 'Location resources returned conform to the HL7 FHIR Specification Location Resource if bulk data export ' \
|
602
|
+
'has Location resources'
|
603
|
+
description <<~DESCRIPTION
|
604
|
+
This test verifies that the resources returned from bulk data export
|
605
|
+
conform to the HL7 FHIR Specification Location Resource. This includes
|
606
|
+
checking for missing data elements and value set verification. This test
|
607
|
+
is omitted if bulk data export does not return any Location resources.
|
608
|
+
DESCRIPTION
|
609
|
+
# link 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-location'
|
610
|
+
|
611
|
+
required_suite_options G10Options::US_CORE_5_REQUIREMENT
|
612
|
+
|
613
|
+
id :g10_us_core_5_bulk_location_validation
|
614
|
+
|
615
|
+
include BulkExportValidationTester
|
616
|
+
|
617
|
+
def resource_type
|
618
|
+
'Location'
|
619
|
+
end
|
620
|
+
|
621
|
+
run do
|
622
|
+
perform_bulk_export_validation
|
623
|
+
end
|
624
|
+
end
|
625
|
+
|
626
|
+
test do
|
627
|
+
title 'Location resources returned conform to the HL7 FHIR Specification Location Resource if bulk data export ' \
|
628
|
+
'has Location resources'
|
629
|
+
description <<~DESCRIPTION
|
630
|
+
This test verifies that the resources returned from bulk data export
|
631
|
+
conform to the HL7 FHIR Specification Location Resource. This includes
|
632
|
+
checking for missing data elements and value set verification. This test
|
633
|
+
is omitted if bulk data export does not return any Location resources.
|
634
|
+
DESCRIPTION
|
635
|
+
# link 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-location'
|
636
|
+
|
637
|
+
required_suite_options G10Options::US_CORE_6_REQUIREMENT
|
638
|
+
|
639
|
+
id :g10_us_core_6_bulk_location_validation
|
640
|
+
|
535
641
|
include BulkExportValidationTester
|
536
642
|
|
537
643
|
def resource_type
|
@@ -575,6 +681,8 @@ module ONCCertificationG10TestKit
|
|
575
681
|
|
576
682
|
required_suite_options G10Options::US_CORE_5_REQUIREMENT
|
577
683
|
|
684
|
+
id :g10_us_core_5_bulk_service_request_validation
|
685
|
+
|
578
686
|
include BulkExportValidationTester
|
579
687
|
|
580
688
|
def resource_type
|
@@ -596,6 +704,8 @@ module ONCCertificationG10TestKit
|
|
596
704
|
|
597
705
|
required_suite_options G10Options::US_CORE_5_REQUIREMENT
|
598
706
|
|
707
|
+
id :g10_us_core_5_bulk_related_person_validation
|
708
|
+
|
599
709
|
include BulkExportValidationTester
|
600
710
|
|
601
711
|
def resource_type
|
@@ -619,6 +729,8 @@ module ONCCertificationG10TestKit
|
|
619
729
|
|
620
730
|
required_suite_options G10Options::US_CORE_5_REQUIREMENT
|
621
731
|
|
732
|
+
id :g10_us_core_5_bulk_questionnaire_response_validation
|
733
|
+
|
622
734
|
include BulkExportValidationTester
|
623
735
|
|
624
736
|
def resource_type
|
@@ -642,6 +754,8 @@ module ONCCertificationG10TestKit
|
|
642
754
|
|
643
755
|
required_suite_options G10Options::US_CORE_5_REQUIREMENT
|
644
756
|
|
757
|
+
id :g10_us_core_5_bulk_practitioner_role_validation
|
758
|
+
|
645
759
|
include BulkExportValidationTester
|
646
760
|
|
647
761
|
def resource_type
|
@@ -817,5 +931,193 @@ module ONCCertificationG10TestKit
|
|
817
931
|
perform_bulk_export_validation
|
818
932
|
end
|
819
933
|
end
|
934
|
+
|
935
|
+
test do
|
936
|
+
title 'ServiceRequest resources returned conform to the US Core ServiceRequest Profile'
|
937
|
+
description <<~DESCRIPTION
|
938
|
+
This test verifies that the resources returned from bulk data export
|
939
|
+
conform to the US Core ServiceRequest profile. This includes checking
|
940
|
+
for missing data elements and value set verification.
|
941
|
+
DESCRIPTION
|
942
|
+
|
943
|
+
id :g10_us_core_7_bulk_service_request_validation
|
944
|
+
|
945
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
946
|
+
|
947
|
+
include BulkExportValidationTester
|
948
|
+
|
949
|
+
def resource_type
|
950
|
+
'ServiceRequest'
|
951
|
+
end
|
952
|
+
|
953
|
+
run do
|
954
|
+
perform_bulk_export_validation
|
955
|
+
end
|
956
|
+
end
|
957
|
+
|
958
|
+
test do
|
959
|
+
title 'RelatedPerson resources returned conform to the US Core RelatedPerson Profile'
|
960
|
+
description <<~DESCRIPTION
|
961
|
+
This test verifies that the resources returned from bulk data export
|
962
|
+
conform to the US Core RelatedPerson profile. This includes checking
|
963
|
+
for missing data elements and value set verification.
|
964
|
+
DESCRIPTION
|
965
|
+
|
966
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
967
|
+
|
968
|
+
id :g10_us_core_7_bulk_related_person_validation
|
969
|
+
|
970
|
+
include BulkExportValidationTester
|
971
|
+
|
972
|
+
def resource_type
|
973
|
+
'RelatedPerson'
|
974
|
+
end
|
975
|
+
|
976
|
+
run do
|
977
|
+
perform_bulk_export_validation
|
978
|
+
end
|
979
|
+
end
|
980
|
+
|
981
|
+
test do
|
982
|
+
title 'QuestionnaireResponse resources returned conform to the US Core QuestionnaireResponse Profile if ' \
|
983
|
+
'bulk data has QuestionnaireResponse resources'
|
984
|
+
description <<~DESCRIPTION
|
985
|
+
This test verifies that the resources returned from bulk data export
|
986
|
+
conform to the US Core QuestionnaireResponse profile. This includes checking for missing
|
987
|
+
data elements and value set verification. This test is omitted if bulk
|
988
|
+
data export does not return any QuestionnaireResponse resources.
|
989
|
+
DESCRIPTION
|
990
|
+
|
991
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
992
|
+
|
993
|
+
id :g10_us_core_7_bulk_questionnaire_response_validation
|
994
|
+
|
995
|
+
include BulkExportValidationTester
|
996
|
+
|
997
|
+
def resource_type
|
998
|
+
'QuestionnaireResponse'
|
999
|
+
end
|
1000
|
+
|
1001
|
+
run do
|
1002
|
+
perform_bulk_export_validation
|
1003
|
+
end
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
test do
|
1007
|
+
title 'PractionerRole resources returned conform to the US Core PractionerRole Profile if bulk data export ' \
|
1008
|
+
'has PractionerRole resources'
|
1009
|
+
description <<~DESCRIPTION
|
1010
|
+
This test verifies that the resources returned from bulk data export
|
1011
|
+
conform to the US Core PractitionerRole profile. This includes checking for missing
|
1012
|
+
data elements and value set verification. This test is omitted if bulk
|
1013
|
+
data export does not return any resources.
|
1014
|
+
DESCRIPTION
|
1015
|
+
|
1016
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
1017
|
+
|
1018
|
+
id :g10_us_core_7_bulk_practitioner_role_validation
|
1019
|
+
|
1020
|
+
include BulkExportValidationTester
|
1021
|
+
|
1022
|
+
def resource_type
|
1023
|
+
'PractitionerRole'
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
run do
|
1027
|
+
perform_bulk_export_validation
|
1028
|
+
end
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
test do
|
1032
|
+
title 'Coverage resources returned conform to the US Core Coverage Profile'
|
1033
|
+
description <<~DESCRIPTION
|
1034
|
+
This test verifies that the resources returned from bulk data export
|
1035
|
+
conform to the US Core Coverage profile. This includes checking
|
1036
|
+
for missing data elements and value set verification.
|
1037
|
+
DESCRIPTION
|
1038
|
+
|
1039
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
1040
|
+
|
1041
|
+
id :g10_us_core_7_bulk_coverage_validation
|
1042
|
+
|
1043
|
+
include BulkExportValidationTester
|
1044
|
+
|
1045
|
+
def resource_type
|
1046
|
+
'Coverage'
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
run do
|
1050
|
+
perform_bulk_export_validation
|
1051
|
+
end
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
test do
|
1055
|
+
title 'MedicationDispense resources returned conform to the US Core MedicationDispense Profile'
|
1056
|
+
description <<~DESCRIPTION
|
1057
|
+
This test verifies that the resources returned from bulk data export
|
1058
|
+
conform to the US Core MedicationDispense profile. This includes checking
|
1059
|
+
for missing data elements and value set verification.
|
1060
|
+
DESCRIPTION
|
1061
|
+
|
1062
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
1063
|
+
|
1064
|
+
id :g10_us_core_7_bulk_medication_dispense_validation
|
1065
|
+
|
1066
|
+
include BulkExportValidationTester
|
1067
|
+
|
1068
|
+
def resource_type
|
1069
|
+
'MedicationDispense'
|
1070
|
+
end
|
1071
|
+
|
1072
|
+
run do
|
1073
|
+
perform_bulk_export_validation
|
1074
|
+
end
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
test do
|
1078
|
+
title 'Specimen resources returned conform to the US Core Specimen Profile'
|
1079
|
+
description <<~DESCRIPTION
|
1080
|
+
This test verifies that the resources returned from bulk data export
|
1081
|
+
conform to the US Core Specimen profile. This includes checking
|
1082
|
+
for missing data elements and value set verification.
|
1083
|
+
DESCRIPTION
|
1084
|
+
|
1085
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
1086
|
+
|
1087
|
+
id :g10_us_core_7_bulk_specimen_validation
|
1088
|
+
|
1089
|
+
include BulkExportValidationTester
|
1090
|
+
|
1091
|
+
def resource_type
|
1092
|
+
'Specimen'
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
run do
|
1096
|
+
perform_bulk_export_validation
|
1097
|
+
end
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
test do
|
1101
|
+
title 'Location resources returned conform to the US Core Location Profile'
|
1102
|
+
description <<~DESCRIPTION
|
1103
|
+
This test verifies that the resources returned from bulk data export
|
1104
|
+
conform to the US Core Location profile. This includes checking
|
1105
|
+
for missing data elements and value set verification.
|
1106
|
+
DESCRIPTION
|
1107
|
+
|
1108
|
+
required_suite_options G10Options::US_CORE_7_REQUIREMENT
|
1109
|
+
|
1110
|
+
id :g10_us_core_7_bulk_location_validation
|
1111
|
+
|
1112
|
+
include BulkExportValidationTester
|
1113
|
+
|
1114
|
+
def resource_type
|
1115
|
+
'Location'
|
1116
|
+
end
|
1117
|
+
|
1118
|
+
run do
|
1119
|
+
perform_bulk_export_validation
|
1120
|
+
end
|
1121
|
+
end
|
820
1122
|
end
|
821
1123
|
end
|
@@ -1,16 +1,17 @@
|
|
1
1
|
require_relative 'profile_selector'
|
2
|
+
require_relative 'all_resources'
|
2
3
|
|
3
4
|
module ONCCertificationG10TestKit
|
4
5
|
module BulkExportValidationTester
|
5
6
|
include USCoreTestKit::MustSupportTest
|
6
7
|
include ProfileSelector
|
7
8
|
include G10Options
|
9
|
+
include AllResources
|
8
10
|
|
9
11
|
attr_reader :metadata
|
10
12
|
|
11
13
|
MAX_NUM_COLLECTED_LINES = 100
|
12
14
|
MIN_RESOURCE_COUNT = 2
|
13
|
-
OMIT_KLASS = ['Medication', 'Location', 'QuestionnaireResponse', 'PractitionerRole'].freeze
|
14
15
|
PROFILES_TO_SKIP = [
|
15
16
|
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-simple-observation'
|
16
17
|
].freeze
|
@@ -99,7 +100,7 @@ module ONCCertificationG10TestKit
|
|
99
100
|
|
100
101
|
def validate_conformance(resources)
|
101
102
|
metadata_list.each do |meta|
|
102
|
-
next if resource_type == 'Location'
|
103
|
+
next if resource_type == 'Location' && !us_core_7_and_above?
|
103
104
|
|
104
105
|
skip_if resources[meta.profile_url].blank?,
|
105
106
|
"No #{resource_type} resources found that conform to profile: #{meta.profile_url}."
|
@@ -201,7 +202,7 @@ module ONCCertificationG10TestKit
|
|
201
202
|
file_list = JSON.parse(status_output).select { |file| file['type'] == resource_type }
|
202
203
|
if file_list.empty?
|
203
204
|
message = "No #{resource_type} resource file item returned by server."
|
204
|
-
omit_if (
|
205
|
+
omit_if (all_required_resources.exclude? resource_type), "#{message} #{resource_type} resources are optional."
|
205
206
|
skip message
|
206
207
|
end
|
207
208
|
|
@@ -4,12 +4,14 @@ module ONCCertificationG10TestKit
|
|
4
4
|
US_CORE_4 = 'us_core_4'.freeze
|
5
5
|
US_CORE_5 = 'us_core_5'.freeze
|
6
6
|
US_CORE_6 = 'us_core_6'.freeze
|
7
|
+
US_CORE_7 = 'us_core_7'.freeze
|
7
8
|
|
8
9
|
US_CORE_VERSION_NUMBERS = {
|
9
10
|
US_CORE_3 => '3.1.1',
|
10
11
|
US_CORE_4 => '4.0.0',
|
11
12
|
US_CORE_5 => '5.0.1',
|
12
|
-
US_CORE_6 => '6.1.0'
|
13
|
+
US_CORE_6 => '6.1.0',
|
14
|
+
US_CORE_7 => '7.0.0'
|
13
15
|
}.freeze
|
14
16
|
|
15
17
|
BULK_DATA_1 = 'multi_patient_api_stu1'.freeze
|
@@ -17,17 +19,20 @@ module ONCCertificationG10TestKit
|
|
17
19
|
|
18
20
|
SMART_1 = 'smart_app_launch_1'.freeze
|
19
21
|
SMART_2 = 'smart_app_launch_2'.freeze
|
22
|
+
SMART_2_2 = 'smart_app_launch_2_2'.freeze
|
20
23
|
|
21
24
|
US_CORE_3_REQUIREMENT = { us_core_version: US_CORE_3 }.freeze
|
22
25
|
US_CORE_4_REQUIREMENT = { us_core_version: US_CORE_4 }.freeze
|
23
26
|
US_CORE_5_REQUIREMENT = { us_core_version: US_CORE_5 }.freeze
|
24
27
|
US_CORE_6_REQUIREMENT = { us_core_version: US_CORE_6 }.freeze
|
28
|
+
US_CORE_7_REQUIREMENT = { us_core_version: US_CORE_7 }.freeze
|
25
29
|
|
26
30
|
BULK_DATA_1_REQUIREMENT = { multi_patient_version: BULK_DATA_1 }.freeze
|
27
31
|
BULK_DATA_2_REQUIREMENT = { multi_patient_version: BULK_DATA_2 }.freeze
|
28
32
|
|
29
33
|
SMART_1_REQUIREMENT = { smart_app_launch_version: SMART_1 }.freeze
|
30
34
|
SMART_2_REQUIREMENT = { smart_app_launch_version: SMART_2 }.freeze
|
35
|
+
SMART_2_2_REQUIREMENT = { smart_app_launch_version: SMART_2_2 }.freeze
|
31
36
|
|
32
37
|
def us_core_version
|
33
38
|
suite_options[:us_core_version]
|
@@ -37,6 +42,10 @@ module ONCCertificationG10TestKit
|
|
37
42
|
us_core_version == US_CORE_3
|
38
43
|
end
|
39
44
|
|
45
|
+
def using_us_core_4?
|
46
|
+
us_core_version == US_CORE_4
|
47
|
+
end
|
48
|
+
|
40
49
|
def using_us_core_5?
|
41
50
|
us_core_version == US_CORE_5
|
42
51
|
end
|
@@ -45,8 +54,18 @@ module ONCCertificationG10TestKit
|
|
45
54
|
us_core_version == US_CORE_6
|
46
55
|
end
|
47
56
|
|
57
|
+
def using_us_core_7?
|
58
|
+
us_core_version == US_CORE_7
|
59
|
+
end
|
60
|
+
|
61
|
+
def us_core_7_and_above?
|
62
|
+
us_core_version[-1].to_i > 6
|
63
|
+
end
|
64
|
+
|
48
65
|
def versioned_us_core_module
|
49
66
|
case us_core_version
|
67
|
+
when US_CORE_7
|
68
|
+
USCoreTestKit::USCoreV700
|
50
69
|
when US_CORE_6
|
51
70
|
USCoreTestKit::USCoreV610
|
52
71
|
when US_CORE_5
|
@@ -37,11 +37,15 @@ module ONCCertificationG10TestKit
|
|
37
37
|
V6_POSSIBLE_RESOURCES =
|
38
38
|
(V5_POSSIBLE_RESOURCES + ['Specimen', 'Coverage', 'MedicationDispense']).freeze
|
39
39
|
|
40
|
+
V7_POSSIBLE_RESOURCES = (V6_POSSIBLE_RESOURCES + ['Location']).freeze
|
41
|
+
|
40
42
|
def possible_resources
|
41
43
|
return V5_POSSIBLE_RESOURCES if using_us_core_5?
|
42
44
|
|
43
45
|
return V6_POSSIBLE_RESOURCES if using_us_core_6?
|
44
46
|
|
47
|
+
return V7_POSSIBLE_RESOURCES if using_us_core_7?
|
48
|
+
|
45
49
|
POSSIBLE_RESOURCES
|
46
50
|
end
|
47
51
|
|
@@ -78,7 +78,8 @@ module ONCCertificationG10TestKit
|
|
78
78
|
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
79
79
|
id: :g10_bulk_group_export_tls_messages_setup
|
80
80
|
|
81
|
-
group from: :
|
81
|
+
group from: :g10_bulk_data_group_export_validation,
|
82
|
+
id: :bulk_data_group_export_validation
|
82
83
|
|
83
84
|
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
84
85
|
id: :g10_bulk_group_export_validation_messages_setup
|
@@ -78,7 +78,8 @@ module ONCCertificationG10TestKit
|
|
78
78
|
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
79
79
|
id: :g10_bulk_group_export_tls_messages_setup
|
80
80
|
|
81
|
-
group from: :
|
81
|
+
group from: :g10_bulk_data_group_export_validation,
|
82
|
+
id: :bulk_data_group_export_validation
|
82
83
|
|
83
84
|
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
84
85
|
id: :g10_bulk_group_export_validation_messages_setup
|
@@ -22,7 +22,7 @@ module ONCCertificationG10TestKit
|
|
22
22
|
|
23
23
|
run do
|
24
24
|
expected_scopes =
|
25
|
-
if scope_version == :v2
|
25
|
+
if scope_version == :v2 || scope_version == :v22
|
26
26
|
[
|
27
27
|
Regexp.new(scope_regex_string('patient/Patient.rs').gsub('.rs', '.r?s')),
|
28
28
|
Regexp.new(scope_regex_string('patient/Patient.rs').gsub('.rs', '.rs?'))
|