subscriptions_test_kit 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +22 -0
  4. data/lib/inferno_requirements_tools/tasks/collect_requirements.rb +222 -0
  5. data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +264 -0
  6. data/lib/subscriptions_test_kit/common/notification_conformance_verification.rb +310 -0
  7. data/lib/subscriptions_test_kit/common/subscription_conformance_verification.rb +87 -0
  8. data/lib/subscriptions_test_kit/docs/samples/Subscription_empty.json +37 -0
  9. data/lib/subscriptions_test_kit/docs/samples/Subscription_full-resource.json +37 -0
  10. data/lib/subscriptions_test_kit/docs/samples/Subscription_id-only.json +38 -0
  11. data/lib/subscriptions_test_kit/docs/subscriptions_r5_backport_r4_client_suite_description.md +120 -0
  12. data/lib/subscriptions_test_kit/docs/subscriptions_r5_backport_r4_server_suite_description.md +170 -0
  13. data/lib/subscriptions_test_kit/endpoints/subscription_create_endpoint.rb +90 -0
  14. data/lib/subscriptions_test_kit/endpoints/subscription_read_endpoint.rb +32 -0
  15. data/lib/subscriptions_test_kit/endpoints/subscription_rest_hook_endpoint.rb +66 -0
  16. data/lib/subscriptions_test_kit/endpoints/subscription_status_endpoint.rb +70 -0
  17. data/lib/subscriptions_test_kit/igs/README.md +21 -0
  18. data/lib/subscriptions_test_kit/jobs/send_subscription_notifications.rb +130 -0
  19. data/lib/subscriptions_test_kit/requirements/generated/subscriptions-test-kit_requirements_coverage.csv +136 -0
  20. data/lib/subscriptions_test_kit/requirements/subscriptions-test-kit_out_of_scope_requirements.csv +23 -0
  21. data/lib/subscriptions_test_kit/requirements/subscriptions-test-kit_requirements.csv +145 -0
  22. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/common/subscription_simulation_utils.rb +140 -0
  23. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/fixtures/capability_statement.json +57 -0
  24. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/notification_input_payload_verification_test.rb +50 -0
  25. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/notification_input_verification_test.rb +25 -0
  26. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/processing_attestation_test.rb +38 -0
  27. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification/subscription_verification_test.rb +28 -0
  28. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/conformance_verification_group.rb +20 -0
  29. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_test.rb +128 -0
  30. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_verification/event_notification_verification_test.rb +40 -0
  31. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_verification/handshake_notification_verification_test.rb +40 -0
  32. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow/interaction_verification_group.rb +16 -0
  33. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client/workflow_group.rb +33 -0
  34. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_client_suite.rb +66 -0
  35. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/creation_response_conformance_test.rb +51 -0
  36. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/notification_delivery_test.rb +56 -0
  37. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction/subscription_conformance_test.rb +72 -0
  38. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_group.rb +24 -0
  39. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification/notification_conformance_test.rb +73 -0
  40. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/interaction_verification_group.rb +19 -0
  41. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/subscription_creation.rb +63 -0
  42. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/common/subscription_status_operation.rb +58 -0
  43. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/capability_statement/cs_conformance_test.rb +49 -0
  44. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/capability_statement/topic_discovery_test.rb +106 -0
  45. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/capability_statement_group.rb +21 -0
  46. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/event_notification/empty_content/empty_conformance_test.rb +63 -0
  47. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/event_notification/empty_content_group.rb +58 -0
  48. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/event_notification/full_resource_content/full_resource_conformance_test.rb +68 -0
  49. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/event_notification/full_resource_content_group.rb +58 -0
  50. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/event_notification/id_only_content/id_only_conformance_test.rb +66 -0
  51. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/event_notification/id_only_content_group.rb +58 -0
  52. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/event_notification_group.rb +25 -0
  53. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/handshake_heartbeat/handshake_conformance_test.rb +67 -0
  54. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/handshake_heartbeat/heartbeat_conformance_test.rb +74 -0
  55. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/handshake_heartbeat_group.rb +19 -0
  56. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/status_operation/status_invocation_test.rb +43 -0
  57. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/status_operation_group.rb +15 -0
  58. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/subscription_rejection/reject_subscriptions_test.rb +181 -0
  59. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage/subscription_rejection_group.rb +21 -0
  60. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/coverage_group.rb +26 -0
  61. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server/workflow_group.rb +27 -0
  62. data/lib/subscriptions_test_kit/suites/subscriptions_r5_backport_r4_server_suite.rb +79 -0
  63. data/lib/subscriptions_test_kit/tags.rb +10 -0
  64. data/lib/subscriptions_test_kit/urls.rb +37 -0
  65. data/lib/subscriptions_test_kit/version.rb +5 -0
  66. data/lib/subscriptions_test_kit.rb +3 -0
  67. metadata +194 -0
@@ -0,0 +1,145 @@
1
+ Req Set,ID,URL,Requirement,Conformance,Actor,Sub-Requirement(s),Conditionality
2
+ hl7.fhir.uv.subscriptions_1.1.0,2,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscription-topics-in-r4,"In order to allow for discovery of supported subscription topics, this guide defines the CapabilityStatement SubscriptionTopic Canonical extension. The extension allows server implementers to advertise the canonical URLs of topics available to clients and allows clients to see the list of supported topics on a server. The extension is expected to appear, if supported, on the Subscription resource entry. Note that servers are NOT required to advertise supported topics via this extension.",MAY,Server,,
3
+ hl7.fhir.uv.subscriptions_1.1.0,3,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscription-topics-in-r4,"Supported topics can also be advertised, for example, by the CapabilityStatement.instantiates or CapabilityStatement.implementationGuide elements of a CapabilityStatement, as defined by another Implementation Guide.",MAY,Server,,
4
+ hl7.fhir.uv.subscriptions_1.1.0,4,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscription-topics-in-r4,"FHIR R4 servers MAY choose to leave topic discovery completely out-of-band and part of other steps, such as registration or integration.",MAY,Server,,
5
+ hl7.fhir.uv.subscriptions_1.1.0,5,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions,"In order to promote widespread compatibility, cross version extensions SHOULD NOT be used on R4 subscriptions to describe any elements also described by this guide",DEPRECATED,,,
6
+ hl7.fhir.uv.subscriptions_1.1.0,6,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions-and-fhir-versions,"Note that subscription notifications, by default, are made using the same FHIR version as the server. The Subscription.channel.payload element can be used to specify a different FHIR version, using syntax and values defined by the MIME Type Parameter. Servers SHALL look for this parameter during subscription negotiation and SHALL not accept requests for notification FHIR versions it cannot support (servers MAY reject or coerce, according to their policies).",DEPRECATED,,,
7
+ hl7.fhir.uv.subscriptions_1.1.0,7,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#accepting-subscription-requests,"When a FHIR Server accepts a request to create a Subscription, the server is indicating to the client that the server:
8
+ - is capable of detecting when events covered by the requested SubscriptionTopic occur, and
9
+ - is willing to make a simple best effort attempt at delivering a notification for each occurrence of a matching event.",SHALL,Server,,
10
+ hl7.fhir.uv.subscriptions_1.1.0,8,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#accepting-subscription-requests,When processing a request for a Subscription...a server SHOULD validate…that the SubscriptionTopic is valid and implemented by the server,SHOULD,Server,,
11
+ hl7.fhir.uv.subscriptions_1.1.0,9,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#accepting-subscription-requests,When processing a request for a Subscription...a server SHOULD validate…that all requested filters are defined in the requested topic and are implemented in the server,SHOULD,Server,,
12
+ hl7.fhir.uv.subscriptions_1.1.0,10,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#accepting-subscription-requests,When processing a request for a Subscription...a server SHOULD validate…that the channel type is known and implemented by the server,SHOULD,Server,,
13
+ hl7.fhir.uv.subscriptions_1.1.0,11,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#accepting-subscription-requests,"When processing a request for a Subscription...a server SHOULD validate…that the channel endpoint is valid for the channel provided (e.g., is it a valid URL of the expected type)",SHOULD,Server,,
14
+ hl7.fhir.uv.subscriptions_1.1.0,12,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#accepting-subscription-requests,When processing a request for a Subscription...a server SHOULD validate…that the payload configuration is known and implemented by the server,SHOULD,Server,,
15
+ hl7.fhir.uv.subscriptions_1.1.0,13,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#accepting-subscription-requests,"When processing a request for a Subscription...a server SHOULD validate…that the payload configuration is valid for the channel type requested (e.g., complies with the server’s security policy)",SHOULD,Server,,
16
+ hl7.fhir.uv.subscriptions_1.1.0,14,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscription-notifications,"In ... FHIR R4 ... notifications are based on a history Bundle. The first entry always contains SubscriptionStatus information, encoded as ... a Parameters resource using the Backport SubscriptionStatus Profile in FHIR R4",SHALL,Server,,
17
+ hl7.fhir.uv.subscriptions_1.1.0,15,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscription-notifications,"Note that since notifications use history type Bundles, all notifications need to comply with the requirements for that bundle type. Specifically, there are two invariants on Bundle (bdl-3 and bdl-4) that require a Bundle.entry.request element for every Bundle.entry.
18
+ - For the status resource (entry[0]) the request SHALL be filled out to match a request to the $status operation.
19
+ - for additional entries the request SHOULD be filled out in a way that makes sense given the subscription (e.g., a POST or PUT operation on the resource, etc.). However, a server MAY choose to simply include a GET to the relevant resource instead.",SHALL,Server,,
20
+ hl7.fhir.uv.subscriptions_1.1.0,16,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#scoping-responsibilities,"Unless otherwise specified by a server implementation and channel, the Subscriptions Framework does not involve guaranteed delivery of notifications. While the Subscriptions Framework is able to support such mechanisms, defining them are beyond the scope of the standard or this guide. - Servers SHOULD detect errors and take appropriate action where possible. In general, this boundary is when the notification is delivered.",SHOULD,Server,,
21
+ hl7.fhir.uv.subscriptions_1.1.0,17,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#scoping-responsibilities,"Therefore, clients SHOULD be aware of some limitations regarding delivery. In particular: - Some notifications might not be delivered. Some notifications might be delivered multiple times",SHOULD,Client,,
22
+ hl7.fhir.uv.subscriptions_1.1.0,18,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/workflow.html#workflow-fhir-r4,"[When a client requests a Subscription, the] Server MAY accept the Subscription request and mark it active (e.g., supported channel and payload, no handshake required). ",MAY,Server,,
23
+ hl7.fhir.uv.subscriptions_1.1.0,19,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/workflow.html#workflow-fhir-r4,"[When a client requests a Subscription, the] Server MAY accept the Subscription request and mark it requested (e.g., supported channel and payload, handshake required).",MAY,Server,,
24
+ hl7.fhir.uv.subscriptions_1.1.0,20,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/workflow.html#workflow-fhir-r4,"[When a server sends a handshake bundle to a Subscription endpoint] If the Endpoint responds appropriately, per the channel requirements (e.g., in REST an HTTP Success code such as 200), the Server updates the subscription to active.",SHALL,Server,,
25
+ hl7.fhir.uv.subscriptions_1.1.0,21,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/workflow.html#workflow-fhir-r4,"[When a server sends a handshake bundle to a Subscription endpoint] If the handshake fails (e.g., connection failure, bad response, etc.), the Server updates the subscription to error.",SHALL,Server,,
26
+ hl7.fhir.uv.subscriptions_1.1.0,22,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/workflow.html#workflow-fhir-r4,"[When a client requests a Subscription, the] Server MAY reject the Subscription request (e.g., unsupported channel type).",MAY,Server,,
27
+ hl7.fhir.uv.subscriptions_1.1.0,23,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,"To receive notifications via HTTP/S POST, a client should request a subscription with the channel type of rest-hook and set the endpoint to the appropriate client URL.",SHALL,Client,,
28
+ hl7.fhir.uv.subscriptions_1.1.0,24,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,This URL [for the subscription notification endpoint] must be accessible by the hosting server.,SHALL,Client,,
29
+ hl7.fhir.uv.subscriptions_1.1.0,25,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,"To convey an event notification, the server POSTs a Bundle to the client’s nominated endpoint URL",SHALL,Server,,
30
+ hl7.fhir.uv.subscriptions_1.1.0,26,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,The content-type of the POST SHALL match the MIME type on the Subscription (Subscription.channel.payload).,SHALL,Server,,
31
+ hl7.fhir.uv.subscriptions_1.1.0,27,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,Each Subscription.channel.header value SHALL be conveyed as an HTTP request header.,SHALL,Server,,
32
+ hl7.fhir.uv.subscriptions_1.1.0,28,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,The bundle SHALL comply with the Backported R5 Notification Bundle Profile.,SHALL,Server,,
33
+ hl7.fhir.uv.subscriptions_1.1.0,29,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,"When a Subscription is created for a REST Hook channel type, the server SHALL set initial status to requested, pending verification of the nominated endpoint URL.",SHALL,Server,,
34
+ hl7.fhir.uv.subscriptions_1.1.0,30,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,"After a successful handshake notification has been sent and accepted [for a REST Hook channel type], the server SHALL update the status to active.",SHALL,Server,,
35
+ hl7.fhir.uv.subscriptions_1.1.0,31,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,Any errors in the initial handshake [for a REST Hook channel type] SHALL result in the status being changed to error.,SHALL,Server,,
36
+ hl7.fhir.uv.subscriptions_1.1.0,32,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#security-notes,"HTTP is neither a secure nor an encrypted channel, nor does it provide endpoint verification. It is strongly recommended that implementations refuse requests to send notifications to URLs using the HTTP protocol (use HTTPS instead).",SHOULD,Server,,
37
+ hl7.fhir.uv.subscriptions_1.1.0,33,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/notifications.html#event-notifications-and-what-to-include,"In addition to the Subscription Status information, each notification MAY include additional resources or references to resources (URLs or ids).",MAY,Server,,
38
+ hl7.fhir.uv.subscriptions_1.1.0,34,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/notifications.html#additional-resources,Servers MAY choose to include additional resources [other than the focus] with notifications that may be of interest to clients.,MAY,Server,,
39
+ hl7.fhir.uv.subscriptions_1.1.0,35,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/notifications.html#additional-resources,"Servers SHALL conform to the payload configuration of the subscription when adding additional resources (e.g., if the subscription is id-only, then only ids of additional resources may be provided; if the subscription is full-resource, then full resources should be provided).",SHALL,Server,,
40
+ hl7.fhir.uv.subscriptions_1.1.0,36,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#payload-types,"If a server will not honor a payload type (e.g., will not send full-resource over HTTP), it SHOULD reject the Subscription request",SHOULD,Server,,
41
+ hl7.fhir.uv.subscriptions_1.1.0,37,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#payload-types,"If a server will not honor a payload type (e.g., will not send full-resource over HTTP), it ... MAY accept the subscription with modifications.",MAY,Server,,
42
+ hl7.fhir.uv.subscriptions_1.1.0,38,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#empty,"When populating the SubscriptionStatus.notificationEvent structure for a notification with an empty payload, a server SHALL NOT include references to resources (e.g., SubscriptionStatus.notificationEvent.focus and SubscriptionStatus.notificationEvent.additionalContext SHALL NOT be present).",SHALL NOT,Server,,
43
+ hl7.fhir.uv.subscriptions_1.1.0,39,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#empty,"When the content type is empty, notification bundles SHALL not contain Bundle.entry elements other than the SubscriptionStatus for the notification.",SHALL NOT,Server,,
44
+ hl7.fhir.uv.subscriptions_1.1.0,40,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#id-only,"When the content type is id-only, notification bundles SHALL include references to the appropriate focus resources in the SubscriptionStatus.notificationEvent.focus element.",SHALL,Server,,
45
+ hl7.fhir.uv.subscriptions_1.1.0,41,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#id-only,"Additionally, [id-only] notification bundles MAY contain, in addition to the SubscriptionStatus used to convey status information, at least one Bundle.entry for each resource relevant to the notification. For example, a notification for a topic based on Encounter MAY include a reference to the Encounter and MAY also include additional resources deemed relevant (e.g., the linked Patient).",MAY,Server,,
46
+ hl7.fhir.uv.subscriptions_1.1.0,42,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#id-only,"Each Bundle.entry for id-only notification SHALL contain a relevant resource URL in the fullUrl and request elements, as is required for history bundles.",SHALL,Server,,
47
+ hl7.fhir.uv.subscriptions_1.1.0,43,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#full-resource,"When the content type is full-resource, notification bundles SHALL include references to the appropriate focus resources in the SubscriptionStatus.notificationEvent.focus element.",SHALL,Server,,
48
+ hl7.fhir.uv.subscriptions_1.1.0,44,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#full-resource,"Notification bundles for full-resource subscriptions SHALL contain, in addition to the SubscriptionStatus, at least one Bundle.entry for each resource relevant to the notification. For example, a notification for a topic based on the Encounter resource SHALL include an Encounter and MAY include additional resources deemed relevant (e.g., the referenced Patient).",SHALL,Server,,
49
+ hl7.fhir.uv.subscriptions_1.1.0,45,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/payloads.html#full-resource,"Each Bundle.entry for a full-resource notification SHALL contain a relevant resource in the entry.resource element. If a server cannot include the resource contents due to an issue with a specific notification, the server SHALL populate the entry.request and/or entry.response elements.",SHALL,Server,,
50
+ hl7.fhir.uv.subscriptions_1.1.0,46,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHALL support the Subscription resource (read/write).",DEPRECATED,Server,,
51
+ hl7.fhir.uv.subscriptions_1.1.0,47,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHALL support the $status operation on the Subscription resource.",SHALL,Server,,
52
+ hl7.fhir.uv.subscriptions_1.1.0,48,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHOULD support topic discovery via the CapabilityStatement SubscriptionTopic Canonical extension",SHOULD,Server,,
53
+ hl7.fhir.uv.subscriptions_1.1.0,49,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHALL support at least one channel type",SHALL,Server,,
54
+ hl7.fhir.uv.subscriptions_1.1.0,50,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHOULD include one [channel type] from this guide",SHOULD,Server,,
55
+ hl7.fhir.uv.subscriptions_1.1.0,51,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHALL support at least one Payload Type",SHALL,Server,,
56
+ hl7.fhir.uv.subscriptions_1.1.0,52,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-artifacts-1,"FHIR Servers claiming conformance to this Implementation Guide must conform to the expectations described in the Capability Statement appropriate to the implemented FHIR version. For FHIR R4 servers, this guide defines the R4 Server CapabilityStatement (https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html).",SHALL,Server,,
57
+ hl7.fhir.uv.subscriptions_1.1.0,53,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-artifacts-1,"In addition to the basic support in the CapabilityStatement (e.g., resources, interactions, and operations), a conformant server SHALL support at least one Payload Type … listed in this IG.",SHALL,Server,,
58
+ hl7.fhir.uv.subscriptions_1.1.0,54,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-artifacts-1,"In addition to the basic support in the CapabilityStatement (e.g., resources, interactions, and operations), a conformant server ... SHOULD support one Channel Type listed in this IG.",SHOULD,Server,,
59
+ hl7.fhir.uv.subscriptions_1.1.0,55,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-artifacts-1,"In order to promote widespread compatibility, cross version extensions SHOULD NOT be used on R4 subscriptions to describe any elements also described by this guide",DEPRECATED,,,
60
+ hl7.fhir.uv.subscriptions_1.1.0,56,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#profile-support-1,a conformant server…SHALL communicate all profile data elements that are mandatory by that profile’s StructureDefinition.,DEPRECATED,,,
61
+ hl7.fhir.uv.subscriptions_1.1.0,57,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#profile-support-1,a conformant server…SHOULD declare conformance with the Backport Subscription Server Capability Statement by including its official URL in the server’s CapabilityStatement.instantiates element: http://hl7.org/fhir/uv/subscriptions-backport/CapabilityStatement/backport-subscription-server-r4.,SHOULD,Server,,
62
+ hl7.fhir.uv.subscriptions_1.1.0,58,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#profile-support-1,"a conformant server…SHALL specify the full capability details from the CapabilityStatement it claims to implement, including declaring support for the Backport Subscription Profile by including its official URL in the server’s CapabilityStatement.rest.resource.supportedProfile element: http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription",SHALL,Server,,
63
+ hl7.fhir.uv.subscriptions_1.1.0,59,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-channel-type-1,Servers supporting this guide SHALL be able to read values present in this [backport-channel-type extension - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-channel-type.html] element. ,SHALL,Server,,
64
+ hl7.fhir.uv.subscriptions_1.1.0,60,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-channel-type-1,A server SHALL reject the subscription request if a client requests an unsupported channel via this [backport-channel-type extension - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-channel-type.html] element.,SHALL,Server,,
65
+ hl7.fhir.uv.subscriptions_1.1.0,61,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-channel-type-1,"Clients supporting this guide MAY support this [backport-channel-type extension - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-channel-type.html] extension, as necessary for their use case.",MAY,Client,,
66
+ hl7.fhir.uv.subscriptions_1.1.0,62,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-filter-criteria-1,Servers supporting this guide SHALL be able to read values in this [backport-filter-criteria - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-filter-criteria.html] extension and SHALL be able to apply filters as described by any Subscription Topics the server advertises support for.,DEPRECATED,Server,,
67
+ hl7.fhir.uv.subscriptions_1.1.0,63,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-filter-criteria-1,"If a server is capable of supporting filter criteria in general but unable to support criteria requested in a subscription [via the extension backport-filter-criteria - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-filter-criteria.html], the server SHALL reject the subscription.",SHALL,Server,,
68
+ hl7.fhir.uv.subscriptions_1.1.0,64,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-filter-criteria-1,Clients supporting this guide SHALL be able to write values in this [backport-filter-criteria - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-filter-criteria.html] extension.,SHALL,Client,,
69
+ hl7.fhir.uv.subscriptions_1.1.0,65,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-payload-content-1,Servers supporting this guide SHALL be able to read values from this [backport-payload-content - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-payload-content.html] extension.,SHALL,Server,,
70
+ hl7.fhir.uv.subscriptions_1.1.0,66,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-payload-content-1,"A server SHALL reject the subscription request if a client asks for a content level the server does not intend to support (e.g., does not meet security requirements) [using the extension backport-payload-content - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-payload-content.html].",SHALL,Server,,
71
+ hl7.fhir.uv.subscriptions_1.1.0,67,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-payload-content-1,Servers SHALL include information in notifications as described in this guide based on this value [in the extension backport-payload-content - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-payload-content.html].,SHALL,Server,,
72
+ hl7.fhir.uv.subscriptions_1.1.0,68,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-payload-content-1,Clients supporting this guide SHALL be able to write values in this [backport-payload-content - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-payload-content.html] extension.,SHALL,Client,,
73
+ hl7.fhir.uv.subscriptions_1.1.0,69,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#notification-entry-subscriptionstatus-1,Servers supporting this guide SHALL be able to generate a valid and correct R4 Backported R5 SubscriptionStatus resource for each notification. ,SHALL,Server,,
74
+ hl7.fhir.uv.subscriptions_1.1.0,70,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#notification-entry-subscriptionstatus-1,The status entry SHALL be the first entry of each notification bundle.,SHALL,Server,,
75
+ hl7.fhir.uv.subscriptions_1.1.0,71,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#notification-entry-subscriptionstatus-1,Clients supporting this guide SHALL be able to process a valid R4 Backported R5 SubscriptionStatus resource without errors.,SHALL,Client,,
76
+ hl7.fhir.uv.subscriptions_1.1.0,72,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#subscriptioncriteria-1,"The Subscription.criteria element is required (cardinality of 1..1), so any compatible implementation SHALL be able to read and/or write as necessary.",SHALL,Server,,
77
+ hl7.fhir.uv.subscriptions_1.1.0,73,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#subscriptioncriteria-1,"Compared with the core specification, this guide specifies that the [Subscription.criteria] element SHALL contain the canonical URL for the Subscription Topic.",SHALL,Server,,
78
+ hl7.fhir.uv.subscriptions_1.1.0,74,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#subscriptioncriteria-1,Servers supporting this guide SHALL be able to read values in this [Subscription.criteria] element and process requests for subscription topics referenced by it.,SHALL,Server,,
79
+ hl7.fhir.uv.subscriptions_1.1.0,75,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#subscriptioncriteria-1,"If a server does not support a requested topic [in the Subscription.criteria element] or will not honor the subscription otherwise, a server SHALL reject the subscription request.",SHALL,Server,,
80
+ hl7.fhir.uv.subscriptions_1.1.0,76,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#subscriptioncriteria-1,Clients supporting this guide SHALL be able to write subscription topic URLs into this [Subscription.criteria] element.,SHALL,Client,,
81
+ hl7.fhir.uv.subscriptions_1.1.0,77,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#handling-errors-as-a-server,A server SHALL…Increment the eventsSinceSubscriptionStart counter internally.,SHALL,Server,,
82
+ hl7.fhir.uv.subscriptions_1.1.0,78,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#handling-errors-as-a-server,A server SHALL…Update the status of the subscription internally.,SHALL,Server,,
83
+ hl7.fhir.uv.subscriptions_1.1.0,79,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#handling-errors-as-a-server,A server SHALL…Continue to respond to $status requests.,SHALL,Server,,
84
+ hl7.fhir.uv.subscriptions_1.1.0,80,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#handling-errors-as-a-server,A server MAY Continue to send heartbeat messages (with an error status set).,MAY,Server,,
85
+ hl7.fhir.uv.subscriptions_1.1.0,81,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#handling-errors-as-a-server,"Discovering the error state and recovering from it are responsibilities of the subscriber. This includes resetting the Subscription to an active or requested status - a client is responsible for requesting re-activation of a subscription. Note: this is important because a subscriber must make the determination of how to recover from an error state; if a server arbitrarily resets a subscription, a subscriber may not be aware of missing notifications.",SHALL,Client,,
86
+ hl7.fhir.uv.subscriptions_1.1.0,82,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#recovering-from-errors,"Once an application has returned to a functional state, it should request the subscription is reactivated by updating the status to either requested or active as appropriate.",SHALL,Client,,
87
+ hl7.fhir.uv.subscriptions_1.1.0,83,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#using-the-events-operation,"Servers MAY choose to support the $events operation, as defined in this IG.",MAY,Server,,
88
+ hl7.fhir.uv.subscriptions_1.1.0,84,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#using-the-events-operation,"Servers which implement the operation MAY use implementation-specific criteria to restrict availability of events (e.g., most recent 10 events, events within the past 30 days, etc.).",MAY,Server,,
89
+ hl7.fhir.uv.subscriptions_1.1.0,85,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/errors.html#using-the-events-operation,"During a recovery process, clients MAY try to retrieve missing events via the $events operation, which should allow processing to continue as normal.",MAY,Client,,
90
+ hl7.fhir.uv.subscriptions_1.1.0,86,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions,"In order to promote widespread compatibility, cross version extensions SHOULD NOT be used [clients should not put into Subscriptions they create] on R4 subscriptions to describe any elements also described by this guide",SHOULD NOT,Client,,
91
+ hl7.fhir.uv.subscriptions_1.1.0,87,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions,"In order to promote widespread compatibility, cross version extensions SHOULD NOT be used [servers should ?? Subscriptions that include them] on R4 subscriptions to describe any elements also described by this guide",DEPRECATED,,,
92
+ hl7.fhir.uv.subscriptions_1.1.0,88,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions-and-fhir-versions,"Note that subscription notifications, by default, are made using the same FHIR version as the server. The Subscription.channel.payload element can be used [by clients] to specify a different FHIR version, using syntax and values defined by the MIME Type Parameter.",MAY,Client,,
93
+ hl7.fhir.uv.subscriptions_1.1.0,89,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions-and-fhir-versions,Servers SHALL look for this [Subscription.channel.payload element] parameter during subscription negotiation,DEPRECATED,,,
94
+ hl7.fhir.uv.subscriptions_1.1.0,90,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions-and-fhir-versions,"Servers SHALL look for this [Subscription.channel.payload element] parameter during subscription negotiation and SHALL not accept requests for notification FHIR versions it cannot support (servers MAY reject or coerce, according to their policies)",SHALL,Server,,
95
+ hl7.fhir.uv.subscriptions_1.1.0,91,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/components.html#subscriptions-and-fhir-versions,"servers MAY reject or coerce [the FHIR version requested via the Subscription.channel.payload element], according to their policies",DEPRECATED,,,
96
+ hl7.fhir.uv.subscriptions_1.1.0,92,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,Server may send notifications of type heartbeat at any time.,MAY,Server,,
97
+ hl7.fhir.uv.subscriptions_1.1.0,93,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-definitions.html#root,"Subscription.channel.extension:heartbeatPeriod: If present, a 'hearbeat' notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds. ",SHALL,Server,,
98
+ hl7.fhir.uv.subscriptions_1.1.0,94,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-definitions.html#root,"Subscription.channel.extension:heartbeatPeriod: If not present, a heartbeat notification is not sent.",SHALL,Server,,
99
+ hl7.fhir.uv.subscriptions_1.1.0,95,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-definitions.html#root,"Subscription.criteria.extension:filterCriteria: When multiple filters are applied, evaluates to true if all the conditions are met; otherwise it returns false. (i.e., logical AND). ",SHALL,Server,,
100
+ hl7.fhir.uv.subscriptions_1.1.0,96,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-definitions.html#root,Subscription.criteria.extension:filterCriteria: Keys can be either search parameters appropriate to the filtering resource or keys defined within the subscription topic.,SHALL,Client,,
101
+ hl7.fhir.uv.subscriptions_1.1.0,97,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-definitions.html#root,"Subscription.channel.extension:timeout: If present, the maximum amount of time a server will allow before failing a notification attempt. ",SHALL,Server,,
102
+ hl7.fhir.uv.subscriptions_1.1.0,98,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-definitions.html#root,"Subscription.channel.extension:maxCount: If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification). Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.",SHALL,Server,,
103
+ hl7.fhir.uv.subscriptions_1.1.0,99,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4-definitions.html,Parameters.parameter:topic.value[x]: This value SHOULD NOT be present when using empty payloads ,SHOULD NOT,Server,,
104
+ hl7.fhir.uv.subscriptions_1.1.0,100,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4-definitions.html,Parameters.parameter:topic.value[x]: This value … MAY be present when using id-only payloads,MAY,Server,,
105
+ hl7.fhir.uv.subscriptions_1.1.0,101,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4-definitions.html,Parameters.parameter:topic.value[x]: This value … SHOULD be present when using full-resource payloads.,SHOULD,Server,,
106
+ hl7.fhir.uv.subscriptions_1.1.0,102,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4-definitions.html,Parameters.parameter:eventsSinceSubscriptionStart.value[x]: The total number of actual events which have been generated since the Subscription was created (inclusive of this notification) - regardless of how many have been successfully communicated. This number is NOT incremented for handshake and heartbeat notifications.,SHALL,Server,,
107
+ hl7.fhir.uv.subscriptions_1.1.0,103,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4-definitions.html,Parameters.parameter:notificationEvent.part:eventNumber.value[x]: The sequential number of this event in this subscription context.,SHALL,Server,,
108
+ hl7.fhir.uv.subscriptions_1.1.0,104,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4-definitions.html,Parameters.parameter:notificationEvent.part:eventFocus.value[x]: MAY contain a reference to a non-FHIR object.,MAY,Server,,
109
+ hl7.fhir.uv.subscriptions_1.1.0,105,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4-definitions.html,Parameters.parameter:notificationEvent.part:eventAdditionalContext.value[x]: MAY refer to non-FHIR objects.,MAY,Server,,
110
+ hl7.fhir.uv.subscriptions_1.1.0,106,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html,"id Parameter: At the Instance level, this parameter is ignored.",SHALL,Server,,
111
+ hl7.fhir.uv.subscriptions_1.1.0,107,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html,"id Parameter: At the Resource level … multiple values are joined via OR (e.g., ""id1"" OR ""id2"").",SHALL,Server,,
112
+ hl7.fhir.uv.subscriptions_1.1.0,108,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html,"id Parameter: At the Resource level … In the absence of any specified ids, the server returns the status for all Subscriptions available to the caller.",SHALL,Server,,
113
+ hl7.fhir.uv.subscriptions_1.1.0,109,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html,"status Parameter: At the Instance level, this parameter is ignored.",SHALL,Server,,
114
+ hl7.fhir.uv.subscriptions_1.1.0,110,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html,"status Parameter: At the resource level, … Multiple values are joined via OR (e.g., ""error"" OR ""off"").",SHALL,Server,,
115
+ hl7.fhir.uv.subscriptions_1.1.0,111,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html,"status Parameter: At the resource level, … In the absence of any specified status values, the server does not filter contents based on the status.",SHALL,Server,,
116
+ hl7.fhir.uv.subscriptions_1.1.0,112,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-status.html,"return Parameter: The operation returns a bundle containing one or more subscription status resources, one per Subscription being queried. The Bundle type is ""searchset"".",SHALL,Server,,
117
+ hl7.fhir.uv.subscriptions_1.1.0,113,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/channels.html#rest-hook-1,Server may send notifications of type event-notification at any time.,MAY,Server,,
118
+ hl7.fhir.uv.subscriptions_1.1.0,114,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#subscription,[Subscription Resource] Conformance Expectation: SHALL,SHALL,Server,,
119
+ hl7.fhir.uv.subscriptions_1.1.0,115,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-events.html,"
120
+ The [$events] operation returns a valid notification bundle, with the first entry being the subscription status information resource. The bundle type is ""history"".",SHALL,Server,,
121
+ hl7.fhir.uv.subscriptions_1.1.0,116,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-events.html,"[the content input indicates the] Requested content style of returned data. Codes from backport-content-value-set (e.g., empty, id-only, full-resource).",SHALL,Client,,
122
+ hl7.fhir.uv.subscriptions_1.1.0,117,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-events.html,"[the content input indicates the] Requested content style of returned data [from the $events operation]…. This is a hint to the server what a client would prefer, and MAY be ignored.",MAY,Server,,
123
+ hl7.fhir.uv.subscriptions_1.1.0,118,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-events.html,"[The eventsSinceNumber input indicates] The starting event number, inclusive of this event (lower bound).",SHALL,Server,,
124
+ hl7.fhir.uv.subscriptions_1.1.0,119,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/OperationDefinition-backport-subscription-events.html,"[The eventsUntilNumber input indicates] The ending event number, inclusive of this event (upper bound).",SHALL,Server,,
125
+ hl7.fhir.uv.subscriptions_1.1.0,120,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,"
126
+ [servers] SHOULD support [profile]: Backported R5 Subscription [NOTE: narrative says SHALL, resource says SHOULD, future versions correct the narrative to SHOULD]",SHOULD,Server,,
127
+ hl7.fhir.uv.subscriptions_1.1.0,121,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,SHALL support the $status operation,SHALL,Server,,
128
+ hl7.fhir.uv.subscriptions_1.1.0,122,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,MAY support the $events operation,MAY,Server,,
129
+ hl7.fhir.uv.subscriptions_1.1.0,123,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,MAY support the $get-ws-binding-token operation,MAY,Server,,
130
+ hl7.fhir.uv.subscriptions_1.1.0,124,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,A Server SHALL be capable of returning a Subscription resource using: GET [base]/Subscription/[id],SHALL,Server,,
131
+ hl7.fhir.uv.subscriptions_1.1.0,125,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,A Server SHOULD be capable of creating a Subscription resource using either: POST [base]/Subscription or PUT [base]/Subscription/[id],SHOULD,Server,,
132
+ hl7.fhir.uv.subscriptions_1.1.0,126,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,A Server SHOULD be capable of modifying a Subscription resource using either: PUT [base]/Subscription/[id] or PATCH [base]/Subscription/[id],SHOULD,Server,,
133
+ hl7.fhir.uv.subscriptions_1.1.0,127,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,A Server SHOULD be capable of deleting a Subscription resource using: DELETE [base]/Subscription/[id],SHOULD,Server,,
134
+ hl7.fhir.uv.subscriptions_1.1.0,128,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,A Server [MAY] be capable of searching for Subscription resources using: GET [base]/Subscription/?[parameters],MAY,Server,,
135
+ hl7.fhir.uv.subscriptions_1.1.0,129,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,"Search Parameter Summary: SHALL [support] url [narrative says SHOULD, resource says SHALL, future versions correct the narrative to SHALL]",SHALL,Server,,
136
+ hl7.fhir.uv.subscriptions_1.1.0,130,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/CapabilityStatement-backport-subscription-server-r4.html#summary,Search Parameter Summary: SHOULD [support] status,SHOULD,Server,,
137
+ hl7.fhir.uv.subscriptions_1.1.0,131,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4.html,[several SubscriptionStatus profile elements are flagged as must support],MAY,Server,,
138
+ hl7.fhir.uv.subscriptions_1.1.0,132,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-status-r4.html,[several SubscriptionStatus profile elements are flagged as must support],MAY,Client,,
139
+ hl7.fhir.uv.subscriptions_1.1.0,133,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHALL support the Subscription resource (...write).",SHALL,Server,,
140
+ hl7.fhir.uv.subscriptions_1.1.0,134,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#conformance-in-fhir-r4,"In order to claim conformance with this guide, a server…SHALL support the Subscription resource (read...).",SHALL,Server,,
141
+ hl7.fhir.uv.subscriptions_1.1.0,135,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-filter-criteria-1,Servers supporting this guide SHALL be able to read values in this [backport-filter-criteria - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-filter-criteria.html] extension.,SHALL,Server,,
142
+ hl7.fhir.uv.subscriptions_1.1.0,136,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#backport-filter-criteria-1,Servers supporting this guide...SHALL be able to apply filters [from the backport-filter-criteria - https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-filter-criteria.html extension] as described by any Subscription Topics the server advertises support for.,SHALL,Server,,
143
+ hl7.fhir.uv.subscriptions_1.1.0,137,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#profile-support-1,a conformant server…SHALL communicate all profile data elements that are mandatory by that profile’s StructureDefinition [for the R4/B Topic-Based Subscription profile],SHALL,Server,,
144
+ hl7.fhir.uv.subscriptions_1.1.0,138,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#profile-support-1,a conformant server…SHALL communicate all profile data elements that are mandatory by that profile’s StructureDefinition [for the R4 Topic-Based Subscription Notification Bundle],SHALL,Server,,
145
+ hl7.fhir.uv.subscriptions_1.1.0,139,https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/conformance.html#profile-support-1,a conformant server…SHALL communicate all profile data elements that are mandatory by that profile’s StructureDefinition [for the R4 Backported R5 SubscriptionStatus],SHALL,Server,,
@@ -0,0 +1,140 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SubscriptionsTestKit
4
+ module SubscriptionsR5BackportR4Client
5
+ module SubscriptionSimulationUtils
6
+ # Per the IG this should only be application/fhir+xml and application/fhir+json, however, Inferno (server suite)
7
+ # can only handle application/json, so we'll allow that. Disallow XML for now.
8
+ DEFAULT_MIME_TYPE = 'application/fhir+json'
9
+ ALLOWED_MIME_TYPES = [DEFAULT_MIME_TYPE, 'application/json'].freeze
10
+
11
+ def notification_bundle_input(test_result)
12
+ JSON.parse(test_result.input_json).find { |i| i['name'] == 'notification_bundle' }['value']
13
+ end
14
+
15
+ def client_access_token_input(test_result)
16
+ JSON.parse(test_result.input_json).find { |i| i['name'] == 'client_endpoint_access_token' }['value']
17
+ end
18
+
19
+ def derive_handshake_notification(notification_json, subscription_url)
20
+ notification_bundle = FHIR.from_contents(notification_json)
21
+ subscription_status = update_subscription_status(notification_bundle, subscription_url, 'requested', 0,
22
+ 'handshake')
23
+ subscription_status.parameter.delete(find_parameter(subscription_status, 'notification-event'))
24
+ subscription_status.parameter.delete(find_parameter(subscription_status, 'error'))
25
+ notification_bundle
26
+ end
27
+
28
+ def derive_event_notification(notification_json, subscription_url, event_count)
29
+ notification_bundle = FHIR.from_contents(notification_json)
30
+ update_subscription_status(notification_bundle, subscription_url, 'active', event_count, 'event-notification')
31
+ notification_bundle
32
+ end
33
+
34
+ def derive_status_bundle(notification_json, subscription_url, status_code, event_count, request_url)
35
+ notification_bundle = FHIR.from_contents(notification_json)
36
+ subscription_status = update_subscription_status(notification_bundle, subscription_url, status_code, event_count,
37
+ 'query-status')
38
+ subscription_status.parameter.delete(find_parameter(subscription_status, 'notification-event'))
39
+ subscription_status_entry = find_subscription_status_entry(notification_bundle)
40
+ FHIR::Bundle.new(
41
+ entry: FHIR::Bundle::Entry.new(
42
+ fullUrl: subscription_status_entry.fullUrl,
43
+ resource: subscription_status,
44
+ search: FHIR::Bundle::Entry::Search.new(mode: 'match', score: 1)
45
+ ),
46
+ link: FHIR::Bundle::Link.new(relation: 'self', url: request_url),
47
+ total: 1,
48
+ type: 'searchset'
49
+ )
50
+ end
51
+
52
+ def operation_outcome(severity, code, text = nil)
53
+ oo = FHIR::OperationOutcome.new(issue: FHIR::OperationOutcome::Issue.new(severity:, code:))
54
+ oo.issue.first.details = FHIR::CodeableConcept.new(text:) if text.present?
55
+ oo
56
+ end
57
+
58
+ def find_subscription(test_session_id)
59
+ request = requests_repo.tagged_requests(test_session_id, [SUBSCRIPTION_CREATE_TAG])&.find { |r| r.status == 201 }
60
+ return unless request
61
+
62
+ begin
63
+ FHIR.from_contents(request.response_body)
64
+ rescue StandardError
65
+ nil
66
+ end
67
+ end
68
+
69
+ def determine_subscription_status_code(subscription_id)
70
+ handshakes = requests_repo.tagged_requests(test_run.test_session_id, [REST_HOOK_HANDSHAKE_NOTIFICATION_TAG])
71
+ handshake = handshakes.filter { |h| notification_subscription_id(h.request_body) == subscription_id }.last
72
+
73
+ if handshake.nil?
74
+ 'requested'
75
+ elsif handshake.status.between?(200, 299)
76
+ 'active'
77
+ else
78
+ 'error'
79
+ end
80
+ end
81
+
82
+ def determine_event_count(test_session_id)
83
+ requests_repo.tagged_requests(test_session_id, [REST_HOOK_EVENT_NOTIFICATION_TAG]).count
84
+ end
85
+
86
+ def actual_mime_type(subscription)
87
+ if ALLOWED_MIME_TYPES.include?(subscription&.channel&.payload)
88
+ subscription&.channel&.payload
89
+ else
90
+ DEFAULT_MIME_TYPE
91
+ end
92
+ end
93
+
94
+ private
95
+
96
+ def requests_repo
97
+ @requests_repo ||= Inferno::Repositories::Requests.new
98
+ end
99
+
100
+ def notification_subscription_id(notification_json)
101
+ notification_bundle = FHIR.from_contents(notification_json)
102
+ subscription_status = find_subscription_status_entry(notification_bundle)&.resource
103
+ subscription_url = find_parameter(subscription_status, 'subscription')&.valueReference
104
+ subscription_url&.reference&.chomp('/')&.split('/')&.last
105
+ end
106
+
107
+ def update_subscription_status(notification_bundle, subscription_url, status_code, event_count, type)
108
+ subscription_status_entry = find_subscription_status_entry(notification_bundle)
109
+ subscription_status_entry.request = FHIR::Bundle::Entry::Request.new(method: 'POST',
110
+ url: "#{subscription_url}/$status")
111
+ subscription_status = subscription_status_entry&.resource
112
+ set_subscription_reference(subscription_status, subscription_url)
113
+ find_parameter(subscription_status, 'status')&.valueCode = status_code
114
+ find_parameter(subscription_status, 'type')&.valueCode = type
115
+ find_parameter(subscription_status, 'events-since-subscription-start')&.valueString = event_count.to_s
116
+ subscription_status
117
+ end
118
+
119
+ def find_subscription_status_entry(notification_bundle)
120
+ notification_bundle.entry.find do |e|
121
+ e.resource&.resourceType == 'Parameters' && e.resource.parameter&.any? { |p| p.name == 'subscription' }
122
+ end
123
+ end
124
+
125
+ def set_subscription_reference(subscription_status, subscription_url)
126
+ subscription = find_parameter(subscription_status, 'subscription')
127
+ unless subscription
128
+ subscription = FHIR::Parameters::Parameter.new(name: 'subscription')
129
+ subscription_status.parameter.unshift(subscription)
130
+ end
131
+
132
+ subscription.valueReference = FHIR::Reference.new(reference: subscription_url)
133
+ end
134
+
135
+ def find_parameter(subscription_status, parameter_name)
136
+ subscription_status.parameter&.find { |p| p.name == parameter_name }
137
+ end
138
+ end
139
+ end
140
+ end
@@ -0,0 +1,57 @@
1
+ {
2
+ "resourceType": "CapabilityStatement",
3
+ "name": "InfernoSubscriptionsTestKitClientSuiteSimulatedServerCapabilityStatement",
4
+ "status": "active",
5
+ "date": "2024-09-05",
6
+ "description": "CapabilityStatement describing the features of the simulated FHIR Subscription server run as a part of the Subscriptions Client Test Suite.",
7
+ "kind": "instance",
8
+ "fhirVersion": "4.0.1",
9
+ "format": [
10
+ "json"
11
+ ],
12
+ "software": {
13
+ "name": "Inferno Subscriptions Test Kit Client Suite"
14
+ },
15
+ "implementation": {
16
+ "description": "Simulation of a FHIR Subscription server run as a part of the Subscriptions Client Test Suite"
17
+ },
18
+ "instantiates": [
19
+ "http://hl7.org/fhir/uv/subscriptions-backport/CapabilityStatement/backport-subscription-server-r4#1.1.0"
20
+ ],
21
+ "implementationGuide": [
22
+ "http://hl7.org/fhir/uv/subscriptions-backport/ImplementationGuide/hl7.fhir.uv.subscriptions-backport"
23
+ ],
24
+ "rest": [
25
+ {
26
+ "mode": "server",
27
+ "resource": [
28
+ {
29
+ "extension": [
30
+ {
31
+ "url": "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/capabilitystatement-subscriptiontopic-canonical",
32
+ "valueCanonical": "https://inferno.healthit.gov/suites/custom/subscriptions_r5_backport_r4_client/topics/patient-admission"
33
+ }
34
+ ],
35
+ "type": "Subscription",
36
+ "supportedProfile": [
37
+ "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription"
38
+ ],
39
+ "interaction": [
40
+ {
41
+ "code": "read"
42
+ },
43
+ {
44
+ "code": "create"
45
+ }
46
+ ],
47
+ "operation": [
48
+ {
49
+ "name": "$status",
50
+ "definition": "http://hl7.org/fhir/uv/subscriptions-backport/OperationDefinition/backport-subscription-status"
51
+ }
52
+ ]
53
+ }
54
+ ]
55
+ }
56
+ ]
57
+ }
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../common/subscription_conformance_verification'
4
+ require_relative '../../../../common/notification_conformance_verification'
5
+ require_relative '../../common/subscription_simulation_utils'
6
+
7
+ module SubscriptionsTestKit
8
+ module SubscriptionsR5BackportR4Client
9
+ class NotificationInputPayloadVerificationTest < Inferno::Test
10
+ include NotificationConformanceVerification
11
+ include SubscriptionConformanceVerification
12
+ include SubscriptionSimulationUtils
13
+
14
+ id :subscriptions_r5_backport_r4_client_notification_input_payload_verification
15
+ title '[USER INPUT VERIFICATION] Notification Bundle Input Conformance Verification for Payload Content'
16
+ description 'This test verifies that the notification bundle from the test input meets the requirements '\
17
+ 'of the payload indicated in the subscription created by the client under test.'
18
+ input :notification_bundle
19
+
20
+ run do
21
+ subscription = find_subscription(test_session_id)
22
+ skip_if(subscription.nil?, 'No subscription found for this test run')
23
+
24
+ # Payload content type is a primitive extension, so we have to parse the source hash
25
+ channel_hash = subscription.channel&.source_hash
26
+ payload_exts = channel_hash&.dig('_payload', 'extension')
27
+ payload_ext = payload_exts&.find do |e|
28
+ e['url'] == 'http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-payload-content'
29
+ end
30
+ payload_content_code = payload_ext['valueCode'] if payload_ext
31
+ skip_if(payload_content_code.nil?, 'Subscription does not have a payload content code')
32
+
33
+ criteria_resource_type = subscription_criteria(subscription.source_hash)
34
+
35
+ case payload_content_code
36
+ when 'empty'
37
+ empty_event_notification_verification(notification_bundle)
38
+ when 'id-only'
39
+ id_only_event_notification_verification(notification_bundle, criteria_resource_type)
40
+ when 'full-resource'
41
+ full_resource_event_notification_verification(notification_bundle, criteria_resource_type)
42
+ else
43
+ skip "Unrecognized payload content code: #{payload_content_code}"
44
+ end
45
+
46
+ no_error_verification('Notification bundle input payload content was not conformant, see error messages')
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../common/notification_conformance_verification'
4
+
5
+ module SubscriptionsTestKit
6
+ module SubscriptionsR5BackportR4Client
7
+ class NotificationInputVerificationTest < Inferno::Test
8
+ include NotificationConformanceVerification
9
+
10
+ id :subscriptions_r5_backport_r4_client_notification_input_verification
11
+ title '[USER INPUT VERIFICATION] Notification Bundle Input Conformance Verification'
12
+ description %(
13
+ This test verifies that the notification bundle provided by the tester is conformant
14
+ to the [R4 Topic-Based Subscription Notification Bundle
15
+ profile](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription-notification-r4.html).
16
+ )
17
+ input :notification_bundle
18
+
19
+ run do
20
+ notification_verification(notification_bundle, 'event-notification')
21
+ no_error_verification('Notification bundle input was not conformant, see error messages')
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../urls'
4
+
5
+ module SubscriptionsTestKit
6
+ module SubscriptionsR5BackportR4Client
7
+ class ProcessingAttestationTest < Inferno::Test
8
+ include URLs
9
+
10
+ id :subscriptions_r5_backport_r4_client_processing_attestation
11
+ title 'Client Processes Event Notification'
12
+ description %(
13
+ This test asks the tester to attest that the event notification sent by Inferno
14
+ was processed correctly according to the design of the client. Thus, the details of
15
+ what entails "correct" processing are left to the tester based on their understanding
16
+ of what should happen when the client receives an event notification for the requested
17
+ Subscription.
18
+ )
19
+ verifies_requirements 'hl7.fhir.uv.subscriptions_1.1.0@113'
20
+
21
+ run do
22
+ load_tagged_requests(REST_HOOK_EVENT_NOTIFICATION_TAG)
23
+ skip_if(requests.none?, 'Inferno did not send an event notification')
24
+ token = SecureRandom.hex(32)
25
+ wait(
26
+ identifier: token,
27
+ message: %(
28
+ I attest that the client application successfully processed the event notification sent by Inferno.
29
+
30
+ [Click here](#{resume_pass_url}?test_run_identifier=#{token}) if the above statement is **true**.
31
+
32
+ [Click here](#{resume_fail_url}?test_run_identifier=#{token}) if the above statement is **false**.
33
+ )
34
+ )
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../common/subscription_conformance_verification'
4
+
5
+ module SubscriptionsTestKit
6
+ module SubscriptionsR5BackportR4Client
7
+ class SubscriptionVerificationTest < Inferno::Test
8
+ include SubscriptionConformanceVerification
9
+ id :subscriptions_r5_backport_r4_client_subscription_verification
10
+ title 'Client Subscription Conformance Verification'
11
+ description %(
12
+ This test verifies that the Subscription created by the client under test
13
+ is conformant to the [R4/B Topic-Based Subscription
14
+ profile](https://hl7.org/fhir/uv/subscriptions-backport/STU1.1/StructureDefinition-backport-subscription.html)
15
+ and meets other requirements placed on it by the IG.
16
+ )
17
+ verifies_requirements 'hl7.fhir.uv.subscriptions_1.1.0@68',
18
+ 'hl7.fhir.uv.subscriptions_1.1.0@76',
19
+ 'hl7.fhir.uv.subscriptions_1.1.0@86'
20
+
21
+ run do
22
+ load_tagged_requests(SUBSCRIPTION_CREATE_TAG)
23
+ skip_if(requests.none?, 'Inferno did not receive a Subscription creation request')
24
+ subscription_verification(request.request_body)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'conformance_verification/subscription_verification_test'
4
+ require_relative 'conformance_verification/notification_input_verification_test'
5
+ require_relative 'conformance_verification/notification_input_payload_verification_test'
6
+ require_relative 'conformance_verification/processing_attestation_test'
7
+
8
+ module SubscriptionsTestKit
9
+ module SubscriptionsR5BackportR4Client
10
+ class ConformanceVerificationGroup < Inferno::TestGroup
11
+ id :subscriptions_r5_backport_r4_client_conformance_verification
12
+ title 'Rest-Hook Subscription Conformance Verification'
13
+
14
+ test from: :subscriptions_r5_backport_r4_client_subscription_verification
15
+ test from: :subscriptions_r5_backport_r4_client_notification_input_verification
16
+ test from: :subscriptions_r5_backport_r4_client_notification_input_payload_verification
17
+ test from: :subscriptions_r5_backport_r4_client_processing_attestation
18
+ end
19
+ end
20
+ end