1 | /*
|
---|
2 | * To change this template, choose Tools | Templates
|
---|
3 | * and open the template in the editor.
|
---|
4 | */
|
---|
5 | package gov.hhs.fha.nhinc.transform.subdisc;
|
---|
6 |
|
---|
7 | import gov.hhs.fha.nhinc.nhinclib.NullChecker;
|
---|
8 | import org.hl7.v3.COCTMT090003UVAssignedEntity;
|
---|
9 | import org.hl7.v3.MFMIMT700701UV01Custodian;
|
---|
10 | import org.hl7.v3.MFMIMT700711UV01Custodian;
|
---|
11 |
|
---|
12 | /**
|
---|
13 | *
|
---|
14 | * @author jhoppesc
|
---|
15 | */
|
---|
16 | public class HL7CustodianTransforms {
|
---|
17 |
|
---|
18 | public static MFMIMT700701UV01Custodian createMFMIMT700701UV01Custodian(String localDeviceId) {
|
---|
19 | MFMIMT700701UV01Custodian custodian = new MFMIMT700701UV01Custodian();
|
---|
20 |
|
---|
21 | if (NullChecker.isNullish(localDeviceId)) {
|
---|
22 | localDeviceId = getDefaultLocalDeviceId();
|
---|
23 | }
|
---|
24 |
|
---|
25 | custodian.setAssignedEntity(createCOCTMT090003UVAssignedEntity(localDeviceId));
|
---|
26 |
|
---|
27 | return custodian;
|
---|
28 | }
|
---|
29 |
|
---|
30 | public static COCTMT090003UVAssignedEntity createCOCTMT090003UVAssignedEntity(String localDeviceId) {
|
---|
31 | COCTMT090003UVAssignedEntity entity = new COCTMT090003UVAssignedEntity();
|
---|
32 |
|
---|
33 | if (NullChecker.isNullish(localDeviceId)) {
|
---|
34 | localDeviceId = getDefaultLocalDeviceId();
|
---|
35 | }
|
---|
36 | entity.getId().add(HL7DataTransformHelper.IIFactory(localDeviceId));
|
---|
37 |
|
---|
38 | return entity;
|
---|
39 | }
|
---|
40 |
|
---|
41 | static MFMIMT700711UV01Custodian createMFMIMT700711UV01Custodian(String localDeviceId) {
|
---|
42 | MFMIMT700711UV01Custodian custodian = new MFMIMT700711UV01Custodian();
|
---|
43 |
|
---|
44 | if (NullChecker.isNullish(localDeviceId)) {
|
---|
45 | localDeviceId = getDefaultLocalDeviceId();
|
---|
46 | }
|
---|
47 | custodian.setAssignedEntity(createCOCTMT090003UVAssignedEntity(localDeviceId));
|
---|
48 |
|
---|
49 | return custodian;
|
---|
50 | }
|
---|
51 |
|
---|
52 | private static String getDefaultLocalDeviceId() {
|
---|
53 | return HL7Constants.DEFAULT_LOCAL_DEVICE_ID;
|
---|
54 | }
|
---|
55 | }
|
---|