HL7DataTransformHelper { public static CD CDFactory(String code) { return CDFactory(code, null); }  static II IIFactory(String root); static II IIFactory(String root, String extension); static II IIFactory(String root, String extension, String assigningAuthorityName); static II IIFactoryCreateNull(); static CS CSFactory(String code); static CE CEFactory(String code); static CD CDFactory(String code); static CD CDFactory(String code, String codeSystem); static CD CDFactory(String code, String codeSystem, String displayName); static TSExplicit TSExplicitFactory(String value); static TSExplicit creationTimeFactory(); static ENExplicit convertPNToEN(PNExplicit pnName); static PNExplicit convertENtoPN(ENExplicit value); static ENExplicit createEnExplicit(String firstName, String middleName, String lastName, String title,
            String suffix); static PNExplicit createPNExplicit(String firstName, String lastName); static PNExplicit createPNExplicit(String firstName, String middleName, String lastName); static PNExplicit createPNExplicit(String firstName, String middleName, String lastName, String title,
            String suffix); static ADExplicit createADExplicit(boolean notOrdered, String street, String city, String state,
            String zip); static ADExplicit createADExplicit(String street, String city, String state, String zip); static ADExplicit createADExplicit(boolean notOrdered, String street, String street1, String city,
            String state, String zip); static ADExplicit createADExplicit(String street, String street1, String city, String state, String zip); static TELExplicit createTELExplicit(String value);  }
@Test public void CDFactory() { String code = "CONNECT"; String codeSystem = "CONNECTDomain"; String displayName = "CONNECT CD"; CD cd = new CD(); HL7DataTransformHelper helper = new HL7DataTransformHelper(); cd = helper.CDFactory(code, codeSystem, displayName); assertEquals(cd.getCode(), "CONNECT"); assertEquals(cd.getCodeSystem(), "CONNECTDomain"); assertEquals(cd.getDisplayName(), "CONNECT CD"); }
@Test public void CDFactoryWhenCodeNull() { String code = null; String codeSystem = "CONNECTDomain"; String displayName = "CONNECT CD"; CD cd = new CD(); HL7DataTransformHelper helper = new HL7DataTransformHelper(); cd = helper.CDFactory(code, codeSystem, displayName); assertNull(cd.getCode()); assertEquals(cd.getCodeSystem(), "CONNECTDomain"); assertEquals(cd.getDisplayName(), "CONNECT CD"); }
@Test public void CDFactoryWithCode() { String code = "CONNECT"; CD cd = new CD(); HL7DataTransformHelper helper = new HL7DataTransformHelper(); cd = helper.CDFactory(code); assertEquals(cd.getCode(), "CONNECT"); assertNull(cd.getCodeSystem()); assertNull(cd.getDisplayName()); }
@Test public void CDFactoryWIthCodeAndCodeSystem() { String code = "CONNECT"; String codeSystem = "CONNECTDomain"; CD cd = new CD(); HL7DataTransformHelper helper = new HL7DataTransformHelper(); cd = helper.CDFactory(code, codeSystem); assertEquals(cd.getCode(), "CONNECT"); assertEquals(cd.getCodeSystem(), "CONNECTDomain"); assertNull(cd.getDisplayName()); }