use of se.inera.intyg.common.support.model.common.internal.HoSPersonal in project webcert by sklintyg.
the class CreateNewDraftRequestBuilderImpl method buildCreateNewDraftRequest.
@Override
public CreateNewDraftRequest buildCreateNewDraftRequest(Utlatande utlatande, IntygUser user) {
HoSPersonal hosPerson = createHoSPerson(utlatande.getSkapadAv(), HoSPersonHelper.createVardenhetFromIntygUser(utlatande.getSkapadAv().getEnhet().getEnhetsId().getExtension(), user));
HoSPersonHelper.enrichHoSPerson(hosPerson, user);
return new CreateNewDraftRequest(null, utlatande.getTypAvUtlatande().getCode(), null, hosPerson, createPatient(utlatande.getPatient()));
}
use of se.inera.intyg.common.support.model.common.internal.HoSPersonal in project webcert by sklintyg.
the class CreateNewDraftRequestBuilderImpl method createHoSPerson.
private HoSPersonal createHoSPerson(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v3.HosPersonal hoSPersonType, Vardenhet vardenhet) {
HoSPersonal hoSPerson = new HoSPersonal();
hoSPerson.setFullstandigtNamn(hoSPersonType.getFullstandigtNamn());
hoSPerson.setPersonId(hoSPersonType.getPersonalId().getExtension());
hoSPerson.setVardenhet(vardenhet);
return hoSPerson;
}
use of se.inera.intyg.common.support.model.common.internal.HoSPersonal in project webcert by sklintyg.
the class IntygServiceRevokeTest method setup.
@Before
public void setup() throws Exception {
HoSPersonal person = buildHosPerson();
VardpersonReferens vardperson = buildVardpersonReferens(person);
WebCertUser user = buildWebCertUser(person);
signedUtkast = buildUtkast(INTYG_ID, INTYG_TYPE, UtkastStatus.SIGNED, INTYG_JSON, vardperson);
revokedUtkast = buildUtkast(INTYG_ID, INTYG_TYPE, UtkastStatus.SIGNED, json, vardperson);
revokedUtkast.setAterkalladDatum(LocalDateTime.now());
when(webCertUserService.getUser()).thenReturn(user);
}
use of se.inera.intyg.common.support.model.common.internal.HoSPersonal in project webcert by sklintyg.
the class IntygServiceRevokeTest method buildHosPerson.
private HoSPersonal buildHosPerson() {
HoSPersonal person = new HoSPersonal();
person.setPersonId(HSA_ID);
person.setFullstandigtNamn("Dr Dengroth");
return person;
}
use of se.inera.intyg.common.support.model.common.internal.HoSPersonal in project webcert by sklintyg.
the class CopyUtkastServiceImplTest method setup.
@Before
public void setup() {
hoSPerson = new HoSPersonal();
hoSPerson.setPersonId(HOSPERSON_ID);
hoSPerson.setFullstandigtNamn(HOSPERSON_NAME);
Vardgivare vardgivare = new Vardgivare();
vardgivare.setVardgivarid(VARDGIVARE_ID);
vardgivare.setVardgivarnamn(VARDGIVARE_NAME);
Vardenhet vardenhet = new Vardenhet();
vardenhet.setEnhetsid(VARDENHET_ID);
vardenhet.setEnhetsnamn(VARDENHET_NAME);
vardenhet.setVardgivare(vardgivare);
hoSPerson.setVardenhet(vardenhet);
patient = new Patient();
patient.setPersonId(PATIENT_SSN);
}
Aggregations