onc_certification_g10_test_kit 2.3.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/inferno/terminology/expected_manifest.yml +242 -29
  3. data/lib/inferno/terminology/fhir_package_manager.rb +27 -0
  4. data/lib/inferno/terminology/loader.rb +22 -1
  5. data/lib/inferno/terminology/tasks/create_value_set_validators.rb +1 -1
  6. data/lib/inferno/terminology/tasks/download_fhir_terminology.rb +5 -0
  7. data/lib/inferno/terminology/value_set.rb +51 -5
  8. data/lib/onc_certification_g10_test_kit/base_token_refresh_group.rb +5 -4
  9. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +5 -0
  10. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu2.rb +2 -0
  11. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +206 -28
  12. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +25 -40
  13. data/lib/onc_certification_g10_test_kit/encounter_context_test.rb +30 -0
  14. data/lib/onc_certification_g10_test_kit/feature.rb +5 -8
  15. data/lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb +18 -5
  16. data/lib/onc_certification_g10_test_kit/profile_selector.rb +175 -0
  17. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +54 -4
  18. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +93 -0
  19. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +50 -5
  20. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +94 -0
  21. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +94 -0
  22. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +197 -13
  23. data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +310 -0
  24. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +211 -0
  25. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +135 -9
  26. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +16 -4
  27. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2.rb +130 -0
  28. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +134 -67
  29. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +166 -11
  30. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +119 -135
  31. data/lib/onc_certification_g10_test_kit/version.rb +1 -1
  32. data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +19 -0
  33. data/lib/onc_certification_g10_test_kit/well_known_capabilities_test.rb +7 -1
  34. data/lib/onc_certification_g10_test_kit.rb +115 -74
  35. metadata +19 -11
  36. data/lib/onc_certification_g10_test_kit/profile_guesser.rb +0 -72
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26db3a7b89aa5bfcd52c5e918543a6a8883e7672825b4c821bc90b7d86f92f39
4
- data.tar.gz: ae93cb1f1d78eda01567a1e85071605a190e6e3c6473a65508a6977229282236
3
+ metadata.gz: adbba68d88b3af6ac68f713093db688cf40e238e00435cfc25f1dd7a533dcdb5
4
+ data.tar.gz: 78d90d908e7c9dac8bb0e78072aa75014db120d11fc9daf09bd247118a0bc6bd
5
5
  SHA512:
6
- metadata.gz: c9f971806d40478dd207b333073433741a9dc3b596de17d0bd6d6e3b2507dcdac2031dad2227eec0b090aec38bc79f21271d1b0fd17d8233c6d1f517359671ff
7
- data.tar.gz: 70a818c745d8f7068bb0834885f3e0215b20115232f1a73c2265a499df8fc164265c73706d75d6eb6934f3a6bbe4fa7e71001766603b86933b0d0fe0cdb98c98
6
+ metadata.gz: 7bfe60790522993322888d224c41556f61010a800f378f14a0a4597d70c198d887f68b9e97819cfb5696988a26ad07de386e8c2af92e1ca34bd541ff918fb575
7
+ data.tar.gz: 90f2b6a0cfed1eaaf46519e68faec2937f210f5504f3d4cd1ad72070fd4a031db5e0cc5b136fe9bf895005483dcac673ff282b2b8c7cdb647447ff49df7d4c7e
@@ -97,6 +97,7 @@
97
97
  :code_systems:
98
98
  - http://nucc.org/provider-taxonomy
99
99
  - http://snomed.info/sct
100
+ - urn:oid:2.16.840.1.113883.6.101
100
101
  - :url: http://hl7.org/fhir/ValueSet/condition-clinical
101
102
  :file: hl7_org_fhir_ValueSet_condition-clinical.msgpack
102
103
  :count: 6
@@ -111,11 +112,12 @@
111
112
  - http://terminology.hl7.org/CodeSystem/condition-ver-status
112
113
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-condition-category
113
114
  :file: hl7_org_fhir_us_core_ValueSet_us-core-condition-category.msgpack
114
- :count: 3
115
+ :count: 4
115
116
  :type: bloom
116
117
  :code_systems:
117
118
  - http://terminology.hl7.org/CodeSystem/condition-category
118
119
  - http://hl7.org/fhir/us/core/CodeSystem/condition-category
120
+ - http://snomed.info/sct
119
121
  - :url: http://hl7.org/fhir/ValueSet/condition-severity
120
122
  :file: hl7_org_fhir_ValueSet_condition-severity.msgpack
121
123
  :count: 3
@@ -124,7 +126,7 @@
124
126
  - http://snomed.info/sct
125
127
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-condition-code
126
128
  :file: hl7_org_fhir_us_core_ValueSet_us-core-condition-code.msgpack
127
- :count: 297182
129
+ :count: 297482
128
130
  :type: bloom
129
131
  :code_systems:
130
132
  - http://snomed.info/sct
@@ -174,7 +176,7 @@
174
176
  - http://loinc.org
175
177
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-diagnosticreport-report-and-note-codes
176
178
  :file: hl7_org_fhir_us_core_ValueSet_us-core-diagnosticreport-report-and-note-codes.msgpack
177
- :count: 270991
179
+ :count: 24810
178
180
  :type: bloom
179
181
  :code_systems:
180
182
  - http://loinc.org
@@ -219,7 +221,11 @@
219
221
  :file: hl7_org_fhir_ValueSet_security-labels.msgpack
220
222
  :count: 200
221
223
  :type: bloom
222
- :code_systems: []
224
+ :code_systems:
225
+ - http://terminology.hl7.org/CodeSystem/v3-Confidentiality
226
+ - http://terminology.hl7.org/CodeSystem/v3-ActCode
227
+ - http://terminology.hl7.org/CodeSystem/v3-ObservationValue
228
+ - http://terminology.hl7.org/CodeSystem/v3-ActReason
223
229
  - :url: http://hl7.org/fhir/ValueSet/mimetypes
224
230
  :file: hl7_org_fhir_ValueSet_mimetypes.msgpack
225
231
  :count: 2382
@@ -381,7 +387,7 @@
381
387
  - http://hl7.org/fhir/address-type
382
388
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state
383
389
  :file: hl7_org_fhir_us_core_ValueSet_us-core-usps-state.msgpack
384
- :count: 59
390
+ :count: 62
385
391
  :type: bloom
386
392
  :code_systems:
387
393
  - https://www.usps.com/
@@ -556,7 +562,7 @@
556
562
  - http://terminology.hl7.org/CodeSystem/v2-0131
557
563
  - :url: http://hl7.org/fhir/us/core/ValueSet/simple-language
558
564
  :file: hl7_org_fhir_us_core_ValueSet_simple-language.msgpack
559
- :count: 8212
565
+ :count: 8239
560
566
  :type: bloom
561
567
  :code_systems:
562
568
  - urn:ietf:bcp:47
@@ -568,48 +574,53 @@
568
574
  - http://hl7.org/fhir/link-type
569
575
  - :url: http://hl7.org/fhir/us/core/ValueSet/omb-race-category
570
576
  :file: hl7_org_fhir_us_core_ValueSet_omb-race-category.msgpack
571
- :count: 7
577
+ :count: 8
572
578
  :type: bloom
573
579
  :code_systems:
574
580
  - urn:oid:2.16.840.1.113883.6.238
575
581
  - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
576
582
  - :url: http://hl7.org/fhir/us/core/ValueSet/detailed-race
577
583
  :file: hl7_org_fhir_us_core_ValueSet_detailed-race.msgpack
578
- :count: 917
584
+ :count: 919
579
585
  :type: bloom
580
586
  :code_systems:
581
587
  - urn:oid:2.16.840.1.113883.6.238
588
+ - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
582
589
  - :url: http://hl7.org/fhir/us/core/ValueSet/omb-ethnicity-category
583
590
  :file: hl7_org_fhir_us_core_ValueSet_omb-ethnicity-category.msgpack
584
- :count: 2
591
+ :count: 4
585
592
  :type: bloom
586
593
  :code_systems:
587
594
  - urn:oid:2.16.840.1.113883.6.238
595
+ - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
588
596
  - :url: http://hl7.org/fhir/us/core/ValueSet/detailed-ethnicity
589
597
  :file: hl7_org_fhir_us_core_ValueSet_detailed-ethnicity.msgpack
590
- :count: 42
598
+ :count: 44
591
599
  :type: bloom
592
600
  :code_systems:
593
601
  - urn:oid:2.16.840.1.113883.6.238
602
+ - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
594
603
  - :url: http://hl7.org/fhir/us/core/ValueSet/birthsex
595
604
  :file: hl7_org_fhir_us_core_ValueSet_birthsex.msgpack
596
- :count: 3
605
+ :count: 5
597
606
  :type: bloom
598
607
  :code_systems:
599
608
  - http://terminology.hl7.org/CodeSystem/v3-AdministrativeGender
600
609
  - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
601
610
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-provider-role
602
611
  :file: hl7_org_fhir_us_core_ValueSet_us-core-provider-role.msgpack
603
- :count: 237
612
+ :count: 862
604
613
  :type: bloom
605
614
  :code_systems:
606
615
  - http://nucc.org/provider-taxonomy
616
+ - urn:oid:2.16.840.1.113883.6.101
607
617
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-provider-specialty
608
618
  :file: hl7_org_fhir_us_core_ValueSet_us-core-provider-specialty.msgpack
609
619
  :count: 862
610
620
  :type: bloom
611
621
  :code_systems:
612
622
  - http://nucc.org/provider-taxonomy
623
+ - urn:oid:2.16.840.1.113883.6.101
613
624
  - :url: http://hl7.org/fhir/ValueSet/event-status
614
625
  :file: hl7_org_fhir_ValueSet_event-status.msgpack
615
626
  :count: 8
@@ -618,13 +629,17 @@
618
629
  - http://hl7.org/fhir/event-status
619
630
  - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-procedure-code
620
631
  :file: hl7_org_fhir_us_core_ValueSet_us-core-procedure-code.msgpack
621
- :count: 285523
632
+ :count: 556515
622
633
  :type: bloom
623
634
  :code_systems:
624
635
  - http://www.ama-assn.org/go/cpt
625
636
  - http://snomed.info/sct
626
- - urn:oid:2.16.840.1.113883.6.285
637
+ - http://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets
627
638
  - http://www.cms.gov/Medicare/Coding/ICD10
639
+ - http://www.ada.org/cdt
640
+ - http://loinc.org
641
+ - urn:oid:2.16.840.1.113883.6.285
642
+ - http://ada.org/cdt
628
643
  - urn:oid:2.16.840.1.113883.6.13
629
644
  - :url: http://hl7.org/fhir/ValueSet/device-action
630
645
  :file: hl7_org_fhir_ValueSet_device-action.msgpack
@@ -666,9 +681,157 @@
666
681
  :type: bloom
667
682
  :code_systems:
668
683
  - http://hl7.org/fhir/provenance-entity-role
684
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1186.8
685
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_113762_1_4_1186_8.msgpack
686
+ :count: 766
687
+ :type: bloom
688
+ :code_systems:
689
+ - http://www.nlm.nih.gov/research/umls/rxnorm
690
+ - http://snomed.info/sct
691
+ - :url: http://hl7.org/fhir/ValueSet/narrative-status
692
+ :file: hl7_org_fhir_ValueSet_narrative-status.msgpack
693
+ :count: 4
694
+ :type: bloom
695
+ :code_systems:
696
+ - http://hl7.org/fhir/narrative-status
697
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1099.30
698
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_113762_1_4_1099_30.msgpack
699
+ :count: 590
700
+ :type: bloom
701
+ :code_systems:
702
+ - http://snomed.info/sct
703
+ - http://terminology.hl7.org/CodeSystem/v3-ParticipationFunction
704
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.6
705
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_113762_1_4_1010_6.msgpack
706
+ :count: 196
707
+ :type: bloom
708
+ :code_systems:
709
+ - http://hl7.org/fhir/sid/cvx
710
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.4
711
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_113762_1_4_1010_4.msgpack
712
+ :count: 1000
713
+ :type: bloom
714
+ :code_systems:
715
+ - http://www.nlm.nih.gov/research/umls/rxnorm
716
+ - :url: http://hl7.org/fhir/ValueSet/medicationrequest-category
717
+ :file: hl7_org_fhir_ValueSet_medicationrequest-category.msgpack
718
+ :count: 4
719
+ :type: bloom
720
+ :code_systems:
721
+ - http://terminology.hl7.org/CodeSystem/medicationrequest-category
722
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-vital-signs
723
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-vital-signs.msgpack
724
+ :count: 19
725
+ :type: bloom
726
+ :code_systems:
727
+ - http://loinc.org
728
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.11.20.9.38
729
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_113883_11_20_9_38.msgpack
730
+ :count: 8
731
+ :type: bloom
732
+ :code_systems:
733
+ - http://snomed.info/sct
734
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.1066
735
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_114222_4_11_1066.msgpack
736
+ :count: 856
737
+ :type: bloom
738
+ :code_systems:
739
+ - http://nucc.org/provider-taxonomy
740
+ - urn:oid:2.16.840.1.113883.6.101
741
+ - :url: http://hl7.org/fhir/ValueSet/resource-types
742
+ :file: hl7_org_fhir_ValueSet_resource-types.msgpack
743
+ :count: 148
744
+ :type: bloom
745
+ :code_systems:
746
+ - http://hl7.org/fhir/resource-types
747
+ - :url: http://hl7.org/fhir/ValueSet/condition-category
748
+ :file: hl7_org_fhir_ValueSet_condition-category.msgpack
749
+ :count: 2
750
+ :type: bloom
751
+ :code_systems:
752
+ - http://terminology.hl7.org/CodeSystem/condition-category
753
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-problem-or-health-concern
754
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-problem-or-health-concern.msgpack
755
+ :count: 2
756
+ :type: bloom
757
+ :code_systems:
758
+ - http://terminology.hl7.org/CodeSystem/condition-category
759
+ - http://hl7.org/fhir/us/core/CodeSystem/condition-category
760
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-goal-description
761
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-goal-description.msgpack
762
+ :count: 760133
763
+ :type: bloom
764
+ :code_systems:
765
+ - http://snomed.info/sct
766
+ - http://loinc.org
767
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-common-sdoh-assessments
768
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-common-sdoh-assessments.msgpack
769
+ :count: 47
770
+ :type: bloom
771
+ :code_systems:
772
+ - http://loinc.org
773
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-sexual-orientation
774
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-sexual-orientation.msgpack
775
+ :count: 6
776
+ :type: bloom
777
+ :code_systems:
778
+ - http://snomed.info/sct
779
+ - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
780
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-survey-codes
781
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-survey-codes.msgpack
782
+ :count: 11120
783
+ :type: bloom
784
+ :code_systems:
785
+ - http://loinc.org
786
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-clinical-test-codes
787
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-clinical-test-codes.msgpack
788
+ :count: 461
789
+ :type: bloom
790
+ :code_systems:
791
+ - http://loinc.org
792
+ - :url: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1021.32
793
+ :file: cts_nlm_nih_gov_fhir_ValueSet_2_16_840_1_113762_1_4_1021_32.msgpack
794
+ :count: 7
795
+ :type: bloom
796
+ :code_systems:
797
+ - http://snomed.info/sct
798
+ - http://terminology.hl7.org/CodeSystem/v3-NullFlavor
799
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-tags
800
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-tags.msgpack
801
+ :count: 1
802
+ :type: bloom
803
+ :code_systems:
804
+ - http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
805
+ - :url: http://hl7.org/fhir/ValueSet/questionnaire-answers-status
806
+ :file: hl7_org_fhir_ValueSet_questionnaire-answers-status.msgpack
807
+ :count: 5
808
+ :type: bloom
809
+ :code_systems:
810
+ - http://hl7.org/fhir/questionnaire-answers-status
811
+ - urn:oid:2.16.840.1.113883.6.101
812
+ - :url: http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype
813
+ :file: hl7_org_fhir_ValueSet_relatedperson-relationshiptype.msgpack
814
+ :count: 117
815
+ :type: bloom
816
+ :code_systems:
817
+ - http://terminology.hl7.org/CodeSystem/v2-0131
818
+ - http://terminology.hl7.org/CodeSystem/v3-RoleCode
819
+ - :url: http://hl7.org/fhir/ValueSet/request-intent
820
+ :file: hl7_org_fhir_ValueSet_request-intent.msgpack
821
+ :count: 9
822
+ :type: bloom
823
+ :code_systems:
824
+ - http://hl7.org/fhir/request-intent
825
+ - :url: http://hl7.org/fhir/us/core/ValueSet/us-core-servicerequest-category
826
+ :file: hl7_org_fhir_us_core_ValueSet_us-core-servicerequest-category.msgpack
827
+ :count: 8
828
+ :type: bloom
829
+ :code_systems:
830
+ - http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
831
+ - http://snomed.info/sct
669
832
  - :url: urn:ietf:bcp:47
670
833
  :file: urn_ietf_bcp_47.msgpack
671
- :count: 8533
834
+ :count: 8562
672
835
  :type: bloom
673
836
  :code_systems: urn:ietf:bcp:47
674
837
  - :url: http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
@@ -746,6 +909,11 @@
746
909
  :count: 862
747
910
  :type: bloom
748
911
  :code_systems: http://nucc.org/provider-taxonomy
912
+ - :url: urn:oid:2.16.840.1.113883.6.101
913
+ :file: urn_oid_2_16_840_1_113883_6_101.msgpack
914
+ :count: 970
915
+ :type: bloom
916
+ :code_systems: urn:oid:2.16.840.1.113883.6.101
749
917
  - :url: http://terminology.hl7.org/CodeSystem/condition-clinical
750
918
  :file: terminology_hl7_org_CodeSystem_condition-clinical.msgpack
751
919
  :count: 6
@@ -831,6 +999,26 @@
831
999
  :count: 4
832
1000
  :type: bloom
833
1001
  :code_systems: http://hl7.org/fhir/document-relationship-type
1002
+ - :url: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
1003
+ :file: terminology_hl7_org_CodeSystem_v3-Confidentiality.msgpack
1004
+ :count: 20
1005
+ :type: bloom
1006
+ :code_systems: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
1007
+ - :url: http://terminology.hl7.org/CodeSystem/v3-ActCode
1008
+ :file: terminology_hl7_org_CodeSystem_v3-ActCode.msgpack
1009
+ :count: 1116
1010
+ :type: bloom
1011
+ :code_systems: http://terminology.hl7.org/CodeSystem/v3-ActCode
1012
+ - :url: http://terminology.hl7.org/CodeSystem/v3-ObservationValue
1013
+ :file: terminology_hl7_org_CodeSystem_v3-ObservationValue.msgpack
1014
+ :count: 250
1015
+ :type: bloom
1016
+ :code_systems: http://terminology.hl7.org/CodeSystem/v3-ObservationValue
1017
+ - :url: http://terminology.hl7.org/CodeSystem/v3-ActReason
1018
+ :file: terminology_hl7_org_CodeSystem_v3-ActReason.msgpack
1019
+ :count: 280
1020
+ :type: bloom
1021
+ :code_systems: http://terminology.hl7.org/CodeSystem/v3-ActReason
834
1022
  - :url: urn:ietf:bcp:13
835
1023
  :file: urn_ietf_bcp_13.msgpack
836
1024
  :count: 2382
@@ -856,11 +1044,6 @@
856
1044
  :count: 9
857
1045
  :type: bloom
858
1046
  :code_systems: http://hl7.org/fhir/encounter-status
859
- - :url: http://terminology.hl7.org/CodeSystem/v3-ActCode
860
- :file: terminology_hl7_org_CodeSystem_v3-ActCode.msgpack
861
- :count: 1116
862
- :type: bloom
863
- :code_systems: http://terminology.hl7.org/CodeSystem/v3-ActCode
864
1047
  - :url: http://www.ama-assn.org/go/cpt
865
1048
  :file: www_ama-assn_org_go_cpt.msgpack
866
1049
  :count: 14654
@@ -963,7 +1146,7 @@
963
1146
  :code_systems: http://hl7.org/fhir/address-type
964
1147
  - :url: https://www.usps.com/
965
1148
  :file: www_usps_com_.msgpack
966
- :count: 59
1149
+ :count: 62
967
1150
  :type: bloom
968
1151
  :code_systems: https://www.usps.com/
969
1152
  - :url: http://hl7.org/fhir/days-of-week
@@ -1076,26 +1259,36 @@
1076
1259
  :count: 3
1077
1260
  :type: bloom
1078
1261
  :code_systems: http://terminology.hl7.org/CodeSystem/v3-AdministrativeGender
1079
- - :url: urn:oid:2.16.840.1.113883.6.285
1080
- :file: urn_oid_2_16_840_1_113883_6_285.msgpack
1262
+ - :url: http://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets
1263
+ :file: www_cms_gov_Medicare_Coding_HCPCSReleaseCodeSets.msgpack
1081
1264
  :count: 7783
1082
1265
  :type: bloom
1083
- :code_systems: urn:oid:2.16.840.1.113883.6.285
1266
+ :code_systems: http://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets
1084
1267
  - :url: http://www.cms.gov/Medicare/Coding/ICD10
1085
1268
  :file: www_cms_gov_Medicare_Coding_ICD10.msgpack
1086
1269
  :count: 190673
1087
1270
  :type: bloom
1088
1271
  :code_systems: http://www.cms.gov/Medicare/Coding/ICD10
1272
+ - :url: http://www.ada.org/cdt
1273
+ :file: www_ada_org_cdt.msgpack
1274
+ :count: 867
1275
+ :type: bloom
1276
+ :code_systems: http://www.ada.org/cdt
1277
+ - :url: urn:oid:2.16.840.1.113883.6.285
1278
+ :file: urn_oid_2_16_840_1_113883_6_285.msgpack
1279
+ :count: 7783
1280
+ :type: bloom
1281
+ :code_systems: urn:oid:2.16.840.1.113883.6.285
1282
+ - :url: http://ada.org/cdt
1283
+ :file: ada_org_cdt.msgpack
1284
+ :count: 867
1285
+ :type: bloom
1286
+ :code_systems: http://ada.org/cdt
1089
1287
  - :url: urn:oid:2.16.840.1.113883.6.13
1090
1288
  :file: urn_oid_2_16_840_1_113883_6_13.msgpack
1091
1289
  :count: 867
1092
1290
  :type: bloom
1093
1291
  :code_systems: urn:oid:2.16.840.1.113883.6.13
1094
- - :url: http://terminology.hl7.org/CodeSystem/v3-ActReason
1095
- :file: terminology_hl7_org_CodeSystem_v3-ActReason.msgpack
1096
- :count: 280
1097
- :type: bloom
1098
- :code_systems: http://terminology.hl7.org/CodeSystem/v3-ActReason
1099
1292
  - :url: http://terminology.hl7.org/CodeSystem/v3-DocumentCompletion
1100
1293
  :file: terminology_hl7_org_CodeSystem_v3-DocumentCompletion.msgpack
1101
1294
  :count: 9
@@ -1121,3 +1314,23 @@
1121
1314
  :count: 5
1122
1315
  :type: bloom
1123
1316
  :code_systems: http://hl7.org/fhir/provenance-entity-role
1317
+ - :url: http://terminology.hl7.org/CodeSystem/v3-ParticipationFunction
1318
+ :file: terminology_hl7_org_CodeSystem_v3-ParticipationFunction.msgpack
1319
+ :count: 49
1320
+ :type: bloom
1321
+ :code_systems: http://terminology.hl7.org/CodeSystem/v3-ParticipationFunction
1322
+ - :url: http://terminology.hl7.org/CodeSystem/medicationrequest-category
1323
+ :file: terminology_hl7_org_CodeSystem_medicationrequest-category.msgpack
1324
+ :count: 4
1325
+ :type: bloom
1326
+ :code_systems: http://terminology.hl7.org/CodeSystem/medicationrequest-category
1327
+ - :url: http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
1328
+ :file: hl7_org_fhir_us_core_CodeSystem_us-core-tags.msgpack
1329
+ :count: 1
1330
+ :type: bloom
1331
+ :code_systems: http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
1332
+ - :url: http://hl7.org/fhir/questionnaire-answers-status
1333
+ :file: hl7_org_fhir_questionnaire-answers-status.msgpack
1334
+ :count: 5
1335
+ :type: bloom
1336
+ :code_systems: http://hl7.org/fhir/questionnaire-answers-status
@@ -10,6 +10,31 @@ module Inferno
10
10
  module FHIRPackageManager
11
11
  class << self
12
12
  REGISTRY_SERVER_URL = 'https://packages.fhir.org'.freeze
13
+ REQUIRED_VSAC_VALUE_SET_URLS = [
14
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1186.8',
15
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1099.30',
16
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.6',
17
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.4',
18
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.11.20.9.38',
19
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.1066',
20
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.1.11.10267',
21
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1099.27',
22
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.88.12.80.17',
23
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.5',
24
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1021.32',
25
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836',
26
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.1.11.14914',
27
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837',
28
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.877',
29
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1',
30
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1186.1',
31
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.88.12.80.17',
32
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1021.102',
33
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1021.103',
34
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1186.2',
35
+ 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.2074.1.1.3'
36
+ ].freeze
37
+
13
38
  # Get the FHIR Package from the registry.
14
39
  #
15
40
  # e.g. get_package('hl7.fhir.us.core#3.1.1')
@@ -49,6 +74,8 @@ module Inferno
49
74
  resource = JSON.parse(entry.read) if file_name.end_with? '.json'
50
75
  next unless resource&.[]('url')
51
76
 
77
+ next if package.start_with?('us.nlm.vsac') && !REQUIRED_VSAC_VALUE_SET_URLS.include?(resource['url'])
78
+
52
79
  encoded_name = "#{encode_name(resource['url'])}.json"
53
80
  encoded_file_name = File.join(path, encoded_name)
54
81
  if File.exist?(encoded_file_name) && !resource['url'] == JSON.parse(File.read(encoded_file_name))['url']
@@ -49,6 +49,18 @@ module Inferno
49
49
  end
50
50
  end
51
51
 
52
+ def add_alternative_code_system_names(code_systems)
53
+ code_systems << 'urn:oid:2.16.840.1.113883.6.285' if code_systems.include? 'http://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets'
54
+ code_systems << 'urn:oid:2.16.840.1.113883.6.13' if code_systems.include? 'http://ada.org/cdt'
55
+ if code_systems.include? 'http://www.ada.org/cdt'
56
+ code_systems << 'http://ada.org/cdt'
57
+ code_systems << 'urn:oid:2.16.840.1.113883.6.13'
58
+ end
59
+ code_systems << 'urn:oid:2.16.840.1.113883.6.101' if code_systems.include? 'http://nucc.org/provider-taxonomy'
60
+ code_systems << 'urn:oid:2.16.840.1.113883.6.101' if code_systems.include? 'http://hl7.org/fhir/questionnaire-answers-status'
61
+ code_systems.uniq!
62
+ end
63
+
52
64
  # Creates the valueset validators, based on the passed in parameters and
53
65
  # the value_sets_repo
54
66
  #
@@ -86,13 +98,17 @@ module Inferno
86
98
  begin
87
99
  # Save the validator to file, and get the "new" count of number of codes
88
100
  new_count = save_to_file(vs.value_set, filename, type)
101
+ code_systems = vs.all_included_code_systems
102
+ Inferno.logger.debug " #{new_count} codes"
103
+ next if new_count.zero?
89
104
 
105
+ add_alternative_code_system_names(code_systems)
90
106
  {
91
107
  url: vs_url,
92
108
  file: name_by_type(File.basename(filename), type),
93
109
  count: new_count,
94
110
  type: type.to_s,
95
- code_systems: vs.included_code_systems
111
+ code_systems: code_systems
96
112
  }
97
113
  rescue UnknownCodeSystemException,
98
114
  FilterOperationException,
@@ -190,6 +206,11 @@ module Inferno
190
206
 
191
207
  # Chooses which filetype to save the validator as, based on the type variable passed in
192
208
  def save_to_file(codeset, filename, type)
209
+ if codeset.blank?
210
+ Inferno.logger.debug "Unable to save #{filename} because it contains no codes"
211
+ return 0
212
+ end
213
+
193
214
  case type
194
215
  when :bloom
195
216
  save_bloom_to_file(codeset, name_by_type(filename, type))
@@ -17,7 +17,7 @@ module Inferno
17
17
 
18
18
  def run
19
19
  Loader.register_umls_db db_for_version
20
- Loader.load_value_sets_from_directory(Inferno::Terminology::PACKAGE_DIR, true)
20
+ Loader.load_value_sets_from_directory(PACKAGE_DIR, true)
21
21
  Loader.create_validators(
22
22
  type: type,
23
23
  minimum_binding_strength: minimum_binding_strength,
@@ -16,6 +16,11 @@ module Inferno
16
16
 
17
17
  def download_us_core
18
18
  FHIRPackageManager.get_package('hl7.fhir.us.core#3.1.1', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
19
+ FHIRPackageManager.get_package('hl7.fhir.us.core#4.0.0', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
20
+ FHIRPackageManager.get_package('hl7.fhir.us.core#5.0.1', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
21
+ FHIRPackageManager.get_package(
22
+ 'us.nlm.vsac#0.7.0', File.join(PACKAGE_DIR, 'vsac'), ['ValueSet', 'CodeSystem']
23
+ )
19
24
  end
20
25
 
21
26
  def download_fhir_expansions
@@ -64,6 +64,10 @@ module Inferno
64
64
  abbreviation: 'NCI_UCUM',
65
65
  name: 'Unified Code for Units of Measure (UCUM)'
66
66
  }.freeze,
67
+ 'urn:oid:2.16.840.1.113883.6.101' => {
68
+ abbreviation: 'NUCCHCPT',
69
+ name: 'National Uniform Claim Committee - Health Care Provider Taxonomy (NUCCHCPT)'
70
+ },
67
71
  'http://nucc.org/provider-taxonomy' => {
68
72
  abbreviation: 'NUCCHCPT',
69
73
  name: 'National Uniform Claim Committee - Health Care Provider Taxonomy (NUCCHCPT)'
@@ -72,6 +76,10 @@ module Inferno
72
76
  abbreviation: 'CPT',
73
77
  name: 'Current Procedural Terminology (CPT)'
74
78
  }.freeze,
79
+ 'http://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets' => {
80
+ abbreviation: 'HCPCS',
81
+ name: 'Healthcare Common Procedure Coding System (HCPCS)'
82
+ }.freeze,
75
83
  'urn:oid:2.16.840.1.113883.6.285' => {
76
84
  abbreviation: 'HCPCS',
77
85
  name: 'Healthcare Common Procedure Coding System (HCPCS)'
@@ -79,7 +87,15 @@ module Inferno
79
87
  'urn:oid:2.16.840.1.113883.6.13' => {
80
88
  abbreviation: 'CDT',
81
89
  name: 'Code on Dental Procedures and Nomenclature (CDT)'
82
- }.freeze
90
+ }.freeze,
91
+ 'http://ada.org/cdt' => {
92
+ abbreviation: 'CDT',
93
+ name: 'Code on Dental Procedures and Nomenclature (CDT)'
94
+ },
95
+ 'http://www.ada.org/cdt' => {
96
+ abbreviation: 'CDT',
97
+ name: 'Code on Dental Procedures and Nomenclature (CDT)'
98
+ }
83
99
  }.freeze
84
100
 
85
101
  CODE_SYS = {
@@ -88,7 +104,19 @@ module Inferno
88
104
  'http://ihe.net/fhir/ValueSet/IHE.FormatCode.codesystem' =>
89
105
  -> { value_sets_repo.find('http://hl7.org/fhir/ValueSet/formatcodes').value_set },
90
106
  'https://www.usps.com/' =>
91
- -> { value_sets_repo.find('http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state').value_set }
107
+ lambda do
108
+ codes = [
109
+ 'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM',
110
+ 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA',
111
+ 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV',
112
+ 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW',
113
+ 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA',
114
+ 'WA', 'WV', 'WI', 'WY', 'AE', 'AP', 'AA'
115
+ ]
116
+ codes.each_with_object(Set.new) do |code, set|
117
+ set.add(system: 'https://www.usps.com/', code: code)
118
+ end
119
+ end
92
120
  }.freeze
93
121
 
94
122
  # https://www.nlm.nih.gov/research/umls/knowledge_sources/metathesaurus/release/attribute_names.html
@@ -104,7 +132,9 @@ module Inferno
104
132
  end
105
133
 
106
134
  def umls_abbreviation(system)
107
- return SAB.dig(system, :abbreviation) if system != 'http://nucc.org/provider-taxonomy'
135
+ if system != 'http://nucc.org/provider-taxonomy' && system != 'urn:oid:2.16.840.1.113883.6.101'
136
+ return SAB.dig(system, :abbreviation)
137
+ end
108
138
 
109
139
  @nucc_system ||= # rubocop:disable Naming/MemoizedInstanceVariableName
110
140
  if @db.execute("SELECT COUNT(*) FROM mrconso WHERE SAB = 'NUCCPT'").flatten.first.positive?
@@ -166,10 +196,23 @@ module Inferno
166
196
  @value_set.length
167
197
  end
168
198
 
199
+ def all_included_code_systems
200
+ (included_code_systems + code_systems_in_codings).uniq
201
+ end
202
+
169
203
  def included_code_systems
170
204
  @value_set_model.compose.include.map(&:system).compact.uniq
171
205
  end
172
206
 
207
+ def code_systems_in_codings
208
+ return [] if value_set.blank?
209
+
210
+ value_set
211
+ .map { |coding| coding[:system] }
212
+ .compact
213
+ .uniq
214
+ end
215
+
173
216
  TOO_COSTLY_URL = 'http://hl7.org/fhir/StructureDefinition/valueset-toocostly'.freeze
174
217
  def too_costly?
175
218
  @value_set_model&.expansion&.extension&.find { |vs| vs.url == TOO_COSTLY_URL }&.value
@@ -318,9 +361,9 @@ module Inferno
318
361
 
319
362
  unless vscs.valueSet.empty?
320
363
  # If no concepts or filtered systems were present and already created the intersection_set
321
- im_val_set = import_value_set(vscs.valueSet.first)
364
+ im_val_set = import_value_set(vscs.valueSet.first).value_set
322
365
  vscs.valueSet.drop(1).each do |im_val|
323
- im_val_set = im_val_set.intersection(im_val)
366
+ im_val_set = im_val_set.intersection(import_value_set(im_val).value_set)
324
367
  end
325
368
  intersection_set = intersection_set.nil? ? im_val_set : intersection_set.intersection(im_val_set)
326
369
  end
@@ -405,6 +448,9 @@ module Inferno
405
448
  raise FilterOperationException, filter&.op
406
449
  end
407
450
  filtered_set
451
+ rescue UnknownCodeSystemException => e
452
+ Inferno.logger.debug e.message
453
+ filtered_set.presence || Set.new
408
454
  end
409
455
 
410
456
  # Imports the ValueSet with the provided URL from the known local ValueSet Authority