smart_scheduling_links_test_kit 0.2.1 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d66a0c5fced9608f57d00a64618c5cdab4c78a72a31ca55101d5fc4b98dc94fe
4
- data.tar.gz: d46c90bd7b7fe79ff69c658e89999267c1f566d84c5efc096db1bb4ecb454aec
3
+ metadata.gz: 2507d306092dbc5f3c20984faa3da3c2a2d5448a170a22ead14cc853327537b4
4
+ data.tar.gz: f78ef6cc843a85061474caf8dc8cbf65965e36b9ac5f1846d5c297c5a88132bf
5
5
  SHA512:
6
- metadata.gz: 464c470058a3c8ed3ccd5c17e72eb1cd76e0781d9865367e7a3e316e52b49270596d0446564f2672d47f2d6779a86341b7a272e904b30a71de6f305ef7000721
7
- data.tar.gz: a1d95c9f10bd7d1c310759e089761fbdbb0682c61fc8fcfed580f4392a47a2d5f044381f8e384189072572a8034b03c1cfc6bd6e291798bf1c068e9002a06ec9
6
+ metadata.gz: d724f571c0b6de359f65c2aa31dfe7a92283924ae5b94edf42d9be04f93ee55fb4f85eb3f29138400b91a6c1338707237682c253e8a840fec40d87952c6c70d1
7
+ data.tar.gz: '0902e9ae820ccc6e758dbf644d03ebbbe742ad5c5ae064802cf93cde406824f37c506e7c25fdff02457ada47025922080660fd08545f1e52dd7f3e59cd1c416b'
@@ -0,0 +1,13 @@
1
+ {
2
+ "title": "CVS",
3
+ "id": "cvs",
4
+ "test_suite_id": "smart_scheduling_links",
5
+ "inputs": [
6
+ {
7
+ "name": "url",
8
+ "value": "https://www.cvs.com/immunizations/inventory/data/$bulk-publish",
9
+ "_title": "Bulk Publication Manifest Url",
10
+ "_type": "text"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "title": "getmyvax.org",
3
+ "id": "getmyvax",
4
+ "test_suite_id": "smart_scheduling_links",
5
+ "inputs": [
6
+ {
7
+ "name": "url",
8
+ "value": "https://getmyvax.org/smart-scheduling/$bulk-publish",
9
+ "_title": "Bulk Publication Manifest Url",
10
+ "_type": "text"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "title": "SMART-on-FHIR Github",
3
+ "id": "smart-github",
4
+ "test_suite_id": "smart_scheduling_links",
5
+ "inputs": [
6
+ {
7
+ "name": "url",
8
+ "value": "https://raw.githubusercontent.com/smart-on-fhir/smart-scheduling-links/master/examples/$bulk-publish",
9
+ "_title": "Bulk Publication Manifest Url",
10
+ "_type": "text"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,21 @@
1
+ # Note on this IGs folder
2
+
3
+ There are three reasons why it would be necessary to put an IG package.tgz in this folder. If none of these apply, you do not need to put any files here, or can consider removing any existing files to make it clear they are unused.
4
+
5
+ ## 1. Generated Test Suites
6
+ Some test kits use a "generator" to automatically generate the contents of a test suite for an IG. The IG files are required every time the test suites need to be regenerated. Examples of test kits that use this approach are the US Core Test Kit and CARIN IG for Blue Button® Test Kit.
7
+
8
+
9
+ ## 2. Non-published IG
10
+ If your IG, or the specific version of the IG you want to test against, is not published, then the validator service needs to load the IG from file in order to be able to validate resources with it. The IG must be referenced in the `fhir_resource_validator` block in the test suite definition by filename, ie:
11
+
12
+ ```ruby
13
+ fhir_resource_validator do
14
+ igs 'igs/filename.tgz'
15
+
16
+ ...
17
+ end
18
+ ```
19
+
20
+ ## 3. Inferno Validator UI
21
+ The Inferno Validator UI is configured to auto-load any IGs present in the igs folder and include them in all validations. The Inferno Validator UI is currently disabled by default, so this is only relevant if you choose to re-enable it. In general, the Inferno team is currently leaving IGs in this folder even if not otherwise necessary to make it easy to re-enable the validator UI.
@@ -0,0 +1,63 @@
1
+ module SMARTSchedulingLinks
2
+ class Metadata < Inferno::TestKit
3
+ id :smart_scheduling_links_test_kit
4
+ title 'SMART Scheduling Links Test Kit'
5
+ suite_ids ['smart_scheduling_links']
6
+ tags []
7
+ last_updated ::SMARTSchedulingLinks::LAST_UPDATED
8
+ version ::SMARTSchedulingLinks::VERSION
9
+ maturity 'Medium'
10
+ authors ['Inferno Team']
11
+ repo 'https://github.com/inferno-framework/smart-scheduling-links-test-kit'
12
+ description <<~DESCRIPTION
13
+ The SMART Scheduling Links Test Kit provides an executable set of tests
14
+ for the
15
+ [SMART Scheduling Links Draft IG](https://github.com/smart-on-fhir/smart-scheduling-links).
16
+ These tests retrieve a bulk publication manifest, retrieve the files
17
+ listed in the manifest, and then validate the resources they contain.
18
+
19
+ <!-- break -->
20
+
21
+ This test kit is open source and freely available for use or adoption
22
+ by the health IT community including EHR vendors, health app developers,
23
+ and testing labs. It is built using the
24
+ [Inferno Framework](https://inferno-framework.github.io/).
25
+ The Inferno Framework is designed for reuse and aims to make it easier
26
+ to build test kits for any FHIR-based data exchange.
27
+
28
+ ## Status
29
+
30
+ These tests are a DRAFT intended to allow SMART Scheduling Links server
31
+ implementers to perform checks of their server against the current draft
32
+ SMART Scheduling Links requirements.
33
+
34
+ The test kit currently tests the following requirements:
35
+
36
+ - Bulk Publication Manifest Validation
37
+ - Resource Retrieval
38
+
39
+ See the test descriptions within the test kit for detail on the specific
40
+ validations performed as part of testing these requirements.
41
+
42
+ ## Repository
43
+
44
+ The SMART Scheduling Links Test Kit GitHub repository can be
45
+ [found here](https://github.com/inferno-framework/smart-scheduling-links).
46
+
47
+ ## Providing Feedback and Reporting Issues
48
+
49
+ We welcome feedback on the tests, including but not limited to the
50
+ following areas:
51
+
52
+ - Validation logic, such as potential bugs, lax checks, and unexpected failures.
53
+ - Requirements coverage, such as requirements that have been missed, tests that
54
+ necessitate features that the IG does not require, or other issues with the
55
+ interpretation of the IG’s requirements.
56
+ - User experience, such as confusing or missing information in the test UI.
57
+
58
+ Please report any issues with this set of tests in the
59
+ [issues section](https://github.com/inferno-framework/smart-scheduling-links/issues)
60
+ of the repository.
61
+ DESCRIPTION
62
+ end
63
+ end
@@ -0,0 +1,97 @@
1
+ require_relative 'manifest_group'
2
+ require_relative 'resource_group'
3
+
4
+ module SMARTSchedulingLinks
5
+ class Suite < Inferno::TestSuite
6
+ id :smart_scheduling_links
7
+ title 'SMART Scheduling Links'
8
+ description %(
9
+ Tests for [SMART Scheduling
10
+ Links](https://github.com/smart-on-fhir/smart-scheduling-links).
11
+
12
+ These tests work by retrieving a bulk publication manifest, then
13
+ retrieving the files listed in the manifest and validating the HL7® FHIR® resources
14
+ they contain.
15
+ )
16
+
17
+ links [
18
+ {
19
+ type: 'report_issue',
20
+ label: 'Report Issue',
21
+ url: 'https://github.com/inferno-framework/smart-scheduling-links-test-kit/issues/'
22
+ },
23
+ {
24
+ type: 'source_code',
25
+ label: 'Open Source',
26
+ url: 'https://github.com/inferno-framework/smart-scheduling-links-test-kit/'
27
+ },
28
+ {
29
+ type: 'download',
30
+ label: 'Download',
31
+ url: 'https://github.com/inferno-framework/smart-scheduling-links-test-kit/releases/'
32
+ }
33
+ ]
34
+
35
+ VALIDATION_MESSAGE_FILTERS = [
36
+ /\A\S+: \S+: URL value '.*' does not resolve/
37
+ ].freeze
38
+
39
+ fhir_resource_validator do
40
+ igs 'igs/smart_scheduling_links_ig.tgz'
41
+
42
+ exclude_message do |message|
43
+ message.type == 'info' ||
44
+ VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
45
+ end
46
+
47
+ perform_additional_validation do |resource, profile_url|
48
+ next unless profile_url == 'http://fhir-registry.smarthealthit.org/StructureDefinition/vaccine-slot'
49
+
50
+ begin
51
+ start_time = DateTime.parse(resource.start)
52
+ end_time = DateTime.parse(resource.end)
53
+ rescue StandardError
54
+ next
55
+ end
56
+
57
+ messages = []
58
+
59
+ slot_hours = (end_time - start_time).days.in_hours
60
+
61
+ if slot_hours > 1
62
+ warning_message = <<~MESSAGE
63
+ #{resource.resourceType}/#{resource.id}: Slot duration is
64
+ #{slot_hours.abs.round(1)} hours, but `start` and `end` SHOULD
65
+ identify a narrow window of time.
66
+ MESSAGE
67
+
68
+ messages << {
69
+ type: 'warning',
70
+ message: warning_message
71
+ }
72
+
73
+ has_capacity_extension = resource.extension&.any? do |extension|
74
+ extension.url == 'http://fhir-registry.smarthealthit.org/StructureDefinition/slot-capacity'
75
+ end
76
+
77
+ if !has_capacity_extension
78
+ warning_message = <<~MESSAGE
79
+ #{resource.resourceType}/#{resource.id}: Slot should include a
80
+ capacity extension if its duration is longer than an hour.
81
+ MESSAGE
82
+
83
+ messages << {
84
+ type: 'warning',
85
+ message: warning_message
86
+ }
87
+ end
88
+ end
89
+
90
+ messages
91
+ end
92
+ end
93
+
94
+ group from: :smart_scheduling_links_manifest
95
+ group from: :smart_scheduling_links_resources
96
+ end
97
+ end
@@ -1,3 +1,4 @@
1
1
  module SMARTSchedulingLinks
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.3.0'.freeze
3
+ LAST_UPDATED = '2025-02-25'.freeze
3
4
  end
@@ -1,81 +1,5 @@
1
- require_relative 'smart_scheduling_links_test_kit/manifest_group'
2
- require_relative 'smart_scheduling_links_test_kit/resource_group'
3
- require_relative 'smart_scheduling_links_test_kit/version'
1
+ require_relative 'smart_scheduling_links_test_kit/metadata'
2
+ require_relative 'smart_scheduling_links_test_kit/suite'
4
3
 
5
4
  module SMARTSchedulingLinks
6
- class Suite < Inferno::TestSuite
7
- id :smart_scheduling_links
8
- title 'SMART Scheduling Links'
9
- description %(
10
- Tests for [SMART Scheduling
11
- Links](https://github.com/smart-on-fhir/smart-scheduling-links).
12
-
13
- These tests work by retrieving a bulk publication manifest, then
14
- retrieving the files listed in the manifest and validating the HL7® FHIR® resources
15
- they contain.
16
- )
17
- version VERSION
18
-
19
- VALIDATION_MESSAGE_FILTERS = [
20
- /\A\S+: \S+: URL value '.*' does not resolve/
21
- ].freeze
22
-
23
- fhir_resource_validator do
24
- igs 'igs/smart_scheduling_links_ig.tgz'
25
-
26
- exclude_message do |message|
27
- message.type == 'info' ||
28
- VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
29
- end
30
-
31
- perform_additional_validation do |resource, profile_url|
32
- next unless profile_url == 'http://fhir-registry.smarthealthit.org/StructureDefinition/vaccine-slot'
33
-
34
- begin
35
- start_time = DateTime.parse(resource.start)
36
- end_time = DateTime.parse(resource.end)
37
- rescue StandardError
38
- next
39
- end
40
-
41
- messages = []
42
-
43
- slot_hours = (end_time - start_time).days.in_hours
44
-
45
- if slot_hours > 1
46
- warning_message = <<~MESSAGE
47
- #{resource.resourceType}/#{resource.id}: Slot duration is
48
- #{slot_hours.abs.round(1)} hours, but `start` and `end` SHOULD
49
- identify a narrow window of time.
50
- MESSAGE
51
-
52
- messages << {
53
- type: 'warning',
54
- message: warning_message
55
- }
56
-
57
- has_capacity_extension = resource.extension&.any? do |extension|
58
- extension.url == 'http://fhir-registry.smarthealthit.org/StructureDefinition/slot-capacity'
59
- end
60
-
61
- if !has_capacity_extension
62
- warning_message = <<~MESSAGE
63
- #{resource.resourceType}/#{resource.id}: Slot should include a
64
- #capacity extension if its duration is longer than an hour.
65
- MESSAGE
66
-
67
- messages << {
68
- type: 'warning',
69
- message: warning_message
70
- }
71
- end
72
- end
73
-
74
- messages
75
- end
76
- end
77
-
78
- group from: :smart_scheduling_links_manifest
79
- group from: :smart_scheduling_links_resources
80
- end
81
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_scheduling_links_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.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-11-06 00:00:00.000000000 Z
11
+ date: 2025-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0
19
+ version: 0.6.2
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.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: database_cleaner-sequel
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -88,9 +88,17 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - LICENSE
91
+ - config/presets/cvs-preset.json
92
+ - config/presets/getmyvax-preset.json
93
+ - config/presets/smart-github-preset.json
91
94
  - lib/smart_scheduling_links_test_kit.rb
95
+ - lib/smart_scheduling_links_test_kit/igs/README.md
96
+ - lib/smart_scheduling_links_test_kit/igs/put_ig_package_dot_tgz_here
97
+ - lib/smart_scheduling_links_test_kit/igs/smart_scheduling_links_ig.tgz
92
98
  - lib/smart_scheduling_links_test_kit/manifest_group.rb
99
+ - lib/smart_scheduling_links_test_kit/metadata.rb
93
100
  - lib/smart_scheduling_links_test_kit/resource_group.rb
101
+ - lib/smart_scheduling_links_test_kit/suite.rb
94
102
  - lib/smart_scheduling_links_test_kit/version.rb
95
103
  homepage: https://github.com/inferno-framework/smart-scheduling-links-test-kit
96
104
  licenses:
@@ -98,6 +106,7 @@ licenses:
98
106
  metadata:
99
107
  homepage_uri: https://github.com/inferno-framework/smart-scheduling-links-test-kit
100
108
  source_code_uri: https://github.com/inferno-framework/smart-scheduling-links-test-kit
109
+ inferno_test_kit: 'true'
101
110
  post_install_message:
102
111
  rdoc_options: []
103
112
  require_paths:
@@ -106,14 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
115
  requirements:
107
116
  - - ">="
108
117
  - !ruby/object:Gem::Version
109
- version: 3.1.2
118
+ version: 3.3.6
110
119
  required_rubygems_version: !ruby/object:Gem::Requirement
111
120
  requirements:
112
121
  - - ">="
113
122
  - !ruby/object:Gem::Version
114
123
  version: '0'
115
124
  requirements: []
116
- rubygems_version: 3.3.7
125
+ rubygems_version: 3.5.22
117
126
  signing_key:
118
127
  specification_version: 4
119
128
  summary: SMART Scheduling Links Test Kit