Skip to main content
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/json
  • Authorization: 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​

FieldRequiredDescription
qeYesThe QE associated with the subscription. Example: HIXNY.
subscribingSourceYesThe source system or organization being subscribed to.
endpointYesThe customer callback URL where alert notifications should be delivered.
criteriaYesSubscription criteria used to identify the patient or event scope. Example: Patient?_id=123456.
reasonYesHuman-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"
}