The area which may be leading you astray in the order is that according to the
standard, the section that HAPI implements as the ORDER section MUST contain an
ORC segment before a single OBR or RQD or etc. As a result, two OBR segments
without corresponding ORC segments are considered non-standard.
If your message looks like this:
MSH|^~\&|TEST|TEST|LAB|HH Lab|20120209095111||ORM^O01|240679|P|2.3|||NE|NE
PID|||9476||J^M^A||19711229|M||A
PV1|||||||^N.N.
ORC|NW|240679|||||^^^^^R^Y||20120209095111
OBR|1|240679||PXUAMACR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
ORC|NW|240679|||||^^^^^R^Y||20120209095111
OBR|2|240679||BNZUR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
CTI|205631|SCR|D001
The printstructure looks like this (patient section snipped):
8-<
ORDER (start)
{
ORC - ORC|NW|240679|||||^^^^^R^Y||20120209095111
ORDER_DETAIL (start)
[
OBR -
OBR|1|240679||PXUAMACR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
RQD - Not populated
RQ1 - Not populated
RXO - Not populated
ODS - Not populated
ODT - Not populated
[ { NTE } ] - Not populated
[ CTD ] - Not populated
[ { DG1 } ] - Not populated
OBSERVATION (start)
[{
OBX - Not populated
[ { NTE } ] - Not populated
}]
OBSERVATION (end)
]
ORDER_DETAIL (end)
[ { FT1 } ] - Not populated
[ { CTI } ] - Not populated
[ BLG ] - Not populated
}
{
ORC - ORC|NW|240679|||||^^^^^R^Y||20120209095111
ORDER_DETAIL (start)
[
OBR -
OBR|2|240679||BNZUR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
RQD - Not populated
RQ1 - Not populated
RXO - Not populated
ODS - Not populated
ODT - Not populated
[ { NTE } ] - Not populated
[ CTD ] - Not populated
[ { DG1 } ] - Not populated
OBSERVATION (start)
[{
OBX - Not populated
[ { NTE } ] - Not populated
}]
OBSERVATION (end)
]
ORDER_DETAIL (end)
[ { FT1 } ] - Not populated
[ { CTI } ] - CTI|205631|SCR|D001
[ BLG ] - Not populated
}
ORDER (end)
ORM_O01 (end)
You can loop through the orders to get at the OBR segments like this:
for (int i = 0; i < input.getORDERReps(); i++) {
System.out.println(input.getORDER(i).getORDER_DETAIL().getOBR().getObr4_UniversalServiceIdentifier().getCe1_Identifier());
}
Does make me wonder, since you can only have one OBR per ORC, if the SET_ID is
supposed to increment or be 1 each time. Does anyone really look at SET_ID's?
Hope this helps
Ian
>>> Sharath Komarla <sharath.koma...@parexel.com> 14/02/13 23:27 >>>
Hi,
I have what seems like should be a simple question but I am really struggling
with this.
I have an ORM message like this:
MSH|^~\&|TEST|TEST|LAB|HH Lab|20120209095111||ORM^O01|240679|P|2.3|||NE|NE
PID|||9476||J^M^A||19711229|M||A
PV1|||||||^N.N.
ORC|NW|240679|||||^^^^^R^Y||20120209095111
OBR|1|240679||PXUAMACR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
OBR|2|240679||BNZUR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
CTI|205631|SCR|D001
I'm trying to parse this and pull out the two OBR's but I'm having a tough time
getting to the two OBR's. Only the first OBR seems to be visibile. I've tried
changing the 2.3 to 2.4,2.5,2.6 etc.
When I do a printStructure on the message, I see the following.
<snip>
ORDER (start)
{
ORC - ORC|NW|240679|||||^^^^^R^Y||20120209095111
ORDER_DETAIL (start)
[
OBR -
OBR|1|240679||PXUAMACR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
[ { OBR2 } ] (non-standard) -
OBR|2|240679||BNZUR|||201202090945||||O||||Urine^^01||||||||||||^^^^^R^Y
<snip>
]
ORDER_DETAIL (end)
<snip>
This seems to match the 2.3-2.6 HAPI structure API's. However, in the HL7 spec,
I see:
MESSAGE ORM - ORDER MESSAGE
MSH
<snip>
{
ORC
[
[
{
ANY OF OBR, ODS, ODT, RQD AND RXO
}
]
[ RQ1 ]
]
<snip>
}
Which makes me think that the OBR should be repeatable.
I feel like I am missing or am misunderstanding something. I would really
appreciate any help I can get.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Hl7api-devel mailing list
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.
**********************************************************************************
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel