HL7PRPA201309Transforms { public static PRPAIN201309UV02 createPRPA201309(String homeCommunityId, String patientId) { PRPAIN201309UV02 result = new PRPAIN201309UV02(); PRPAIN201309UV02QUQIMT021001UV01ControlActProcess controlActProcess = new PRPAIN201309UV02QUQIMT021001UV01ControlActProcess(); PRPAMT201307UV02QueryByParameter queryParameter = new PRPAMT201307UV02QueryByParameter(); PRPAMT201307UV02ParameterList parameterList = new PRPAMT201307UV02ParameterList(); PRPAMT201307UV02PatientIdentifier patientIdentifier = new PRPAMT201307UV02PatientIdentifier(); patientIdentifier.getValue().add(0, HL7DataTransformHelper.IIFactory(homeCommunityId, patientId)); parameterList.getPatientIdentifier().add(patientIdentifier); queryParameter.setParameterList(parameterList); org.hl7.v3.ObjectFactory factory = new org.hl7.v3.ObjectFactory(); JAXBElement oJaxbElement = factory .createPRPAIN201309UV02QUQIMT021001UV01ControlActProcessQueryByParameter(queryParameter); controlActProcess.setQueryByParameter(oJaxbElement); result.setControlActProcess(controlActProcess); return result; }  static PRPAIN201309UV02 createPRPA201309(String homeCommunityId, String patientId);  }
@Test public void createPRPA201309() { String patientId = "D123401"; String homeCommunityId = "1.1"; PRPAIN201309UV02 result; HL7PRPA201309Transforms transforms = new HL7PRPA201309Transforms(); result = transforms.createPRPA201309(homeCommunityId, patientId); assertEquals(result.getControlActProcess().getQueryByParameter().getValue().getParameterList() .getPatientIdentifier().get(0).getValue().get(0).getExtension(), "D123401"); assertEquals(result.getControlActProcess().getQueryByParameter().getValue().getParameterList() .getPatientIdentifier().get(0).getValue().get(0).getRoot(), "1.1"); }