I'm working to implement HealthCloud with an external system. HealthCloud provides the services/apexrest/HealthCloudGA/HL7
REST endpoint to accept HL7 messages and parse them into the Electronic Health Record objects included in the HealthCloud package.
One of the main issues is lack of documentation, let alone examples. I've gone through many different formats specified by HL7 (JSON, XML, plain text) and have learned the JSON format expected by SF is undocumented and not particularly standard. My current test message JSON is as follows:
{
"MSH": {
"MSH_1": "|^~\\&",
"MSH_2": "",
"MSH_3": "APPLICATION",
"MSH_4": "FACILITY",
"MSH_5": "HEALTHCLOUDGA",
"MSH_6": "SALESFORCE",
"MSH_7": "199912271408",
"MSH_8": "",
"MSH_9": "ADT^A01",
"MSH_10": "20060126130405",
"MSH_11": "D",
"MSH_12": "2.5",
"MSH_16": "AL"
},
"PID": {
"PID_3": "454721",
"PID_5": "DOE^JOHN^^^^",
"PID_12": "USA"
},
"NK1": {
"NK1_2": "ROE^MARIE^^^^",
"NK1_3": "SPO",
"NK1_4": "(216)123-4567",
"NK1_6": "EC"
},
"PV1": {
"PV1_2": "O",
"PV1_3": "168 ~219~C~PMA^^^^^^^^^",
"PV1_8": "277^ALLEN MYLASTNAME^BONNIE^^^^",
"PV1_22": "2688684",
"PV1_48": "199912271408",
"PV1_54": "002376853"
}
}
When I POST this to the endpoint I receive the following error:
{
"Messages": [
{
"summary": "Parse Failure",
"severity": "ERROR",
"scope": "Context.triggerEvent",
"detail": "triggerEvent not Found.",
"code": "HL7-002"
},
{
"summary": "Parse Failure",
"severity": "ERROR",
"scope": "Context",
"detail": "Unable to determine Context",
"code": "HL7-008"
}
],
"isDebug": true,
"Data": null,
"Context": {
"versionId": "2.5",
"triggerEvent": null,
"sendingFacility": "FACILITY",
"sendingApplication": "APPLICATION",
"receivingFacility": "SALESFORCE",
"receivingApplication": "HEALTHCLOUDGA",
"mshObject": null,
"messageCode": "ADT^A01"
}
}
From my understanding of the HL7 format and this error message, the system isn't able to parse the MSH_9
key for the message type ADT
and the trigger event A01
. The documentation I've found simply states that the endpoint exists (HealthCloud Implementation Guide) or is a link to the generic Industries API documentation which does not specify the expected request format for the HealthCloud HL7 API.
What is wrong with my JSON that is causing SF to fail to parse the sample message?