davinci_pdex_test_kit 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69ebae860adae457b880d996bf245755998f96de7bdd308fbb60cf6bcd9805e6
4
- data.tar.gz: d6ca088c410fc8041a14cac65d686b102565fd207c8c3a4d8f7c82a24554c20d
3
+ metadata.gz: 24f9510b1d2105f4b1199d572e887929941fb34ee15a09ccb08faa34558c0561
4
+ data.tar.gz: caa1b93a05c412f9a75949dcbea9f0840fe18a43c195a41a76b6dc30a4f8caf5
5
5
  SHA512:
6
- metadata.gz: 81bfcdd1eba8390797921e95287814bc2ca5dda33a9e8b8e70cdbc2ea894af0ff1307a19b8be1fe8296c2a4a14bc786aa29035f8d23fd35e4ea379773b2c3339
7
- data.tar.gz: 6634a7ce409f7f9a99d0f36e142c408ae65e7e7b5d8642671c39fc1eab86479a7d3c3fb4c62ee57765c8d408a4f29342d081e8bdc9345aad9e0ad5eb26ebc4e5
6
+ metadata.gz: f14278dd56909c49768c2fc16578dd199a0e5f200af4c12a4eff4ad282eacd6e91ade0b7ed39778cd80b788e8835566fba6db642ec099028064d01e7751444a5
7
+ data.tar.gz: fc7b2623686c52477fdb32973b7bcf23ae103eb5eccd82c2da1ffe99626380497f48e5d30a64c0fa4c37ec228c2eb51f9954af99e75b7c1f672394617cdbda68
@@ -71,9 +71,6 @@ to make requests against Inferno for these tests. To use the Postman demo on thi
71
71
  use Postman to send some or all of the requests in the `Clinical Data Requests` folder and click
72
72
  on the link in the dialog when done. If not all the requests are made, the test will not pass
73
73
  because the test requires that all available data be accessed.
74
- 6. When a third `User Action Required` requesting additional `$member-match` requests be made
75
- demonstrating coverage of all must support elements on `$member-match` submissions, use Postman to send any or all of the requests found in the `$member-match Requests` folder. If only the
76
- `$member-match missing CoverageToMatch` is sent, then the test will fail due to missing examples.
77
74
 
78
75
  The tests will complete and the results made available for review.
79
76
 
@@ -135,16 +135,6 @@ module DaVinciPDexTestKit
135
135
  request.query_parameters['token']
136
136
  end
137
137
 
138
- # Drop the last two segments of a URL, i.e. the resource type and ID of a FHIR resource
139
- # e.g. http://example.org/fhir/Patient/123 -> http://example.org/fhir
140
- # @private
141
- def base_url(url)
142
- return unless url.start_with?('http://', 'https://')
143
-
144
- # Drop everything after the second to last '/', ignoring a trailing slash
145
- url.sub(%r{/[^/]*/[^/]*(/)?\z}, '')
146
- end
147
-
148
138
  # Pull resource type from url
149
139
  # e.g. http://example.org/fhir/Patient/123 -> Patient
150
140
  # @private
@@ -180,9 +170,9 @@ module DaVinciPDexTestKit
180
170
 
181
171
  def replace_bundle_urls(bundle)
182
172
  reference_server_base = ENV.fetch('FHIR_REFERENCE_SERVER')
183
- bundle.link.map! {|link| {relation: link.relation, url: link.url.gsub(reference_server_base, 'http://localhost:4567/custom/pdex_payer_client/fhir')}}
173
+ bundle.link.map! {|link| {relation: link.relation, url: link.url.gsub(reference_server_base, new_link)}}
184
174
  bundle&.entry&.map! do |bundled_resource|
185
- {fullUrl: bundled_resource.fullUrl.gsub(reference_server_base, 'http://localhost:4567/custom/pdex_payer_client/fhir'),
175
+ {fullUrl: bundled_resource.fullUrl.gsub(reference_server_base, new_link),
186
176
  resource: bundled_resource.resource,
187
177
  search: bundled_resource.search
188
178
  }
@@ -190,6 +180,10 @@ module DaVinciPDexTestKit
190
180
  bundle
191
181
  end
192
182
 
183
+ def new_link
184
+ "#{Inferno::Application['base_url']}/custom/pdex_payer_client/fhir"
185
+ end
186
+
193
187
  # @private
194
188
  def absolute_reference(ref, entries, root_url)
195
189
  url = find_matching_entry(ref&.reference, entries, root_url)&.fullUrl
@@ -0,0 +1,61 @@
1
+ ---
2
+ :name: hrex_member_match_request_parameters
3
+ :class_name: HRexMemberMatchRequestParameters
4
+ :version: 1.0.0
5
+ :reformatted_version: v1.0.0
6
+ :resource: Parameters
7
+ :profile_url: http://hl7.org/fhir/us/davinci-hrex/StructureDefinition/hrex-parameters-member-match-in
8
+ :profile_name: HRex Member Match Request Parameters
9
+ :profile_version: 1.0.0
10
+ :title: Member Match Request Parameters
11
+ :short_description: "The Parameters profile for Da Vinci Find Member using Patient and Coverage Resources Request. The resource must contain: \n * MemberPatient - US Core Patient containing member demographics \n * CoverageToMatch - details of prior health plan coverage provided by the member, typically from their health plan coverage card \n * CoverageToLink - details of new or prospective health plan coverage, provided by the health plan based upon the member's enrolment"
12
+ :is_delayed: false
13
+ :interactions: []
14
+ :operations: []
15
+ :include_params: []
16
+ :revincludes: []
17
+ :required_concepts: []
18
+ :must_supports:
19
+ :extensions: []
20
+ :slices:
21
+ - :slice_id: Parameters.parameter:MemberPatient
22
+ :slice_name: MemberPatient
23
+ :path: parameter
24
+ :discriminator:
25
+ :type: value
26
+ :values:
27
+ - :path: name
28
+ :value: MemberPatient
29
+ - :slice_id: Parameters.parameter:CoverageToMatch
30
+ :slice_name: CoverageToMatch
31
+ :path: parameter
32
+ :discriminator:
33
+ :type: value
34
+ :values:
35
+ - :path: name
36
+ :value: CoverageToMatch
37
+ - :slice_id: Parameters.parameter:CoverageToLink
38
+ :slice_name: CoverageToLink
39
+ :path: parameter
40
+ :discriminator:
41
+ :type: value
42
+ :values:
43
+ - :path: name
44
+ :value: CoverageToLink
45
+ - :slice_id: Parameters.parameter:Consent
46
+ :slice_name: Consent
47
+ :path: parameter
48
+ :discriminator:
49
+ :type: value
50
+ :values:
51
+ - :path: name
52
+ :value: Consent
53
+ :elements:
54
+ - :path: parameter:MemberPatient.resource
55
+ - :path: parameter:CoverageToMatch.resource
56
+ - :path: parameter:CoverageToLink.resource
57
+ - :path: parameter:Consent.resource
58
+ :mandatory_elements:
59
+
60
+
61
+
@@ -17,7 +17,7 @@ module DaVinciPDexTestKit
17
17
  run do
18
18
  skip_if scratch[:Patient].nil?, "No requests made for Patient resources"
19
19
 
20
- assert scratch[:Patient].any? {|resource| resource.id == 'pdex-Patient'}, "Unable to find expected resource: 999"
20
+ assert scratch[:Patient].any? {|resource| resource.id == '999'}, "Unable to find expected resource: 999"
21
21
  end
22
22
  end
23
23
  end
@@ -51,9 +51,33 @@ module DaVinciPDexTestKit
51
51
  !test.config.options[:accepts_multiple_requests]
52
52
  end
53
53
 
54
- # All FHIR validation requests will use this FHIR validator
55
- validator do
56
- url ENV.fetch('VALIDATOR_URL')
54
+ links [
55
+ {
56
+ label: 'Report Issue',
57
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit/issues'
58
+ },
59
+ {
60
+ label: 'Open Source',
61
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit'
62
+ },
63
+ {
64
+ label: 'Download',
65
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit/releases'
66
+ },
67
+ {
68
+ label: 'Implementation Guide',
69
+ url: 'https://hl7.org/fhir/us/davinci-pdex/STU2/'
70
+ }
71
+ ]
72
+
73
+ # Hl7 Validator Wrapper:
74
+ fhir_resource_validator do
75
+ igs 'hl7.fhir.us.davinci-pdex#2.0.0'
76
+ # hrex 1.0.0 and other dependencies will auto-load
77
+
78
+ exclude_message do |message|
79
+ message.message.match?(/\A\S+: \S+: URL value '.*' does not resolve/)
80
+ end
57
81
  end
58
82
 
59
83
  record_response_route :post, TOKEN_PATH, AUTH_TAG, method(:token_response) do |request|
@@ -149,4 +173,4 @@ module DaVinciPDexTestKit
149
173
  # end
150
174
  end
151
175
  end
152
-
176
+
@@ -24,27 +24,28 @@ module DaVinciPDexTestKit
24
24
  run do
25
25
  member_match_request_resource = FHIR.from_contents(member_match_request)
26
26
  skip_if !member_match_request_resource.parameter.find{|p| p.name=='CoverageToLink'},
27
- "No CoverageToLink parameter provided"
27
+ 'No CoverageToLink parameter provided'
28
28
 
29
29
  coverage = member_match_request_resource.parameter.find{|p| p.name=='CoverageToLink'}.resource
30
30
 
31
31
  assert_resource_type(:coverage, resource: coverage)
32
- assert !coverage.type
33
- assert !coverage.policyHolder
34
- assert !coverage.subscriber
35
- assert !coverage.relationship
36
- assert !coverage.period
37
- assert !coverage.local_class.any? do |backbone_element|
32
+ assert !coverage.type, 'CoverageToLink parameter has unnecessary type field'
33
+ assert !coverage.policyHolder, 'CoverageToLink parameter has unnecessary policyHolder field'
34
+ assert !coverage.subscriber, 'CoverageToLink parameter has unnecessary subscriber field'
35
+ assert !coverage.relationship, 'CoverageToLink parameter has unnecessary relationship field'
36
+ assert !coverage.period, 'CoverageToLink parameter has unnecessary period field'
37
+ extraneous_coverage_classes = coverage.local_class.any? do |backbone_element|
38
38
  backbone_element.type.coding.any? do |coding|
39
39
  !(coding.code == 'group' &&
40
40
  coding.system == 'http://terminology.hl7.org/CodeSystem/coverage-class')
41
41
  end
42
42
  end
43
- assert !coverage.order
44
- assert !coverage.network
45
- assert coverage.costToBeneficiary.empty?
46
- assert coverage.subrogation.nil?
47
- assert !coverage.contract
43
+ assert !extraneous_coverage_classes, 'CoverageToLink parameter has class field with array elements aside from the group slice'
44
+ assert !coverage.order, 'CoverageToLink parameter has unnecessary order field'
45
+ assert !coverage.network, 'CoverageToLink parameter has unecessary network field'
46
+ assert coverage.costToBeneficiary.nil? || coverage.costToBeneficiary.empty?, 'CoverageToLink parameter has unnecessary costToBeneficiary field'
47
+ assert coverage.subrogation.nil?, 'CoverageToLink parameter has unnecessary subrogation field'
48
+ assert !coverage.contract, 'CoverageToLink parameter has uncessary contract field'
48
49
  end
49
50
 
50
51
  end
@@ -0,0 +1,566 @@
1
+ ---
2
+ :name: pdex_prior_authorization
3
+ :class_name: PDexExplanationOfBenefitSequence
4
+ :version: v2.0.0
5
+ :reformatted_version: v200
6
+ :resource: ExplanationOfBenefit
7
+ :profile_url: https://hl7.org/fhir/us/davinci-pdex/STU2/CapabilityStatement-pdex-server
8
+ :profile_name: PDex Prior Authorization
9
+ :profile_version: 2.0.0
10
+ :title: PDex Prior Authorization
11
+ :short_description: Verify support for the server capabilities required by the PDex Prior Authorization Profile.
12
+ :is_delayed: false
13
+ :interactions:
14
+ - :code: create
15
+ :expectation: MAY # Unspecified expectations are defaulted to MAY here
16
+ - :code: search-type
17
+ :expectation: SHALL
18
+ - :code: read
19
+ :expectation: SHALL
20
+ - :code: vread
21
+ :expectation: MAY
22
+ - :code: update
23
+ :expectation: MAY
24
+ - :code: patch
25
+ :expectation: MAY
26
+ - :code: delete
27
+ :expectation: MAY
28
+ - :code: history-instance
29
+ :expectation: SHOULD
30
+ - :code: history-type
31
+ :expectation: MAY
32
+ :operations: []
33
+ :searches:
34
+ - :expectation: SHALL
35
+ :names:
36
+ - patient
37
+ - use
38
+ :names_not_must_support_or_mandatory: []
39
+ :must_support_or_mandatory: true
40
+ - :expectation: SHALL
41
+ :names:
42
+ - _id
43
+ :names_not_must_support_or_mandatory: []
44
+ :must_support_or_mandatory: true
45
+ - :expectation: SHALL
46
+ :names:
47
+ - patient
48
+ - _lastUpdated
49
+ :names_not_must_support_or_mandatory: []
50
+ :must_support_or_mandatory: true
51
+ - :expectation: SHALL
52
+ :names:
53
+ - patient
54
+ - service-date
55
+ :names_not_must_support_or_mandatory: []
56
+ :must_support_or_mandatory: true
57
+ - :expectation: SHALL
58
+ :names:
59
+ - patient
60
+ - type
61
+ :names_not_must_support_or_mandatory: []
62
+ :must_support_or_mandatory: true
63
+ - :expectation: SHALL
64
+ :names:
65
+ - identifier
66
+ :names_not_must_support_or_mandatory: []
67
+ :must_support_or_mandatory: true
68
+
69
+ :search_definitions:
70
+ :patient:
71
+ :paths:
72
+ - patient
73
+ :full_paths:
74
+ - ExplanationOfBenefit.patient
75
+ :comparators: {}
76
+ :values: []
77
+ :type: Reference
78
+ :contains_multiple: false
79
+ :multiple_or: MAY
80
+ :identifier:
81
+ :paths:
82
+ - identifier
83
+ :full_paths:
84
+ - ExplanationOfBenefit.identifier
85
+ :comparators: {}
86
+ :values: []
87
+ :type: Identifier
88
+ :contains_multiple: true
89
+ :multiple_or: MAY
90
+ # The service-date search parameter paths are not clear in the JSON, but explicit in its narrative
91
+ # https://hl7.org/fhir/us/davinci-pdex/STU2/SearchParameter-explanationofbenefit-service-date
92
+ :service-date:
93
+ :paths:
94
+ - billablePeriod.period.start
95
+ - item.servicedDate
96
+ - item.servicedPeriod.period.start
97
+ :full_paths:
98
+ - ExplanationOfBenefit.billablePeriod.period.start
99
+ - ExplanationOfBenefit.item.serviced.servicedDate
100
+ - ExplanationOfBenefit.item.servicedPeriod.period.start
101
+ :comparators:
102
+ :eq: MAY
103
+ :ne: MAY
104
+ :gt: MAY
105
+ :ge: MAY
106
+ :lt: MAY
107
+ :le: MAY
108
+ :sa: MAY
109
+ :eb: MAY
110
+ :ap: MAY
111
+ :values: []
112
+ :type: date
113
+ :contains_multiple: false
114
+ :multiple_or: MAY
115
+ :type:
116
+ :paths:
117
+ - type
118
+ :full_paths:
119
+ - ExplanationOfBenefit.type
120
+ :comparators: {}
121
+ :values: []
122
+ :type: CodeableConcept
123
+ :contains_multiple: false
124
+ :multiple_or: MAY
125
+ :use:
126
+ :paths:
127
+ - use
128
+ :full_paths:
129
+ - ExplanationOfBenefit.use
130
+ :comparators: {}
131
+ :values:
132
+ - preauthorization
133
+ :type: code
134
+ :contains_multiple: false
135
+ :multiple_or: MAY
136
+ # I'm assuming metadata needs _id, even though its defined in FHIR Core
137
+ :_id:
138
+ :paths:
139
+ - id
140
+ :full_paths:
141
+ - ExplanationOfBenefit.id
142
+ :comparators: {}
143
+ :values: []
144
+ :type: http://hl7.org/fhirpath/System.String
145
+ :contains_multiple: false
146
+ :multiple_or: MAY
147
+ # Likewise assuming metadata needs _lastUpdated
148
+ :_lastUpdated:
149
+ :paths:
150
+ - meta.lastUpdated
151
+ :full_paths:
152
+ - ExplanationOfBenefit.meta.lastUpdated
153
+ :comparators:
154
+ :eq: MAY
155
+ :ne: MAY
156
+ :gt: MAY
157
+ :ge: MAY
158
+ :lt: MAY
159
+ :le: MAY
160
+ :sa: MAY
161
+ :eb: MAY
162
+ :ap: MAY
163
+ :values: []
164
+ :type: date
165
+ :contains_multiple: false
166
+ :multiple_or: MAY
167
+ :include_params:
168
+ - ExplanationOfBenefit:patient:Patient
169
+ - ExplanationOfBenefit:provider:Practitioner
170
+ - ExplanationOfBenefit:provider:PractitionerRole
171
+ - ExplanationOfBenefit:provider:Organization
172
+ # 'care-team' search parameter maps to ExplanationOfBenefit.careTeam.provider
173
+ - ExplanationOfBenefit:care-team:Practitioner
174
+ - ExplanationOfBenefit:care-team:PractitionerRole
175
+ - ExplanationOfBenefit:care-team:Organization
176
+ - ExplanationOfBenefit:coverage:Coverage
177
+ - ExplanationOfBenefit:insurer:Organization
178
+ # Asserting '*' search parameter makes a lot of the above redundant
179
+ - ExplanationOfBenefit:*
180
+
181
+ :revincludes:
182
+ - Provenance:target
183
+ :required_concepts: []
184
+
185
+ ## TODO: must supports
186
+ :must_supports:
187
+ :extensions:
188
+ - :id: ExplanationOfBenefit.extension:levelOfServiceType
189
+ :path: extension
190
+ :url: https://hl7.org/fhir/us/davinci-pdex/StructureDefinition-extension-levelOfServiceCode
191
+ - :id: ExplanationOfBenefit.item.extension:itemTraceNumber
192
+ :path: item.extension
193
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition-extension-itemTraceNumber
194
+ - :id: ExplanationOfBenefit.item.extension:preAuthIssueDate
195
+ :path: item.extension
196
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition-extension-itemPreAuthIssueDate
197
+ - :id: ExplanationOfBenefit.item.extension:preAuthIssuePeriod
198
+ :path: item.extension
199
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition-extension-itemPreAuthPeriod
200
+ - :id: ExplanationOfBenefit.item.extension:previousAuthorizationNumber
201
+ :path: item.extension
202
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition-extension-authorizationNumber
203
+ - :id: ExplanationOfBenefit.item.extension:administrationReferenceNumber
204
+ :path: item.extension
205
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition-extension-administrationReferenceNumber
206
+ - :id: ExplanationOfBenefit.item.extension:authorizedItemDetail
207
+ :path: item.extension
208
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemAuthorizedDetail
209
+ - :id: ExplanationOfBenefit.item.extension:authorizedProvider
210
+ :path: item.extension
211
+ :url: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemAuthorizedProvider
212
+ - :id: ExplanationOfBenefit.item.adjudication.extension:reviewAction
213
+ :path: item.adjudication.extension
214
+ :url: http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/extension-reviewAction
215
+ # TODO item.detail.adjudication
216
+ # TODO item.detail.subdetail.adjudication
217
+ # TODO addItem
218
+ - :id: ExplanationOfBenefit.adjudication.extension:reviewAction
219
+ :path: adjudication.extension
220
+ :url: http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/extension-reviewAction
221
+ - :id: ExplanationOfBenefit.total.extension:priorauth-utilization
222
+ :path: total.extension
223
+ :url: http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/PriorAuthorizationUtilization
224
+
225
+ :slices:
226
+ - :slice_id: ExplanationOfBenefit.item.adjudication:adjudicationamounttype
227
+ :slice_name: adjudicationamounttype
228
+ :path: item.adjudication
229
+ :discriminator:
230
+ :type: requiredBinding
231
+ :path: category
232
+ :values:
233
+ - submitted
234
+ - copay
235
+ - eligible
236
+ - deductible
237
+ - benefit
238
+ - coinsurance
239
+ - noncovered
240
+ - priorpayerpaid
241
+ - paidbypatient
242
+ - paidtopatient
243
+ - paidtoprovider
244
+ - memberliability
245
+ - discount
246
+ - :slice_id: ExplanationOfBenefit.item.adjudication:allowedunits
247
+ :slice_name: allowedunits
248
+ :path: item.adjudication
249
+ :discriminator:
250
+ :type: patternCodeableConcept
251
+ :path: category
252
+ :code: allowedunits
253
+ :system: http://hl7.org/fhir/us/davinci-pdex/CodeSystem/PDexAdjudicationDiscriminator
254
+ - :slice_id: ExplanationOfBenefit.item.adjudication:denialreason
255
+ :slice_name: denialreason
256
+ :path: item.adjudication
257
+ :discriminator:
258
+ :type: patternCodeableConcept
259
+ :path: category
260
+ :code: denialreason
261
+ :system: http://hl7.org/fhir/us/davinci-pdex/CodeSystem/PDexAdjudicationDiscriminator
262
+ - :slice_id: ExplanationOfBenefit.item.adjudication:consumedunits
263
+ :slice_name: consumedunits
264
+ :path: item.adjudication
265
+ :discriminator:
266
+ :type: patternCodeableConcept
267
+ :path: category
268
+ :code: consumedunits
269
+ :system: http://hl7.org/fhir/us/davinci-pdex/CodeSystem/PDexAdjudicationDiscriminator
270
+ # TODO item.detail.adjudication
271
+ # TODO item.detail.subdetail.adjudication
272
+ # TODO addItem
273
+ - :slice_id: ExplanationOfBenefit.adjudication:adjudicationamounttype
274
+ :slice_name: adjudicationamounttype
275
+ :path: adjudication
276
+ :discriminator:
277
+ :type: requiredBinding
278
+ :path: category
279
+ :values:
280
+ - submitted
281
+ - copay
282
+ - eligible
283
+ - deductible
284
+ - benefit
285
+ - coinsurance
286
+ - noncovered
287
+ - priorpayerpaid
288
+ - paidbypatient
289
+ - paidtopatient
290
+ - paidtoprovider
291
+ - memberliability
292
+ - discount
293
+ - :slice_id: ExplanationOfBenefit.adjudication:denialreason
294
+ :slice_name: denialreason
295
+ :path: adjudication
296
+ :discriminator:
297
+ :type: patternCodeableConcept
298
+ :path: category
299
+ :code: denialreason
300
+ :system: http://hl7.org/fhir/us/davinci-pdex/CodeSystem/PDexAdjudicationDiscriminator
301
+
302
+ :elements:
303
+ - :path: status
304
+ - :path: type
305
+ - :path: use
306
+ - :path: patient
307
+ :types:
308
+ - Reference
309
+ :target_profiles:
310
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-patient
311
+ - :path: enterer
312
+ :types:
313
+ - Reference
314
+ :target_profiles:
315
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitioner
316
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitionerrole
317
+ - :path: insurer
318
+ :types:
319
+ - Reference
320
+ :target_profiles:
321
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-organization
322
+ - :path: provider
323
+ :types:
324
+ - Reference
325
+ :target_profiles:
326
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitioner
327
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitionerrole
328
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-organization
329
+ - :path: facility
330
+ :types:
331
+ - Reference
332
+ :target_profiles:
333
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-location
334
+ - :path: preAuthRefPeriod
335
+ - :path: careTeam.provider
336
+ :types:
337
+ - Reference
338
+ :target_profiles:
339
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitioner
340
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitionerrole
341
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-organization
342
+ - :path: item.category
343
+ - :path: item.adjudication:adjudicationamounttype.amount
344
+ - :path: item.adjudication:allowedunits.value
345
+ - :path: item.adjudication:denialreason.reason
346
+ - :path: item.adjudication:consumedunits.value
347
+ # TODO item.detail.adjudication
348
+ # TODO item.detail.subdetail.adjudication
349
+ # TODO addItem
350
+ - :path: adjudication.category
351
+ # Header-level adjudication denialreason slice points to item-level adjudication for content reference,
352
+ # however, header-level adjudication amounttype slice does not (and has no MS subelements).
353
+ # Is this intentional by PDex authors?
354
+ - :path: adjudication:denialreason.reason
355
+ - :path: total.category
356
+
357
+ :mandatory_elements:
358
+ - ExplanationOfBenefit.meta.profile
359
+ - ExplanationOfBenefit.status
360
+ - ExplanationOfBenefit.type
361
+ - ExplanationOfBenefit.use
362
+ - ExplanationOfBenefit.patient
363
+ - ExplanationOfBenefit.created
364
+ - ExplanationOfBenefit.insurer
365
+ - ExplanationOfBenefit.provider
366
+ - ExplanationOfBenefit.outcome
367
+ - ExplanationOfBenefit.careTeam.sequence
368
+ - ExplanationOfBenefit.careTeam.provider
369
+ - ExplanationOfBenefit.supportingInfo.sequence
370
+ - ExplanationOfBenefit.supportingInfo.category
371
+ - ExplanationOfBenefit.diagnosis.sequence
372
+ - ExplanationOfBenefit.diagnosis.diagnosis[x]
373
+ - ExplanationOfBenefit.procedure.sequence
374
+ - ExplanationOfBenefit.procedure.procedure[x]
375
+ - ExplanationOfBenefit.insurance
376
+ - ExplanationOfBenefit.insurance.focal
377
+ - ExplanationOfBenefit.insurance.coverage
378
+ - ExplanationOfBenefit.item.sequence
379
+ - ExplanationOfBenefit.item.productOrService
380
+ - ExplanationOfBenefit.item.adjudication.category
381
+ # Do slices count as mandatory elements?
382
+ - ExplanationOfBenefit.item.adjudication:adjudicationamounttype.category
383
+ - ExplanationOfBenefit.item.adjudication:adjudicationamounttype.amount
384
+ - ExplanationOfBenefit.item.adjudication:adjudicationallowedunits.category
385
+ - ExplanationOfBenefit.item.adjudication:adjudicationallowedunits.category.coding
386
+ - ExplanationOfBenefit.item.adjudication:adjudicationallowedunits.category.coding.system
387
+ - ExplanationOfBenefit.item.adjudication:adjudicationallowedunits.category.coding.code
388
+ - ExplanationOfBenefit.item.adjudication:adjudicationallowedunits.value
389
+ - ExplanationOfBenefit.item.adjudication:denialreason.category
390
+ - ExplanationOfBenefit.item.adjudication:denialreason.category.coding
391
+ - ExplanationOfBenefit.item.adjudication:denialreason.category.coding.system
392
+ - ExplanationOfBenefit.item.adjudication:denialreason.category.coding.code
393
+ - ExplanationOfBenefit.item.adjudication:denialreason.reason
394
+ - ExplanationOfBenefit.item.adjudication:consumedunits.category
395
+ - ExplanationOfBenefit.item.adjudication:consumedunits.category.coding
396
+ - ExplanationOfBenefit.item.adjudication:consumedunits.category.coding.system
397
+ - ExplanationOfBenefit.item.adjudication:consumedunits.category.coding.code
398
+ - ExplanationOfBenefit.item.adjudication:consumedunits.value
399
+ # TODO: ExplanationOfBenefit.item.detail.adjudication ... (== ExplanationOfBenefit.item.adjudication)
400
+ # TODO: ExplanationOfBenefit.item.detail.subDetail
401
+ # TODO: ExplanationOfBenefit.addItem
402
+ - ExplanationOfBenefit.adjudication.category
403
+ - ExplanationOfBenefit.adjudication:adjudicationamounttype.category
404
+ - ExplanationOfBenefit.adjudication:adjudicationamounttype.amount
405
+ # TODO: ExplanationOfBenefit.adjudication:denialreason (== ExplanationOfBenefit.item.adjudication:denialreason)
406
+ - ExplanationOfBenefit.total.category
407
+ - ExplanationOfBenefit.total.amount
408
+
409
+ :bindings:
410
+ # Only differential bindings for PDex PriorAuthorization Profile are here
411
+ # Example-strength bindings are excluded
412
+ - :path: priority
413
+ :type: CodeableConcept
414
+ :strength: required
415
+ :system: http://hl7.org/fhir/R4/valueset-process-priority
416
+ - :path: item.category
417
+ :type: CodeableConcept
418
+ :strength: required
419
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-PriorAuthServiceTypeCodes
420
+ - :path: item.productOrService
421
+ :type: CodeableConcept
422
+ :strength: required
423
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-PDexPAInstitutionalProcedureCodesVS
424
+ - :path: item.adjudication.category
425
+ :type: CodeableConcept
426
+ :strength: required
427
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-PDexAdjudicationCategoryDiscriminator
428
+ - :path: item.adjudication:adjudicationamounttype.category
429
+ :type: CodeableConcept
430
+ :strength: required
431
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-PDexAdjudication
432
+ - :path: item.adjudication:denialreason.reason
433
+ :type: CodeableConcept
434
+ :strength: required
435
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-X12ClaimAdjustmentReasonCodesCMSRemittanceAdviceRemarkCodes
436
+ - :path: adjudication.category
437
+ :type: CodeableConcept
438
+ :strength: required
439
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-PDexAdjudicationCategoryDiscriminator
440
+ - :path: adjudication:adjudicationamounttype.category
441
+ :type: CodeableConcept
442
+ :strength: required
443
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-PDexAdjudication
444
+ - :path: total.category
445
+ :type: CodeableConcept
446
+ :strength: extensible
447
+ :system: https://hl7.org/fhir/us/davinci-pdex/ValueSet-PriorAuthorizationAmounts
448
+
449
+ :references:
450
+ - :path: ExplanationOfBenefit.patient
451
+ :profiles:
452
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-patient
453
+ - :path: ExplanationOfBenefit.enterer
454
+ :profiles:
455
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitioner
456
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitionerrole
457
+ - :path: ExplanationOfBenefit.insurer
458
+ :profiles:
459
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-organization
460
+ - :path: ExplanationOfBenefit.provider
461
+ :profiles:
462
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitioner
463
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitionerrole
464
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-organization
465
+ - :path: ExplanationOfBenefit.related.claim
466
+ :profiles:
467
+ - http://hl7.org/fhir/R4/claim
468
+ - :path: ExplanationOfBenefit.prescription
469
+ :profiles:
470
+ - http://hl7.org/fhir/R4/medicationrequest
471
+ - http://hl7.org/fhir/R4/visionprescription
472
+ - :path: ExplanationOfBenefit.originalPrescription
473
+ :profiles:
474
+ - http://hl7.org/fhir/R4/medicationrequest
475
+ - :path: ExplanationOfBenefit.payee.party
476
+ :profiles:
477
+ - http://hl7.org/fhir/R4/practitioner
478
+ - http://hl7.org/fhir/R4/practitionerrole
479
+ - http://hl7.org/fhir/R4/organization
480
+ - http://hl7.org/fhir/R4/patient
481
+ - http://hl7.org/fhir/R4/relatedperson
482
+ - :path: ExplanationOfBenefit.referral
483
+ :profiles:
484
+ - http://hl7.org/fhir/R4/servicerequest
485
+ - :path: ExplanationOfBenefit.facility
486
+ :profiles:
487
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-location
488
+ - :path: ExplanationOfBenefit.claim
489
+ :profiles:
490
+ - http://hl7.org/fhir/R4/claim
491
+ - :path: ExplanationOfBenefit.claimResponse
492
+ :profiles:
493
+ - http://hl7.org/fhir/R4/claimresponse
494
+ - :path: ExplanationOfBenefit.careTeam.provider
495
+ :profiles:
496
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitioner
497
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitionerrole
498
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-organization
499
+ - :path: ExplanationOfBenefit.supportingInfo.valueReference
500
+ :profiles:
501
+ - http://hl7.org/fhir/R4/resource
502
+ - :path: ExplanationOfBenefit.diagnosis.diagnosisReference
503
+ :profiles:
504
+ - http://hl7.org/fhir/R4/condition
505
+ - :path: ExplanationOfBenefit.procedure.procedureReference
506
+ :profiles:
507
+ - http://hl7.org/fhir/R4/procedure
508
+ - :path: ExplanationOfBenefit.insurance.coverage
509
+ :profiles:
510
+ - http://hl7.org/fhir/us/davinci-hrex/STU1/StructureDefinition-hrex-coverage
511
+ - :path: ExplanationOfBenefit.acident.locationReference
512
+ :profiles:
513
+ - http://hl7.org/fhir/R4/location
514
+ - :path: ExplanationOfBenefit.item.locationReference
515
+ :profiles:
516
+ - http://hl7.org/fhir/R4/location
517
+ - :path: ExplanationOfBenefit.item.udi # Unique Device Identifier
518
+ :profiles:
519
+ - http://hl7.org/fhir/R4/device
520
+ - :path: ExplanationOfBenefit.item.encounter
521
+ :profiles:
522
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-encounter
523
+ - :path: ExplanationOfBenefit.item.detail.udi
524
+ :profiles:
525
+ - http://hl7.org/fhir/R4/device
526
+ - :path: ExplanationOfBenefit.item.detail.subDetail.udi
527
+ :profiles:
528
+ - http://hl7.org/fhir/R4/device
529
+ - :path: ExplanationOfBenefit.addItem.provider
530
+ :profiles:
531
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitioner
532
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-practitionerrole
533
+ - http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-organization
534
+ - :path: ExplanationOfBenefit.addItem.locationReference
535
+ :profiles:
536
+ - http://hl7.org/fhir/R4/location
537
+
538
+ :tests:
539
+ - :id: pdex_explanation_of_benefit_patient_use_search_test
540
+ :file_name: explanation_of_benefit_patient_use_search_test.rb
541
+ - :id: pdex_explanation_of_benefit__id_search_test
542
+ :file_name: explanation_of_benefit_id_search_test.rb
543
+ - :id: pdex_explanation_of_benefit_patient__last_updated_search_test
544
+ :file_name: explanation_of_benefit_patient_last_updated_search_test.rb
545
+ - :id: pdex_explanation_of_benefit_service_date_search_test
546
+ :file_name: explanation_of_benefit_service_date_search_test.rb
547
+ - :id: pdex_explanation_of_benefit_patient_type_search_test
548
+ :file_name: explanation_of_benefit_patient_type_search_test.rb
549
+ - :id: pdex_explanation_of_benefit_identifier_search_test
550
+ :file_name: explanation_of_benefit_identifier_search_test.rb
551
+ - :id: pdex_explanation_of_benefit_read_test
552
+ :file_name: explanation_of_benefit_read_test.rb
553
+ - :id: pdex_explanation_of_benefit_provenance_revinclude_search_test
554
+ :file_name: explanation_of_benefit_provenance_revinclude_search_test.rb
555
+ - :id: pdex_explanation_of_benefit_validation_test
556
+ :file_name: explanation_of_benefit_validation_test.rb
557
+ - :id: pdex_explanation_of_benefit_must_support_test
558
+ :file_name: explanation_of_benefit_must_support_test.rb
559
+ - :id: pdex_explanation_of_benefit_reference_resolution_test
560
+ :file_name: explanation_of_benefit_reference_resolution_test.rb
561
+
562
+ :id: pdex_explanation_of_benefit
563
+ :file_name: explanation_of_benefit_group.rb
564
+
565
+ # NOTE: delayed_references is set as false above
566
+ :delayed_references: []
@@ -84,33 +84,36 @@ module DaVinciPDexTestKit
84
84
  end
85
85
  end
86
86
 
87
- test do
88
- title %{
89
- The resources returned SHALL include all the data covered by the meaningful use common data elements as
90
- defined in the US Core Implementation Guide
91
- }
92
- description %{
93
- See FHIR R4 documentation for [patient-everything](https://hl7.org/fhir/R4/patient-operation-everything.html).
94
- The US realm has now replaced meaningful use common data elements with [USCDI](https://www.healthit.gov/isa/united-states-core-data-interoperability-uscdi).
95
87
 
96
- This test currently uses `meta.profile` to validate that a resource is compliant with its intended profile,
97
- which includes checking for the profile's required elements.
88
+ # TODO: convert to attestation
89
+ # test do
90
+ # title %{
91
+ # The resources returned SHALL include all the data covered by the meaningful use common data elements as
92
+ # defined in the US Core Implementation Guide
93
+ # }
94
+ # description %{
95
+ # See FHIR R4 documentation for [patient-everything](https://hl7.org/fhir/R4/patient-operation-everything.html).
96
+ # The US realm has now replaced meaningful use common data elements with [USCDI](https://www.healthit.gov/isa/united-states-core-data-interoperability-uscdi).
98
97
 
99
- It is the servers responsiblity to return all resources necessary to cover all USDCI elements known by
100
- the server.
101
- }
98
+ # This test currently uses `meta.profile` to validate that a resource is compliant with its intended profile,
99
+ # which includes checking for the profile's required elements.
102
100
 
103
- uses_request :pdex_patient_everything
101
+ # It is the servers responsiblity to return all resources necessary to cover all USDCI elements known by
102
+ # the server.
103
+ # }
104
104
 
105
- run do
106
- skip_if resource.resourceType != 'Bundle'
105
+ # uses_request :pdex_patient_everything
107
106
 
108
- (0...resource.entry.length).each do |i|
109
- assert_valid_resource(resource: resource.entry[i].resource,
110
- profile_url: resource.entry[i].resource.meta.profile)
111
- end
112
- end
113
- end
107
+ # run do
108
+ # skip_if resource.resourceType != 'Bundle'
109
+
110
+ # (0...resource.entry.length).each do |i|
111
+ # assert_valid_resource(resource: resource.entry[i].resource,
112
+ # profile_url: resource.entry[i].resource.meta.profile
113
+ # )
114
+ # end
115
+ # end
116
+ # end
114
117
 
115
118
  # TODO: make attestations clearer, possibly change UI
116
119
  # test do
@@ -16,6 +16,25 @@ module DaVinciPDexTestKit
16
16
  title 'Da Vinci PDex Payer Server Test Suite'
17
17
  description File.read(File.join(__dir__, 'docs', 'payer_server_suite_description_v200.md'))
18
18
 
19
+ links [
20
+ {
21
+ label: 'Report Issue',
22
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit/issues'
23
+ },
24
+ {
25
+ label: 'Open Source',
26
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit'
27
+ },
28
+ {
29
+ label: 'Download',
30
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit/releases'
31
+ },
32
+ {
33
+ label: 'Implementation Guide',
34
+ url: 'https://hl7.org/fhir/us/davinci-pdex/STU2/'
35
+ }
36
+ ]
37
+
19
38
  input :url,
20
39
  title: 'FHIR Server Base Url'
21
40
 
@@ -35,9 +54,11 @@ module DaVinciPDexTestKit
35
54
  ].freeze
36
55
 
37
56
  VERSION_SPECIFIC_MESSAGE_FILTERS = [].freeze
38
-
39
- validator do
40
- url ENV.fetch('VALIDATOR_URL')
57
+
58
+ # Hl7 Validator Wrapper:
59
+ fhir_resource_validator do
60
+ igs 'hl7.fhir.us.davinci-pdex#2.0.0'
61
+ # hrex 1.0.0 and other dependencies will auto-load
41
62
 
42
63
  # Copy messages limit from Bulk Data Export tests
43
64
  message_filters = VALIDATION_MESSAGE_FILTERS + VERSION_SPECIFIC_MESSAGE_FILTERS
@@ -11,6 +11,25 @@ module DaVinciPDexTestKit
11
11
  guide. Inferno will act as a payer server that the
12
12
  system under test will connect to and retrieve data from.
13
13
  )
14
+
15
+ links [
16
+ {
17
+ label: 'Report Issue',
18
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit/issues'
19
+ },
20
+ {
21
+ label: 'Open Source',
22
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit'
23
+ },
24
+ {
25
+ label: 'Download',
26
+ url: 'https://github.com/inferno-framework/davinci-pdex-test-kit/releases'
27
+ },
28
+ {
29
+ label: 'Implementation Guide',
30
+ url: 'https://hl7.org/fhir/us/davinci-pdex/STU2/'
31
+ }
32
+ ]
14
33
 
15
34
  # These inputs will be available to all tests in this suite
16
35
  input :url,
@@ -27,10 +46,16 @@ module DaVinciPDexTestKit
27
46
  oauth_credentials :credentials
28
47
  end
29
48
 
30
- # All FHIR validation requsets will use this FHIR validator
31
- validator do
32
- url ENV.fetch('VALIDATOR_URL')
49
+ # Hl7 Validator Wrapper:
50
+ fhir_resource_validator do
51
+ igs 'hl7.fhir.us.davinci-pdex#2.0.0'
52
+ # hrex 1.0.0 and other dependencies will auto-load
53
+
54
+ exclude_message do |message|
55
+ message.message.match?(/\A\S+: \S+: URL value '.*' does not resolve/)
56
+ end
57
+
33
58
  end
34
59
  end
35
- end
36
-
60
+ end
61
+
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DaVinciPDexTestKit
4
- VERSION = '0.9.2'
4
+ VERSION = '0.10.0'
5
5
  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.9.2
4
+ version: 0.10.0
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: 2024-06-07 00:00:00.000000000 Z
13
+ date: 2024-06-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: inferno_core
@@ -135,6 +135,7 @@ files:
135
135
  - lib/davinci_pdex_test_kit/pdex_payer_client/client_member_match_tests/client_member_match_validation_test.rb
136
136
  - lib/davinci_pdex_test_kit/pdex_payer_client/client_must_support_tests/client_member_match_must_support_submit_test.rb
137
137
  - lib/davinci_pdex_test_kit/pdex_payer_client/client_must_support_tests/client_member_match_must_support_validation_test.rb
138
+ - lib/davinci_pdex_test_kit/pdex_payer_client/client_must_support_tests/metadata.yml
138
139
  - lib/davinci_pdex_test_kit/pdex_payer_client/client_validation_test.rb
139
140
  - lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/allergyintolerance_clinical_data_request_test.rb
140
141
  - lib/davinci_pdex_test_kit/pdex_payer_client/clinical_data_request_tests/careplan_clinical_data_request_test.rb
@@ -175,6 +176,7 @@ files:
175
176
  - lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_read_test.rb
176
177
  - lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_reference_resolution_test.rb
177
178
  - lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/explanation_of_benefit_validation_test.rb
179
+ - lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit/metadata.yml
178
180
  - lib/davinci_pdex_test_kit/pdex_payer_server/explanation_of_benefit_group.rb
179
181
  - lib/davinci_pdex_test_kit/pdex_payer_server/export_patient_group.rb
180
182
  - lib/davinci_pdex_test_kit/pdex_payer_server/export_validation_group.rb