I can second James’ additional alternatives, having successfully coded several
custom structures, and also pulled out Z-segments via string manipulation
before parsing into a standard HAPI structure.
Hope it goes well
Ian
From: James Agnew [mailto:jamesag...@gmail.com]
Sent: Wednesday, 12 November 2014 9:15 AM
To: Singh, Brijesh
Cc: hl7api-devel@lists.sourceforge.net
Subject: Re: [HAPI-devel] DG1 segments repetition.
Hi Brijesh,
You're right, the custom segments are causing an issue since the parser csn't
see subsequent DG1 repetitions as actual repetitions.
The easiest way to do this would be to call
MessageInstance.getAll("DG1")
followed by
MessageInstance.getAll("DG12")
followed by
MessageInstance.getAll("DG13")
etc.. Basically HAPI creates nonstandard segments for each of the following
DG1s by adding a sequential number to the end.
If you wanted to be more fancy, you could create a custom structure that has a
group containing the custom segment as well, or you could override the parser
and use string maniulation to remove the Z-segments before parsing.. But the
method above is definitely the least work.
Incidentally MessageInstance.getNames() will give you the names of all the
segments (including the "DG1[number]" ones) so you will know how many there are.
Cheers,
James
On Tue, Nov 11, 2014 at 2:06 PM, Singh, Brijesh
<sin...@advisory.com<mailto:sin...@advisory.com>> wrote:
Hi – I’m using HAPI library(2.2) to parse the below message and calling the
method getAll(“DG1”) ( Structure[] Structs = MessageInstance.getAll(“DG1”) ) to
retrieve the DG1 segments. I’m having issues getting all DG1 segments. From the
below message, able to retrieve only one DG1 segment. Looks like the custom
segment (ZDG) is in the middle of repeating DG1 segments and breaking the
repetition.
Can you please suggest if I can use other API methods to retrieve all DG1 ( 3
in the below case) ignoring ZDG segments?
Thanks for your help.
MSH|^~\&|SCM|SCM|HL7ADT||20130114001147||ADT^A08|8456356603013|P|2.3
PID||5012223067<tel:5012223067>^^^Corporate Num|50730137^^^EAST
MRN|300000003^^^EID|Moose^Bullwinkle^J||19091011|F||1|1 Roanoke St^^New
York^NY^11111^USA^Home||(888)111-1111^^^^^888^111-1111^^Home|^^^^^^^^Cellular|ENG|W|CA|3000000039^^^EAST
MRN|111165812|11119791||Hispanic Origin
NK1|1|Bugs^Bee|19||(888)111-1111^^^^^888^111-1111^^Home||Emergency
PV1||E|ERM^^^EAST
MRN|Emergency|||N20714^Chris^Bob^Bruce~1907828742^^^^^^^^^^^^NPI|||REH||||Non-Health
Care||0||Emergency|3000000039^^^EAST
MRN|||||||||||||||||||||Clean||||20130115001000
PV2||^N|ABDOMINAL PAIN NAUSEA COLD SYM OBX|1|ST|Intolerances||None
Entered||||||X
DG1|1||^CHEST PAIN DEHYDRATION NAUSE|CHEST PAIN DEHYDRATION NAUSE||Visit
Reason
ZDG|1||^CHEST PAIN DEHYDRATION NAUSE|CHEST PAIN DEHYDRATION NAUSE||Visit
Reason
DG1|2||^CHEST PAIN DEHYDRATION NAUSE|CHEST PAIN DEHYDRATION NAUSE||Visit
Reason
ZDG|2||^CHEST PAIN DEHYDRATION NAUSE|CHEST PAIN DEHYDRATION NAUSE||Visit
Reason
DG1|3||^CHEST PAIN DEHYDRATION NAUSE|CHEST PAIN DEHYDRATION NAUSE||Visit
Reason
ZDG|3||^CHEST PAIN DEHYDRATION NAUSE|CHEST PAIN DEHYDRATION NAUSE||Visit
Reason
OBX|2|ST|Allergies||See Allergy Icon/Pt Info Tab||||||X
AL1|1|Drug|quinolone antibiotics^^^^23^Multum|Swelling|facial swelling
ZAL||||AL|Swelling
AL1|2|Drug|quinolone topicals^^^^70^Multum|Swelling|facial swelling
ZAL||||AL|Swelling
IN1|1||BLUE|BLUE CROSS^MEDICARE|PO BOX
880031^^Boston^MA^02201||(888)111-1111^^^^^888^111-1111||||||||Medicare|Bugs^Bunny^M|18|19000928|1
Roanoke St^^New York^NY^11111^USA||||||||||||||||||||||||Male||||||1112223067
IN2||475846521|DISABLED||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||(888)111-1111^^Phone^^^888^111-1111|||||||DISABLED
Regards,
Brijesh Singh
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net<mailto:Hl7api-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/hl7api-devel
********************************************************************************
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.
**********************************************************************************
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel