[507] | 1 | /*
|
---|
| 2 | * To change this template, choose Tools | Templates
|
---|
| 3 | * and open the template in the editor.
|
---|
| 4 | */
|
---|
| 5 | package gov.hhs.fha.nhinc.patientcorrelationservice.parsers.helpers;
|
---|
| 6 |
|
---|
| 7 | import gov.hhs.fha.nhinc.nhinclib.NullChecker;
|
---|
| 8 | import org.hl7.v3.CommunicationFunctionType;
|
---|
| 9 | import org.hl7.v3.II;
|
---|
| 10 | import org.hl7.v3.MCCIMT000300UV01Device;
|
---|
| 11 | import org.hl7.v3.MCCIMT000300UV01Receiver;
|
---|
| 12 | import org.hl7.v3.MCCIMT000300UV01Sender;
|
---|
| 13 | import org.hl7.v3.MCCIMT000300UV01Sender;
|
---|
| 14 | import org.hl7.v3.TELExplicit;
|
---|
| 15 |
|
---|
| 16 | /**
|
---|
| 17 | *
|
---|
| 18 | * @author rayj
|
---|
| 19 | */
|
---|
| 20 | public class SenderReceiverHelperMCCIMT000300UV01 {
|
---|
| 21 |
|
---|
| 22 | public static MCCIMT000300UV01Sender CreateSender(II senderDeviceId) {
|
---|
| 23 | MCCIMT000300UV01Sender sender = new MCCIMT000300UV01Sender();
|
---|
| 24 | sender.setTypeCode(CommunicationFunctionType.SND);
|
---|
| 25 | sender.setDevice(createDevice(senderDeviceId));
|
---|
| 26 | return sender;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | public static MCCIMT000300UV01Sender CreateSender() {
|
---|
| 30 | return CreateSender(null);
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public static MCCIMT000300UV01Receiver CreateReceiver(II receiverDeviceId) {
|
---|
| 34 | MCCIMT000300UV01Receiver receiver = new MCCIMT000300UV01Receiver();
|
---|
| 35 | receiver.setTypeCode(CommunicationFunctionType.RCV);
|
---|
| 36 | receiver.setDevice(createDevice(receiverDeviceId));
|
---|
| 37 | return receiver;
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | public static MCCIMT000300UV01Receiver CreateReceiver() {
|
---|
| 41 | return CreateReceiver(null);
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | private static MCCIMT000300UV01Device createDevice(II deviceId) {
|
---|
| 45 |
|
---|
| 46 | MCCIMT000300UV01Device device = new MCCIMT000300UV01Device();
|
---|
| 47 | device.setDeterminerCode(Constants.determinerCodeValue);
|
---|
| 48 |
|
---|
| 49 | device.getId().add(deviceId);
|
---|
| 50 |
|
---|
| 51 | // TELExplicit tel = new TELExplicit();
|
---|
| 52 | // tel.getNullFlavor().add("NA");
|
---|
| 53 | // device.getTelecom().add(tel);
|
---|
| 54 |
|
---|
| 55 | return device;
|
---|
| 56 | }
|
---|
| 57 | }
|
---|