web stats

Mirth Connect

BAD ER7 serialization of A17 messages

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.1
  • Fix Version/s: 1.8.2
  • Component/s: Server
  • Operating System:
    Windows XP
  • Description:
    Hide
    The A17 HL7 message (swapping patients) creates an strange structure

    The problems seems to happen only from XML to ER7.

    This is an example of good A17 XML file transformation to ER7:

    MSH|^~\&|HIS|050101|CUIDADOS|050101|20080427092114||ADT^A17^ADT_A17|MENSAJE_EJEMPLO_ADT_A17_1|P|2.5|||AL|ER
    EVN||20080427092100||||20080427092100
    PID|1||12345679^^^MI^NNESP^^^^ESP&&ISO3166~AST12345679^^^MS^HC^^^^ESP&&ISO3166~100000^^^HIS^PI^^^^050101&&99CENTROMICASA||SaEZ^ALBERTO|TORRES|19750322|M|||C&NiNa Bonita&78^5^051159^5^5291^ESP^H^Maello||^PRN^PH^^^^921787865|||||||||||||ESP^EspaNa^ISO3166
    PV1|1|I|UE6D^117-^117-1^050101||||||||||||||||11111111111111^^^HOS^VN^^^^050101&&99CENTROMICASA
    PID|1||12345679^^^MI^NNESP^^^^ESP&&ISO3166~AST12345679^^^MS^HC^^^^ESP&&ISO3166~100000^^^HIS^PI^^^^050101&&99CENTROMICASA||SaEZ^ALBERTO|TORRES|19750322|M|||C&NiNa Bonita&78^5^051159^5^5291^ESP^H^Maello||^PRN^PH^^^^921787865|||||||||||||ESP^EspaNa^ISO3166
    PV1|1|I|UE6D^117-^117-1^050101||||||||||||||||11111111111111^^^HOS^VN^^^^050101&&99CENTROMICASA
    PID|2||2222222l^^^MI^NNESP^^^^ESP&&ISO3166~AST2222222^^^MS^HC^^^^ESP&&ISO3166~200000^^^HIS^PI^^^^050101&&99CENTROMICASA||SWAP2^SWAP1|SWAP3|19750322|M|||C&NiNa Bonita&78^4 Izquierda^051159^5^5291^ESP^H^Maello||^PRN^PH^^^^921787865|||||||||||||ESP^EspaNa^ISO3166
    PV1|2|I|UE6D^217-^217-2^050101||||||||||||||||2222222222222222^^^HOS^VN^^^^050101&&99CENTROMICASA
    PID22|2||2222222l^MI^NNESP^ESP&ISO3166~AST2222222^MS^HC^ESP&ISO3166~200000^HIS^PI^050101&99CENTROMICASA||SWAP2^SWAP1|SWAP3|19750322|M|||C&NiNa Bonita&78^4 Izquierda^051159^5^5291^ESP^H^Maello||PRN^PH^921787865|||||||||||||ESP^EspaNa^ISO3166
    PV122|2|I|UE6D^217-^217-2^050101||||||||||||||||2222222222222222^HOS^VN^050101&99CENTROMICASA
    Show
    The A17 HL7 message (swapping patients) creates an strange structure The problems seems to happen only from XML to ER7. This is an example of good A17 XML file transformation to ER7: MSH|^~\&|HIS|050101|CUIDADOS|050101|20080427092114||ADT^A17^ADT_A17|MENSAJE_EJEMPLO_ADT_A17_1|P|2.5|||AL|ER EVN||20080427092100||||20080427092100 PID|1||12345679^^^MI^NNESP^^^^ESP&&ISO3166~AST12345679^^^MS^HC^^^^ESP&&ISO3166~100000^^^HIS^PI^^^^050101&&99CENTROMICASA||SaEZ^ALBERTO|TORRES|19750322|M|||C&NiNa Bonita&78^5^051159^5^5291^ESP^H^Maello||^PRN^PH^^^^921787865|||||||||||||ESP^EspaNa^ISO3166 PV1|1|I|UE6D^117-^117-1^050101||||||||||||||||11111111111111^^^HOS^VN^^^^050101&&99CENTROMICASA PID|1||12345679^^^MI^NNESP^^^^ESP&&ISO3166~AST12345679^^^MS^HC^^^^ESP&&ISO3166~100000^^^HIS^PI^^^^050101&&99CENTROMICASA||SaEZ^ALBERTO|TORRES|19750322|M|||C&NiNa Bonita&78^5^051159^5^5291^ESP^H^Maello||^PRN^PH^^^^921787865|||||||||||||ESP^EspaNa^ISO3166 PV1|1|I|UE6D^117-^117-1^050101||||||||||||||||11111111111111^^^HOS^VN^^^^050101&&99CENTROMICASA PID|2||2222222l^^^MI^NNESP^^^^ESP&&ISO3166~AST2222222^^^MS^HC^^^^ESP&&ISO3166~200000^^^HIS^PI^^^^050101&&99CENTROMICASA||SWAP2^SWAP1|SWAP3|19750322|M|||C&NiNa Bonita&78^4 Izquierda^051159^5^5291^ESP^H^Maello||^PRN^PH^^^^921787865|||||||||||||ESP^EspaNa^ISO3166 PV1|2|I|UE6D^217-^217-2^050101||||||||||||||||2222222222222222^^^HOS^VN^^^^050101&&99CENTROMICASA PID22|2||2222222l^MI^NNESP^ESP&ISO3166~AST2222222^MS^HC^ESP&ISO3166~200000^HIS^PI^050101&99CENTROMICASA||SWAP2^SWAP1|SWAP3|19750322|M|||C&NiNa Bonita&78^4 Izquierda^051159^5^5291^ESP^H^Maello||PRN^PH^921787865|||||||||||||ESP^EspaNa^ISO3166 PV122|2|I|UE6D^217-^217-2^050101||||||||||||||||2222222222222222^HOS^VN^050101&99CENTROMICASA
  1. adt_a17.xml
    (8 kB)
    Alberto Torres
    01/Oct/08 8:35 AM
  2. adt_a17_malformed.er7
    (2 kB)
    Alberto Torres
    01/Oct/08 8:39 AM

Activity

Hide
Alberto Torres added a comment - 01/Oct/08 8:35 AM
ADT^A17_ADT_A17 (Swap pattients) based on HL7 schemas
Show
Alberto Torres added a comment - 01/Oct/08 8:35 AM ADT^A17_ADT_A17 (Swap pattients) based on HL7 schemas
Hide
Alberto Torres added a comment - 01/Oct/08 8:39 AM
THe previous file, transformed to er7 by mirth (checking the "strict parser" and "handle repetitions" to on)
Show
Alberto Torres added a comment - 01/Oct/08 8:39 AM THe previous file, transformed to er7 by mirth (checking the "strict parser" and "handle repetitions" to on)
Hide
Jacob Brauer added a comment - 10/Oct/08 6:30 PM
According to the HL7 v2.5 specification for A17, the segment grammar should be:

MSH
{[SFT]}
EVN
PID
[PD1]
PV1
[PV2]
{[DB1]}
{[OBX]}
PID
[PD1]
PV1
[PV2]
{[DB1]}
{[OBX]}

Hapi is a strict hl7 parser that requires you to follow this grammar. Your test message has a third PID and PV1 segment. This is not allowed so the strict parser fails on it, giving the erroneous output.
Show
Jacob Brauer added a comment - 10/Oct/08 6:30 PM According to the HL7 v2.5 specification for A17, the segment grammar should be: MSH {[SFT]} EVN PID [PD1] PV1 [PV2] {[DB1]} {[OBX]} PID [PD1] PV1 [PV2] {[DB1]} {[OBX]} Hapi is a strict hl7 parser that requires you to follow this grammar. Your test message has a third PID and PV1 segment. This is not allowed so the strict parser fails on it, giving the erroneous output.
Hide
Alberto Torres added a comment - 10/Oct/08 6:48 PM
The problem is converting from XML to ER7. The problem is the bad ER7 file generated (with a third PID, PV1 and PID22).
Show
Alberto Torres added a comment - 10/Oct/08 6:48 PM The problem is converting from XML to ER7. The problem is the bad ER7 file generated (with a third PID, PV1 and PID22).
Hide
Jacob Brauer added a comment - 10/Oct/08 8:47 PM
It looks like it is an issue with hapi, which we do not currently have control over. Will look more into this later.
Show
Jacob Brauer added a comment - 10/Oct/08 8:47 PM It looks like it is an issue with hapi, which we do not currently have control over. Will look more into this later.
Hide
Gerald Bortis added a comment - 13/Oct/08 11:46 AM
This seems to be an issue with HAPI's parser. I tested the XML message with the 0.5.1 release using the test bench and the resulting ER7 was also invalid. I will open an issue on the HAPI project website.
Show
Gerald Bortis added a comment - 13/Oct/08 11:46 AM This seems to be an issue with HAPI's parser. I tested the XML message with the 0.5.1 release using the test bench and the resulting ER7 was also invalid. I will open an issue on the HAPI project website.
Hide
Gerald Bortis added a comment - 05/Aug/09 9:59 AM
This issue has been fixed in HAPI 0.6. Look into upgrading to this version.
Show
Gerald Bortis added a comment - 05/Aug/09 9:59 AM This issue has been fixed in HAPI 0.6. Look into upgrading to this version.
Hide
Gerald Bortis added a comment - 29/Sep/09 9:59 AM
Upgraded HAPI library from 0.5 to 0.6. Deleted all custom HAPI classes from source tree.
Show
Gerald Bortis added a comment - 29/Sep/09 9:59 AM Upgraded HAPI library from 0.5 to 0.6. Deleted all custom HAPI classes from source tree.

People

Dates

  • Created:
    01/Oct/08 8:33 AM
    Updated:
    29/Sep/09 9:59 AM
    Resolved:
    29/Sep/09 9:59 AM