subscriptions_test_kit 0.9.4 → 0.10.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 +4 -4
- data/config/presets/subscription_client_empty_preset.json.erb +15 -0
- data/config/presets/subscription_client_full_resource_preset.json.erb +15 -0
- data/config/presets/subscription_client_id_only_preset.json.erb +15 -0
- data/config/presets/subscription_server_preset_empty.json.erb +23 -0
- data/config/presets/subscription_server_preset_full_resource.json.erb +23 -0
- data/config/presets/subscription_server_preset_id_only.json.erb +23 -0
- data/lib/subscriptions_test_kit/common/notification_conformance_verification.rb +1 -1
- data/lib/subscriptions_test_kit/common/subscription_conformance_verification.rb +16 -7
- data/lib/subscriptions_test_kit/docs/samples/Subscription_empty.json +1 -1
- data/lib/subscriptions_test_kit/docs/samples/Subscription_full-resource.json +1 -1
- data/lib/subscriptions_test_kit/docs/samples/Subscription_id-only.json +1 -1
- data/lib/subscriptions_test_kit/docs/subscriptions_r5_backport_r4_client_suite_description.md +4 -1
- data/lib/subscriptions_test_kit/docs/subscriptions_r5_backport_r4_server_suite_description.md +8 -1
- data/lib/subscriptions_test_kit/endpoints/subscription_status_endpoint.rb +3 -3
- data/lib/subscriptions_test_kit/igs/.keep +0 -0
- data/lib/subscriptions_test_kit/metadata.rb +92 -0
- data/lib/subscriptions_test_kit/requirements/generated/subscriptions-test-kit_requirements_coverage.csv +22 -22
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/common/subscription_simulation_utils.rb +2 -2
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/notification_input_payload_verification_test.rb +0 -1
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/notification_input_verification_test.rb +0 -1
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_test.rb +7 -0
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow_group.rb +12 -6
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client_suite.rb +3 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/creation_response_conformance_test.rb +1 -1
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/notification_delivery_test.rb +5 -5
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/subscription_conformance_test.rb +13 -15
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_group.rb +3 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification/notification_conformance_test.rb +38 -22
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification/notification_presence_test.rb +56 -0
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification_group.rb +7 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/subscription_creation.rb +1 -1
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/event_notification_group.rb +4 -3
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat/handshake_conformance_test.rb +3 -0
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat/heartbeat_conformance_test.rb +3 -0
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/handshake_heartbeat_group.rb +1 -1
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/workflow_group.rb +4 -4
- data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server_suite.rb +0 -2
- data/lib/subscriptions_test_kit/version.rb +2 -1
- data/lib/subscriptions_test_kit.rb +1 -0
- metadata +16 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33ac6bc935b44cb7bc9e03e4d8d5c3fecb0626f72afe303a2fbda58c59c89bf9
|
4
|
+
data.tar.gz: 99a87dfe4745fdb7f658ed01e133f63b392d2341db636c1f65a1289c1e9fa2f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d38fca0fc6b0714be01b3f33273dbd6df9dd5001dc294d0a602bd93ebafd02fa3dd0166f1e7f35e624f3f3627e7a720f00eb33bc84631b0115eb1bfde89b120
|
7
|
+
data.tar.gz: 58a359a599bb089ce6bdae13f6a343d489138f482b65f0348fcb5bbdb71be7eba5ec1d913914351a979bbfd001c9d20dca86ddfd2dfbb16f2a59c6c27501ea4b
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"title": "Inferno Subscription R4 Client Empty Preset",
|
3
|
+
"id": "inferno-subscriptions_r5_backport_r4_client_empty",
|
4
|
+
"test_suite_id": "subscriptions_r5_backport_r4_client",
|
5
|
+
"inputs": [
|
6
|
+
{
|
7
|
+
"name": "access_token",
|
8
|
+
"value": "SAMPLE_TOKEN"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "notification_bundle",
|
12
|
+
"value": "{\n \"resourceType\" : \"Bundle\",\n \"id\" : \"r4-notification-empty\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-notification-r4\"]\n },\n \"type\" : \"history\",\n \"timestamp\" : \"2020-05-29T11:44:13.1882432-05:00\",\n \"entry\" : [{\n \"fullUrl\" : \"urn:uuid:9e41ff6d-5be6-4e6a-8b85-abd4e7f58400\",\n \"resource\" : {\n \"resourceType\" : \"Parameters\",\n \"id\" : \"9e41ff6d-5be6-4e6a-8b85-abd4e7f58400\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status-r4\"]\n },\n \"parameter\" : [{\n \"name\" : \"subscription\",\n \"valueReference\" : {\n \"reference\" : \"https://example.org/fhir/Subscription/admission\"\n }\n },\n {\n \"name\" : \"topic\",\n \"valueCanonical\" : \"http://hl7.org/SubscriptionTopic/admission\"\n },\n {\n \"name\" : \"status\",\n \"valueCode\" : \"active\"\n },\n {\n \"name\" : \"type\",\n \"valueCode\" : \"event-notification\"\n },\n {\n \"name\" : \"events-since-subscription-start\",\n \"valueString\" : \"1\"\n },\n {\n \"name\" : \"notification-event\",\n \"part\" : [{\n \"name\" : \"event-number\",\n \"valueString\" : \"1\"\n },\n {\n \"name\" : \"timestamp\",\n \"valueInstant\" : \"2020-05-29T11:44:13.1882432-05:00\"\n }]\n }]\n },\n \"request\" : {\n \"method\" : \"GET\",\n \"url\" : \"https://example.org/fhir/Subscription/admission/$status\"\n },\n \"response\" : {\n \"status\" : \"200\"\n }\n }]\n}"
|
13
|
+
}
|
14
|
+
]
|
15
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"title": "Inferno Subscription R4 Client Full-Resource Preset",
|
3
|
+
"id": "inferno-subscriptions_r5_backport_r4_client_full_resource",
|
4
|
+
"test_suite_id": "subscriptions_r5_backport_r4_client",
|
5
|
+
"inputs": [
|
6
|
+
{
|
7
|
+
"name": "access_token",
|
8
|
+
"value": "SAMPLE_TOKEN"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "notification_bundle",
|
12
|
+
"value": "{\n \"resourceType\" : \"Bundle\",\n \"id\" : \"r4-notification-full-resource\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-notification-r4\"]\n },\n \"type\" : \"history\",\n \"timestamp\" : \"2020-05-29T11:44:13.1882432-05:00\",\n \"entry\" : [{\n \"fullUrl\" : \"urn:uuid:2d5afc69-6ef2-420f-a8d1-8500c99eb96c\",\n \"resource\" : {\n \"resourceType\" : \"Parameters\",\n \"id\" : \"2d5afc69-6ef2-420f-a8d1-8500c99eb96c\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status-r4\"]\n },\n \"parameter\" : [{\n \"name\" : \"subscription\",\n \"valueReference\" : {\n \"reference\" : \"https://example.org/fhir/Subscription/admission\"\n }\n },\n {\n \"name\" : \"topic\",\n \"valueCanonical\" : \"http://hl7.org/SubscriptionTopic/admission\"\n },\n {\n \"name\" : \"status\",\n \"valueCode\" : \"active\"\n },\n {\n \"name\" : \"type\",\n \"valueCode\" : \"event-notification\"\n },\n {\n \"name\" : \"events-since-subscription-start\",\n \"valueString\" : \"1\"\n },\n {\n \"name\" : \"notification-event\",\n \"part\" : [{\n \"name\" : \"event-number\",\n \"valueString\" : \"1\"\n },\n {\n \"name\" : \"timestamp\",\n \"valueInstant\" : \"2020-05-29T11:44:13.1882432-05:00\"\n },\n {\n \"name\" : \"focus\",\n \"valueReference\" : {\n \"reference\" : \"https://example.org/fhir/Encounter/86009987-eabe-42bf-8c02-b112b18cb616\"\n }\n }]\n }]\n },\n \"request\" : {\n \"method\" : \"GET\",\n \"url\" : \"https://example.org/fhir/Subscription/admission/$status\"\n },\n \"response\" : {\n \"status\" : \"200\"\n }\n },\n {\n \"fullUrl\" : \"https://fhirserver.org/fhir/Encounter/86009987-eabe-42bf-8c02-b112b18cb616\",\n \"resource\" : {\n \"resourceType\" : \"Encounter\",\n \"id\" : \"86009987-eabe-42bf-8c02-b112b18cb616\",\n \"status\" : \"in-progress\",\n \"class\" : {\n \"system\" : \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\" : \"VR\"\n },\n \"subject\" : {\n \"reference\" : \"https://fhirserver.org/fhir/Patient/1599eb66-431a-447c-a3de-6897fe9ae9a1\",\n \"display\" : \"Example Patient\"\n }\n },\n \"request\" : {\n \"method\" : \"POST\",\n \"url\" : \"Encounter\"\n },\n \"response\" : {\n \"status\" : \"201\"\n }\n }]\n}"
|
13
|
+
}
|
14
|
+
]
|
15
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"title": "Inferno Subscription R4 Client Id-Only Preset",
|
3
|
+
"id": "inferno-subscriptions_r5_backport_r4_client_id_only",
|
4
|
+
"test_suite_id": "subscriptions_r5_backport_r4_client",
|
5
|
+
"inputs": [
|
6
|
+
{
|
7
|
+
"name": "access_token",
|
8
|
+
"value": "SAMPLE_TOKEN"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "notification_bundle",
|
12
|
+
"value": "{\n \"resourceType\" : \"Bundle\",\n \"id\" : \"r4-notification-id-only\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-notification-r4\"]\n },\n \"type\" : \"history\",\n \"timestamp\" : \"2020-05-29T11:44:13.1882432-05:00\",\n \"entry\" : [{\n \"fullUrl\" : \"urn:uuid:292d3c72-edc1-4d8a-afaa-d85e19c7f563\",\n \"resource\" : {\n \"resourceType\" : \"Parameters\",\n \"id\" : \"292d3c72-edc1-4d8a-afaa-d85e19c7f563\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status-r4\"]\n },\n \"parameter\" : [{\n \"name\" : \"subscription\",\n \"valueReference\" : {\n \"reference\" : \"https://example.org/fhir/Subscription/admission\"\n }\n },\n {\n \"name\" : \"topic\",\n \"valueCanonical\" : \"http://hl7.org/SubscriptionTopic/admission\"\n },\n {\n \"name\" : \"status\",\n \"valueCode\" : \"active\"\n },\n {\n \"name\" : \"type\",\n \"valueCode\" : \"event-notification\"\n },\n {\n \"name\" : \"events-since-subscription-start\",\n \"valueString\" : \"1\"\n },\n {\n \"name\" : \"notification-event\",\n \"part\" : [{\n \"name\" : \"event-number\",\n \"valueString\" : \"1\"\n },\n {\n \"name\" : \"timestamp\",\n \"valueInstant\" : \"2020-05-29T11:44:13.1882432-05:00\"\n },\n {\n \"name\" : \"focus\",\n \"valueReference\" : {\n \"reference\" : \"https://example.org/fhir/Encounter/86009987-eabe-42bf-8c02-b112b18cb616\"\n }\n }]\n }]\n },\n \"request\" : {\n \"method\" : \"GET\",\n \"url\" : \"https://example.org/fhir/Subscription/admission/$status\"\n },\n \"response\" : {\n \"status\" : \"200\"\n }\n }]\n}"
|
13
|
+
}
|
14
|
+
]
|
15
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"title": "Empty Notifications Against The Subscriptions Client Suite",
|
3
|
+
"id": "inferno-subscriptions_r5_backport_r4_server_preset_empty",
|
4
|
+
"test_suite_id": "subscriptions_r5_backport_r4_server",
|
5
|
+
"inputs": [
|
6
|
+
{
|
7
|
+
"name": "url",
|
8
|
+
"value": "<%= Inferno::Application['base_url'] %>/custom/subscriptions_r5_backport_r4_client/fhir"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "credentials",
|
12
|
+
"value": "{\"access_token\":\"SAMPLE_TOKEN\"}"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "subscription_resource",
|
16
|
+
"value": "{\n \"resourceType\" : \"Subscription\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription\"]\n },\n \"status\" : \"requested\",\n \"end\" : \"2020-12-31T12:00:00Z\",\n \"reason\" : \"R4 Topic-Based Workflow Subscription for Patient Admission\",\n \"criteria\" : \"https://inferno.healthit.gov/suites/custom/subscriptions_r5_backport_r4_client/topics/patient-admission\",\n \"_criteria\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-filter-criteria\",\n \"valueString\" : \"Encounter.patient=Patient/123\"\n }]\n },\n \"channel\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-timeout\",\n \"valueUnsignedInt\" : 60\n },\n {\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-max-count\",\n \"valuePositiveInt\" : 20\n }],\n \"type\" : \"rest-hook\",\n \"header\": [\"Authorization: Bearer SAMPLE_TOKEN\"],\n \"endpoint\" : \"<%= Inferno::Application['base_url'] %>/custom/subscriptions_r5_backport_r4_server/subscription/channel/notification_listener\",\n \"payload\" : \"application/fhir+json\",\n \"_payload\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content\",\n \"valueCode\" : \"empty\"\n }]\n }\n }\n}"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"name": "access_token",
|
20
|
+
"value": "SAMPLE_TOKEN"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"title": "Full Resource Notifications Against The Subscriptions Client Suite",
|
3
|
+
"id": "inferno-subscriptions_r5_backport_r4_server_preset_full_resource",
|
4
|
+
"test_suite_id": "subscriptions_r5_backport_r4_server",
|
5
|
+
"inputs": [
|
6
|
+
{
|
7
|
+
"name": "url",
|
8
|
+
"value": "<%= Inferno::Application['base_url'] %>/custom/subscriptions_r5_backport_r4_client/fhir"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "credentials",
|
12
|
+
"value": "{\"access_token\":\"SAMPLE_TOKEN\"}"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "subscription_resource",
|
16
|
+
"value": "{\n \"resourceType\" : \"Subscription\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription\"]\n },\n \"status\" : \"requested\",\n \"end\" : \"2020-12-31T12:00:00Z\",\n \"reason\" : \"R4 Topic-Based Workflow Subscription for Patient Admission\",\n \"criteria\" : \"https://inferno.healthit.gov/suites/custom/subscriptions_r5_backport_r4_client/topics/patient-admission\",\n \"_criteria\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-filter-criteria\",\n \"valueString\" : \"Encounter.patient=Patient/123\"\n }]\n },\n \"channel\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-timeout\",\n \"valueUnsignedInt\" : 60\n },\n {\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-max-count\",\n \"valuePositiveInt\" : 20\n }],\n \"type\" : \"rest-hook\",\n \"header\": [\"Authorization: Bearer SAMPLE_TOKEN\"],\n \"endpoint\" : \"<%= Inferno::Application['base_url'] %>/custom/subscriptions_r5_backport_r4_server/subscription/channel/notification_listener\",\n \"payload\" : \"application/fhir+json\",\n \"_payload\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content\",\n \"valueCode\" : \"full-resource\"\n }]\n }\n }\n}"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"name": "access_token",
|
20
|
+
"value": "SAMPLE_TOKEN"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"title": "Id Only Notifications Against The Subscriptions Client Suite",
|
3
|
+
"id": "inferno-subscriptions_r5_backport_r4_server_preset_id_only",
|
4
|
+
"test_suite_id": "subscriptions_r5_backport_r4_server",
|
5
|
+
"inputs": [
|
6
|
+
{
|
7
|
+
"name": "url",
|
8
|
+
"value": "<%= Inferno::Application['base_url'] %>/custom/subscriptions_r5_backport_r4_client/fhir"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"name": "credentials",
|
12
|
+
"value": "{\"access_token\":\"SAMPLE_TOKEN\"}"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "subscription_resource",
|
16
|
+
"value": "{\n \"resourceType\" : \"Subscription\",\n \"meta\" : {\n \"profile\" : [\"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription\"]\n },\n \"status\" : \"requested\",\n \"end\" : \"2020-12-31T12:00:00Z\",\n \"reason\" : \"R4 Topic-Based Workflow Subscription for Patient Admission\",\n \"criteria\" : \"https://inferno.healthit.gov/suites/custom/subscriptions_r5_backport_r4_client/topics/patient-admission\",\n \"_criteria\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-filter-criteria\",\n \"valueString\" : \"Encounter.patient=Patient/123\"\n }]\n },\n \"channel\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-timeout\",\n \"valueUnsignedInt\" : 60\n },\n {\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-max-count\",\n \"valuePositiveInt\" : 20\n }],\n \"type\" : \"rest-hook\",\n \"header\": [\"Authorization: Bearer SAMPLE_TOKEN\"],\n \"endpoint\" : \"<%= Inferno::Application['base_url'] %>/custom/subscriptions_r5_backport_r4_server/subscription/channel/notification_listener\",\n \"payload\" : \"application/fhir+json\",\n \"_payload\" : {\n \"extension\" : [{\n \"url\" : \"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content\",\n \"valueCode\" : \"id-only\"\n }]\n }\n }\n}"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"name": "access_token",
|
20
|
+
"value": "SAMPLE_TOKEN"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
@@ -127,7 +127,7 @@ module SubscriptionsTestKit
|
|
127
127
|
return if empty_req_check
|
128
128
|
|
129
129
|
add_message('error', %(
|
130
|
-
When populating the SubscriptionStatus.notificationEvent structure for
|
130
|
+
When populating the SubscriptionStatus.notificationEvent structure for an event notification with an empty
|
131
131
|
payload, a server SHALL NOT include references to resources))
|
132
132
|
end
|
133
133
|
|
@@ -50,12 +50,14 @@ module SubscriptionsTestKit
|
|
50
50
|
|
51
51
|
subscription_channel = subscription['channel']
|
52
52
|
assert(channel_field_matches?(subscription_channel, 'type', 'rest-hook'), %(
|
53
|
-
The `type`
|
54
|
-
channel type is unsupported.))
|
53
|
+
The `type` element on the Subscription resource must be set to `rest-hook`,
|
54
|
+
the `#{subscription_channel['type']}` channel type is unsupported.))
|
55
55
|
|
56
56
|
unless subscription['criteria'].present? && valid_url?(subscription['criteria'])
|
57
|
-
add_message('error',
|
58
|
-
|
57
|
+
add_message('error',
|
58
|
+
%(
|
59
|
+
'The `criteria` element SHALL be populated and contain the canonical
|
60
|
+
URL for the Subscription Topic.'
|
59
61
|
))
|
60
62
|
end
|
61
63
|
subscription_resource = FHIR.from_contents(subscription.to_json)
|
@@ -76,10 +78,17 @@ module SubscriptionsTestKit
|
|
76
78
|
subscription_channel['endpoint'] = subscription_channel_url
|
77
79
|
end
|
78
80
|
|
79
|
-
unless channel_field_matches?(subscription_channel, 'payload', 'application/json')
|
81
|
+
unless channel_field_matches?(subscription_channel, 'payload', 'application/fhir+json')
|
82
|
+
update_message = if channel_field_matches?(subscription_channel, 'payload', 'application/json')
|
83
|
+
''
|
84
|
+
else
|
85
|
+
subscription_channel['payload'] = 'application/fhir+json'
|
86
|
+
' The requested Subscription has been updated to use this value.'
|
87
|
+
end
|
88
|
+
|
80
89
|
add_message('warning', %(
|
81
|
-
The `
|
82
|
-
|
90
|
+
The `payload` element on the Subscription resource should be set to `application/fhir+json`, which is the
|
91
|
+
[correct mime type for FHIR JSON](https://hl7.org/fhir/R4/http.html#mime-type).#{update_message}
|
83
92
|
))
|
84
93
|
end
|
85
94
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"type" : "rest-hook",
|
27
27
|
"header": ["Authorization: Bearer SAMPLE_TOKEN"],
|
28
28
|
"endpoint" : "http://inferno.healthit.gov/suites/custom/subscriptions_r5_backport_r4_server/subscription/channel/notification_listener",
|
29
|
-
"payload" : "application/json",
|
29
|
+
"payload" : "application/fhir+json",
|
30
30
|
"_payload" : {
|
31
31
|
"extension" : [{
|
32
32
|
"url" : "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"type" : "rest-hook",
|
27
27
|
"header": ["Authorization: Bearer SAMPLE_TOKEN"],
|
28
28
|
"endpoint" : "http://inferno.healthit.gov/suites/custom/subscriptions_r5_backport_r4_server/subscription/channel/notification_listener",
|
29
|
-
"payload" : "application/json",
|
29
|
+
"payload" : "application/fhir+json",
|
30
30
|
"_payload" : {
|
31
31
|
"extension" : [{
|
32
32
|
"url" : "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"type" : "rest-hook",
|
28
28
|
"header": ["Authorization: Bearer SAMPLE_TOKEN"],
|
29
29
|
"endpoint" : "http://inferno.healthit.gov/suites/custom/subscriptions_r5_backport_r4_server/subscription/channel/notification_listener",
|
30
|
-
"payload" : "application/json",
|
30
|
+
"payload" : "application/fhir+json",
|
31
31
|
"_payload" : {
|
32
32
|
"extension" : [{
|
33
33
|
"url" : "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content",
|
data/lib/subscriptions_test_kit/docs/subscriptions_r5_backport_r4_client_suite_description.md
CHANGED
@@ -120,4 +120,7 @@ Specific limitations to highlight include
|
|
120
120
|
- Inferno does not support sending heartbeat notifications.
|
121
121
|
- Inferno does not verify that the shape and content of notifications are appropriate for the triggering
|
122
122
|
Subscription because those details, e.g., the resource types that can be a focus of the notification,
|
123
|
-
are defined within the SubscriptionTopic which is not available in FHIR R4.
|
123
|
+
are defined within the SubscriptionTopic which is not available in FHIR R4.
|
124
|
+
- When sending notifications, Inferno supports only JSON payloads and will always use `application/fhir+json`
|
125
|
+
as the value of the `content-type` HTTP header, unless the client system explicitly asks for
|
126
|
+
`application/json` using the `Subscription.channel.payload` element.
|
data/lib/subscriptions_test_kit/docs/subscriptions_r5_backport_r4_server_suite_description.md
CHANGED
@@ -170,4 +170,11 @@ Specific limitations to highlight include
|
|
170
170
|
the optional `$events` API and event numbering details.
|
171
171
|
- Inferno does not verify that the shape and content of notifications are appropriate for the triggering
|
172
172
|
Subscription because those details, e.g., the resource types that can be a focus of the notification,
|
173
|
-
are defined within the SubscriptionTopic which is not available in FHIR R4.
|
173
|
+
are defined within the SubscriptionTopic which is not available in FHIR R4.
|
174
|
+
- When accepting notifications, Inferno supports only JSON payloads with a
|
175
|
+
`content-type` HTTP header of `application/fhir+json` or `application/json`.
|
176
|
+
Inferno will always request that `application/fhir+json` appear in `content-type`
|
177
|
+
header using the `Subscription.channel.payload` element. Testers may instruct
|
178
|
+
Inferno to request that `application/json` be used instead by placing it in the
|
179
|
+
`Subscription.channel.payload` element of the Subscription they provide for Inferno
|
180
|
+
to use.
|
@@ -30,7 +30,7 @@ module SubscriptionsTestKit
|
|
30
30
|
return
|
31
31
|
end
|
32
32
|
|
33
|
-
unless subscription_params_match?(params)
|
33
|
+
unless subscription_params_match?(params, subscription)
|
34
34
|
not_found
|
35
35
|
return
|
36
36
|
end
|
@@ -46,14 +46,14 @@ module SubscriptionsTestKit
|
|
46
46
|
event_count, request.url).to_json
|
47
47
|
end
|
48
48
|
|
49
|
-
def subscription_params_match?(params)
|
49
|
+
def subscription_params_match?(params, subscription)
|
50
50
|
id_params = find_params(params, 'id')
|
51
51
|
|
52
52
|
return false if id_params&.any? && id_params&.none? { |p| p.valueString == subscription.id }
|
53
53
|
|
54
54
|
status_params = find_params(params, 'status')
|
55
55
|
subscription_status = determine_subscription_status_code(subscription.id)
|
56
|
-
status_params.
|
56
|
+
status_params.blank? || status_params.any? { |p| p.valueString == subscription_status }
|
57
57
|
end
|
58
58
|
|
59
59
|
def tags
|
File without changes
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require_relative 'version'
|
2
|
+
|
3
|
+
module SubscriptionsTestKit
|
4
|
+
class Metadata < Inferno::TestKit
|
5
|
+
id :subscriptions_test_kit
|
6
|
+
title 'Subscription Test Kit'
|
7
|
+
description <<~DESCRIPTION
|
8
|
+
The Subscriptions Test Suite verifies the conformance of systems to the FHIR Subscriptions
|
9
|
+
framework as specified in the [HL7® FHIR® R5 version](https://www.hl7.org/fhir/R5/subscriptions.html)
|
10
|
+
and above. For systems using the R4 and R4B releases of FHIR, it verifies Subscription
|
11
|
+
functionality against the [Subscriptions R5 Backport
|
12
|
+
IG](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/) that specifies how to use R5 Subscriptions
|
13
|
+
functionality within those earlier versions.
|
14
|
+
|
15
|
+
<!-- break -->
|
16
|
+
|
17
|
+
## Status
|
18
|
+
|
19
|
+
These tests are a **DRAFT** intended to allow implementers to perform
|
20
|
+
preliminary checks of their systems against Subscriptions capabilities backported
|
21
|
+
from FHIR R5 to R4 and [provide feedback](https://github.com/inferno-framework/subscriptions-test-kit/issues)
|
22
|
+
on the tests. Future versions of these tests may verify other
|
23
|
+
requirements and may change the test verification logic. The test kit currently
|
24
|
+
includes suites for systems implementing FHIR R4 only.
|
25
|
+
|
26
|
+
## Test Scope and Limitations
|
27
|
+
|
28
|
+
The Subscriptions Test Kit includes suites for the following Subscriptions actors
|
29
|
+
and versions:
|
30
|
+
- **Subscriptions R4 Client Test Suite**:
|
31
|
+
Verifies that a FHIR R4 system implements FHIR R5
|
32
|
+
Subscriptions client capabilities as specified in the [Subscriptions R5 Backport
|
33
|
+
IG](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/), namely the ability
|
34
|
+
to request a Subscription and receive notifications.
|
35
|
+
- **Subscriptions R4 Server Test Suite**:
|
36
|
+
Verifies that a FHIR R4 system implements FHIR R5
|
37
|
+
Subscriptions server capabilities as specified in the [Subscriptions R5 Backport
|
38
|
+
IG](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/), namely the ability
|
39
|
+
to receive Subscription requests and send notifications.
|
40
|
+
|
41
|
+
Documentation of the current tests and their limitations can be found in each
|
42
|
+
suite's description when the tests are run and can also be viewed in the
|
43
|
+
source code:
|
44
|
+
- [Subscriptions R4 Client Test Suite Documentation](https://github.com/inferno-framework/subscriptions-test-kit/blob/main/lib/subscriptions_test_kit/docs/dsubscriptions_r5_backport_r4_client_suite_description.md)
|
45
|
+
- [Subscriptions R4 Server Test Suite Documentation](https://github.com/inferno-framework/subscriptions-test-kit/blob/main/lib/subscriptions_test_kit/docs/subscriptions_r5_backport_r4_server_suite_description.md)
|
46
|
+
|
47
|
+
### Test Scope
|
48
|
+
|
49
|
+
To validate the behavior of the system under test, Inferno will act as an
|
50
|
+
exchange partner. Specifically,
|
51
|
+
|
52
|
+
- **When testing a Subscriptions client**: Inferno will simulate a Subscriptions
|
53
|
+
server by responding to Subscription API requests (e.g., `create` interactions and
|
54
|
+
the `$status` operation) and sending notifications as directed by
|
55
|
+
created Subscription instances.
|
56
|
+
- **When testing a Subscriptions server**: Inferno will simulate a Subscriptions
|
57
|
+
client by requesting a Subscription with notifications delivered to an Inferno-hosted
|
58
|
+
endpoint and responding to notifications sent to that endpoint by the server under test.
|
59
|
+
|
60
|
+
### Known Limitations
|
61
|
+
|
62
|
+
This test kit is still in draft form and does not test all of the requirements and features
|
63
|
+
described in the [R5 Subscriptions framework](https://www.hl7.org/fhir/R5/subscriptions.html)
|
64
|
+
or its [backport to R4](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/).
|
65
|
+
You can find information on the requirements that the test kit covers and does not cover in the [Requirements
|
66
|
+
Coverage](https://github.com/inferno-framework/subscriptions-test-kit/blob/main/lib/subscriptions_test_kit/requirements/generated/subscriptions-test-kit_requirements_coverage.csv)
|
67
|
+
CSV document.
|
68
|
+
|
69
|
+
Specific current limitations to highlight include:
|
70
|
+
- *Channels*: Inferno only supports the `rest-hook` notification delivery channel.
|
71
|
+
- *Error Handling and Recovery*: Inferno does not test error handling and the ability
|
72
|
+
to recover from errors or missed notifications, including the `$events` operation.
|
73
|
+
- *Heartbeat Notifications*: Inferno will not send heartbeat notifications when simulating
|
74
|
+
a Subscriptions server for the client test suite.
|
75
|
+
- *FHIR Versions*: Inferno only supports verification of FHIR R4 systems.
|
76
|
+
|
77
|
+
## Reporting Issues
|
78
|
+
|
79
|
+
Please report any issues with this set of tests in the [GitHub
|
80
|
+
Issues](https://github.com/inferno-framework/subscriptions-test-kit/issues)
|
81
|
+
section of the
|
82
|
+
[open-source code repository](https://github.com/inferno-framework/subscriptions-test-kit).
|
83
|
+
DESCRIPTION
|
84
|
+
suite_ids [:subscriptions_r5_backport_r4_client, :subscriptions_r5_backport_r4_server]
|
85
|
+
tags ['Subscriptions']
|
86
|
+
last_updated LAST_UPDATED
|
87
|
+
version VERSION
|
88
|
+
maturity 'Low'
|
89
|
+
authors ['Karl Naden', 'Emily Semple', 'Tom Strassner']
|
90
|
+
repo 'https://github.com/inferno-framework/subscriptions-test-kit'
|
91
|
+
end
|
92
|
+
end
|