Draft - pending technical reviewOwner PDR Engineering (owner to be confirmed)
Subscription API Specification
Endpoint
POST https://mc-pdr-intake.qa.healtheconnections.org:6007/
Description
This endpoint allows a customer system to create a subscription for patient alert notifications.
When a matching event occurs, alerts are sent to the callback URL provided in the endpoint field.
Headers
Content-Type: application/jsonAuthorization: Mutual TLS, using the same certificates exchanged for the intake channels.
Request body
Example for a subscription based on MRN:
{
"qe": "HIXNY",
"subscribingSource": "SOURCE-TO-SUBSCRIBE-TO",
"endpoint": "https://endpoint.to.receive.alert.hixny.org:1234/",
"criteria": "Patient?_id=123456", //Source MRN
"reason": "Patient Discharge"
}
Example for a subscription based on MRN and document type:
{
"qe": "HIXNY",
"subscribingSource": "SOURCE-TO-SUBSCRIBE-TO",
"endpoint": "https://endpoint.to.receive.alert.hixny.org:1234/",
"criteria": "DocumentReference?type=TRN&subject=Patient/<MRN>",
"reason": "Patient Discharge"
}
Fields
| Field | Required | Description |
|---|---|---|
qe | Yes | The QE associated with the subscription. Example: HIXNY. |
subscribingSource | Yes | The source system or organization being subscribed to. |
endpoint | Yes | The customer callback URL where alert notifications should be delivered. |
criteria | Yes | Subscription criteria used to identify the patient or event scope. Example: Patient?_id=123456. |
reason | Yes | Human-readable reason for the subscription. Example: Patient Discharge. |
Example request
curl -X POST "https://some-endpoint:someport/" \
-H "Content-Type: application/json" \
-d '{
"qe": "HIXNY",
"subscribingSource": "SOURCE-TO-SUBSCRIBE-TO",
"endpoint": "https://endpoint.to.receive.alert.hixny.org:1234/",
"criteria": "Patient?_id=123456",
"reason": "Patient Discharge"
}'
Success response
HTTP/1.1 200 OK
{
"subscriptionId": "341692f7-840f-5c42-a616-21fba1a3b4a1",
"status": "accepted"
}