Ashutosh sent this question to me directly, but included the message he was dealing with complete. Given the MSH I was able to ascertain that the message said it was HL7 version 2.2, and this resulted in the XML representation matching closer with the standard (no PID-3 lists catered for, repeating telephone numbers of TN type, not XTN which has additional components), than what is available in the parsed object.
Extra components and the like don't end up in the XML when you use a simple context. There may be more options to adjust this in the XML representation of such things, but I'm not dealing with the XML representation every day. Is anyone else able to comment? Thanks Ian Vowles Systems Integration Team Queensland Department of Health Australia From: Satyam, Ashutosh [mailto:ashutosh.sat...@ca.com] Sent: Tuesday, 11 August 2015 9:12 AM To: hl7api-devel@lists.sourceforge.net Subject: [HAPI-devel] Handling Repetitions in fields Hi, I am using HAPI 2.2 library. The goal is to convert HL7 message to XML representation. Here is my challenges with how HAPI is dealing with repetitions. Sample HL7 message - with Field repetition in bold PID:1::952918621~989864122::Cloaked;WAUA;;""::20141211155123:M::1;*WHITE;HL70005;1;*WHITE;99RAC:424 Clark Cir;;Rougon;KY;70773;;P;;034::5555412;PRN;PH;;;;5559782;;;;;8592701727~5551477;ORN;PH;;;;5556958;;;;;""~5551477;ORN;CP;;;;5556958;;;;;""~;NET;X.400;:5555225;WPN;PH;;;;5554747;;;;;"":ENG;ENGLISH;HL70296;ENG;ENGLISH;99CLAN:M:035:539073518;;;A:90000000:::2;NOT HISPANIC/LATINO;HL70189;2;NOT HISPANIC/LATINO;99ETH:::::N:::N:N:::::::::::::::::::N HAPI XML Output (for the repeated fields in bold) <PID.3> <CM_PAT_ID.1>952918621</CM_PAT_ID.1> </PID.3> <PID.3> <CM_PAT_ID.1>989864122</CM_PAT_ID.1> </PID.3> With the above representation it looks like as if it's a component value then the field value itself. Is it possible to get XML output as mentioned below or something on similar lines? I am looking for a generic solution. <PID.3-1>952918621</PID.3-1> <PID.3-2>989864122</PID.3-2> Thanks Ashutosh ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. **********************************************************************************
------------------------------------------------------------------------------
_______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel