use of uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Person in project integration-adaptor-111 by nhsconnect.
the class GuardianMapperTest method mockGuardianPerson.
private void mockGuardianPerson(POCDMT000002UK01Guardian guardian) {
POCDMT000002UK01Person guardianPerson = mock(POCDMT000002UK01Person.class);
when(guardian.isSetGuardianPerson()).thenReturn(true);
when(guardian.getGuardianPerson()).thenReturn(guardianPerson);
PN personName = mock(PN.class);
when(guardianPerson.sizeOfNameArray()).thenReturn(1);
when(guardianPerson.getNameArray(0)).thenReturn(personName);
when(humanNameMapper.mapHumanName(any())).thenReturn(humanName);
}
use of uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Person in project integration-adaptor-111 by nhsconnect.
the class RelatedPersonMapperTest method createPerson.
private POCDMT000002UK01Person createPerson() {
POCDMT000002UK01Person person = POCDMT000002UK01Person.Factory.newInstance();
PN pn = PN.Factory.newInstance();
PN[] pnArray = { pn };
person.setNameArray(pnArray);
return person;
}
use of uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Person in project integration-adaptor-111 by nhsconnect.
the class PractitionerMapperTest method createPerson.
private POCDMT000002UK01Person createPerson() {
POCDMT000002UK01Person person = POCDMT000002UK01Person.Factory.newInstance();
PN pn = PN.Factory.newInstance();
PN[] pnArray = { pn };
person.setNameArray(pnArray);
return person;
}
use of uk.nhs.connect.iucds.cda.ucr.POCDMT000002UK01Person in project integration-adaptor-111 by nhsconnect.
the class GuardianMapper method mapGuardian.
public Patient.ContactComponent mapGuardian(POCDMT000002UK01Guardian guardian) {
Patient.ContactComponent contactComponent = new Patient.ContactComponent();
if (guardian.isSetGuardianPerson()) {
POCDMT000002UK01Person guardianPerson = guardian.getGuardianPerson();
if (guardianPerson.sizeOfNameArray() > 0) {
contactComponent.setName(humanNameMapper.mapHumanName(guardianPerson.getNameArray(0)));
}
}
if (guardian.sizeOfAddrArray() > 0) {
contactComponent.setAddress(addressMapper.mapAddress(guardian.getAddrArray(0)));
}
if (guardian.isSetGuardianOrganization()) {
Organization managingOrganization = organizationMapper.mapOrganization(guardian.getGuardianOrganization());
contactComponent.setOrganization(resourceUtil.createReference(managingOrganization));
contactComponent.setOrganizationTarget(managingOrganization);
}
return contactComponent;
}
Aggregations