This page is part of the FHIR Specification (v4.6.0: R5 Draft Ballot). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions 
| FHIR Infrastructure Work Group | Maturity Level: N/A | Standards Status: Informative | Compartments: Not linked to any defined compartments |
Raw JSON (canonical form + also see JSON Format Specification)
Example of subscription for beginning of a clinical encounter
{
"resourceType": "Subscription",
"id": "admission",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative</b></p><p><b>name</b>: AdmissionExample</p><p><b>status</b>: active</p><p><b>topic</b>: <a>http://example.org/R4/SubscriptionTopic/admission</a></p><p><b>end</b>: 7 Aug. 2019, 9:15:18 pm</p><p><b>reason</b>: subscription for beginning of a clinical encounter for patient 123</p><h3>FilterBies</h3><table><tr><td>-</td><td><b>SearchParamName</b></td><td><b>Value</b></td></tr><tr><td>*</td><td>patient</td><td>Patient/123</td></tr></table><p><b>channelType</b>: <span>rest-hook</span></p><p><b>endpoint</b>: <a>https://example.org/Endpoints/P123</a></p><p><b>header</b>: Authorization: Bearer secret-token-abc-123</p><p><b>heartbeatPeriod</b>: 60</p><p><b>timeout</b>: 5</p><p><b>contentType</b>: application/fhir+json</p><p><b>content</b>: id-only</p><p><b>notificationUrlLocation</b>: all</p><p><b>maxCount</b>: 100</p></div>"
},
"name": "AdmissionExample",
"status": "active",
"topic": "http://example.org/R4/SubscriptionTopic/admission",
"end": "2019-08-07T11:15:18Z",
"reason": "subscription for beginning of a clinical encounter for patient 123",
"filterBy": [
{
"searchParamName": "patient",
"value": "Patient/123"
}
],
"channelType": {
"code": "rest-hook"
},
"endpoint": "https://example.org/Endpoints/P123",
"header": [
"Authorization: Bearer secret-token-abc-123"
],
"heartbeatPeriod": 60,
"timeout": 5,
"contentType": "application/fhir+json",
"content": "id-only",
"notificationUrlLocation": "all",
"maxCount": 100
}
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.