smart_health_cards_test_kit 0.9.0 → 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: 8dcd02e218c20c7df4ac05da3a491653ea9cf69f8c2f86471407a68d0582bbd5
4
- data.tar.gz: 801a9e6c1301ce4daf3c1a126e9a00537dd4871e7786f664f1591daeea7e43a0
3
+ metadata.gz: 11e936a7ba17d8d7c809078bbdc0c4d86863fc5ac1b51a0349d517a412ad5610
4
+ data.tar.gz: 57a8d93352c62a2dde7e124b03b3977fdb7c015a97891d455777941498991436
5
5
  SHA512:
6
- metadata.gz: a45f4aead162a4ba9dfb363310eca1e36cc09a7c289e0f7659a06a19c2d4b3c1217b3c48269d858ba0c75af99ffc937081541075db7b93715a22b12ecda73c56
7
- data.tar.gz: fb75562a3a42290e637434d3b96782e51d79081343b5c50722b9fbf912e90602d21eaf91e025fe01bbc22858d9c7953cc343cc5c3c6ac3e4ce3cfe424c47faf5
6
+ metadata.gz: 4ff7902279565ad4de1c9629820e7a0df41b60724d86762f61ff9dda9b49656d1bb3e9088e803f088e0e29def99264c0efb05d37febe2b763a4642250c6d26af
7
+ data.tar.gz: 577a0d8912eb002fd314c2cc2b2b43fa09ee7af80c8a19cbbb3bbdeedaa2903783ac9ab4aaa3e75ca50d122137561942b34d8f205c2ce8d7bd3e5de7cb25e85d
@@ -0,0 +1,52 @@
1
+ require_relative 'version'
2
+
3
+ module SmartHealthCardsTestKit
4
+ class Metadata < Inferno::TestKit
5
+ id :smart_health_cards
6
+ title 'SMART Health Cards'
7
+ description <<~DESCRIPTION
8
+ The SMART Health Cards Test Kit provides an
9
+ executable set of tests for the [SMART Health Cards Framework v1.4.0](https://spec.smarthealth.cards/).
10
+ This test kit simulates downloading and validating a SMART Health Card.
11
+ <!-- break -->
12
+
13
+ This test kit is [open source](https://github.com/inferno-framework/smart-health-cards-test-kit#license)
14
+ and freely available for use or adoption by the health IT community including EHR vendors, health app
15
+ developers, and testing labs. It is built using the [Inferno Framework](https://inferno-framework.github.io/inferno-core/).
16
+ The Inferno Framework is designed for reuse and aims to make it easier to build test kits for any
17
+ FHIR-based data exchange.
18
+
19
+ ## Status
20
+
21
+ These tests are intended to allow server implementers to perform checks of their server against SMART Health Cards Framework requrirements.
22
+
23
+ The test kit currently tests the following requirements:
24
+ - Download and validate a health card via file download
25
+ - Download and validate a health card via FHIR $health-cards-issue operation
26
+ - Download and validate a health card via QR Code scanning
27
+
28
+ See the test descriptions within the test kit for detail on the specific validations performed as part of testing these requirements.
29
+
30
+ ## Repository
31
+
32
+ The SMART Health Cards Test Kit GitHub repository can be [found here](https://github.com/inferno-framework/smart-health-cards-test-kit).
33
+
34
+ ## Providing Feedback and Reporting Issues
35
+
36
+ We welcome feedback on the tests, including but not limited to the following areas:
37
+
38
+ - Validation logic, such as potential bugs, lax checks, and unexpected failures.
39
+ - Requirements coverage, such as requirements that have been missed, tests that necessitate features that the IG does not require, or other issues with the interpretation of the IG's requirements.
40
+ - User experience, such as confusing or missing information in the test UI.
41
+
42
+ Please report any issues with this set of tests in the [issues section](https://github.com/inferno-framework/smart-health-cards-test-kit/issues) of the repository.
43
+ DESCRIPTION
44
+ suite_ids [:smart_health_cards]
45
+ tags ['SMART Health Cards']
46
+ last_updated LAST_UPDATED
47
+ version VERSION
48
+ maturity 'Low'
49
+ authors ['Yunwei Wang']
50
+ repo 'https://github.com/inferno-framework/smart-health-cards-test-kit'
51
+ end
52
+ end
@@ -0,0 +1,84 @@
1
+ require 'json'
2
+
3
+ require_relative 'version'
4
+
5
+ require_relative 'utils/jws'
6
+ require_relative 'health_card'
7
+
8
+ require_relative 'shc_fhir_validation'
9
+ require_relative 'shc_header_verification'
10
+ require_relative 'shc_payload_verification'
11
+ require_relative 'shc_signature_verification'
12
+
13
+ require_relative 'file_download_group'
14
+ require_relative 'qr_code_group'
15
+ require_relative 'fhir_operation_group'
16
+
17
+ module SmartHealthCardsTestKit
18
+ class SmartHealthCardsTestSuite < Inferno::TestSuite
19
+ id :smart_health_cards
20
+ title 'SMART Health Cards'
21
+ description %(
22
+ The US Core Test Kit tests systems for their conformance to the
23
+ [SMART Health Cards Framework v1.4.0](https://spec.smarthealth.cards/)
24
+ )
25
+
26
+ links [
27
+ {
28
+ type: 'source_code',
29
+ label: 'Open Source',
30
+ url: 'https://github.com/inferno-framework/smart-health-cards-test-kit/'
31
+ },
32
+ {
33
+ type: 'report_issue',
34
+ label: 'Report Issue',
35
+ url: 'https://github.com/inferno-framework/smart-health-cards-test-kit/issues/'
36
+ },
37
+ {
38
+ type: 'download',
39
+ label: 'Download',
40
+ url: 'https://github.com/inferno-framework/smart-health-cards-test-kit/releases/'
41
+ }
42
+ ]
43
+
44
+ # All FHIR validation requsets will use this FHIR validator
45
+ fhir_resource_validator do
46
+ # igs 'identifier#version' # Use this method for published IGs/versions
47
+ # igs 'igs/filename.tgz' # Use this otherwise
48
+
49
+ exclude_message do |message|
50
+ message.message.match?(/\A\S+: \S+: URL value '.*' does not resolve/)
51
+ end
52
+ end
53
+
54
+ # HTTP Routes
55
+ resume_test_route :post, '/post_qr_code' do |request|
56
+ request.query_parameters['id']
57
+ end
58
+
59
+ scan_qr_code_html = File.read(File.join(__dir__, './views/scan_qr_code.html'))
60
+ scan_qr_code_html_route_handler = proc { [200, { 'Content-Type' => 'text/html' }, [scan_qr_code_html]] }
61
+ route(:get, '/scan_qr_code', scan_qr_code_html_route_handler)
62
+
63
+ qr_scanner = File.read(File.join(__dir__, './javascript/qr-scanner.min.js'))
64
+ qr_scanner_route_handler = proc { [200, { 'Content-Type' => 'text/javascript' }, [qr_scanner]] }
65
+ route(:get, '/qr-scanner.min.js', qr_scanner_route_handler)
66
+
67
+ qr_scanner_worker = File.read(File.join(__dir__, './javascript/qr-scanner-worker.min.js'))
68
+ qr_scanner_worker_route_handler = proc { [200, { 'Content-Type' => 'text/javascript' }, [qr_scanner_worker]] }
69
+ route(:get, '/qr-scanner-worker.min.js', qr_scanner_worker_route_handler)
70
+
71
+ js_qr = File.read(File.join(__dir__, './javascript/jsQR.js'))
72
+ js_qr_route_handler = proc { [200, { 'Content-Type' => 'text/javascript' }, [js_qr]] }
73
+ route(:get, '/jsqr.js', js_qr_route_handler)
74
+
75
+ upload_html = File.read(File.join(__dir__, './views/upload_qr_code.html'))
76
+ upload_html_route_handler = proc { [200, { 'Content-Type' => 'text/html' }, [upload_html]] }
77
+ route(:get, '/upload_qr_code', upload_html_route_handler)
78
+
79
+ # Tests and TestGroups
80
+ group from: :shc_file_download_group
81
+ group from: :shc_fhir_operation_group
82
+ group from: :shc_qr_code_group
83
+ end
84
+ end
@@ -1,3 +1,4 @@
1
1
  module SmartHealthCardsTestKit
2
- VERSION = '0.9.0'
3
- end
2
+ VERSION = '0.10.0'.freeze
3
+ LAST_UPDATED = '2025-02-20'.freeze # TODO: update next release
4
+ end
@@ -1,67 +1,5 @@
1
- require 'json'
2
-
3
- require_relative 'smart_health_cards_test_kit/version'
4
-
5
- require_relative 'smart_health_cards_test_kit/utils/jws'
6
- require_relative 'smart_health_cards_test_kit/health_card'
7
-
8
- require_relative 'smart_health_cards_test_kit/shc_fhir_validation'
9
- require_relative 'smart_health_cards_test_kit/shc_header_verification'
10
- require_relative 'smart_health_cards_test_kit/shc_payload_verification'
11
- require_relative 'smart_health_cards_test_kit/shc_signature_verification'
12
-
13
- require_relative 'smart_health_cards_test_kit/file_download_group'
14
- require_relative 'smart_health_cards_test_kit/qr_code_group'
15
- require_relative 'smart_health_cards_test_kit/fhir_operation_group'
1
+ require_relative 'smart_health_cards_test_kit/smart_health_cards_test_suite'
2
+ require_relative 'smart_health_cards_test_kit/metadata'
16
3
 
17
4
  module SmartHealthCardsTestKit
18
- class SmartHealthCardsTestSuite < Inferno::TestSuite
19
- id :smart_health_cards
20
- title 'SMART Health Cards'
21
- description %(
22
- The US Core Test Kit tests systems for their conformance to the
23
- [SMART Health Cards Framework v1.4.0](https://spec.smarthealth.cards/)
24
- )
25
- version VERSION
26
-
27
- # All FHIR validation requsets will use this FHIR validator
28
- fhir_resource_validator do
29
- # igs 'identifier#version' # Use this method for published IGs/versions
30
- # igs 'igs/filename.tgz' # Use this otherwise
31
-
32
- exclude_message do |message|
33
- message.message.match?(/\A\S+: \S+: URL value '.*' does not resolve/)
34
- end
35
- end
36
-
37
- # HTTP Routes
38
- resume_test_route :post, '/post_qr_code' do |request|
39
- request.query_parameters['id']
40
- end
41
-
42
- scan_qr_code_html = File.read(File.join(__dir__, './smart_health_cards_test_kit/views/scan_qr_code.html'))
43
- scan_qr_code_html_route_handler = proc { [200, { 'Content-Type' => 'text/html' }, [scan_qr_code_html]] }
44
- route(:get, '/scan_qr_code', scan_qr_code_html_route_handler)
45
-
46
- qr_scanner = File.read(File.join(__dir__, './smart_health_cards_test_kit/javascript/qr-scanner.min.js'))
47
- qr_scanner_route_handler = proc { [200, { 'Content-Type' => 'text/javascript' }, [qr_scanner]] }
48
- route(:get, '/qr-scanner.min.js', qr_scanner_route_handler)
49
-
50
- qr_scanner_worker = File.read(File.join(__dir__, './smart_health_cards_test_kit/javascript/qr-scanner-worker.min.js'))
51
- qr_scanner_worker_route_handler = proc { [200, { 'Content-Type' => 'text/javascript' }, [qr_scanner_worker]] }
52
- route(:get, '/qr-scanner-worker.min.js', qr_scanner_worker_route_handler)
53
-
54
- js_qr = File.read(File.join(__dir__, './smart_health_cards_test_kit/javascript/jsQR.js'))
55
- js_qr_route_handler = proc { [200, { 'Content-Type' => 'text/javascript' }, [js_qr]] }
56
- route(:get, '/jsqr.js', js_qr_route_handler)
57
-
58
- upload_html = File.read(File.join(__dir__, './smart_health_cards_test_kit/views/upload_qr_code.html'))
59
- upload_html_route_handler = proc { [200, { 'Content-Type' => 'text/html' }, [upload_html]] }
60
- route(:get, '/upload_qr_code', upload_html_route_handler)
61
-
62
- # Tests and TestGroups
63
- group from: :shc_file_download_group
64
- group from: :shc_fhir_operation_group
65
- group from: :shc_qr_code_group
66
- end
67
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_health_cards_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yunwei Wang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-07 00:00:00.000000000 Z
11
+ date: 2025-02-20 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.5.0
19
+ version: 0.6.4
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.5.0
26
+ version: 0.6.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rqrcode
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -123,11 +123,13 @@ files:
123
123
  - lib/smart_health_cards_test_kit/javascript/jsQR.js
124
124
  - lib/smart_health_cards_test_kit/javascript/qr-scanner-worker.min.js
125
125
  - lib/smart_health_cards_test_kit/javascript/qr-scanner.min.js
126
+ - lib/smart_health_cards_test_kit/metadata.rb
126
127
  - lib/smart_health_cards_test_kit/qr_code_group.rb
127
128
  - lib/smart_health_cards_test_kit/shc_fhir_validation.rb
128
129
  - lib/smart_health_cards_test_kit/shc_header_verification.rb
129
130
  - lib/smart_health_cards_test_kit/shc_payload_verification.rb
130
131
  - lib/smart_health_cards_test_kit/shc_signature_verification.rb
132
+ - lib/smart_health_cards_test_kit/smart_health_cards_test_suite.rb
131
133
  - lib/smart_health_cards_test_kit/utils/chunking_utils.rb
132
134
  - lib/smart_health_cards_test_kit/utils/encoding.rb
133
135
  - lib/smart_health_cards_test_kit/utils/jws.rb
@@ -146,6 +148,7 @@ licenses:
146
148
  metadata:
147
149
  homepage_uri: https://github.com/inferno-framework/smart-health-cards-test-kit
148
150
  source_code_uri: https://github.com/inferno-framework/smart-health-cards-test-kit
151
+ inferno_test_kit: 'true'
149
152
  post_install_message:
150
153
  rdoc_options: []
151
154
  require_paths:
@@ -154,14 +157,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
157
  requirements:
155
158
  - - ">="
156
159
  - !ruby/object:Gem::Version
157
- version: 3.1.2
160
+ version: 3.3.6
158
161
  required_rubygems_version: !ruby/object:Gem::Requirement
159
162
  requirements:
160
163
  - - ">="
161
164
  - !ruby/object:Gem::Version
162
165
  version: '0'
163
166
  requirements: []
164
- rubygems_version: 3.5.7
167
+ rubygems_version: 3.5.22
165
168
  signing_key:
166
169
  specification_version: 4
167
170
  summary: Smart Health Cards test kit