Hi,

I'm trying to create an XML document containting the results of a 'Find
Candidates' search,
I have found a way to create a single PID (see output below) with the
following, but I haven't
found a way to create more than 1 pid. Any pointers appreciated :)

Thanks,

Eamonn

PID pid = _response.getQUERY_RESPONSE().getPID();
pid.getPatientName(0).getFamilyName().getSurname().setValue("BUNNY");
pid.getPatientName(0).getGivenName().setValue("BUGS");


<?xml version="1.0"?>
<RSP_K22 xmlns="urn:hl7-org:v2xml">
    <MSH/>
    <RSP_K22.QUERY_RESPONSE>
        <PID>
            <PID.5>
                <XPN.1>
                    <FN.1>BUNNY</FN.1>
                </XPN.1>
                <XPN.2>BUGS</XPN.2>
            </PID.5>
        </PID>
    </RSP_K22.QUERY_RESPONSE>
</RSP_K22>
------------------------------------------------------------------------------

_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to