onc_certification_g10_test_kit 6.0.3 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7c3b147bf3895a43988f8d02e947ac646522fb0637c6bb33ca7d00fe6d8728b
|
4
|
+
data.tar.gz: b7a1f24fb4775b196f1eb48ba8bb995754580dbbd48c1dd1e066e56cb3e8cc45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b3460861a86ba5358b79351fd75d0335ba7cb75a575f7e92780bee257719c0947d79f1670481187b392376888f606384a6a84c38f441f6411cb14d3f726926
|
7
|
+
data.tar.gz: 16f84edff5ac43c598d0876f2d7ec4f78d8e7d661d08bcd679d243006b00329a258d78429485d74bf60bcfd5810ec703c36e5b6ee963b082b2787ec80a331511
|
@@ -3,12 +3,6 @@ require 'inferno/repositories/in_memory_repository'
|
|
3
3
|
module Inferno
|
4
4
|
module Repositories
|
5
5
|
class Validators < InMemoryRepository
|
6
|
-
def self.index_by_id
|
7
|
-
@all_by_id = {}
|
8
|
-
all.each { |vs| @all_by_id[vs.url] = vs }
|
9
|
-
@all_by_id
|
10
|
-
end
|
11
|
-
|
12
6
|
def all_urls
|
13
7
|
all_by_id.keys
|
14
8
|
end
|
@@ -3,15 +3,9 @@ require 'inferno/repositories/in_memory_repository'
|
|
3
3
|
module Inferno
|
4
4
|
module Repositories
|
5
5
|
class ValueSets < InMemoryRepository
|
6
|
-
def self.index_by_id
|
7
|
-
@all_by_id = {}
|
8
|
-
all.each { |vs| @all_by_id[vs.url] = vs }
|
9
|
-
@all_by_id
|
10
|
-
end
|
11
|
-
|
12
6
|
# @return [Hash] a Hash where the keys are vs urls and the values are vs
|
13
7
|
def select_by_url(urls)
|
14
|
-
|
8
|
+
all_by_id.slice(*urls)
|
15
9
|
end
|
16
10
|
|
17
11
|
def select_by_binding_strength(strengths)
|
@@ -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:
|
124
|
+
:count: 12002
|
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:
|
137
|
+
:count: 2578
|
138
138
|
:type: bloom
|
139
139
|
:code_systems:
|
140
140
|
- urn:ietf:bcp:13
|
@@ -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:
|
507
|
+
:count: 292887
|
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:
|
517
|
+
:count: 2578
|
518
518
|
:type: bloom
|
519
519
|
:code_systems: urn:ietf:bcp:13
|
520
520
|
- :url: http://hl7.org/fhir/identifier-use
|
@@ -669,7 +669,7 @@
|
|
669
669
|
:code_systems: http://terminology.hl7.org/CodeSystem/observation-category
|
670
670
|
- :url: http://snomed.info/sct
|
671
671
|
:file: snomed_info_sct.msgpack
|
672
|
-
:count:
|
672
|
+
:count: 517626
|
673
673
|
:type: bloom
|
674
674
|
:code_systems: http://snomed.info/sct
|
675
675
|
- :url: http://terminology.hl7.org/CodeSystem/data-absent-reason
|
@@ -10,6 +10,8 @@ module Inferno
|
|
10
10
|
module FHIRPackageManager
|
11
11
|
class << self
|
12
12
|
REGISTRY_SERVER_URL = 'https://packages.fhir.org'.freeze
|
13
|
+
US_CORE_7_PACKAGE_URL = 'https://hl7.org/fhir/us/core/STU7/package.tgz'.freeze
|
14
|
+
VSAC_18_PACKAGE_URL = 'https://packages2.fhir.org/packages/us.nlm.vsac/0.18.0'.freeze
|
13
15
|
REQUIRED_VSAC_VALUE_SET_URLS = [
|
14
16
|
'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836',
|
15
17
|
'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.1.11.14914',
|
@@ -44,10 +46,17 @@ module Inferno
|
|
44
46
|
#
|
45
47
|
# @param [String] package The FHIR Package
|
46
48
|
def get_package(package, destination, desired_types = [])
|
47
|
-
package_url = package
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
package_url = case package
|
50
|
+
when 'hl7.fhir.us.core#7.0.0'
|
51
|
+
US_CORE_7_PACKAGE_URL
|
52
|
+
when 'us.nlm.vsac#0.18.0'
|
53
|
+
VSAC_18_PACKAGE_URL
|
54
|
+
else
|
55
|
+
package
|
56
|
+
.split('#')
|
57
|
+
.prepend(REGISTRY_SERVER_URL)
|
58
|
+
.join('/')
|
59
|
+
end
|
51
60
|
|
52
61
|
tar_file_name = "tmp/#{package.split('#').join('-')}.tgz"
|
53
62
|
|
@@ -199,7 +199,8 @@ module Inferno
|
|
199
199
|
USCoreTestKit::USCoreV311::USCoreTestSuite.metadata +
|
200
200
|
USCoreTestKit::USCoreV400::USCoreTestSuite.metadata +
|
201
201
|
USCoreTestKit::USCoreV501::USCoreTestSuite.metadata +
|
202
|
-
USCoreTestKit::USCoreV610::USCoreTestSuite.metadata
|
202
|
+
USCoreTestKit::USCoreV610::USCoreTestSuite.metadata +
|
203
|
+
USCoreTestKit::USCoreV700::USCoreTestSuite.metadata
|
203
204
|
|
204
205
|
all_metadata =
|
205
206
|
all_metadata
|
@@ -19,8 +19,9 @@ module Inferno
|
|
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
21
|
FHIRPackageManager.get_package('hl7.fhir.us.core#6.1.0', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
|
22
|
+
FHIRPackageManager.get_package('hl7.fhir.us.core#7.0.0', PACKAGE_DIR, ['ValueSet', 'CodeSystem'])
|
22
23
|
FHIRPackageManager.get_package(
|
23
|
-
'us.nlm.vsac#0.
|
24
|
+
'us.nlm.vsac#0.18.0', File.join(PACKAGE_DIR, 'vsac'), ['ValueSet', 'CodeSystem']
|
24
25
|
)
|
25
26
|
end
|
26
27
|
|
@@ -13,7 +13,8 @@ module Inferno
|
|
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
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
|
+
'2023' => 'https://download.nlm.nih.gov/umls/kss/2023AA/umls-2023AA-full.zip',
|
17
|
+
'2024' => 'https://download.nlm.nih.gov/umls/kss/2024AA/umls-2024AA-full.zip'
|
17
18
|
}.freeze
|
18
19
|
TICKET_GRANTING_TICKET_URL = 'https://utslogin.nlm.nih.gov/cas/v1/api-key'.freeze
|
19
20
|
|
@@ -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[
|
19
|
+
%w[2024].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)
|
@@ -0,0 +1,74 @@
|
|
1
|
+
require_relative 'g10_options'
|
2
|
+
|
3
|
+
module ONCCertificationG10TestKit
|
4
|
+
# This is a list of all resource types mapped to USCDI data classes or elements,
|
5
|
+
# and shall be supported by certified server implementation:
|
6
|
+
|
7
|
+
# * AllergyIntolerance
|
8
|
+
# * CarePlan
|
9
|
+
# * CareTeam
|
10
|
+
# * Condition
|
11
|
+
# * Device
|
12
|
+
# * DiagnosticReport
|
13
|
+
# * DocumentReference
|
14
|
+
# * Encounter
|
15
|
+
# * Goal
|
16
|
+
# * Immunization
|
17
|
+
# * MedicationRequest
|
18
|
+
# * Observation
|
19
|
+
# * Organization
|
20
|
+
# * Patient
|
21
|
+
# * Practitioner
|
22
|
+
# * Procedure
|
23
|
+
# * Provenance
|
24
|
+
|
25
|
+
# For USCDI v2 / US Core v5.0.1, these resource types are added:
|
26
|
+
# * RelatedPerson
|
27
|
+
# * ServiceRequest
|
28
|
+
|
29
|
+
# For USCDI v3 / US Core v6.1.0, these resource types are added:
|
30
|
+
# * Coverage
|
31
|
+
# * MedicationDispense
|
32
|
+
# * Specimen
|
33
|
+
|
34
|
+
# For USCDI v4 / US Core v7.0.0, these resource types are added:
|
35
|
+
# * Location
|
36
|
+
module AllResources
|
37
|
+
ALL_RESOURCES =
|
38
|
+
[
|
39
|
+
'AllergyIntolerance',
|
40
|
+
'CarePlan',
|
41
|
+
'CareTeam',
|
42
|
+
'Condition',
|
43
|
+
'Device',
|
44
|
+
'DiagnosticReport',
|
45
|
+
'DocumentReference',
|
46
|
+
'Encounter',
|
47
|
+
'Goal',
|
48
|
+
'Immunization',
|
49
|
+
'MedicationRequest',
|
50
|
+
'Observation',
|
51
|
+
'Organization',
|
52
|
+
'Procedure',
|
53
|
+
'Patient',
|
54
|
+
'Practitioner',
|
55
|
+
'Provenance'
|
56
|
+
].freeze
|
57
|
+
|
58
|
+
V5_ALL_RESOURCES = (ALL_RESOURCES + ['RelatedPerson', 'ServiceRequest']).freeze
|
59
|
+
|
60
|
+
V6_ALL_RESOURCES = (V5_ALL_RESOURCES + ['Coverage', 'MedicationDispense', 'Specimen']).freeze
|
61
|
+
|
62
|
+
V7_ALL_RESOURCES = (V6_ALL_RESOURCES + ['Location']).freeze
|
63
|
+
|
64
|
+
def all_required_resources
|
65
|
+
return V5_ALL_RESOURCES if using_us_core_5?
|
66
|
+
|
67
|
+
return V6_ALL_RESOURCES if using_us_core_6?
|
68
|
+
|
69
|
+
return V7_ALL_RESOURCES if using_us_core_7?
|
70
|
+
|
71
|
+
ALL_RESOURCES
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|