HL7PRPA201301Transforms { public static PRPAIN201301UV02 createPRPA201301(PRPAMT201301UV02Patient patient, String localDeviceId, String senderOID, String receiverOID) { PRPAIN201301UV02 result = createPRPA201301Headers(localDeviceId); result.setSender(HL7SenderTransforms.createMCCIMT000100UV01Sender(senderOID)); result.getReceiver().add(HL7ReceiverTransforms.createMCCIMT000100UV01Receiver(receiverOID)); result.setControlActProcess(createMFMIMT700701UV01ControlActProcess(patient, localDeviceId)); return result; }  static PRPAIN201301UV02 createPRPA201301(PRPAMT201301UV02Patient patient, String localDeviceId,
            String senderOID, String receiverOID); static PRPAIN201301UV02 createPRPA201301Headers(String localDeviceId); static PRPAIN201301UV02MFMIMT700701UV01ControlActProcess createMFMIMT700701UV01ControlActProcess(
            PRPAMT201301UV02Patient patient, String localDeviceId); static PRPAIN201301UV02MFMIMT700701UV01Subject1 createPRPAIN201301UVMFMIMT700701UV01Subject1(
            PRPAMT201301UV02Patient patient, String localDeviceId); static PRPAIN201301UV02MFMIMT700701UV01RegistrationEvent createPRPAIN201301UVMFMIMT700701UV01RegistrationEvent(
            PRPAMT201301UV02Patient patient, String localDeviceId); static PRPAIN201301UV02MFMIMT700701UV01Subject2 createPRPAIN201301UVMFMIMT700701UV01Subject2(
            PRPAMT201301UV02Patient patient); static PRPAIN201301UV02 createPRPA201301(PRPAIN201305UV02 original, String localDeviceId); static PRPAIN201301UV02 createPRPA201301(PRPAIN201306UV02 original, String localDeviceId); static PRPAIN201301UV02MFMIMT700701UV01ControlActProcess copyControlActProcess(
            PRPAIN201306UV02MFMIMT700711UV01ControlActProcess original, String localDeviceId); static PRPAIN201301UV02MFMIMT700701UV01ControlActProcess copyControlActProcess2(
            PRPAIN201306UV02MFMIMT700711UV01ControlActProcess original, String localDeviceId); static PRPAIN201301UV02MFMIMT700701UV01ControlActProcess copyControlActProcess(
            PRPAIN201305UV02QUQIMT021001UV01ControlActProcess original, String localDeviceId); static MFMIMT700701UV01DataEnterer copyDataEnterer(MFMIMT700711UV01DataEnterer orig); static MFMIMT700701UV01DataEnterer copyDataEnterer(QUQIMT021001UV01DataEnterer orig); static MFMIMT700701UV01AuthorOrPerformer copyAuthorOrPerformer(QUQIMT021001UV01AuthorOrPerformer orig); static MFMIMT700701UV01AuthorOrPerformer copyAuthorOrPerformer(MFMIMT700711UV01AuthorOrPerformer orig);  }
@Test public void createPRPA201301Patient() { String localDeviceId = "1.1"; String senderOID = "1.1"; String receiverOID = "2.2"; PRPAMT201301UV02Patient patient = createPRPAMT201301UV02Patient(); HL7PRPA201301Transforms transform = new HL7PRPA201301Transforms(); PRPAIN201301UV02 request = transform.createPRPA201301(patient, localDeviceId, senderOID, receiverOID); assertEquals(request.getControlActProcess().getSubject().get(0).getRegistrationEvent().getSubject1() .getPatient().getId().get(0).getExtension(), "1.16.17.19"); }
@Test public void createPRPA201301Request() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201301UV02 request; request = transforms.createPRPA201301(createPRPAIN201305UV02(), localDeviceId); assertEquals(request.getAttentionLine().get(0).getRealmCode().get(0).getCode(), "CONNECT"); assertEquals(request.getControlActProcess().getAuthorOrPerformer().get(0).getAssignedDevice().getValue() .getId().get(0).getExtension(), "1.16.17.19"); }
@Test public void createPRPA201301RequestNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201305UV02 req = null; assertNull(transforms.createPRPA201301(req, localDeviceId)); }
@Test public void createPRPA201301RequestWhenContolActIdNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201305UV02 request = new PRPAIN201305UV02(); PRPAIN201305UV02QUQIMT021001UV01ControlActProcess controlActProcess = new PRPAIN201305UV02QUQIMT021001UV01ControlActProcess(); controlActProcess.getAuthorOrPerformer().add(createPRPAIN201305UV02AuthorOrPerformer()); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); request.getControlActProcess(); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getId().isEmpty()); }
@Test public void createPRPA201301RequestWhenContolActRealmCodeNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201305UV02 request = new PRPAIN201305UV02(); PRPAIN201305UV02QUQIMT021001UV01ControlActProcess controlActProcess = new PRPAIN201305UV02QUQIMT021001UV01ControlActProcess(); controlActProcess.getAuthorOrPerformer().add(createPRPAIN201305UV02AuthorOrPerformer()); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getRealmCode().isEmpty()); }
@Test public void createPRPA201301RequestWhenContolActDataEntererNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201305UV02 request = new PRPAIN201305UV02(); PRPAIN201305UV02QUQIMT021001UV01ControlActProcess controlActProcess = new PRPAIN201305UV02QUQIMT021001UV01ControlActProcess(); controlActProcess.getAuthorOrPerformer().add(createPRPAIN201305UV02AuthorOrPerformer()); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getDataEnterer().isEmpty()); }
@Test public void createPRPA201301RequestWhenContolActProcessNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201305UV02 request = new PRPAIN201305UV02(); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertNull(result.getControlActProcess()); }
@Test public void createPRPA201301RequestWhenAuthorOrPerformerNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201305UV02 request = new PRPAIN201305UV02(); PRPAIN201305UV02QUQIMT021001UV01ControlActProcess controlActProcess = new PRPAIN201305UV02QUQIMT021001UV01ControlActProcess(); QUQIMT021001UV01AuthorOrPerformer authorOrPerformer = new QUQIMT021001UV01AuthorOrPerformer(); authorOrPerformer.setAssignedDevice(createPRPAIN201305UV02AssignedDevice()); authorOrPerformer.setAssignedPerson(createPRPAIN201305UV02AssignedPerson()); controlActProcess.getAuthorOrPerformer().add(authorOrPerformer); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getAuthorOrPerformer().get(0).getRealmCode().isEmpty()); assertTrue(result.getControlActProcess().getAuthorOrPerformer().get(0).getTemplateId().isEmpty()); }
@Test public void createPRPA201301forPRPAIN201306UV02Request() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201301UV02 request; request = transforms.createPRPA201301(createPRPAIN201306UV02(), localDeviceId); assertEquals(request.getAttentionLine().get(0).getRealmCode().get(0).getCode(), "CONNECT"); assertEquals(request.getControlActProcess().getAuthorOrPerformer().get(0).getAssignedDevice().getValue() .getId().get(0).getExtension(), "1.16.17.19"); }
@Test public void createPRPA201301RequestNullforPRPAIN201306UV02() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201306UV02 req = null; assertNull(transforms.createPRPA201301(req, localDeviceId)); }
@Test public void createPRPA201301RequestForPRPAIN201306WhenContolActIdNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201306UV02 request = new PRPAIN201306UV02(); PRPAIN201306UV02MFMIMT700711UV01ControlActProcess controlActProcess = new PRPAIN201306UV02MFMIMT700711UV01ControlActProcess(); controlActProcess.getAuthorOrPerformer().add(createPRPAIN201306UV02AuthorOrPerformer()); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); request.getControlActProcess(); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getId().isEmpty()); }
@Test public void createPRPA201301RequestForPRPAIN201306WhenContolActRealmCodeNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201306UV02 request = new PRPAIN201306UV02(); PRPAIN201306UV02MFMIMT700711UV01ControlActProcess controlActProcess = new PRPAIN201306UV02MFMIMT700711UV01ControlActProcess(); controlActProcess.getAuthorOrPerformer().add(createPRPAIN201306UV02AuthorOrPerformer()); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getRealmCode().isEmpty()); }
@Test public void createPRPA201301RequestForPRPAIN201306WhenContolActDataEntererNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201306UV02 request = new PRPAIN201306UV02(); PRPAIN201306UV02MFMIMT700711UV01ControlActProcess controlActProcess = new PRPAIN201306UV02MFMIMT700711UV01ControlActProcess(); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getDataEnterer().isEmpty()); }
@Test public void createPRPA201301RequestForPRPAIN201306WhenContolActProcessNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201306UV02 request = new PRPAIN201306UV02(); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertNull(result.getControlActProcess()); }
@Test public void createPRPA201301RequestForPRPAIN201306WhenAuthorOrPerformerNull() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201306UV02 request = new PRPAIN201306UV02(); PRPAIN201306UV02MFMIMT700711UV01ControlActProcess controlActProcess = new PRPAIN201306UV02MFMIMT700711UV01ControlActProcess(); MFMIMT700711UV01AuthorOrPerformer authorOrPerformer = new MFMIMT700711UV01AuthorOrPerformer(); authorOrPerformer.setAssignedDevice(createPRPAIN201305UV02AssignedDevice()); authorOrPerformer.setAssignedPerson(createPRPAIN201305UV02AssignedPerson()); controlActProcess.getAuthorOrPerformer().add(authorOrPerformer); controlActProcess.setTypeId(createII()); controlActProcess.setQueryByParameter(createQueryByParameter()); request.setControlActProcess(controlActProcess); PRPAIN201301UV02 result; result = transforms.createPRPA201301(request, localDeviceId); assertTrue(result.getControlActProcess().getAuthorOrPerformer().get(0).getRealmCode().isEmpty()); assertTrue(result.getControlActProcess().getAuthorOrPerformer().get(0).getTemplateId().isEmpty()); }