us_core_test_kit 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/us_core_test_kit/custom_groups/base_smart_granular_scopes_group.rb +87 -6
- data/lib/us_core_test_kit/custom_groups/smart_app_launch_group.rb +28 -6
- data/lib/us_core_test_kit/custom_groups/smart_ehr_launch_stu2_2.rb +40 -0
- data/lib/us_core_test_kit/custom_groups/smart_standalone_launch_stu2_2_group.rb +40 -0
- data/lib/us_core_test_kit/custom_groups/v3.1.1/capability_statement_group.rb +2 -2
- data/lib/us_core_test_kit/custom_groups/v3.1.1/{profile_support_test.rb → resource_support_test.rb} +1 -1
- data/lib/us_core_test_kit/custom_groups/v7.0.0/smart_app_launch_group.rb +3 -3
- data/lib/us_core_test_kit/custom_groups/v7.0.0/smart_app_launch_stu2_2_group.rb +16 -0
- data/lib/us_core_test_kit/custom_groups/v7.0.0/smart_discovery_stu2_2_group.rb +11 -0
- data/lib/us_core_test_kit/generated/v3.1.1/us_core_test_suite.rb +8 -2
- data/lib/us_core_test_kit/generated/v4.0.0/us_core_test_suite.rb +8 -2
- data/lib/us_core_test_kit/generated/v5.0.1/us_core_test_suite.rb +8 -2
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_note_must_support_test.rb +0 -2
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_note_reference_resolution_test.rb +0 -1
- data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/metadata.yml +0 -4
- data/lib/us_core_test_kit/generated/v6.1.0/metadata.yml +3 -16
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner/metadata.yml +2 -6
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner/practitioner_address_test.rb +32 -0
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner/practitioner_must_support_test.rb +0 -6
- data/lib/us_core_test_kit/generated/v6.1.0/practitioner_group.rb +2 -0
- data/lib/us_core_test_kit/generated/v6.1.0/smokingstatus/metadata.yml +1 -6
- data/lib/us_core_test_kit/generated/v6.1.0/smokingstatus/smokingstatus_must_support_test.rb +1 -1
- data/lib/us_core_test_kit/generated/v6.1.0/us_core_test_suite.rb +16 -3
- data/lib/us_core_test_kit/generated/v7.0.0/diagnostic_report_note/diagnostic_report_note_must_support_test.rb +0 -2
- data/lib/us_core_test_kit/generated/v7.0.0/diagnostic_report_note/diagnostic_report_note_reference_resolution_test.rb +0 -1
- data/lib/us_core_test_kit/generated/v7.0.0/diagnostic_report_note/metadata.yml +0 -4
- data/lib/us_core_test_kit/generated/v7.0.0/metadata.yml +2 -10
- data/lib/us_core_test_kit/generated/v7.0.0/practitioner/metadata.yml +2 -6
- data/lib/us_core_test_kit/generated/v7.0.0/practitioner/practitioner_address_test.rb +32 -0
- data/lib/us_core_test_kit/generated/v7.0.0/practitioner/practitioner_must_support_test.rb +0 -6
- data/lib/us_core_test_kit/generated/v7.0.0/practitioner_group.rb +2 -0
- data/lib/us_core_test_kit/generated/v7.0.0/us_core_test_suite.rb +21 -5
- data/lib/us_core_test_kit/generator/group_generator.rb +1 -2
- data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_6.rb +23 -0
- data/lib/us_core_test_kit/generator/must_support_metadata_extractor_us_core_7.rb +5 -1
- data/lib/us_core_test_kit/generator/practitioner_address_test_generator.rb +68 -0
- data/lib/us_core_test_kit/generator/suite_generator.rb +15 -2
- data/lib/us_core_test_kit/generator.rb +6 -0
- data/lib/us_core_test_kit/must_support_test.rb +25 -22
- data/lib/us_core_test_kit/practitioner_address_test.rb +85 -0
- data/lib/us_core_test_kit/reference_resolution_test.rb +31 -23
- data/lib/us_core_test_kit/us_core_options.rb +9 -8
- data/lib/us_core_test_kit/version.rb +1 -1
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0b4059c21c91aac9937415541f2104a2f15ea911181d73e0e71b37efdb30d80
|
4
|
+
data.tar.gz: bc52f233f6620307ab10c64c03bfc3e223f7a9d6bd5e80e5bcecc4ace255a399
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b786a061e34bb45029cebf15641f360607d89f6c5b4c2249bd11171b6ca74403958795c7579ef170bee76a8061cb4f4b23dac257a3cdee91675510de3901eed5
|
7
|
+
data.tar.gz: b8ebd86009a0fc9cd4b3ab35a5f8078320d4c81612f3445793d524367cc446096a537461c1f30aaf5686f27110282a6717ed44f3460415b7def5ddd61ab905ae
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'inferno'
|
2
2
|
require 'smart_app_launch_test_kit'
|
3
|
-
require_relative '
|
4
|
-
require_relative '
|
5
|
-
require_relative '
|
3
|
+
require_relative 'smart_ehr_launch_stu2'
|
4
|
+
require_relative 'smart_scopes_constants'
|
5
|
+
require_relative 'smart_standalone_launch_stu2_group'
|
6
6
|
require_relative '../granular_scope_search_test'
|
7
7
|
require_relative '../granular_scope_read_test'
|
8
8
|
require_relative '../us_core_options'
|
9
|
-
require_relative '
|
9
|
+
require_relative 'granted_granular_scopes_test'
|
10
10
|
|
11
11
|
module USCoreTestKit
|
12
12
|
class BaseSmartGranularScopesGroup < Inferno::TestGroup
|
@@ -54,8 +54,29 @@ module USCoreTestKit
|
|
54
54
|
smart_credentials: {
|
55
55
|
name: :granular_scopes_1_credentials
|
56
56
|
}
|
57
|
-
}
|
57
|
+
}
|
58
|
+
)
|
58
59
|
group from: :us_core_smart_standalone_launch_stu2,
|
60
|
+
required_suite_options: USCoreOptions::SMART_2_REQUIREMENT,
|
61
|
+
optional: true,
|
62
|
+
config: {
|
63
|
+
inputs: {
|
64
|
+
smart_credentials: {
|
65
|
+
name: :granular_scopes_1_credentials
|
66
|
+
}
|
67
|
+
}
|
68
|
+
} do
|
69
|
+
groups[1].test from: :us_core_granted_granular_scopes,
|
70
|
+
config: {
|
71
|
+
inputs: {
|
72
|
+
received_scopes: {
|
73
|
+
name: :standalone_received_scopes
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
end
|
78
|
+
group from: :us_core_smart_standalone_launch_stu2_2,
|
79
|
+
required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT,
|
59
80
|
optional: true,
|
60
81
|
config: {
|
61
82
|
inputs: {
|
@@ -73,7 +94,28 @@ module USCoreTestKit
|
|
73
94
|
}
|
74
95
|
}
|
75
96
|
end
|
97
|
+
|
76
98
|
group from: :us_core_smart_ehr_launch_stu2,
|
99
|
+
required_suite_options: USCoreOptions::SMART_2_REQUIREMENT,
|
100
|
+
optional: true,
|
101
|
+
config: {
|
102
|
+
inputs: {
|
103
|
+
smart_credentials: {
|
104
|
+
name: :granular_scopes_1_credentials
|
105
|
+
}
|
106
|
+
}
|
107
|
+
} do
|
108
|
+
groups[1].test from: :us_core_granted_granular_scopes,
|
109
|
+
config: {
|
110
|
+
inputs: {
|
111
|
+
received_scopes: {
|
112
|
+
name: :ehr_received_scopes
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
end
|
117
|
+
group from: :us_core_smart_ehr_launch_stu2_2,
|
118
|
+
required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT,
|
77
119
|
optional: true,
|
78
120
|
config: {
|
79
121
|
inputs: {
|
@@ -113,6 +155,26 @@ module USCoreTestKit
|
|
113
155
|
)
|
114
156
|
|
115
157
|
group from: :us_core_smart_standalone_launch_stu2,
|
158
|
+
required_suite_options: USCoreOptions::SMART_2_REQUIREMENT,
|
159
|
+
optional: true,
|
160
|
+
config: {
|
161
|
+
inputs: {
|
162
|
+
smart_credentials: {
|
163
|
+
name: :granular_scopes_2_credentials
|
164
|
+
}
|
165
|
+
}
|
166
|
+
} do
|
167
|
+
groups[1].test from: :us_core_granted_granular_scopes,
|
168
|
+
config: {
|
169
|
+
inputs: {
|
170
|
+
received_scopes: {
|
171
|
+
name: :standalone_received_scopes
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
end
|
176
|
+
group from: :us_core_smart_standalone_launch_stu2_2,
|
177
|
+
required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT,
|
116
178
|
optional: true,
|
117
179
|
config: {
|
118
180
|
inputs: {
|
@@ -130,9 +192,28 @@ module USCoreTestKit
|
|
130
192
|
}
|
131
193
|
}
|
132
194
|
end
|
133
|
-
|
134
195
|
|
135
196
|
group from: :us_core_smart_ehr_launch_stu2,
|
197
|
+
required_suite_options: USCoreOptions::SMART_2_REQUIREMENT,
|
198
|
+
optional: true,
|
199
|
+
config: {
|
200
|
+
inputs: {
|
201
|
+
smart_credentials: {
|
202
|
+
name: :granular_scopes_2_credentials
|
203
|
+
}
|
204
|
+
}
|
205
|
+
} do
|
206
|
+
groups[1].test from: :us_core_granted_granular_scopes,
|
207
|
+
config: {
|
208
|
+
inputs: {
|
209
|
+
received_scopes: {
|
210
|
+
name: :ehr_received_scopes
|
211
|
+
}
|
212
|
+
}
|
213
|
+
}
|
214
|
+
end
|
215
|
+
group from: :us_core_smart_ehr_launch_stu2_2,
|
216
|
+
required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT,
|
136
217
|
optional: true,
|
137
218
|
config: {
|
138
219
|
inputs: {
|
@@ -1,18 +1,22 @@
|
|
1
1
|
require 'smart_app_launch_test_kit'
|
2
2
|
require_relative '../us_core_options'
|
3
|
-
require_relative '
|
4
|
-
require_relative '
|
5
|
-
require_relative '
|
6
|
-
require_relative '
|
3
|
+
require_relative 'smart_ehr_launch_stu1'
|
4
|
+
require_relative 'smart_ehr_launch_stu2'
|
5
|
+
require_relative 'smart_ehr_launch_stu2_2'
|
6
|
+
require_relative 'smart_standalone_launch_stu1_group'
|
7
|
+
require_relative 'smart_standalone_launch_stu2_group'
|
8
|
+
require_relative 'smart_standalone_launch_stu2_2_group'
|
7
9
|
|
8
10
|
module USCoreTestKit
|
9
11
|
class SmartAppLaunchGroup < Inferno::TestGroup
|
10
12
|
id :us_core_smart_app_launch
|
11
13
|
title 'SMART App Launch'
|
12
14
|
|
13
|
-
SMART_V1_RESOURCE_LEVEL_SCOPES =
|
15
|
+
SMART_V1_RESOURCE_LEVEL_SCOPES = 'launch/patient openid fhirUser offline_access patient/Medication.read patient/AllergyIntolerance.read patient/CarePlan.read patient/CareTeam.read patient/Condition.read patient/Device.read patient/DiagnosticReport.read patient/DocumentReference.read patient/Encounter.read patient/Goal.read patient/Immunization.read patient/Location.read patient/MedicationRequest.read patient/Observation.read patient/Organization.read patient/Patient.read patient/Practitioner.read patient/Procedure.read patient/Provenance.read patient/PractitionerRole.read patient/ServiceRequest.read patient/RelatedPerson.read patient/Specimen.read patient/MedicationDispense.read patient/Coverage.read patient/Location.read patient/media.read'.freeze
|
14
16
|
|
15
|
-
SMART_V2_RESOURCE_LEVEL_SCOPES =
|
17
|
+
SMART_V2_RESOURCE_LEVEL_SCOPES = 'launch/patient openid fhirUser offline_access patient/Medication.rs patient/AllergyIntolerance.rs patient/CarePlan.rs patient/CareTeam.rs patient/Condition.rs patient/Device.rs patient/DiagnosticReport.rs patient/DocumentReference.rs patient/Encounter.rs patient/Goal.rs patient/Immunization.rs patient/Location.rs patient/MedicationRequest.rs patient/Observation.rs patient/Organization.rs patient/Patient.rs patient/Practitioner.rs patient/Procedure.rs patient/Provenance.rs patient/PractitionerRole.rs patient/ServiceRequest.rs patient/RelatedPerson.rs patient/Specimen.rs patient/MedicationDispense.rs patient/Coverage.rs patient/Location.rs patient/Media.rs'.freeze
|
18
|
+
|
19
|
+
SMART_V2_2_RESOURCE_LEVEL_SCOPES = 'launch/patient openid fhirUser offline_access patient/Medication.rs patient/AllergyIntolerance.rs patient/CarePlan.rs patient/CareTeam.rs patient/Condition.rs patient/Device.rs patient/DiagnosticReport.rs patient/DocumentReference.rs patient/Encounter.rs patient/Goal.rs patient/Immunization.rs patient/Location.rs patient/MedicationRequest.rs patient/Observation.rs patient/Organization.rs patient/Patient.rs patient/Practitioner.rs patient/Procedure.rs patient/Provenance.rs patient/PractitionerRole.rs patient/ServiceRequest.rs patient/RelatedPerson.rs patient/Specimen.rs patient/MedicationDispense.rs patient/Coverage.rs patient/Location.rs patient/Media.rs'.freeze
|
16
20
|
|
17
21
|
group from: :us_core_smart_standalone_launch_stu1,
|
18
22
|
required_suite_options: USCoreOptions::SMART_1_REQUIREMENT,
|
@@ -49,5 +53,23 @@ module USCoreTestKit
|
|
49
53
|
requested_scopes: { default: SmartAppLaunchGroup::SMART_V2_RESOURCE_LEVEL_SCOPES }
|
50
54
|
}
|
51
55
|
}
|
56
|
+
|
57
|
+
group from: :us_core_smart_standalone_launch_stu2_2,
|
58
|
+
required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT,
|
59
|
+
optional: true,
|
60
|
+
config: {
|
61
|
+
inputs: {
|
62
|
+
requested_scopes: { default: SmartAppLaunchGroup::SMART_V2_2_RESOURCE_LEVEL_SCOPES }
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
group from: :us_core_smart_ehr_launch_stu2_2,
|
67
|
+
required_suite_options: USCoreOptions::SMART_2_2_REQUIREMENT,
|
68
|
+
optional: true,
|
69
|
+
config: {
|
70
|
+
inputs: {
|
71
|
+
requested_scopes: { default: SmartAppLaunchGroup::SMART_V2_2_RESOURCE_LEVEL_SCOPES }
|
72
|
+
}
|
73
|
+
}
|
52
74
|
end
|
53
75
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module USCoreTestKit
|
2
|
+
class SmartEHRLaunchSTU22 < Inferno::TestGroup
|
3
|
+
id :us_core_smart_ehr_launch_stu2_2
|
4
|
+
title 'EHR Launch'
|
5
|
+
|
6
|
+
run_as_group
|
7
|
+
|
8
|
+
group from: :smart_discovery_stu2_2,
|
9
|
+
run_as_group: true
|
10
|
+
group from: :smart_ehr_launch_stu2_2,
|
11
|
+
run_as_group: true
|
12
|
+
|
13
|
+
group from: :smart_openid_connect_stu2_2 do
|
14
|
+
run_as_group
|
15
|
+
optional
|
16
|
+
config(
|
17
|
+
inputs: {
|
18
|
+
id_token: { name: :ehr_id_token },
|
19
|
+
client_id: { name: :ehr_client_id },
|
20
|
+
requested_scopes: { name: :ehr_requested_scopes },
|
21
|
+
access_token: { name: :ehr_access_token },
|
22
|
+
smart_credentials: { name: :ehr_smart_credentials }
|
23
|
+
}
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
group from: :smart_token_refresh_stu2 do
|
28
|
+
run_as_group
|
29
|
+
optional
|
30
|
+
config(
|
31
|
+
inputs: {
|
32
|
+
refresh_token: { name: :ehr_refresh_token },
|
33
|
+
client_id: { name: :ehr_client_id },
|
34
|
+
client_secret: { name: :ehr_client_secret },
|
35
|
+
received_scopes: { name: :ehr_received_scopes }
|
36
|
+
}
|
37
|
+
)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module USCoreTestKit
|
2
|
+
class SmartStandaloneLaunchSTU22 < Inferno::TestGroup
|
3
|
+
id :us_core_smart_standalone_launch_stu2_2
|
4
|
+
title 'Standalone Launch'
|
5
|
+
|
6
|
+
run_as_group
|
7
|
+
|
8
|
+
group from: :smart_discovery_stu2_2,
|
9
|
+
run_as_group: true
|
10
|
+
group from: :smart_standalone_launch_stu2_2,
|
11
|
+
run_as_group: true
|
12
|
+
|
13
|
+
group from: :smart_openid_connect_stu2_2 do
|
14
|
+
run_as_group
|
15
|
+
optional
|
16
|
+
config(
|
17
|
+
inputs: {
|
18
|
+
id_token: { name: :standalone_id_token },
|
19
|
+
client_id: { name: :standalone_client_id },
|
20
|
+
requested_scopes: { name: :standalone_requested_scopes },
|
21
|
+
access_token: { name: :standalone_access_token },
|
22
|
+
smart_credentials: { name: :standalone_smart_credentials }
|
23
|
+
}
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
group from: :smart_token_refresh_stu2 do
|
28
|
+
run_as_group
|
29
|
+
optional
|
30
|
+
config(
|
31
|
+
inputs: {
|
32
|
+
refresh_token: { name: :standalone_refresh_token },
|
33
|
+
client_id: { name: :standalone_client_id },
|
34
|
+
client_secret: { name: :standalone_client_secret },
|
35
|
+
received_scopes: { name: :standalone_received_scopes }
|
36
|
+
}
|
37
|
+
)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -2,7 +2,7 @@ require 'tls_test_kit'
|
|
2
2
|
require_relative '../capability_statement/conformance_support_test'
|
3
3
|
require_relative '../capability_statement/fhir_version_test'
|
4
4
|
require_relative '../capability_statement/json_support_test'
|
5
|
-
require_relative './
|
5
|
+
require_relative './resource_support_test'
|
6
6
|
|
7
7
|
module USCoreTestKit
|
8
8
|
module USCoreV311
|
@@ -100,7 +100,7 @@ module USCoreTestKit
|
|
100
100
|
test from: :us_core_fhir_version
|
101
101
|
test from: :us_core_json_support
|
102
102
|
|
103
|
-
test from: :
|
103
|
+
test from: :us_core_v311_resource_support do
|
104
104
|
config(
|
105
105
|
options: { us_core_resources: PROFILES.keys }
|
106
106
|
)
|
data/lib/us_core_test_kit/custom_groups/v3.1.1/{profile_support_test.rb → resource_support_test.rb}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
module USCoreTestKit
|
2
2
|
module USCoreV311
|
3
3
|
class ProfileSupportTest < Inferno::Test
|
4
|
-
id :
|
4
|
+
id :us_core_v311_resource_support
|
5
5
|
title 'Capability Statement lists support for required US Core Resoruce Types'
|
6
6
|
description %(
|
7
7
|
The US Core Implementation Guide states:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require_relative '../smart_app_launch_group'
|
2
|
-
require_relative '
|
2
|
+
require_relative 'smart_discovery_stu2_group'
|
3
3
|
|
4
4
|
module USCoreTestKit
|
5
5
|
module USCoreV700
|
@@ -9,8 +9,8 @@ module USCoreTestKit
|
|
9
9
|
groups[2].group from: :us_core_v700_smart_discovery_stu2
|
10
10
|
groups[2].children[0] = groups[2].children.pop
|
11
11
|
|
12
|
-
groups.
|
13
|
-
groups.
|
12
|
+
groups[3].group from: :us_core_v700_smart_discovery_stu2
|
13
|
+
groups[3].children[0] = groups[3].children.pop
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../smart_app_launch_group'
|
2
|
+
require_relative 'smart_discovery_stu2_2_group'
|
3
|
+
|
4
|
+
module USCoreTestKit
|
5
|
+
module USCoreV700
|
6
|
+
class SmartAppLaunchSTU22Group < USCoreTestKit::SmartAppLaunchGroup
|
7
|
+
id :us_core_v700_smart_app_launch_stu2_2
|
8
|
+
|
9
|
+
groups[4].group from: :us_core_v700_smart_discovery_stu2_2
|
10
|
+
groups[4].children[0] = groups[4].children.pop
|
11
|
+
|
12
|
+
groups.last.group from: :us_core_v700_smart_discovery_stu2_2
|
13
|
+
groups.last.children[0] = groups.last.children.pop
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require_relative '../smart_well_known_capabilities_test'
|
2
|
+
|
3
|
+
module USCoreTestKit
|
4
|
+
module USCoreV700
|
5
|
+
class USCoreDiscoverySTU22Group < SMARTAppLaunch::DiscoverySTU22Group
|
6
|
+
id :us_core_v700_smart_discovery_stu2_2
|
7
|
+
|
8
|
+
test from: :us_core_smart_well_known_capabilities
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -57,7 +57,7 @@ module USCoreTestKit
|
|
57
57
|
)
|
58
58
|
version VERSION
|
59
59
|
|
60
|
-
|
60
|
+
GENERAL_MESSAGE_FILTERS = [
|
61
61
|
%r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
|
62
62
|
%r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
|
63
63
|
/Observation\.effective\.ofType\(Period\): .*vs-1:/, # Invalid invariant in FHIR v4.0.1
|
@@ -71,6 +71,8 @@ module USCoreTestKit
|
|
71
71
|
|
72
72
|
VERSION_SPECIFIC_MESSAGE_FILTERS = [].freeze
|
73
73
|
|
74
|
+
VALIDATION_MESSAGE_FILTERS = GENERAL_MESSAGE_FILTERS + VERSION_SPECIFIC_MESSAGE_FILTERS
|
75
|
+
|
74
76
|
def self.metadata
|
75
77
|
@metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)[:groups].map do |raw_metadata|
|
76
78
|
Generator::GroupMetadata.new(raw_metadata)
|
@@ -81,7 +83,7 @@ module USCoreTestKit
|
|
81
83
|
|
82
84
|
fhir_resource_validator do
|
83
85
|
igs 'hl7.fhir.us.core#3.1.1'
|
84
|
-
message_filters = VALIDATION_MESSAGE_FILTERS
|
86
|
+
message_filters = VALIDATION_MESSAGE_FILTERS
|
85
87
|
|
86
88
|
exclude_message do |message|
|
87
89
|
|
@@ -107,6 +109,10 @@ module USCoreTestKit
|
|
107
109
|
{
|
108
110
|
label: 'SMART App Launch 2.0.0',
|
109
111
|
value: USCoreOptions::SMART_2
|
112
|
+
},
|
113
|
+
{
|
114
|
+
label: 'SMART App Launch 2.2.0',
|
115
|
+
value: USCoreOptions::SMART_2_2
|
110
116
|
}
|
111
117
|
]
|
112
118
|
|
@@ -59,7 +59,7 @@ module USCoreTestKit
|
|
59
59
|
)
|
60
60
|
version VERSION
|
61
61
|
|
62
|
-
|
62
|
+
GENERAL_MESSAGE_FILTERS = [
|
63
63
|
%r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
|
64
64
|
%r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
|
65
65
|
/Observation\.effective\.ofType\(Period\): .*vs-1:/, # Invalid invariant in FHIR v4.0.1
|
@@ -73,6 +73,8 @@ module USCoreTestKit
|
|
73
73
|
|
74
74
|
VERSION_SPECIFIC_MESSAGE_FILTERS = [].freeze
|
75
75
|
|
76
|
+
VALIDATION_MESSAGE_FILTERS = GENERAL_MESSAGE_FILTERS + VERSION_SPECIFIC_MESSAGE_FILTERS
|
77
|
+
|
76
78
|
def self.metadata
|
77
79
|
@metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)[:groups].map do |raw_metadata|
|
78
80
|
Generator::GroupMetadata.new(raw_metadata)
|
@@ -83,7 +85,7 @@ module USCoreTestKit
|
|
83
85
|
|
84
86
|
fhir_resource_validator do
|
85
87
|
igs 'hl7.fhir.us.core#4.0.0'
|
86
|
-
message_filters = VALIDATION_MESSAGE_FILTERS
|
88
|
+
message_filters = VALIDATION_MESSAGE_FILTERS
|
87
89
|
|
88
90
|
exclude_message do |message|
|
89
91
|
|
@@ -109,6 +111,10 @@ module USCoreTestKit
|
|
109
111
|
{
|
110
112
|
label: 'SMART App Launch 2.0.0',
|
111
113
|
value: USCoreOptions::SMART_2
|
114
|
+
},
|
115
|
+
{
|
116
|
+
label: 'SMART App Launch 2.2.0',
|
117
|
+
value: USCoreOptions::SMART_2_2
|
112
118
|
}
|
113
119
|
]
|
114
120
|
|
@@ -69,7 +69,7 @@ module USCoreTestKit
|
|
69
69
|
)
|
70
70
|
version VERSION
|
71
71
|
|
72
|
-
|
72
|
+
GENERAL_MESSAGE_FILTERS = [
|
73
73
|
%r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
|
74
74
|
%r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris},
|
75
75
|
/Observation\.effective\.ofType\(Period\): .*vs-1:/, # Invalid invariant in FHIR v4.0.1
|
@@ -83,6 +83,8 @@ module USCoreTestKit
|
|
83
83
|
|
84
84
|
VERSION_SPECIFIC_MESSAGE_FILTERS = [].freeze
|
85
85
|
|
86
|
+
VALIDATION_MESSAGE_FILTERS = GENERAL_MESSAGE_FILTERS + VERSION_SPECIFIC_MESSAGE_FILTERS
|
87
|
+
|
86
88
|
def self.metadata
|
87
89
|
@metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true)[:groups].map do |raw_metadata|
|
88
90
|
Generator::GroupMetadata.new(raw_metadata)
|
@@ -93,7 +95,7 @@ module USCoreTestKit
|
|
93
95
|
|
94
96
|
fhir_resource_validator do
|
95
97
|
igs 'hl7.fhir.us.core#5.0.1'
|
96
|
-
message_filters = VALIDATION_MESSAGE_FILTERS
|
98
|
+
message_filters = VALIDATION_MESSAGE_FILTERS
|
97
99
|
|
98
100
|
exclude_message do |message|
|
99
101
|
|
@@ -119,6 +121,10 @@ module USCoreTestKit
|
|
119
121
|
{
|
120
122
|
label: 'SMART App Launch 2.0.0',
|
121
123
|
value: USCoreOptions::SMART_2
|
124
|
+
},
|
125
|
+
{
|
126
|
+
label: 'SMART App Launch 2.2.0',
|
127
|
+
value: USCoreOptions::SMART_2_2
|
122
128
|
}
|
123
129
|
]
|
124
130
|
|
@@ -18,8 +18,6 @@ module USCoreTestKit
|
|
18
18
|
* DiagnosticReport.effectiveDateTime
|
19
19
|
* DiagnosticReport.encounter
|
20
20
|
* DiagnosticReport.issued
|
21
|
-
* DiagnosticReport.media
|
22
|
-
* DiagnosticReport.media.link
|
23
21
|
* DiagnosticReport.performer
|
24
22
|
* DiagnosticReport.presentedForm
|
25
23
|
* DiagnosticReport.result
|
@@ -192,10 +192,6 @@
|
|
192
192
|
:target_profiles:
|
193
193
|
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
|
194
194
|
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-clinical-result
|
195
|
-
- :path: media
|
196
|
-
- :path: media.link
|
197
|
-
:types:
|
198
|
-
- Reference
|
199
195
|
- :path: presentedForm
|
200
196
|
:mandatory_elements:
|
201
197
|
- DiagnosticReport.status
|
@@ -1887,10 +1887,6 @@
|
|
1887
1887
|
:target_profiles:
|
1888
1888
|
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
|
1889
1889
|
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-clinical-result
|
1890
|
-
- :path: media
|
1891
|
-
- :path: media.link
|
1892
|
-
:types:
|
1893
|
-
- Reference
|
1894
1890
|
- :path: presentedForm
|
1895
1891
|
:mandatory_elements:
|
1896
1892
|
- DiagnosticReport.status
|
@@ -7111,12 +7107,6 @@
|
|
7111
7107
|
:path: ''
|
7112
7108
|
:code: social-history
|
7113
7109
|
:system: http://terminology.hl7.org/CodeSystem/observation-category
|
7114
|
-
- :slice_id: Observation.effective[x]:effectiveDateTime
|
7115
|
-
:slice_name: effectiveDateTime
|
7116
|
-
:path: effective[x]
|
7117
|
-
:discriminator:
|
7118
|
-
:type: type
|
7119
|
-
:code: DateTime
|
7120
7110
|
:elements:
|
7121
7111
|
- :path: status
|
7122
7112
|
- :path: category
|
@@ -7128,6 +7118,7 @@
|
|
7128
7118
|
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
|
7129
7119
|
- :path: valueCodeableConcept
|
7130
7120
|
:original_path: value[x]
|
7121
|
+
- :path: effective[x]
|
7131
7122
|
:mandatory_elements:
|
7132
7123
|
- Observation.status
|
7133
7124
|
- Observation.category
|
@@ -10732,12 +10723,6 @@
|
|
10732
10723
|
- :path: telecom
|
10733
10724
|
- :path: telecom.system
|
10734
10725
|
- :path: telecom.value
|
10735
|
-
- :path: address
|
10736
|
-
- :path: address.line
|
10737
|
-
- :path: address.city
|
10738
|
-
- :path: address.state
|
10739
|
-
- :path: address.postalCode
|
10740
|
-
- :path: address.country
|
10741
10726
|
:mandatory_elements:
|
10742
10727
|
- Practitioner.identifier
|
10743
10728
|
- Practitioner.identifier.system
|
@@ -10794,6 +10779,8 @@
|
|
10794
10779
|
:file_name: practitioner_validation_test.rb
|
10795
10780
|
- :id: us_core_v610_practitioner_must_support_test
|
10796
10781
|
:file_name: practitioner_must_support_test.rb
|
10782
|
+
- :id: us_core_v610_practitioner_address_test
|
10783
|
+
:file_name: practitioner_address_test.rb
|
10797
10784
|
:id: us_core_v610_practitioner
|
10798
10785
|
:file_name: practitioner_group.rb
|
10799
10786
|
:delayed_references: []
|
@@ -100,12 +100,6 @@
|
|
100
100
|
- :path: telecom
|
101
101
|
- :path: telecom.system
|
102
102
|
- :path: telecom.value
|
103
|
-
- :path: address
|
104
|
-
- :path: address.line
|
105
|
-
- :path: address.city
|
106
|
-
- :path: address.state
|
107
|
-
- :path: address.postalCode
|
108
|
-
- :path: address.country
|
109
103
|
:mandatory_elements:
|
110
104
|
- Practitioner.identifier
|
111
105
|
- Practitioner.identifier.system
|
@@ -162,6 +156,8 @@
|
|
162
156
|
:file_name: practitioner_validation_test.rb
|
163
157
|
- :id: us_core_v610_practitioner_must_support_test
|
164
158
|
:file_name: practitioner_must_support_test.rb
|
159
|
+
- :id: us_core_v610_practitioner_address_test
|
160
|
+
:file_name: practitioner_address_test.rb
|
165
161
|
:id: us_core_v610_practitioner
|
166
162
|
:file_name: practitioner_group.rb
|
167
163
|
:delayed_references: []
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative '../../../practitioner_address_test'
|
2
|
+
|
3
|
+
module USCoreTestKit
|
4
|
+
module USCoreV610
|
5
|
+
class PractitionerAddressTest < Inferno::Test
|
6
|
+
include USCoreTestKit::PractitionerAddressTest
|
7
|
+
|
8
|
+
title 'Server support either Practitioner.address or PractitionerRole'
|
9
|
+
description %(
|
10
|
+
US Core Responders SHALL support either US Core PractitionerRole Profile or
|
11
|
+
these data elements in US Core Practitioner Profile
|
12
|
+
|
13
|
+
* Practitioner.address
|
14
|
+
* Practitioner.address.city
|
15
|
+
* Practitioner.address.country
|
16
|
+
* Practitioner.address.line
|
17
|
+
* Practitioner.address.postalCode
|
18
|
+
* Practitioner.address.state
|
19
|
+
)
|
20
|
+
|
21
|
+
id :us_core_v610_practitioner_address_test
|
22
|
+
|
23
|
+
def self.metadata
|
24
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
|
25
|
+
end
|
26
|
+
|
27
|
+
run do
|
28
|
+
verify_practitioner_address
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -12,12 +12,6 @@ module USCoreTestKit
|
|
12
12
|
Statement. This test will look through the Practitioner resources
|
13
13
|
found previously for the following must support elements:
|
14
14
|
|
15
|
-
* Practitioner.address
|
16
|
-
* Practitioner.address.city
|
17
|
-
* Practitioner.address.country
|
18
|
-
* Practitioner.address.line
|
19
|
-
* Practitioner.address.postalCode
|
20
|
-
* Practitioner.address.state
|
21
15
|
* Practitioner.identifier
|
22
16
|
* Practitioner.identifier.system
|
23
17
|
* Practitioner.identifier.value
|
@@ -4,6 +4,7 @@ require_relative 'practitioner/practitioner_name_search_test'
|
|
4
4
|
require_relative 'practitioner/practitioner_identifier_search_test'
|
5
5
|
require_relative 'practitioner/practitioner_validation_test'
|
6
6
|
require_relative 'practitioner/practitioner_must_support_test'
|
7
|
+
require_relative 'practitioner/practitioner_address_test'
|
7
8
|
|
8
9
|
module USCoreTestKit
|
9
10
|
module USCoreV610
|
@@ -82,6 +83,7 @@ read succeeds.
|
|
82
83
|
test from: :us_core_v610_practitioner_identifier_search_test
|
83
84
|
test from: :us_core_v610_practitioner_validation_test
|
84
85
|
test from: :us_core_v610_practitioner_must_support_test
|
86
|
+
test from: :us_core_v610_practitioner_address_test
|
85
87
|
end
|
86
88
|
end
|
87
89
|
end
|
@@ -144,12 +144,6 @@
|
|
144
144
|
:path: ''
|
145
145
|
:code: social-history
|
146
146
|
:system: http://terminology.hl7.org/CodeSystem/observation-category
|
147
|
-
- :slice_id: Observation.effective[x]:effectiveDateTime
|
148
|
-
:slice_name: effectiveDateTime
|
149
|
-
:path: effective[x]
|
150
|
-
:discriminator:
|
151
|
-
:type: type
|
152
|
-
:code: DateTime
|
153
147
|
:elements:
|
154
148
|
- :path: status
|
155
149
|
- :path: category
|
@@ -161,6 +155,7 @@
|
|
161
155
|
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
|
162
156
|
- :path: valueCodeableConcept
|
163
157
|
:original_path: value[x]
|
158
|
+
- :path: effective[x]
|
164
159
|
:mandatory_elements:
|
165
160
|
- Observation.status
|
166
161
|
- Observation.category
|