use of se.inera.ifv.insuranceprocess.healthreporting.v2.EnhetType in project webcert by sklintyg.
the class ConvertToFKTypes method toEnhetType.
public static EnhetType toEnhetType(Vardperson vp) {
if (vp == null) {
return null;
}
EnhetType et = new EnhetType();
if (vp.getEnhetsId() != null) {
et.setEnhetsId(toII(HSA_ID_OID, vp.getEnhetsId()));
}
et.setEnhetsnamn(vp.getEnhetsnamn());
et.setEpost(vp.getEpost());
et.setPostadress(vp.getPostadress());
et.setPostnummer(vp.getPostnummer());
et.setPostort(vp.getPostort());
et.setTelefonnummer(vp.getTelefonnummer());
if (vp.getArbetsplatsKod() != null) {
et.setArbetsplatskod(toII(ARBETSPLATS_KOD_OID, vp.getArbetsplatsKod()));
}
VardgivareType vgt = new VardgivareType();
vgt.setVardgivarnamn(vp.getVardgivarnamn());
if (vp.getVardgivarId() != null) {
vgt.setVardgivareId(toII(HSA_ID_OID, vp.getVardgivarId()));
}
et.setVardgivare(vgt);
return et;
}
use of se.inera.ifv.insuranceprocess.healthreporting.v2.EnhetType in project webcert by sklintyg.
the class MailNotificationServiceImplTest method testSendMailForIncomingAnswerHsaIsNotCalledIfPrivatePractitioner.
@Test
public void testSendMailForIncomingAnswerHsaIsNotCalledIfPrivatePractitioner() throws Exception {
// Given
HoSPersonType hoSPersonType = new HoSPersonType();
EnhetType enhet = new EnhetType();
enhet.setEpost("test@test.se");
enhet.setEnhetsnamn("TestEnhet");
hoSPersonType.setEnhet(enhet);
doReturn(hoSPersonType).when(ppService).getPrivatePractitioner(anyString(), isNull(), isNull());
MailNotification mailNotification = mailNotification("intygsId", MailNotificationServiceImpl.PRIVATE_PRACTITIONER_HSAID_PREFIX + "1234");
// When
mailNotificationService.sendMailForIncomingAnswer(mailNotification);
// Then
verify(hsaOrganizationUnitService, times(0)).getVardenhet(anyString());
}
use of se.inera.ifv.insuranceprocess.healthreporting.v2.EnhetType in project webcert by sklintyg.
the class ElegWebCertUserDetailsServiceTest method buildHosPerson.
private HoSPersonType buildHosPerson() {
HoSPersonType hoSPersonType = new HoSPersonType();
HsaId hsaId = new HsaId();
hsaId.setExtension(HSA_ID);
hoSPersonType.setHsaId(hsaId);
PersonId personId = new PersonId();
personId.setExtension(PERSON_ID);
hoSPersonType.setPersonId(personId);
EnhetType vardEnhet = new EnhetType();
vardEnhet.setEnhetsnamn("enhetsNamn");
HsaId enhetsId = new HsaId();
enhetsId.setExtension("enhetsId");
vardEnhet.setEnhetsId(enhetsId);
VardgivareType vardgivare = new VardgivareType();
HsaId vardgivareId = new HsaId();
enhetsId.setExtension("vardgivareId");
vardgivare.setVardgivareId(vardgivareId);
vardgivare.setVardgivarenamn("vardgivareName");
vardEnhet.setVardgivare(vardgivare);
hoSPersonType.setEnhet(vardEnhet);
return hoSPersonType;
}
Aggregations