davinci_pas_test_kit 0.10.1 → 0.11.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: d40c4c0c39ba10a8778afae1486a12c79f4b5f9719183a0c6eb47f3be29c65e6
4
- data.tar.gz: 40c233eed6b5b08f9758990f37cbb607e44a77242ce03192a99a7607357933f1
3
+ metadata.gz: adbcd07bb5f1a40e3ca790bab8009a1d905f444a22fee717fe06a2630e9360f4
4
+ data.tar.gz: 1b3ec155956da7225994cb43a1d4cbaaf73ebc988e25b9ef1acdf375cc917026
5
5
  SHA512:
6
- metadata.gz: ff6a773ee8f7ee5f391cebbb3882dcfeb9e6a39ee5c24ee8187b4aef65832811643fd8eafd39cfe126566a11183e0ffa54f4d471ee890bedef06015fece93bbd
7
- data.tar.gz: fc7a2ebccd4bd42d5ecf65954d479447a78686d4423d2c7f593fd716e79e65f12fee044d47774eccfb1214dff7cfd08b8414e9381942f16bb7b0bc73ebc1be7b
6
+ metadata.gz: 9f0e290e3d5c5af6f5263d23f78b69d4d9f017ea5452ebf56602361b57e7c22e1ff5cfa63f5bbbbc06541ddb66a031373a65699c6b6ff5ac0026038ce1633678
7
+ data.tar.gz: 10d76ce494d9cfd1aee463b25a04624b8556f1f80f99b175a2b4c1e00a7e6f8c31bb1a5844b83688df0ac3f86e80e02465f9791ea657c82651e5b6761e97e221
@@ -176,4 +176,4 @@ These and any other requirements found in the PAS IG may be tested in future ver
176
176
  Testing has identified issues with the source IG that result in spurious failures.
177
177
  Tests impacted by these issues have an indication in their documentations. The full
178
178
  list of known issues can be found on the [repository's issues page with the 'source ig issue'
179
- lable](https://github.com/inferno-framework/davinci-pas-test-kit/labels/source%20ig%20issue).
179
+ label](https://github.com/inferno-framework/davinci-pas-test-kit/labels/source%20ig%20issue).
@@ -154,4 +154,4 @@ These and any other requirements found in the PAS IG may be tested in future ver
154
154
  Testing has identified issues with the source IG that result in spurious failures.
155
155
  Tests impacted by these issues have an indication in their documentations. The full
156
156
  list of known issues can be found on the [repository's issues page with the 'source ig issue'
157
- lable](https://github.com/inferno-framework/davinci-pas-test-kit/labels/source%20ig%20issue).
157
+ label](https://github.com/inferno-framework/davinci-pas-test-kit/labels/source%20ig%20issue).
@@ -29,10 +29,10 @@ module DaVinciPASTestKit
29
29
 
30
30
  Note that because X12 value sets are not public, elements bound to value
31
31
  sets containing X12 codes are not validated.
32
-
32
+
33
33
  **Limitations**
34
-
35
- Due to recognized errors in the DTR IG around extension context definitions,
34
+
35
+ Due to recognized errors in the PAS IG around extension context definitions,
36
36
  this test may not pass due to spurious errors of the form "The extension
37
37
  [extension url] is not allowed at this point". See [this
38
38
  issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
@@ -26,6 +26,14 @@ module DaVinciPASTestKit
26
26
 
27
27
  Note that because X12 value sets are not public, elements bound to value
28
28
  sets containing X12 codes are not validated.
29
+
30
+ **Limitations**
31
+
32
+ Due to recognized errors in the PAS IG around extension context definitions,
33
+ this test may not pass due to spurious errors of the form "The extension
34
+ [extension url] is not allowed at this point". See [this
35
+ issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
36
+ for additional details.
29
37
  )
30
38
 
31
39
  def resource_type
@@ -26,6 +26,14 @@ module DaVinciPASTestKit
26
26
 
27
27
  Note that because X12 value sets are not public, elements bound to value
28
28
  sets containing X12 codes are not validated.
29
+
30
+ **Limitations**
31
+
32
+ Due to recognized errors in the PAS IG around extension context definitions,
33
+ this test may not pass due to spurious errors of the form "The extension
34
+ [extension url] is not allowed at this point". See [this
35
+ issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
36
+ for additional details.
29
37
  )
30
38
 
31
39
  def resource_type
@@ -29,10 +29,10 @@ module DaVinciPASTestKit
29
29
 
30
30
  Note that because X12 value sets are not public, elements bound to value
31
31
  sets containing X12 codes are not validated.
32
-
32
+
33
33
  **Limitations**
34
-
35
- Due to recognized errors in the DTR IG around extension context definitions,
34
+
35
+ Due to recognized errors in the PAS IG around extension context definitions,
36
36
  this test may not pass due to spurious errors of the form "The extension
37
37
  [extension url] is not allowed at this point". See [this
38
38
  issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
@@ -28,6 +28,14 @@ module DaVinciPASTestKit
28
28
 
29
29
  Note that because X12 value sets are not public, elements bound to value
30
30
  sets containing X12 codes are not validated.
31
+
32
+ **Limitations**
33
+
34
+ Due to recognized errors in the PAS IG around extension context definitions,
35
+ this test may not pass due to spurious errors of the form "The extension
36
+ [extension url] is not allowed at this point". See [this
37
+ issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
38
+ for additional details.
31
39
  )
32
40
 
33
41
  input :pa_inquire_request_payload,
@@ -25,10 +25,10 @@ module DaVinciPASTestKit
25
25
 
26
26
  Note that because X12 value sets are not public, elements bound to value
27
27
  sets containing X12 codes are not validated.
28
-
28
+
29
29
  **Limitations**
30
-
31
- Due to recognized errors in the DTR IG around extension context definitions,
30
+
31
+ Due to recognized errors in the PAS IG around extension context definitions,
32
32
  this test may not pass due to spurious errors of the form "The extension
33
33
  [extension url] is not allowed at this point". See [this
34
34
  issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
@@ -28,6 +28,14 @@ module DaVinciPASTestKit
28
28
 
29
29
  Note that because X12 value sets are not public, elements bound to value
30
30
  sets containing X12 codes are not validated.
31
+
32
+ **Limitations**
33
+
34
+ Due to recognized errors in the PAS IG around extension context definitions,
35
+ this test may not pass due to spurious errors of the form "The extension
36
+ [extension url] is not allowed at this point". See [this
37
+ issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
38
+ for additional details.
31
39
  )
32
40
 
33
41
  input :pa_submit_request_payload,
@@ -25,10 +25,10 @@ module DaVinciPASTestKit
25
25
 
26
26
  Note that because X12 value sets are not public, elements bound to value
27
27
  sets containing X12 codes are not validated.
28
-
28
+
29
29
  **Limitations**
30
-
31
- Due to recognized errors in the DTR IG around extension context definitions,
30
+
31
+ Due to recognized errors in the PAS IG around extension context definitions,
32
32
  this test may not pass due to spurious errors of the form "The extension
33
33
  [extension url] is not allowed at this point". See [this
34
34
  issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
@@ -1,6 +1,6 @@
1
1
  require_relative '../../validator_suppressions'
2
2
  require_relative '../../custom_groups/v2.0.1/pas_error_group'
3
- require_relative '../../version.rb'
3
+ require_relative '../../version'
4
4
  require_relative 'pas_server_approval_use_case_group'
5
5
  require_relative 'pas_server_denial_use_case_group'
6
6
  require_relative 'pas_server_pended_use_case_group'
@@ -15,12 +15,12 @@ module DaVinciPASTestKit
15
15
  description File.read(File.join(__dir__, '..', '..', 'docs', 'server_suite_description_v201.md'))
16
16
 
17
17
  links [
18
- {
19
- label: 'Report Issue',
20
- url: 'https://github.com/inferno-framework/davinci-pas-test-kit/issues/'
18
+ {
19
+ label: 'Report Issue',
20
+ url: 'https://github.com/inferno-framework/davinci-pas-test-kit/issues/'
21
21
  },
22
22
  {
23
- label: 'Open Source',
23
+ label: 'Open Source',
24
24
  url: 'https://github.com/inferno-framework/davinci-pas-test-kit/'
25
25
  },
26
26
  {
@@ -50,12 +50,21 @@ module DaVinciPASTestKit
50
50
 
51
51
  input :smart_credentials,
52
52
  title: 'OAuth Credentials',
53
- type: :oauth_credentials,
53
+ type: :auth_info,
54
+ options: {
55
+ mode: 'access',
56
+ components: [
57
+ {
58
+ name: :auth_type,
59
+ default: 'backend_services'
60
+ }
61
+ ]
62
+ },
54
63
  optional: true
55
64
 
56
65
  fhir_client do
57
66
  url :server_endpoint
58
- oauth_credentials :smart_credentials
67
+ auth_info :smart_credentials
59
68
  end
60
69
 
61
70
  # Used for attestation experiment - see pas_claim_response_decision_test.rb
@@ -66,7 +75,7 @@ module DaVinciPASTestKit
66
75
  # resume_test_route :get, RESUME_FAIL_PATH, result: 'fail' do |request|
67
76
  # request.query_parameters['token']
68
77
  # end
69
-
78
+
70
79
  group 'Demonstrate Workflow Support' do
71
80
  description %(
72
81
  The workflow tests validate that the server can participate in complete
@@ -151,6 +151,14 @@ module DaVinciPASTestKit
151
151
 
152
152
  Note that because X12 value sets are not public, elements bound to value
153
153
  sets containing X12 codes are not validated.
154
+
155
+ **Limitations**
156
+
157
+ Due to recognized errors in the PAS IG around extension context definitions,
158
+ this test may not pass due to spurious errors of the form "The extension
159
+ [extension url] is not allowed at this point". See [this
160
+ issue](https://github.com/inferno-framework/davinci-pas-test-kit/issues/11)
161
+ for additional details.
154
162
  DESCRIPTION
155
163
  end
156
164
 
@@ -282,10 +282,14 @@ module DaVinciPASTestKit
282
282
  # @param bundle_map [Hash] A map of the bundle contents.
283
283
  # @param version [String] The FHIR version.
284
284
  def process_reference_element(reference_element, current_entry, bundle_entry, bundle_map, version)
285
- reference_element_values = evaluate_fhirpath_expression(current_entry.resource, reference_element[:path])
286
- referenced_instances = reference_element_values.map do |value|
285
+ fhirpath_result = evaluate_fhirpath(resource: current_entry.resource, path: reference_element[:path])
286
+ reference_element_values = fhirpath_result.filter_map do |entry|
287
+ entry['element']&.reference if entry['type'] == 'Reference'
288
+ end
289
+
290
+ referenced_instances = reference_element_values.filter_map do |value|
287
291
  find_referenced_instance_in_bundle(value, current_entry.fullUrl, bundle_map)
288
- end.compact
292
+ end
289
293
 
290
294
  referenced_instances.each do |instance|
291
295
  process_instance_profiles(instance, bundle_entry, reference_element, version)
@@ -363,34 +367,6 @@ module DaVinciPASTestKit
363
367
  end
364
368
  end
365
369
 
366
- # Evaluates a FHIRPath expression against a FHIR resource using an external FHIRPath validator.
367
- # @param resource [Object] The FHIR resource to be evaluated.
368
- # @param expression [String] The FHIRPath expression to evaluate.
369
- # @return [Array] An array of references extracted from the evaluation result, or an empty array in case of failure.
370
- def evaluate_fhirpath_expression(resource, expression)
371
- return [] unless expression && resource
372
-
373
- logger = Logger.new($stdout)
374
- begin
375
- fhirpath_url = ENV.fetch('FHIRPATH_URL')
376
- path = "#{fhirpath_url}/evaluate?path=#{expression}"
377
-
378
- response = Faraday.post(path, resource.to_json, 'Content-Type' => 'application/json')
379
- if response.status.to_s.start_with? '2'
380
- result = JSON.parse(response.body)
381
- return result.map { |entry| entry.dig('element', 'reference') if entry['type'] == 'Reference' }.compact
382
- else
383
- logger.error "External FHIRPath service failed: #{response.status}"
384
- raise 'FHIRPath service not available'
385
- end
386
- rescue Faraday::Error => e
387
- logger.error "HTTP request failed: #{e.message}"
388
- raise 'FHIRPath service not available'
389
- end
390
-
391
- []
392
- end
393
-
394
370
  # Finds a referenced instance in a FHIR bundle based on a reference and the full URL of the enclosing entry.
395
371
  # @param reference [String] The reference to find.
396
372
  # @param enclosing_entry_fullurl [String] The full URL of the enclosing entry.
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: truen
1
+ # frozen_string_literal: true
2
2
 
3
3
  module DaVinciPASTestKit
4
- VERSION = '0.10.1'.freeze
4
+ VERSION = '0.11.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: davinci_pas_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inferno Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-08 00:00:00.000000000 Z
11
+ date: 2024-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.37
19
+ version: 0.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.37
26
+ version: 0.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: database_cleaner-sequel
29
29
  requirement: !ruby/object:Gem::Requirement