Skip to content

Instantly share code, notes, and snippets.

@jmandel
Last active February 20, 2020 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmandel/90a2f590a4f6f4ff7c82d81416f522e3 to your computer and use it in GitHub Desktop.
Save jmandel/90a2f590a4f6f4ff7c82d81416f522e3 to your computer and use it in GitHub Desktop.
R5 Subscription Notifications: Packaging Discussion
{
"resourceType": "Bundle",
"id": "handshake",
"type": "history",
"timestamp": "2019-08-07T10:24:13.1882432-05:00",
"meta": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-event-count",
"valueInteger64": "0"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/bundle-event-count",
"valueUnsignedInt": 0
},
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-status",
"valueCode": "requested"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-topic-url",
"valueUrl": "https://example.org/SubscriptionTopic/admission"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-url",
"valueUrl": "https://example.org/Subscription/cb2dce51-a1f5-40b4-a98b-c934eae368e8"
}
]
}
}
{
"resourceType": "Bundle",
"id": "handshake",
"type": "message",
"timestamp": "2019-08-07T10:24:13.1882432-05:00",
"entry": [{
"resoure": {
"resourceType": "MessageHeader",
"source": {
"endpoint": "https://ehr.example.org/fhir"
},
"eventCoding": {
"system": "http://hl7.org/fhir/message-events/subscription-notification"
},
"eventsSinceSubscriptionStart": "0",
"eventsInBundle": "0",
"subscription": {
"reference": "https://example.org/Subscription/cb2dce51-a1f5-40b4-a98b-c934eae368e8",
},
"subscriptionStatus": "requested",
"topic": {
"reference": "https://example.org/SubscriptionTopic/admission"
}
}
}]
}
{
"resourceType": "Bundle",
"id": "handshake",
"type": "subscription-notification",
"timestamp": "2019-08-07T10:24:13.1882432-05:00",
"entry": [{
"resource": {
"resourceType": "SubscriptionStatus",
"eventsSinceSubscriptionStart": "0",
"eventsInBundle": "0",
"subscription": {
"reference": "https://example.org/Subscription/cb2dce51-a1f5-40b4-a98b-c934eae368e8",
},
"status": "requested",
"topic": {
"reference": "https://example.org/SubscriptionTopic/admission"
}
}
}]
}
{
"resourceType": "Bundle",
"id": "notification-id-only",
"type": "history",
"timestamp": "2019-08-07T10:24:13.1882432-05:00",
"meta": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-event-count",
"valueInteger64": "2513"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/bundle-event-count",
"valueUnsignedInt": 1
},
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-status",
"valueCode": "active"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-topic-url",
"valueUrl": "https://example.org/SubscriptionTopic/admission"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/subscription-url",
"valueUrl": "https://example.org/Subscription/cb2dce51-a1f5-40b4-a98b-c934eae368e8"
}
]
},
"entry": [
{
"fullUrl": "https://example.org/baseR4/Encounter/2",
"request": {
"method": "PUT",
"url": "Encounter/2"
},
"response": {
"status": "201"
}
}
]
}
{
"resourceType": "Bundle",
"id": "notification-id-only",
"type": "message",
"timestamp": "2019-08-07T10:24:13.1882432-05:00",
"entry": [{
"resource": {
"resourceType": "MessageHeader",
"source": {
"endpoint": "https://ehr.example.org/fhir"
},
"eventCoding": {
"system": "http://hl7.org/fhir/message-events/subscription-notification"
},
"eventsSinceSubscriptionStart": "2513",
"eventsInBundle": "1",
"subscriptionStatus": "active",
"subscription": {
"reference": "https://example.org/Subscription/cb2dce51-a1f5-40b4-a98b-c934eae368e8",
},
"topic": {
"reference": "https://example.org/SubscriptionTopic/admission"
},
"focus": [{
"reference": "https://example.org/Encounter/2"
}]
}
}, {
"fullUrl": "https://example.org/baseR4/Encounter/2",
"request": {
"method": "PUT",
"url": "Encounter/2"
},
"response": {
"status": "201"
}
}
]
}
{
"resourceType": "Bundle",
"id": "notification-id-only",
"type": "subscription-notification",
"timestamp": "2019-08-07T10:24:13.1882432-05:00",
"entry": [{
"resource": {
"resourceType": "SubscriptionStatus",
"eventsSinceSubscriptionStart": "3513",
"eventsInBundle": "1",
"subscription": {
"reference": "https://example.org/Subscription/cb2dce51-a1f5-40b4-a98b-c934eae368e8",
},
"status": "active",
"topic": {
"reference": "https://example.org/SubscriptionTopic/admission"
}
}
}, {
"fullUrl": "https://example.org/Encounter/2",
"request": {
"method": "PUT",
"url": "Encounter/2"
},
"response": {
"status": "201"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment