Hello.
I have a channel in Mirth Connect that receives V2 ADT, transforms into FHIR JSON and persists in HAPI FHIR.
The transformed resource is this:
{
"resourceType": "MessageHeader",
"source": {
"name": "NES"
},
"destination": [
{
"name": "openEMR"
}
],
"date": [
{
"resourceType": "Patient",
"gender": "M",
"birthDate": "1985-01-01",
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"code": "MR"
}
]
},
"value": "123456789"
}
],
"name": [
{
"family": [
"HOUSE"
],
"given": [
"GREGORY"
],
"text": "GREGORY HOUSE"
}
]
}
]
}
When I receive the message through Mirth, the error occurs:
ER7Serializer error
ERROR MESSAGE: Error converting XML to ER7
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException (Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError (Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError (Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError (Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError (Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError (Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl $ PrologDispatcher.dispatch (Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse (Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse (Unknown Source)
at com.mirth.connect.plugins.datatypes.hl7v2.ER7Serializer.fromXML (ER7Serializer.java:277)
at com.mirth.connect.donkey.server.channel.FilterTransformerExecutor.processConnectorMessage (FilterTransformerExecutor.java:123)
at com.mirth.connect.donkey.server.channel.Channel.process (Channel.java:1543)
at com.mirth.connect.donkey.server.channel.Channel.dispatchRawMessage (Channel.java:1191)
at com.mirth.connect.donkey.server.channel.SourceConnector.dispatchRawMessage (SourceConnector.java:192)
at com.mirth.connect.server.controllers.DonkeyEngineController.dispatchRawMessage (DonkeyEngineController.java:1067)
at com.mirth.connect.server.api.servlets.MessageServlet $ 2.run (MessageServlet.java:107)
at java.lang.Thread.run (Unknown Source)
But when I use the POST through postman the resource is created: 201 (with some errors because the resource is not complete, it is a test at the moment)
{
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns = \" http: //
www.w3.org/1999/xhtml \ "> <h1> Operation Outcome <table border = \" 0 \ "> <tr> </ Successfully created resource & quot; MessageHeader / 420097 / _history / 1 & quot; in 1ms <td style = \ "font-weight: bold; \"> INFORMATION </ td> \ n \ t \ t \ t \ t \ t \ t \ t \ t \ \ n \ t \ t \ t \ t <td style = \ "font-weight: bold; \"> ERROR </ td> \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ <td> </ td> <td> <td> <td> <td> <td> t </ t> \ n \ t \ t \ t <tt> t <td style = \ "font-weight: bold; \"> ERROR </ td> \ n \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ n \ t \ t \ t \ t \ t \ t <td> <pre> Profile
http://hl7.org/fhir/StructureDefinition/MessageHeader, Element 'MessageHeader.event': minimum required = 1, but only found </ Td> </ td> </ td> </ td> </ td> <td> <td> </ td> </ td> <td> <td class = \ "font-weight: </ td> \ n \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t <td> <pre> Profile
http://hl7.org/fhir/StructureDefinition/MessageHeader, Element 'MessageHeader.timestamp': minimum required = 1, but only found 0 </ pre \ n \ t \ t \ t \ t \ t \ t \ t \ t \ t \ \ n \ t \ t \ t \ t <td style = \ "font-weight: bold; \"> ERROR </ td> \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ <td> <pre> Profile
http://hl7.org/fhir/StructureDefinition/MessageHeader, Element 'MessageHeader.destination.endpoint': minimum required = 1, but only found 0 </ pre> </ td> \ n \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ n <td style = \ "font-weight: bold; \"> ERROR \ n \ t \ t \ t \ t \ t <td> [MessageHeader.source] </ td> \ n \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ t \ : //
hl7.org/fhir/StructureDefinition/MessageHeader, Element 'MessageHeader.source.endpoint': minimum required = 1, but only found 0 </ pre> </ td> \ n \ t \ t \ t \ t \ \ n \ t \ t \ t \ t \ t \ t \ t \
},
"issue": [
{
"severity": "information"
"code": "informational",
"diagnostics": "Successfully created resource \"MessageHeader/420097/_history/1\" in 1ms"
What I need is to persist the patient on the FHIR server ....
If a FHIR server does not support the MessageHeader feature, can I insert only the patient?
Tks,
Paulo