[507] | 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 javax.xml.bind.JAXBElement;
|
---|
| 9 | import org.hl7.v3.*;
|
---|
| 10 |
|
---|
| 11 | /**
|
---|
| 12 | *
|
---|
| 13 | * @author Jon Hoppesch
|
---|
| 14 | */
|
---|
| 15 | public class HL7PRPA201305Transforms {
|
---|
| 16 |
|
---|
| 17 | public static PRPAIN201305UV createPRPA201305 (PRPAMT201301UVPatient patient, String senderOID, String receiverOID, String localDeviceId) {
|
---|
| 18 | PRPAIN201305UV result = new PRPAIN201305UV();
|
---|
| 19 |
|
---|
| 20 | // Create the 201305 message header fields
|
---|
| 21 | result.setITSVersion(HL7Constants.ITS_VERSION);
|
---|
| 22 | result.setId(HL7MessageIdGenerator.GenerateHL7MessageId(localDeviceId));
|
---|
| 23 | result.setCreationTime(HL7DataTransformHelper.CreationTimeFactory());
|
---|
| 24 | result.setInteractionId(HL7DataTransformHelper.IIFactory(HL7Constants.INTERACTION_ID_ROOT, "PRPA_IN201305UV"));
|
---|
| 25 | result.setProcessingCode(HL7DataTransformHelper.CSFactory("P"));
|
---|
| 26 | result.setProcessingModeCode(HL7DataTransformHelper.CSFactory("R"));
|
---|
| 27 | result.setAcceptAckCode(HL7DataTransformHelper.CSFactory("AL"));
|
---|
| 28 |
|
---|
| 29 | // Create the Sender
|
---|
| 30 | result.setSender(HL7SenderTransforms.createMCCIMT000100UV01Sender(senderOID));
|
---|
| 31 |
|
---|
| 32 | // Create the Receiver
|
---|
| 33 | result.getReceiver().add(HL7ReceiverTransforms.createMCCIMT000100UV01Receiver(receiverOID));
|
---|
| 34 |
|
---|
| 35 | result.setControlActProcess(createQUQIMT021001UV01ControlActProcess(patient, localDeviceId));
|
---|
| 36 |
|
---|
| 37 | return result;
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | public static PRPAIN201305UVQUQIMT021001UV01ControlActProcess createQUQIMT021001UV01ControlActProcess (PRPAMT201301UVPatient patient, String localDeviceId) {
|
---|
| 41 | PRPAIN201305UVQUQIMT021001UV01ControlActProcess controlActProcess = new PRPAIN201305UVQUQIMT021001UV01ControlActProcess();
|
---|
| 42 |
|
---|
| 43 | controlActProcess.setMoodCode("EVN");
|
---|
| 44 |
|
---|
| 45 | controlActProcess.setCode(HL7DataTransformHelper.CDFactory("PRPA_TE201305UV", HL7Constants.INTERACTION_ID_ROOT));
|
---|
| 46 |
|
---|
| 47 | controlActProcess.setQueryByParameter(HL7QueryParamsTransforms.createQueryParams(patient, localDeviceId));
|
---|
| 48 |
|
---|
| 49 | return controlActProcess;
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | }
|
---|