source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Common/NhincDataTransformsLib/src/gov/hhs/fha/nhinc/transform/subdisc/HL7CustodianTransforms.java@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 1.7 KB
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package gov.hhs.fha.nhinc.transform.subdisc;
6
7import gov.hhs.fha.nhinc.nhinclib.NullChecker;
8import org.hl7.v3.COCTMT090003UVAssignedEntity;
9import org.hl7.v3.MFMIMT700701UV01Custodian;
10import org.hl7.v3.MFMIMT700711UV01Custodian;
11
12/**
13 *
14 * @author jhoppesc
15 */
16public 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}
Note: See TracBrowser for help on using the repository browser.