Unfortunately, the query response does not conform to the structure of
ADR_A19, either. It appears to have an entirely custom structure, but
calls itself ACK. We managed to extract the segments using
"Message.getNames()" followed by "Message.get(segmentName)" for each
segment name. Each segment (except OBR-32) had a standard structure so we
could model these using HAPI segment classes.
Derek
On Wed, Aug 1, 2012 at 3:14 AM, Jens Kristian Villadsen <j...@c3a.dk> wrote:
> The response should not be an ACK, but instead a ADR_A19 message. From
> this structure you can access your required segments
>
> 2012/8/1 Derek Mahar <derek.ma...@intelerad.com>
>
>> I've just learned that the message that the remote system sends in
>> response to QRY_A19 does not conform to the HL7 standard and includes
>> invalid segments QRD, PID, PV1, ORC, OBR, ORC2, and OBR2. Fortunately,
>> HAPI does parse these non-standard segments and stores them in the message
>> structure. How may I extract these segments using the more abstract Group
>> or Structure interfaces?
>>
>> Derek
>>
>>
>> On Tue, Jul 31, 2012 at 5:33 PM, Derek Mahar
>> <derek.ma...@intelerad.com>wrote:
>>
>>> Given a QRY_A19 query message, what approach do you recommend to
>>> decompose the contents of the response Message from
>>> "Initiator.sendAndReceive(Message)"? The debugger reports that the type of
>>> the response is ACK, but ACK does not offer access to additional segments
>>> in the message such as PID, ORC, OBR. Should I treat the contents instead
>>> as a Structure or Group? In particular, how might I retrieve the second
>>> OBR segment in a message that contains a pair of ORC and OBR segments?
>>>
>>> References:
>>>
>>> Class ACK
>>>
>>> http://hl7api.sourceforge.net/v23/apidocs/ca/uhn/hl7v2/model/v23/message/ACK.html
>>>
>>> Interface Group
>>> http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/model/Group.html
>>>
>>> Method Initiator.sendAndReceive(Message)
>>>
>>> http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/app/Initiator.html#sendAndReceive(ca.uhn.hl7v2.model.Message)
>>>
>>> Class Message
>>>
>>> http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/app/Initiator.html#sendAndReceive(ca.uhn.hl7v2.model.Message
>>>
>>> Class QRY_A19
>>>
>>> http://hl7api.sourceforge.net/v23/apidocs/src-html/ca/uhn/hl7v2/model/v23/message/QRY_A19.html
>>>
>>> Interface Structure
>>>
>>> http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/model/Structure.html
>>>
>>> Thank you,
>>>
>>> Derek
>>>
>>
--
Derek Mahar
Senior Software Developer
Intelerad Medical Systems Incorporated
895 de la Gauchetiere W. Suite 400
Montreal, QC, Canada, H3B 4G1
Tel: 514.931.6222 x7754
Fax: 514.931.4653
derek.ma...@intelerad.com
www.intelerad.com
--
This email or any attachments may contain confidential or legally
privileged information intended for the sole use of the addressees. Any
use, redistribution, disclosure, or reproduction of this information,
except as intended, is prohibited. If you received this email in error,
please notify the sender and remove all copies of the message, including
any attachments.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel