We are using HAPI version 0.4.3. We are trying to generate QBP_Qnn
messages (specifically one that conforms to Chapter 5 Query/Response
Conformance Statement).
We have the following code snippet:
private Message buildQBP_Q22Message(QueryBrokerMessage msg) {
QBP_Qnn message = new QBP_Qnn();
msg.setSendingApplication("PCR");
msg.setProcessingID("D");
msg.setSendingFacility("AHW");
buildMSH(message.getMSH(), msg, EVENT_CODE_Q22,
MESSAGE_QBP_Q22);
Member member = msg.getMember();
try {
QPD qpd = message.getQPD();
qpd.getMessageQueryName().getIdentifier().setValue(EVENT_CODE_Q22);
qpd.getMessageQueryName().getText().setValue(
"Find Candidates");
qpd.getQueryTag().setValue("my_tag");
QIP qip = new QIP();
qpd.getUserParametersInsuccessivefields().setData(qip);
Terser t = new Terser(message);
t.set("/QPD-3(0)/QIP-1",
"@"+getSegmentFieldNames(member));
t.set("/QPD-3(0)/QIP-2", getValues(member));
This code produces the desired:
<QPD.3><QIP.1>@PID5.1.1</QIP.1><QIP.2>Anders</QIP.2></QPD.3>
But when we try to put the second QIP field in like this:
t.set("/QPD-3(1)/QIP-1", "@PID5.2");
t.set("/QPD-3(1)/QIP-2", "JOHN");
We get generated UNKNOWNs from the Terser like so:
<QPD.3><UNKNOWN.1>@PID5.2</UNKNOWN.1><UNKNOWN.2>JOHN</UNKNOWN.2></QPD.3>
We suspect the Terser lost track of the QIP datatype but we don't know
why. Does anyone have an insight into building QBP_Qnn (Q22 type)
message queries?
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
you have received this email in error please notify the system manager. This
message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel