Announcement

Collapse
No announcement yet.

Error converting FHIR resource from XML to JSON

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error converting FHIR resource from XML to JSON

    Hi!

    Using Mirth v3.9, I'm trying to feed a FHIR server with an HL7 feed. I'd like to receive SIU messages and create the appointment resources in my FHIR server. The process would be:
    Receive HL7 SIU -> Get Patient resource from FHIR server -> Create Appointment resource -> Post it to the FHIR server

    I created a FHIR sender destination to get the patient resource from the FHIR server but I receive an error:
    "Error converting FHIR resource from XML to JSON [DataFormatException: DataFormatException at [[row,col {unknown-source}]: [1,1]]: Unknown resource name "HL7Message" (this name is not known in FHIR version "R5")]"

    I'm now not too sure what I have to do:
    - Am I using the right approach?
    - How can I convert the internal XML into FHIR resource?

    I attached my sample channel.

    Thanks for your help!

    Jean-Luc
    Attached Files

  • #2
    I think the sender needs JSON. See attached. Note empty JSON object on source side transformer outbound template and under datatypes button check types.



    Attached Files
    Mirth 3.8.0 / PostgreSQL 11 / Ubuntu 18.04
    Diridium Technologies, Inc.
    https://diridium.com

    Comment


    • #3
      You are likely using the msg variable with the initial SIU E4X object, not the msg with the FHIR server response.
      However, I wonder why do you need a Patient resource at all if you are about to send the Appointment back to the same FHIR server. You may use a logical reference to the Patient in the Appointment.participant.actor element and it's the FHIR server responsibility to replace it with the literal reference.

      Comment


      • #4
        I'll defer to Shamil on the logic here, I was just cleaning up your channel so it actually makes a call correctly.
        Mirth 3.8.0 / PostgreSQL 11 / Ubuntu 18.04
        Diridium Technologies, Inc.
        https://diridium.com

        Comment

        Working...
        X