HL7QueryParamsTransforms { public static PRPAMT201306UV02ParameterList createParamList(PRPAMT201301UV02Patient patient) { PRPAMT201306UV02ParameterList paramList = new PRPAMT201306UV02ParameterList(); PRPAMT201301UV02Person person = null; if (patient != null) { JAXBElement<PRPAMT201301UV02Person> jaxbPerson = patient.getPatientPerson(); person = jaxbPerson.getValue(); } if (person != null && person.getAdministrativeGenderCode() != null && NullChecker.isNotNullish(person.getAdministrativeGenderCode().getCode())) { paramList.getLivingSubjectAdministrativeGender() .add(createGender(person.getAdministrativeGenderCode().getCode())); } if (person != null && person.getBirthTime() != null && NullChecker.isNotNullish(person.getBirthTime().getValue())) { paramList.getLivingSubjectBirthTime().add(createBirthTime(person.getBirthTime().getValue())); } if (person != null && CollectionUtils.isNotEmpty(person.getAddr())) { paramList.getPatientAddress().add(createAddress(person.getAddr())); } if (person != null && CollectionUtils.isNotEmpty(person.getTelecom())) { paramList.getPatientTelecom().add(createTelecom(person.getTelecom())); } if (person != null && CollectionUtils.isNotEmpty(person.getName())) { paramList.getLivingSubjectName().add(createName(person.getName())); } if (patient != null && CollectionUtils.isNotEmpty(patient.getId()) && patient.getId().get(0) != null) { paramList.getLivingSubjectId().add(createSubjectId(patient.getId().get(0))); } if (person != null && NullChecker.isNotNullish(person.getAsOtherIDs())) { for (PRPAMT201301UV02OtherIDs otherId : person.getAsOtherIDs()) { for (II id : otherId.getId()) { paramList.getLivingSubjectId().add(createSubjectId(id)); } } } return paramList; }  static JAXBElement<PRPAMT201306UV02QueryByParameter> createQueryParams(PRPAMT201301UV02Patient patient,
        String localDeviceId); static PRPAMT201306UV02ParameterList createParamList(PRPAMT201301UV02Patient patient); static PRPAMT201306UV02LivingSubjectId createSubjectId(II subjectId); static PRPAMT201306UV02LivingSubjectName createName(List<PNExplicit> patientNames); static PRPAMT201306UV02LivingSubjectBirthTime createBirthTime(String birthTime); static PRPAMT201306UV02LivingSubjectAdministrativeGender createGender(String gender); static PRPAMT201306UV02PatientAddress createAddress(List<ADExplicit> patientAddress); static PRPAMT201306UV02PatientTelecom createTelecom(List<TELExplicit> patientTelecom);  }
@Test public void createParamList() { PRPAMT201306UV02ParameterList parameterList; HL7QueryParamsTransforms queryTransforms = new HL7QueryParamsTransforms(); parameterList = queryTransforms.createParamList(createPRPAMT201301UV02Patient()); assertEquals(parameterList.getLivingSubjectAdministrativeGender().get(0).getValue().get(0).getCode(), "CONNECT"); assertEquals(parameterList.getLivingSubjectBirthTime().get(0).getValue().get(0).getValue(), "12-10-1955"); }