1 | /*
|
---|
2 | * To change this template, choose Tools | Templates
|
---|
3 | * and open the template in the editor.
|
---|
4 | */
|
---|
5 |
|
---|
6 | package gov.hhs.fha.nhinc.transform.subdisc;
|
---|
7 |
|
---|
8 | import org.hl7.v3.*;
|
---|
9 | import javax.xml.bind.JAXBElement;
|
---|
10 | import java.util.ArrayList;
|
---|
11 |
|
---|
12 | /**
|
---|
13 | *
|
---|
14 | * @author mflynn02
|
---|
15 | */
|
---|
16 | public class HL7PRPA201309Transforms {
|
---|
17 | public static PRPAIN201309UV createPRPA201309 (String homeCommunityId, String patientId) {
|
---|
18 | PRPAIN201309UV result = new PRPAIN201309UV();
|
---|
19 |
|
---|
20 | // For Audit, need ControlActProcess.queryParameters.ParameterList.paitentIdentified.root
|
---|
21 | // and .extension.
|
---|
22 | PRPAIN201309UVQUQIMT021001UV01ControlActProcess controlActProcess = new PRPAIN201309UVQUQIMT021001UV01ControlActProcess();
|
---|
23 | PRPAMT201307UVQueryByParameter queryParameter = new PRPAMT201307UVQueryByParameter();
|
---|
24 | PRPAMT201307UVParameterList parameterList = new PRPAMT201307UVParameterList();
|
---|
25 | PRPAMT201307UVPatientIdentifier patientIdentifier = new PRPAMT201307UVPatientIdentifier();
|
---|
26 | patientIdentifier.getValue().add(0, HL7DataTransformHelper.IIFactory(homeCommunityId, patientId));
|
---|
27 | parameterList.getPatientIdentifier().add(patientIdentifier);
|
---|
28 | queryParameter.setParameterList(parameterList);
|
---|
29 |
|
---|
30 | org.hl7.v3.ObjectFactory factory = new org.hl7.v3.ObjectFactory();
|
---|
31 | JAXBElement oJaxbElement = factory.createPRPAIN201309UVQUQIMT021001UV01ControlActProcessQueryByParameter(queryParameter);
|
---|
32 |
|
---|
33 | controlActProcess.setQueryByParameter(oJaxbElement);
|
---|
34 | result.setControlActProcess(controlActProcess);
|
---|
35 |
|
---|
36 | return result;
|
---|
37 | }
|
---|
38 | }
|
---|