Announcement

Collapse
No announcement yet.

Converting HL7 v.3 to a custom XML

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

  • Converting HL7 v.3 to a custom XML

    I am evaluating MIRTH Connect as a platform for exchanging HL7 messages. I am fairly new to this framework and still trying to figure out the benefits it can provide.
    For example, I would like to convert the XML MIRTH generates from a HL7 2.x message into my own XML format. Is there an easy way to do that in MIRTH Connect Administrator without writing a javascript?
    I tried to do that by providing my custom XML in the outbound message template. I then added mappings between HL7 elements and my custom XML tags. It worked fine as long as the number of repeating elements (such as OBX) in the HL7 message is always the same but it is not the case.
    Having that said, I still do not know how to do that and I would much appreciate if someone would point me to the right direction.

  • #2
    repeating elements in XML

    Hi,

    I am also facing a similar kind of problem. I am mapping a XML message to ccd. I am using javascript in the transformer. Please let me know if you come across any solution and I'll do the same.

    here is the code I have written in the transformer.

    while(i>=0){
    tmp.*::['recordTarget'].*::['patientRole'].*::['telecom'] = new XML("<telecom/>");
    var temp = msg['Header']['PatientCareReport']['ePatient']['ePatient.18'][i].toString();
    if(temp == null)
    {
    tmp.*::['recordTarget'].*::['patientRole'].*::['telecom']['@value']= "NA";
    }
    else{
    tmp.*::['recordTarget'].*::['patientRole'].*::['telecom']['@value'] = temp;
    }
    i++;
    }

    And the error I am facing is:
    TypeError: Cannot call method "toString" of undefined.

    Comment

    Working...
    X