davinci_pdex_test_kit 0.12.0 → 0.12.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/config/presets/pdex_payer_client_postman_preset.json.erb +67 -0
- data/lib/davinci_pdex_test_kit/docs/payer_client_suite_description_v200.md +124 -32
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_smart_alca_group.rb +32 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_smart_alcs_group.rb +32 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_smart_alp_group.rb +32 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_udap_group.rb +31 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_member_match_tests/client_member_match_validation_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_registration/configuration_display_smart_test.rb +38 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_registration/configuration_display_udap_test.rb +38 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_registration_group.rb +67 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_validation_test.rb +10 -2
- data/lib/davinci_pdex_test_kit/pdex_payer_client/client_workflow_interaction_test.rb +37 -7
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/allergyintolerance_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/careplan_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/careteam_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/condition_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/device_clinical_data_request_test.rb +1 -2
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/diagnosticreport_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/documentreference_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/encounter_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/explanationofbenefit_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/goal_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/immunization_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/location_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/medicationdispense_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/medicationrequest_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/observation_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/organization_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/patient_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/practitioner_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/practitionerrole_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/procedure_clinical_data_request_test.rb +0 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/export_endpoint.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/export_status_endpoint.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/next_page_endpoint.rb +9 -2
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/patient_endpoint.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/proxy_endpoint.rb +15 -6
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/resource_read_endpoint.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/resource_search_endpoint.rb +1 -1
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server.rb +28 -2
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb +53 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/token_endpoint.rb +85 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/pdex_client_options.rb +26 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_client/tags.rb +8 -9
- data/lib/davinci_pdex_test_kit/pdex_payer_client/urls.rb +17 -9
- data/lib/davinci_pdex_test_kit/pdex_payer_client_suite.rb +51 -2
- data/lib/davinci_pdex_test_kit/pdex_payer_server/workflow_export_group.rb +2 -0
- data/lib/davinci_pdex_test_kit/pdex_payer_server_suite.rb +3 -3
- data/lib/davinci_pdex_test_kit/requirements/davinci-pdex-test-kit_requirements.csv +6 -4
- data/lib/davinci_pdex_test_kit/requirements/generated/davinci-pdex-test-kit_requirements_coverage.csv +8 -6
- data/lib/davinci_pdex_test_kit/version.rb +2 -2
- data/lib/inferno_requirements_tools/tasks/collect_requirements.rb +228 -0
- metadata +42 -4
- data/config/presets/pdex_payer_client_postman_preset.json +0 -12
- data/lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/token_endpoint.rb +0 -27
@@ -4,12 +4,10 @@ module DaVinciPDexTestKit
|
|
4
4
|
module PDexPayerClient
|
5
5
|
|
6
6
|
module URLs
|
7
|
-
BASE_PATH = "#{Inferno::Application['base_url']}/custom/pdex_payer_client"
|
8
|
-
TOKEN_PATH = '/mock_auth/token'
|
9
7
|
PATIENT_PATH = '/fhir/Patient'
|
8
|
+
PATIENT_INSTANCE_PATH = '/fhir/Patient/:patient'
|
10
9
|
RESOURCE_PATH = '/fhir/:endpoint'
|
11
10
|
INSTANCE_PATH = '/fhir/:endpoint/:id'
|
12
|
-
SUBMIT_PATH = '/fhir/:endpoint' # FIXME duplicate
|
13
11
|
BINARY_PATH = '/fhir/Binary/:id'
|
14
12
|
METADATA_PATH = '/fhir/metadata'
|
15
13
|
EVERYTHING_PATH = '/fhir/Patient/:patient/$everything'
|
@@ -19,7 +17,9 @@ module DaVinciPDexTestKit
|
|
19
17
|
BASE_FHIR_PATH = '/fhir'
|
20
18
|
RESUME_PASS_PATH = '/resume_pass'
|
21
19
|
RESUME_CLINICAL_DATA_PATH = '/resume_clinical_data'
|
22
|
-
RESUME_FAIL_PATH = '/resume_fail'
|
20
|
+
RESUME_FAIL_PATH = '/resume_fail'
|
21
|
+
AUTHORIZATION_PATH = '/auth/authorization'
|
22
|
+
TOKEN_PATH = '/auth/token'
|
23
23
|
|
24
24
|
constants.each do |path_constant|
|
25
25
|
# For each constant X_PATH, define x_path()
|
@@ -29,20 +29,28 @@ module DaVinciPDexTestKit
|
|
29
29
|
|
30
30
|
# For each constant X_PATH, define x_url(), which includes base
|
31
31
|
define_method(path_constant.to_s.downcase.gsub(/_path$/, '_url')) do
|
32
|
-
|
32
|
+
base_url + URLs.const_get(path_constant)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
def suite_id
|
37
|
+
PDexPayerClientSuite.id
|
38
|
+
end
|
39
|
+
|
36
40
|
# overwrite base_url which is irregular
|
37
41
|
def base_url
|
38
|
-
|
42
|
+
@base_url ||= "#{Inferno::Application['base_url']}/custom/#{suite_id}"
|
39
43
|
end
|
40
44
|
|
41
|
-
# overwrite
|
42
|
-
def
|
43
|
-
|
45
|
+
# overwrite fhir_base_url which is irregular
|
46
|
+
def fhir_base_url
|
47
|
+
base_url + BASE_FHIR_PATH
|
44
48
|
end
|
45
49
|
|
50
|
+
# alias for smart and udap tests
|
51
|
+
def client_fhir_base_url
|
52
|
+
fhir_base_url
|
53
|
+
end
|
46
54
|
end
|
47
55
|
|
48
56
|
# Add all constants and dynamically defined methods to PDexPayerClient namespace
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative 'pdex_payer_client/pdex_client_options'
|
1
2
|
require_relative 'pdex_payer_client/urls'
|
2
3
|
require_relative 'pdex_payer_client/tags'
|
3
4
|
require_relative 'pdex_payer_client/collection'
|
@@ -5,6 +6,11 @@ require_relative 'pdex_payer_client/mock_server'
|
|
5
6
|
# require_relative 'must_support_test'
|
6
7
|
# require_relative 'pdex_payer_client/client_validation_test'
|
7
8
|
|
9
|
+
require_relative 'pdex_payer_client/client_registration_group'
|
10
|
+
require_relative 'pdex_payer_client/client_auth_smart_alca_group'
|
11
|
+
require_relative 'pdex_payer_client/client_auth_smart_alcs_group'
|
12
|
+
require_relative 'pdex_payer_client/client_auth_smart_alp_group'
|
13
|
+
require_relative 'pdex_payer_client/client_auth_udap_group'
|
8
14
|
require_relative 'pdex_payer_client/client_workflow_interaction_test'
|
9
15
|
require_relative 'pdex_payer_client/client_member_match_tests/client_member_match_validation_test'
|
10
16
|
|
@@ -70,6 +76,27 @@ module DaVinciPDexTestKit
|
|
70
76
|
end
|
71
77
|
end
|
72
78
|
|
79
|
+
suite_option :client_type,
|
80
|
+
title: 'Client Security Type',
|
81
|
+
list_options: [
|
82
|
+
{
|
83
|
+
label: 'SMART App Launch Public Client',
|
84
|
+
value: PDexClientOptions::SMART_APP_LAUNCH_PUBLIC
|
85
|
+
},
|
86
|
+
{
|
87
|
+
label: 'SMART App Launch Confidential Symmetric Client',
|
88
|
+
value: PDexClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_SYMMETRIC
|
89
|
+
},
|
90
|
+
{
|
91
|
+
label: 'SMART App Launch Confidential Asymmetric Client',
|
92
|
+
value: PDexClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_ASYMMETRIC
|
93
|
+
},
|
94
|
+
{
|
95
|
+
label: 'UDAP Authorization Code Client',
|
96
|
+
value: PDexClientOptions::UDAP_AUTHORIZATION_CODE
|
97
|
+
}
|
98
|
+
]
|
99
|
+
|
73
100
|
resume_test_route :get, RESUME_PASS_PATH do |request|
|
74
101
|
PDexPayerClientSuite.extract_token_from_query_params(request)
|
75
102
|
end
|
@@ -82,18 +109,37 @@ module DaVinciPDexTestKit
|
|
82
109
|
PDexPayerClientSuite.extract_token_from_query_params(request)
|
83
110
|
end
|
84
111
|
|
112
|
+
group from: :pdex_client_registration
|
113
|
+
|
85
114
|
group do
|
86
115
|
run_as_group
|
87
|
-
title '
|
116
|
+
title 'Verify PDex Data Access'
|
88
117
|
id :payer_to_payer_workflow
|
89
118
|
|
90
119
|
group do
|
91
120
|
title 'Interaction Tests'
|
92
|
-
id :
|
121
|
+
id :pdex_client_workflow_interaction
|
93
122
|
|
94
123
|
test from: :pdex_client_workflow_interaction
|
95
124
|
end
|
96
125
|
|
126
|
+
group from: :pdex_client_auth_smart_alca,
|
127
|
+
required_suite_options: {
|
128
|
+
client_type: PDexClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_ASYMMETRIC
|
129
|
+
}
|
130
|
+
group from: :pdex_client_auth_smart_alcs,
|
131
|
+
required_suite_options: {
|
132
|
+
client_type: PDexClientOptions::SMART_APP_LAUNCH_CONFIDENTIAL_SYMMETRIC
|
133
|
+
}
|
134
|
+
group from: :pdex_client_auth_smart_alp,
|
135
|
+
required_suite_options: {
|
136
|
+
client_type: PDexClientOptions::SMART_APP_LAUNCH_PUBLIC
|
137
|
+
}
|
138
|
+
group from: :pdex_client_auth_udap,
|
139
|
+
required_suite_options: {
|
140
|
+
client_type: PDexClientOptions::UDAP_AUTHORIZATION_CODE
|
141
|
+
}
|
142
|
+
|
97
143
|
group do
|
98
144
|
title '$member-match validation'
|
99
145
|
id :member_match_validation
|
@@ -130,8 +176,11 @@ module DaVinciPDexTestKit
|
|
130
176
|
end
|
131
177
|
end
|
132
178
|
|
179
|
+
|
133
180
|
# TODO: must support validation
|
134
181
|
|
182
|
+
|
183
|
+
|
135
184
|
private
|
136
185
|
|
137
186
|
def self.extract_token_from_query_params(request)
|
@@ -24,6 +24,8 @@ module DaVinciTestKit
|
|
24
24
|
to be returned by Patient-level export. The tests require a Bulk Data Autthorization Bearer Token.
|
25
25
|
}
|
26
26
|
|
27
|
+
verifies_requirements 'hl7.fhir.us.davinci-pdex_2.0.0@57', 'hl7.fhir.us.davinci-pdex_2.0.0@58'
|
28
|
+
|
27
29
|
config(
|
28
30
|
{
|
29
31
|
inputs: {
|
@@ -172,9 +172,9 @@ module DaVinciPDexTestKit
|
|
172
172
|
|
173
173
|
verifies_requirements 'hl7.fhir.us.davinci-pdex_2.0.0@3', 'hl7.fhir.us.davinci-pdex_2.0.0@7',
|
174
174
|
'hl7.fhir.us.davinci-pdex_2.0.0@16', 'hl7.fhir.us.davinci-pdex_2.0.0@43',
|
175
|
-
'hl7.fhir.us.davinci-pdex_2.0.0@
|
176
|
-
'hl7.fhir.us.davinci-pdex_2.0.0@
|
177
|
-
'hl7.fhir.us.davinci-pdex_2.0.0@52'
|
175
|
+
'hl7.fhir.us.davinci-pdex_2.0.0@44', 'hl7.fhir.us.davinci-pdex_2.0.0@48',
|
176
|
+
'hl7.fhir.us.davinci-pdex_2.0.0@49', 'hl7.fhir.us.davinci-pdex_2.0.0@50',
|
177
|
+
'hl7.fhir.us.davinci-pdex_2.0.0@51', 'hl7.fhir.us.davinci-pdex_2.0.0@52'
|
178
178
|
|
179
179
|
group from: :pdex_eob
|
180
180
|
group from: :pdex_device
|
@@ -49,16 +49,18 @@ hl7.fhir.us.davinci-pdex_2.0.0,41,https://hl7.org/fhir/us/davinci-pdex/STU2/paye
|
|
49
49
|
- Bulk FHIR Asynchronous protocols.",SHALL,Client,,false
|
50
50
|
hl7.fhir.us.davinci-pdex_2.0.0,42,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#data-retrieval-methods,"Each of the above methods[, query all clinical resource individually, $everything, and $export,] SHALL support the retrieval of the profiles and resources [in the scope of the member health history, defined in the Server CapabilityStatement]",SHALL,Server,,false
|
51
51
|
hl7.fhir.us.davinci-pdex_2.0.0,43,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#query-all-clinical-resources-individually,Health Plans SHALL support search of a member’s clinical data.,SHALL,Server,,false
|
52
|
-
hl7.fhir.us.davinci-pdex_2.0.0,44
|
52
|
+
hl7.fhir.us.davinci-pdex_2.0.0,44,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#query-all-clinical-resources-individually,[Servers SHALL support] the _revInclude and _include parameters to ... retrieve the associated Provenance and supporting records.,SHALL,Server,,false
|
53
53
|
hl7.fhir.us.davinci-pdex_2.0.0,45,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#constraining-data-based-upon-permissions-of-the-requestor,The FHIR Server SHALL constrain the data returned from the server to a requester based upon the access permissions of the requester.,SHALL,Server,,false
|
54
54
|
hl7.fhir.us.davinci-pdex_2.0.0,46,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#everything-operation,Health Plans SHOULD support the use of the $everything operation… defined in the FHIR R4 specification here: https://www.hl7.org/fhir/operation-patient-everything.html,SHOULD,Server,fhir_4.0.1,false
|
55
|
-
hl7.fhir.us.davinci-pdex_2.0.0,47,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,"Payer-to-Payer Data Exchange SHOULD support the use of Bulk FHIR methods, as defined in the HL7 FHIR [Bulk Data Access Implementation Guide](https://hl7.org/fhir/uv/bulkdata/authorization/).",SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false
|
55
|
+
hl7.fhir.us.davinci-pdex_2.0.0,47,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,"Payer-to-Payer Data Exchange SHOULD support the use of Bulk FHIR methods, as defined in the HL7 FHIR [Bulk Data Access Implementation Guide](https://hl7.org/fhir/uv/bulkdata/authorization/). ",SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false
|
56
56
|
hl7.fhir.us.davinci-pdex_2.0.0,48,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#data-mapping,Health Plans SHALL map claims and clinical information for a member to US Core v3.1.1 FHIR Resources based on R4.,SHALL,Server,hl7.fhir.us.core_3.1.1,false
|
57
57
|
hl7.fhir.us.davinci-pdex_2.0.0,49,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#data-mapping,"Where a US Core FHIR R4 Resource is not defined Health Plans SHALL map claims and clinical information to FHIR Profiles defined in this IG, or the Da Vinci HRex IG.",SHALL,Server,hl7.fhir.us.davinci-hrex_1.0.0,true
|
58
58
|
hl7.fhir.us.davinci-pdex_2.0.0,50,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"If a field is marked as required (cardinality n.., where n>0) the Health Plan SHALL populate the field.",SHALL,Server,,true
|
59
59
|
hl7.fhir.us.davinci-pdex_2.0.0,51,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"For a field specified as MUST SUPPORT and the cardinality is 0.., the Health Plan SHALL be capable of populating the field and do so if the relevant data exists.",SHALL,Server,,true
|
60
60
|
hl7.fhir.us.davinci-pdex_2.0.0,52,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"For a field specified as MUST SUPPORT and the cardinality is 0.., the Health Plan SHALL … [populate] the field ... if the relevant data exists.",SHALL,Server,,true
|
61
61
|
hl7.fhir.us.davinci-pdex_2.0.0,53,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"If a field is marked as MUST SUPPORT the receiver must be able to consume it without generating an error, unless the field is a sub-element of another field where that parent field does NOT have a minimum cardinality of 1 [or a Must Support Flag]. For example, if the parent field has a cardinality of “0..1” or “0..*” the sub-element field does not need to be populated.",SHALL,Client,,true
|
62
|
-
hl7.fhir.us.davinci-pdex_2.0.0,54,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,"If a payer chooses to support FHIR resource data versioning of related resource references, the referring resource **SHALL** use the vread format of reference: `[type]/[id]/_history/[vid]`",
|
63
|
-
hl7.fhir.us.davinci-pdex_2.0.0,55,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,Supporting versioning of FHIR data implies supporting the [vread](https://www.hl7.org/fhir/http.html#vread) and [history](https://www.hl7.org/fhir/http.html#history) interactions in the FHIR specification.,
|
62
|
+
hl7.fhir.us.davinci-pdex_2.0.0,54,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,"If a payer chooses to support FHIR resource data versioning of related resource references, the referring resource **SHALL** use the vread format of reference: `[type]/[id]/_history/[vid]`",MAY,Server,,true
|
63
|
+
hl7.fhir.us.davinci-pdex_2.0.0,55,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,Supporting versioning of FHIR data implies supporting the [vread](https://www.hl7.org/fhir/http.html#vread) and [history](https://www.hl7.org/fhir/http.html#history) interactions in the FHIR specification.,MAY,Server,,true
|
64
64
|
hl7.fhir.us.davinci-pdex_2.0.0,56,https://hl7.org/fhir/us/davinci-pdex/STU2/StructureDefinition-pdex-priorauthorization.html,"Payers SHALL make available pending and active prior authorization decisions and related clinical documentation and forms for items and services, not including prescription drugs, including the date the prior authorization was approved, the date the authorization ends, as well as the units and services approved and those used to date, no later than one (1) business day after a provider initiates a prior authorization for the beneficiary or there is a change of status for the prior authorization.",SHALL,Server,,false
|
65
|
+
hl7.fhir.us.davinci-pdex_2.0.0,57,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,The request/retrieval [for the Payer-to-Payer Exchange] of data SHOULD use the [FHIR Bulk Data Patient Level Export](https://hl7.org/fhir/uv/bulkdata/OperationDefinition-patient-export.html).,SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false
|
66
|
+
hl7.fhir.us.davinci-pdex_2.0.0,58,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,The request/retrieval [for the Payer-to-Payer Exchange] of data SHOULD use the … [Bulk Data Export Operation Request Flow](https://hl7.org/fhir/uv/bulkdata/export.html#bulk-data-export-operation-request-flow).,SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false
|
@@ -7,12 +7,12 @@ hl7.fhir.us.davinci-pdex_2.0.0,5,https://hl7.org/fhir/us/davinci-pdex/STU2/index
|
|
7
7
|
hl7.fhir.us.davinci-pdex_2.0.0,6,https://hl7.org/fhir/us/davinci-pdex/STU2/index.html#must-support,"For profiles defined in [DaVinci HRex and referenced by PDex], the meaning of Must Support [for Clients] is established in [the HRex IG].",SHALL,Client,"hl7.fhir.us.davinci-hrex_1.0.0@23,26,28",false,NA,NA,,
|
8
8
|
hl7.fhir.us.davinci-pdex_2.0.0,7,https://hl7.org/fhir/us/davinci-pdex/STU2/index.html#must-support,"[For profiles defined in the PDex IG, Servers SHALL follow] Must Support requirements … [from] the US Core Implementation Guide.",SHALL,Server,"hl7.fhir.us.core_3.1.1@75,77,78,80",false,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
9
9
|
hl7.fhir.us.davinci-pdex_2.0.0,8,https://hl7.org/fhir/us/davinci-pdex/STU2/index.html#must-support,"[For profiles defined in the PDex IG, Clients SHALL follow] Must Support requirements … [from] the US Core Implementation Guide.",SHALL,Client,"hl7.fhir.us.core_3.1.1@76,79",false,NA,NA,,
|
10
|
-
hl7.fhir.us.davinci-pdex_2.0.0,9,https://hl7.org/fhir/us/davinci-pdex/STU2/overview.html#overview,All data exchanged by Health Plans using the interactions covered in this IG SHALL be transformed to FHIR R4 resources.,SHALL,Server,,false
|
10
|
+
hl7.fhir.us.davinci-pdex_2.0.0,9,https://hl7.org/fhir/us/davinci-pdex/STU2/overview.html#overview,All data exchanged by Health Plans using the interactions covered in this IG SHALL be transformed to FHIR R4 resources.,SHALL,Server,,false,2,pdex_payer_server-api_and_ms_coverage,NA,NA
|
11
11
|
hl7.fhir.us.davinci-pdex_2.0.0,10,"https://hl7.org/fhir/us/davinci-pdex/STU2/overview.html#oauth20-or-smart-on-fhir-member-authorized-exchange,https://hl7.org/fhir/us/davinci-pdex/STU2/member-authorizedoauth2exchange.html,https://hl7.org/fhir/us/davinci-pdex/STU2/pdeximplementationactorsinteractionsdatapayloadsandmethods.html#oauth20-and-fhir-api",The member SHALL authenticate using [and the server SHALL accept only] credentials that have been issued by or are recognized and accepted by the Health Plan. These are typically the member’s customer portal credentials for accessing the health plan.,SHALL,Client,,false,NA,NA,,
|
12
12
|
hl7.fhir.us.davinci-pdex_2.0.0,11,https://hl7.org/fhir/us/davinci-pdex/STU2/overview.html#patient-everything-exchange-via-alternate-secure-transport,The use of the Bulk FHIR specification for transmission of member data SHALL honor jurisdictional and personal privacy restrictions that are relevant to a member’s health record.,SHALL,Server,,false,,,NA,NA
|
13
13
|
hl7.fhir.us.davinci-pdex_2.0.0,12,https://hl7.org/fhir/us/davinci-pdex/STU2/overview.html#provenance,Health Plans SHALL incorporate provenance records that they receive as part of any exchange of FHIR data.,SHALL,Server,,false,,,NA,NA
|
14
14
|
hl7.fhir.us.davinci-pdex_2.0.0,13,https://hl7.org/fhir/us/davinci-pdex/STU2/overview.html#provenance,"Health Plans SHALL provide Provenance records [for each non-Provenance instance] that, at a minimum, indicate that they are playing the role of Transmitter of the data in any PDex information exchange.",SHALL,Server,,false,,,NA,NA
|
15
|
-
hl7.fhir.us.davinci-pdex_2.0.0,14,https://hl7.org/fhir/us/davinci-pdex/STU2/introduction.html#implementation-hierarchy-and-priorities,"[F]or profiles and APIs identified in this IG, the FHIR R4 version SHALL be used.",SHALL,Server,,false
|
15
|
+
hl7.fhir.us.davinci-pdex_2.0.0,14,https://hl7.org/fhir/us/davinci-pdex/STU2/introduction.html#implementation-hierarchy-and-priorities,"[F]or profiles and APIs identified in this IG, the FHIR R4 version SHALL be used.",SHALL,Server,,false,2,pdex_payer_server-api_and_ms_coverage,NA,NA
|
16
16
|
hl7.fhir.us.davinci-pdex_2.0.0,15,https://hl7.org/fhir/us/davinci-pdex/STU2/introduction.html#pdex-data-payloads,All resources available via a FHIR API endpoint SHALL be declared in a FHIR CapabilityStatement.,SHALL,Server,,false,,,NA,NA
|
17
17
|
hl7.fhir.us.davinci-pdex_2.0.0,16,https://hl7.org/fhir/us/davinci-pdex/STU2/introduction.html#pdex-data-payloads,The Read and Search Operations SHALL be supported for the FHIR Profiles [that are part of the member health history].,SHALL,Server,,false,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
18
18
|
hl7.fhir.us.davinci-pdex_2.0.0,17,https://hl7.org/fhir/us/davinci-pdex/STU2/introduction.html#capabilitystatement,The Read ... Operation... SHALL be supported for … Resource Type … Coverage [using the [HRex Coverage](https://hl7.org/fhir/us/davinci-hrex/STU1/StructureDefinition-hrex-coverage.html) profile].,SHALL,Server,,false,,,NA,NA
|
@@ -49,16 +49,18 @@ hl7.fhir.us.davinci-pdex_2.0.0,41,https://hl7.org/fhir/us/davinci-pdex/STU2/paye
|
|
49
49
|
- Bulk FHIR Asynchronous protocols.",SHALL,Client,,false,NA,NA,1.1.01,pdex_payer_client-payer_to_payer_workflow-client_workflow_interaction-pdex_client_workflow_interaction
|
50
50
|
hl7.fhir.us.davinci-pdex_2.0.0,42,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#data-retrieval-methods,"Each of the above methods[, query all clinical resource individually, $everything, and $export,] SHALL support the retrieval of the profiles and resources [in the scope of the member health history, defined in the Server CapabilityStatement]",SHALL,Server,,false,"1.2, 1.3, 1.4.1","pdex_payer_server-payer_to_payer_workflow-pdex_workflow_clinical_data, pdex_payer_server-payer_to_payer_workflow-pdex_workflow_everything, pdex_payer_server-payer_to_payer_workflow-pdex_workflow_export-pdex_patient_export",NA,NA
|
51
51
|
hl7.fhir.us.davinci-pdex_2.0.0,43,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#query-all-clinical-resources-individually,Health Plans SHALL support search of a member’s clinical data.,SHALL,Server,,false,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
52
|
-
hl7.fhir.us.davinci-pdex_2.0.0,44
|
52
|
+
hl7.fhir.us.davinci-pdex_2.0.0,44,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#query-all-clinical-resources-individually,[Servers SHALL support] the _revInclude and _include parameters to ... retrieve the associated Provenance and supporting records.,SHALL,Server,,false,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
53
53
|
hl7.fhir.us.davinci-pdex_2.0.0,45,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#constraining-data-based-upon-permissions-of-the-requestor,The FHIR Server SHALL constrain the data returned from the server to a requester based upon the access permissions of the requester.,SHALL,Server,,false,,,NA,NA
|
54
54
|
hl7.fhir.us.davinci-pdex_2.0.0,46,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#everything-operation,Health Plans SHOULD support the use of the $everything operation… defined in the FHIR R4 specification here: https://www.hl7.org/fhir/operation-patient-everything.html,SHOULD,Server,fhir_4.0.1,false,1.3.02,pdex_payer_server-payer_to_payer_workflow-pdex_workflow_everything-Test02,NA,NA
|
55
|
-
hl7.fhir.us.davinci-pdex_2.0.0,47,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,"Payer-to-Payer Data Exchange SHOULD support the use of Bulk FHIR methods, as defined in the HL7 FHIR [Bulk Data Access Implementation Guide](https://hl7.org/fhir/uv/bulkdata/authorization/).",SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false,1.4.1.01,pdex_payer_server-payer_to_payer_workflow-pdex_workflow_export-pdex_patient_export-pdex_patient_export_in_cap_stmt,NA,NA
|
55
|
+
hl7.fhir.us.davinci-pdex_2.0.0,47,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,"Payer-to-Payer Data Exchange SHOULD support the use of Bulk FHIR methods, as defined in the HL7 FHIR [Bulk Data Access Implementation Guide](https://hl7.org/fhir/uv/bulkdata/authorization/). ",SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false,1.4.1.01,pdex_payer_server-payer_to_payer_workflow-pdex_workflow_export-pdex_patient_export-pdex_patient_export_in_cap_stmt,NA,NA
|
56
56
|
hl7.fhir.us.davinci-pdex_2.0.0,48,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#data-mapping,Health Plans SHALL map claims and clinical information for a member to US Core v3.1.1 FHIR Resources based on R4.,SHALL,Server,hl7.fhir.us.core_3.1.1,false,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
57
57
|
hl7.fhir.us.davinci-pdex_2.0.0,49,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#data-mapping,"Where a US Core FHIR R4 Resource is not defined Health Plans SHALL map claims and clinical information to FHIR Profiles defined in this IG, or the Da Vinci HRex IG.",SHALL,Server,hl7.fhir.us.davinci-hrex_1.0.0,true,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
58
58
|
hl7.fhir.us.davinci-pdex_2.0.0,50,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"If a field is marked as required (cardinality n.., where n>0) the Health Plan SHALL populate the field.",SHALL,Server,,true,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
59
59
|
hl7.fhir.us.davinci-pdex_2.0.0,51,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"For a field specified as MUST SUPPORT and the cardinality is 0.., the Health Plan SHALL be capable of populating the field and do so if the relevant data exists.",SHALL,Server,,true,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
60
60
|
hl7.fhir.us.davinci-pdex_2.0.0,52,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"For a field specified as MUST SUPPORT and the cardinality is 0.., the Health Plan SHALL … [populate] the field ... if the relevant data exists.",SHALL,Server,,true,2.2,pdex_payer_server-api_and_ms_coverage-pdex_fhir_api_coverage,NA,NA
|
61
61
|
hl7.fhir.us.davinci-pdex_2.0.0,53,https://hl7.org/fhir/us/davinci-pdex/STU2/datamapping.html#providing-data-in-sub-element-fields,"If a field is marked as MUST SUPPORT the receiver must be able to consume it without generating an error, unless the field is a sub-element of another field where that parent field does NOT have a minimum cardinality of 1 [or a Must Support Flag]. For example, if the parent field has a cardinality of “0..1” or “0..*” the sub-element field does not need to be populated.",SHALL,Client,,true,NA,NA,,
|
62
|
-
hl7.fhir.us.davinci-pdex_2.0.0,54,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,"If a payer chooses to support FHIR resource data versioning of related resource references, the referring resource **SHALL** use the vread format of reference: `[type]/[id]/_history/[vid]`",
|
63
|
-
hl7.fhir.us.davinci-pdex_2.0.0,55,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,Supporting versioning of FHIR data implies supporting the [vread](https://www.hl7.org/fhir/http.html#vread) and [history](https://www.hl7.org/fhir/http.html#history) interactions in the FHIR specification.,
|
62
|
+
hl7.fhir.us.davinci-pdex_2.0.0,54,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,"If a payer chooses to support FHIR resource data versioning of related resource references, the referring resource **SHALL** use the vread format of reference: `[type]/[id]/_history/[vid]`",MAY,Server,,true,,,NA,NA
|
63
|
+
hl7.fhir.us.davinci-pdex_2.0.0,55,https://hl7.org/fhir/us/davinci-pdex/STU2/usecasescenarios.html#versioning-of-fhir-data,Supporting versioning of FHIR data implies supporting the [vread](https://www.hl7.org/fhir/http.html#vread) and [history](https://www.hl7.org/fhir/http.html#history) interactions in the FHIR specification.,MAY,Server,,true,,,NA,NA
|
64
64
|
hl7.fhir.us.davinci-pdex_2.0.0,56,https://hl7.org/fhir/us/davinci-pdex/STU2/StructureDefinition-pdex-priorauthorization.html,"Payers SHALL make available pending and active prior authorization decisions and related clinical documentation and forms for items and services, not including prescription drugs, including the date the prior authorization was approved, the date the authorization ends, as well as the units and services approved and those used to date, no later than one (1) business day after a provider initiates a prior authorization for the beneficiary or there is a change of status for the prior authorization.",SHALL,Server,,false,,,NA,NA
|
65
|
+
hl7.fhir.us.davinci-pdex_2.0.0,57,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,The request/retrieval [for the Payer-to-Payer Exchange] of data SHOULD use the [FHIR Bulk Data Patient Level Export](https://hl7.org/fhir/uv/bulkdata/OperationDefinition-patient-export.html).,SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false,1.4,pdex_payer_server-payer_to_payer_workflow-pdex_workflow_export,NA,NA
|
66
|
+
hl7.fhir.us.davinci-pdex_2.0.0,58,https://hl7.org/fhir/us/davinci-pdex/STU2/payertopayerexchange.html#bulk-fhir-asynchronous-protocols,The request/retrieval [for the Payer-to-Payer Exchange] of data SHOULD use the … [Bulk Data Export Operation Request Flow](https://hl7.org/fhir/uv/bulkdata/export.html#bulk-data-export-operation-request-flow).,SHOULD,Server,hl7.fhir.uv.bulkdata_2.0.0,false,1.4,pdex_payer_server-payer_to_payer_workflow-pdex_workflow_export,NA,NA
|
@@ -0,0 +1,228 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'CSV'
|
4
|
+
require 'roo'
|
5
|
+
require 'yaml'
|
6
|
+
require 'csv'
|
7
|
+
|
8
|
+
module InfernoRequirementsTools
|
9
|
+
module Tasks
|
10
|
+
# This class manages the collection of requirements details from
|
11
|
+
# requirements planning excel workbooks into a CSV representation.
|
12
|
+
# Currently splits out Requirements and Planned Not Tested Requirements
|
13
|
+
# into two separate files.
|
14
|
+
#
|
15
|
+
# The `run_check` method will check whether the previously generated file is up-to-date.
|
16
|
+
class CollectRequirements
|
17
|
+
CONFIG = YAML.load_file(File.join('lib', 'requirements_config.yaml'))
|
18
|
+
|
19
|
+
TEST_KIT_ID = CONFIG['test_kit_id']
|
20
|
+
INPUT_SETS = CONFIG['requirement_sets'].map do |req_set|
|
21
|
+
req_set['id']
|
22
|
+
end
|
23
|
+
|
24
|
+
# Derivative constants
|
25
|
+
TEST_KIT_CODE_FOLDER = TEST_KIT_ID.gsub('-', '_')
|
26
|
+
DASHERIZED_TEST_KIT_ID = TEST_KIT_ID.gsub('_', '-')
|
27
|
+
INPUT_HEADERS =
|
28
|
+
[
|
29
|
+
'ID*',
|
30
|
+
'URL*',
|
31
|
+
'Requirement*',
|
32
|
+
'Conformance*',
|
33
|
+
'Actor*',
|
34
|
+
'Sub-Requirement(s)',
|
35
|
+
'Conditionality',
|
36
|
+
'Verifiable?',
|
37
|
+
'Verifiability Details',
|
38
|
+
'Planning To Test?',
|
39
|
+
'Planning To Test Details'
|
40
|
+
].freeze
|
41
|
+
REQUIREMENTS_OUTPUT_HEADERS =
|
42
|
+
[
|
43
|
+
'Req Set',
|
44
|
+
'ID',
|
45
|
+
'URL',
|
46
|
+
'Requirement',
|
47
|
+
'Conformance',
|
48
|
+
'Actor',
|
49
|
+
'Sub-Requirement(s)',
|
50
|
+
'Conditionality'
|
51
|
+
].freeze
|
52
|
+
REQUIREMENTS_OUTPUT_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_requirements.csv".freeze
|
53
|
+
REQUIREMENTS_OUTPUT_FILE =
|
54
|
+
File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', REQUIREMENTS_OUTPUT_FILE_NAME).freeze
|
55
|
+
PLANNED_NOT_TESTED_OUTPUT_HEADERS = ['Req Set', 'ID', 'Reason', 'Details'].freeze
|
56
|
+
PLANNED_NOT_TESTED_OUTPUT_FILE_NAME = "#{DASHERIZED_TEST_KIT_ID}_out_of_scope_requirements.csv".freeze
|
57
|
+
PLANNED_NOT_TESTED_OUTPUT_FILE =
|
58
|
+
File.join('lib', TEST_KIT_CODE_FOLDER, 'requirements', PLANNED_NOT_TESTED_OUTPUT_FILE_NAME).freeze
|
59
|
+
|
60
|
+
def available_input_worksheets
|
61
|
+
@available_input_worksheets ||= Dir.glob(File.join(@input_directory, '*.xlsx')).reject { |f| f.include?('~$') }
|
62
|
+
end
|
63
|
+
|
64
|
+
# Of the form:
|
65
|
+
# {
|
66
|
+
# req_set_id_1: [row1, row2, row 3, ...],
|
67
|
+
# req_set_id_2: [row1, row2, row 3, ...]
|
68
|
+
# }
|
69
|
+
def input_requirement_sets
|
70
|
+
@input_requirement_sets ||= INPUT_SETS.each_with_object({}) do |req_set_id, hash|
|
71
|
+
req_set_file = available_input_worksheets.find { |worksheet_file| worksheet_file.include?(req_set_id) }
|
72
|
+
|
73
|
+
hash[req_set_id] =
|
74
|
+
unless req_set_file.nil?
|
75
|
+
CSV.parse(Roo::Spreadsheet.open(req_set_file).sheet('Requirements').to_csv,
|
76
|
+
headers: true).map do |row|
|
77
|
+
row.to_h.slice(*INPUT_HEADERS)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def new_requirements_csv
|
84
|
+
@new_requirements_csv ||=
|
85
|
+
CSV.generate(+"\xEF\xBB\xBF") do |csv| # start with an unnecessary BOM to make viewing in excel easier
|
86
|
+
csv << REQUIREMENTS_OUTPUT_HEADERS
|
87
|
+
|
88
|
+
input_requirement_sets.each do |req_set_id, input_rows|
|
89
|
+
input_rows.each do |input_row| # NOTE: use row order from source file
|
90
|
+
csv << REQUIREMENTS_OUTPUT_HEADERS.map do |header|
|
91
|
+
header == 'Req Set' ? req_set_id : input_row[header] || input_row["#{header}*"]
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def old_requirements_csv
|
99
|
+
@old_requirements_csv ||= File.read(REQUIREMENTS_OUTPUT_FILE)
|
100
|
+
end
|
101
|
+
|
102
|
+
def new_planned_not_tested_csv
|
103
|
+
@new_planned_not_tested_csv ||=
|
104
|
+
CSV.generate(+"\xEF\xBB\xBF") do |csv| # start with an unnecessary BOM to make viewing in excel easier
|
105
|
+
csv << PLANNED_NOT_TESTED_OUTPUT_HEADERS
|
106
|
+
|
107
|
+
input_requirement_sets.each do |req_set_id, input_rows|
|
108
|
+
input_rows.each do |row|
|
109
|
+
if spreadsheet_value_falsy?(row['Verifiable?'])
|
110
|
+
csv << [req_set_id, row['ID*'], 'Not Verifiable', row['Verifiability Details']]
|
111
|
+
elsif spreadsheet_value_falsy?(row['Planning To Test?'])
|
112
|
+
csv << [req_set_id, row['ID*'], 'Not Tested', row['Planning To Test Details']]
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def old_planned_not_tested_csv
|
120
|
+
@old_planned_not_tested_csv ||= File.read(PLANNED_NOT_TESTED_OUTPUT_FILE)
|
121
|
+
end
|
122
|
+
|
123
|
+
def run(input_directory)
|
124
|
+
@input_directory = input_directory
|
125
|
+
check_presence_of_input_files
|
126
|
+
|
127
|
+
update_requirements =
|
128
|
+
if File.exist?(REQUIREMENTS_OUTPUT_FILE)
|
129
|
+
if old_requirements_csv == new_requirements_csv
|
130
|
+
puts "'#{REQUIREMENTS_OUTPUT_FILE_NAME}' file is up to date."
|
131
|
+
false
|
132
|
+
else
|
133
|
+
puts 'Requirements set has changed.'
|
134
|
+
true
|
135
|
+
end
|
136
|
+
else
|
137
|
+
puts "No existing #{REQUIREMENTS_OUTPUT_FILE_NAME}."
|
138
|
+
true
|
139
|
+
end
|
140
|
+
|
141
|
+
if update_requirements
|
142
|
+
puts "Writing to file #{REQUIREMENTS_OUTPUT_FILE}..."
|
143
|
+
File.write(REQUIREMENTS_OUTPUT_FILE, new_requirements_csv, encoding: Encoding::UTF_8)
|
144
|
+
end
|
145
|
+
|
146
|
+
udpate_planned_not_tested =
|
147
|
+
if File.exist?(PLANNED_NOT_TESTED_OUTPUT_FILE)
|
148
|
+
if old_planned_not_tested_csv == new_planned_not_tested_csv
|
149
|
+
puts "'#{PLANNED_NOT_TESTED_OUTPUT_FILE_NAME}' file is up to date."
|
150
|
+
false
|
151
|
+
else
|
152
|
+
puts 'Planned Not Tested Requirements set has changed.'
|
153
|
+
true
|
154
|
+
end
|
155
|
+
else
|
156
|
+
puts "No existing #{PLANNED_NOT_TESTED_OUTPUT_FILE_NAME}."
|
157
|
+
true
|
158
|
+
end
|
159
|
+
|
160
|
+
if udpate_planned_not_tested
|
161
|
+
puts "Writing to file #{PLANNED_NOT_TESTED_OUTPUT_FILE}..."
|
162
|
+
File.write(PLANNED_NOT_TESTED_OUTPUT_FILE, new_planned_not_tested_csv, encoding: Encoding::UTF_8)
|
163
|
+
end
|
164
|
+
|
165
|
+
puts 'Done.'
|
166
|
+
end
|
167
|
+
|
168
|
+
def run_check(input_directory)
|
169
|
+
@input_directory = input_directory
|
170
|
+
check_presence_of_input_files
|
171
|
+
|
172
|
+
requirements_ok =
|
173
|
+
if File.exist?(REQUIREMENTS_OUTPUT_FILE)
|
174
|
+
if old_requirements_csv == new_requirements_csv
|
175
|
+
puts "'#{REQUIREMENTS_OUTPUT_FILE_NAME}' file is up to date."
|
176
|
+
true
|
177
|
+
else
|
178
|
+
puts "#{REQUIREMENTS_OUTPUT_FILE_NAME} file is out of date."
|
179
|
+
false
|
180
|
+
end
|
181
|
+
else
|
182
|
+
puts "No existing #{REQUIREMENTS_OUTPUT_FILE_NAME} file."
|
183
|
+
false
|
184
|
+
end
|
185
|
+
|
186
|
+
planned_not_tested_requirements_ok =
|
187
|
+
if File.exist?(PLANNED_NOT_TESTED_OUTPUT_FILE)
|
188
|
+
if old_planned_not_tested_csv == new_planned_not_tested_csv
|
189
|
+
puts "'#{PLANNED_NOT_TESTED_OUTPUT_FILE_NAME}' file is up to date."
|
190
|
+
true
|
191
|
+
else
|
192
|
+
puts "#{PLANNED_NOT_TESTED_OUTPUT_FILE_NAME} file is out of date."
|
193
|
+
false
|
194
|
+
end
|
195
|
+
else
|
196
|
+
puts "No existing #{PLANNED_NOT_TESTED_OUTPUT_FILE_NAME} file."
|
197
|
+
false
|
198
|
+
end
|
199
|
+
|
200
|
+
return if planned_not_tested_requirements_ok && requirements_ok
|
201
|
+
|
202
|
+
puts <<~MESSAGE
|
203
|
+
Check Failed. To resolve, run:
|
204
|
+
|
205
|
+
bundle exec rake "requirements:collect[<input_directory>]"
|
206
|
+
|
207
|
+
MESSAGE
|
208
|
+
exit(1)
|
209
|
+
end
|
210
|
+
|
211
|
+
def check_presence_of_input_files
|
212
|
+
input_requirement_sets.each do |req_set_id, rows|
|
213
|
+
next unless rows.nil?
|
214
|
+
|
215
|
+
puts %(
|
216
|
+
Could not find input file for set #{req_set_id} in directory #{@input_directory}. Aborting requirements
|
217
|
+
collection..."
|
218
|
+
)
|
219
|
+
exit(1)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
def spreadsheet_value_falsy?(str)
|
224
|
+
%w[no false].include?(str&.downcase)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: davinci_pdex_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Naden
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-05-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: inferno_core
|
@@ -82,6 +82,34 @@ dependencies:
|
|
82
82
|
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: 1.2.1
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: smart_app_launch_test_kit
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: 0.6.3
|
92
|
+
type: :runtime
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.6.3
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
name: udap_security_test_kit
|
101
|
+
requirement: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 0.11.5
|
106
|
+
type: :runtime
|
107
|
+
prerelease: false
|
108
|
+
version_requirements: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 0.11.5
|
85
113
|
- !ruby/object:Gem::Dependency
|
86
114
|
name: database_cleaner-sequel
|
87
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,7 +203,7 @@ extensions: []
|
|
175
203
|
extra_rdoc_files: []
|
176
204
|
files:
|
177
205
|
- LICENSE
|
178
|
-
- config/presets/pdex_payer_client_postman_preset.json
|
206
|
+
- config/presets/pdex_payer_client_postman_preset.json.erb
|
179
207
|
- config/presets/pdex_payer_server_fhir_foundry_ri_preset.json
|
180
208
|
- config/presets/pdex_payer_server_inferno_ri_preset.json
|
181
209
|
- lib/davinci_pdex_test_kit.rb
|
@@ -188,7 +216,14 @@ files:
|
|
188
216
|
- lib/davinci_pdex_test_kit/igs/us-core-3.1.1.tgz
|
189
217
|
- lib/davinci_pdex_test_kit/metadata.rb
|
190
218
|
- lib/davinci_pdex_test_kit/must_support_test.rb
|
219
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_smart_alca_group.rb
|
220
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_smart_alcs_group.rb
|
221
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_smart_alp_group.rb
|
222
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/client_auth_udap_group.rb
|
191
223
|
- lib/davinci_pdex_test_kit/pdex_payer_client/client_member_match_tests/client_member_match_validation_test.rb
|
224
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/client_registration/configuration_display_smart_test.rb
|
225
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/client_registration/configuration_display_udap_test.rb
|
226
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/client_registration_group.rb
|
192
227
|
- lib/davinci_pdex_test_kit/pdex_payer_client/client_validation_test.rb
|
193
228
|
- lib/davinci_pdex_test_kit/pdex_payer_client/client_workflow_interaction_test.rb
|
194
229
|
- lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/allergyintolerance_clinical_data_request_test.rb
|
@@ -227,7 +262,9 @@ files:
|
|
227
262
|
- lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/resource_search_endpoint.rb
|
228
263
|
- lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/resources/mock_capability_statement.json
|
229
264
|
- lib/davinci_pdex_test_kit/pdex_payer_client/mock_server/resources/mock_operation_outcome_resource.json
|
230
|
-
- lib/davinci_pdex_test_kit/pdex_payer_client/
|
265
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/authorization_endpoint.rb
|
266
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/mock_udap_smart_server/token_endpoint.rb
|
267
|
+
- lib/davinci_pdex_test_kit/pdex_payer_client/pdex_client_options.rb
|
231
268
|
- lib/davinci_pdex_test_kit/pdex_payer_client/tags.rb
|
232
269
|
- lib/davinci_pdex_test_kit/pdex_payer_client/urls.rb
|
233
270
|
- lib/davinci_pdex_test_kit/pdex_payer_client_suite.rb
|
@@ -290,6 +327,7 @@ files:
|
|
290
327
|
- lib/davinci_pdex_test_kit/version.rb
|
291
328
|
- lib/inferno_requirements_tools/ext/inferno_core/runnable.rb
|
292
329
|
- lib/inferno_requirements_tools/rake/rakefile_template
|
330
|
+
- lib/inferno_requirements_tools/tasks/collect_requirements.rb
|
293
331
|
- lib/inferno_requirements_tools/tasks/requirements_coverage.rb
|
294
332
|
- lib/requirements_config.yaml
|
295
333
|
homepage: https://github.com/inferno-framework/davinci-pdex-test-kit/
|
@@ -1,12 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title": "PDex Payer Client Postman Demo",
|
3
|
-
"id": "pdex_payer_client_postman_demo_preset",
|
4
|
-
"test_suite_id": "pdex_payer_client",
|
5
|
-
"inputs": [
|
6
|
-
{
|
7
|
-
"name": "access_token",
|
8
|
-
"type": "text",
|
9
|
-
"value": "UERleFBheWVyQ2xpZW50VGVzdFBvc3RtYW5EZW1v"
|
10
|
-
}
|
11
|
-
]
|
12
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require_relative '../tags'
|
2
|
-
require_relative 'proxy_endpoint'
|
3
|
-
|
4
|
-
module DaVinciPDexTestKit
|
5
|
-
module PDexPayerClient
|
6
|
-
module MockServer
|
7
|
-
# This endpoint is intended to help clients jumpstart the payer-to-payer workflow
|
8
|
-
# but Inferno requires a bearer token to recieve this endpoint anyways so
|
9
|
-
# this doesn't offer much utility.
|
10
|
-
# TODO: open this endpoint, or send auth to another service
|
11
|
-
class TokenEndpoint < ProxyEndpoint
|
12
|
-
|
13
|
-
def make_response
|
14
|
-
response.status = 200
|
15
|
-
# TODO: derive access_token from suite inputs
|
16
|
-
response.body = { access_token: SecureRandom.hex, token_type: 'bearer', expires_in: 300 }.to_json
|
17
|
-
response.format = :json
|
18
|
-
end
|
19
|
-
|
20
|
-
def tags
|
21
|
-
[AUTH_TAG]
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|