HL7PRPA201301Transforms { public static PRPAIN201301UV02MFMIMT700701UV01ControlActProcess copyControlActProcess2( PRPAIN201306UV02MFMIMT700711UV01ControlActProcess original, String localDeviceId) { if (original == null) { return null; } PRPAIN201301UV02MFMIMT700701UV01ControlActProcess result = new PRPAIN201301UV02MFMIMT700701UV01ControlActProcess(); result.setClassCode(original.getClassCode()); result.setCode(original.getCode()); result.setEffectiveTime(original.getEffectiveTime()); result.setLanguageCode(original.getLanguageCode()); result.setMoodCode(original.getMoodCode()); result.setText(original.getText()); result.setTypeId(original.getTypeId()); String localAAId = null; if (original.getAuthorOrPerformer() != null) { for (MFMIMT700711UV01AuthorOrPerformer item : original.getAuthorOrPerformer()) { MFMIMT700701UV01AuthorOrPerformer newItem = copyAuthorOrPerformer(item); result.getAuthorOrPerformer().add(newItem); if (newItem != null && newItem.getAssignedDevice() != null && newItem.getAssignedDevice().getValue() != null && NullChecker.isNotNullish(newItem.getAssignedDevice().getValue().getId()) && newItem.getAssignedDevice().getValue().getId().get(0) != null && NullChecker.isNotNullish(newItem.getAssignedDevice().getValue().getId().get(0).getRoot())) { localAAId = newItem.getAssignedDevice().getValue().getId().get(0).getRoot(); } } } if (original.getId() != null) { result.getId().clear(); for (II item : original.getId()) { result.getId().add(item); } } if (original.getDataEnterer() != null) { result.getDataEnterer().clear(); for (MFMIMT700711UV01DataEnterer item : original.getDataEnterer()) { MFMIMT700701UV01DataEnterer newItem = copyDataEnterer(item); result.getDataEnterer().add(newItem); } } PRPAMT201301UV02Patient patient; PRPAMT201306UV02QueryByParameter params; params = original.getQueryByParameter().getValue(); patient = HL7PatientTransforms.create201301Patient(params.getParameterList(), localAAId); result.getSubject().add(createPRPAIN201301UVMFMIMT700701UV01Subject1(patient, localDeviceId)); result = HL7ArrayTransforms.copyNullFlavors(original, result); result = copyInformationReceipent(original, result); result = HL7ArrayTransforms.copyNullFlavors(original, result); 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 copyControlActProcess2() { String localDeviceId = "1.1"; HL7PRPA201301Transforms transforms = new HL7PRPA201301Transforms(); PRPAIN201301UV02MFMIMT700701UV01ControlActProcess cap = transforms.copyControlActProcess2( createPRPAIN201306UV02ControlActProcess(), localDeviceId); assertEquals(cap.getAuthorOrPerformer().get(0).getAssignedDevice().getValue().getId().get(0).getExtension(), "1.16.17.19"); }