Search in sources :

Example 31 with Patient

use of se.inera.intyg.common.support.model.common.internal.Patient in project webcert by sklintyg.

the class PatientDetailsResolverImpl method buildBasePatient.

private Patient buildBasePatient(Personnummer personnummer, PersonSvar personSvar) {
    Patient patient = new Patient();
    patient.setPersonId(personnummer);
    // Name
    patient.setFornamn(personSvar.getPerson().getFornamn());
    patient.setMellannamn(personSvar.getPerson().getMellannamn());
    patient.setEfternamn(personSvar.getPerson().getEfternamn());
    patient.setFullstandigtNamn(Joiner.on(' ').skipNulls().join(personSvar.getPerson().getFornamn(), personSvar.getPerson().getMellannamn(), personSvar.getPerson().getEfternamn()));
    // Other
    patient.setAvliden(personSvar.getPerson().isAvliden());
    patient.setSekretessmarkering(personSvar.getPerson().isSekretessmarkering());
    return patient;
}
Also used : Patient(se.inera.intyg.common.support.model.common.internal.Patient)

Example 32 with Patient

use of se.inera.intyg.common.support.model.common.internal.Patient in project webcert by sklintyg.

the class UtkastModuleApiControllerTest method buildPatient.

private Patient buildPatient() {
    Patient patient = new Patient();
    patient.setFornamn("Tolvan");
    patient.setEfternamn("Tolvansson");
    return patient;
}
Also used : Patient(se.inera.intyg.common.support.model.common.internal.Patient)

Example 33 with Patient

use of se.inera.intyg.common.support.model.common.internal.Patient in project webcert by sklintyg.

the class CreateNewDraftRequestBuilderImpl method createPatient.

private Patient createPatient(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Patient patientType) {
    Patient patient = new Patient();
    patient.setPersonId(Personnummer.createPersonnummer(patientType.getPersonId().getExtension()).get());
    patient.setFornamn(joinNames(patientType.getFornamn()));
    patient.setMellannamn(joinNames(patientType.getMellannamn()));
    patient.setEfternamn(patientType.getEfternamn());
    patient.setFullstandigtNamn(IntygConverterUtil.concatPatientName(patient.getFornamn(), patient.getMellannamn(), patient.getEfternamn()));
    return patient;
}
Also used : Patient(se.inera.intyg.common.support.model.common.internal.Patient)

Example 34 with Patient

use of se.inera.intyg.common.support.model.common.internal.Patient in project webcert by sklintyg.

the class CopyCompletionUtkastBuilderTest 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);
}
Also used : HoSPersonal(se.inera.intyg.common.support.model.common.internal.HoSPersonal) Patient(se.inera.intyg.common.support.model.common.internal.Patient) Vardgivare(se.inera.intyg.common.support.model.common.internal.Vardgivare) AbstractVardenhet(se.inera.intyg.infra.integration.hsa.model.AbstractVardenhet) Vardenhet(se.inera.intyg.common.support.model.common.internal.Vardenhet) Before(org.junit.Before)

Example 35 with Patient

use of se.inera.intyg.common.support.model.common.internal.Patient in project webcert by sklintyg.

the class CreateRenewalCopyUtkastBuilderImplTest 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);
}
Also used : HoSPersonal(se.inera.intyg.common.support.model.common.internal.HoSPersonal) Patient(se.inera.intyg.common.support.model.common.internal.Patient) Vardgivare(se.inera.intyg.common.support.model.common.internal.Vardgivare) AbstractVardenhet(se.inera.intyg.infra.integration.hsa.model.AbstractVardenhet) Vardenhet(se.inera.intyg.common.support.model.common.internal.Vardenhet) Before(org.junit.Before)

Aggregations

Patient (se.inera.intyg.common.support.model.common.internal.Patient)62 Test (org.junit.Test)28 Personnummer (se.inera.intyg.schemas.contract.Personnummer)28 Utkast (se.inera.intyg.webcert.persistence.utkast.model.Utkast)12 HoSPersonal (se.inera.intyg.common.support.model.common.internal.HoSPersonal)11 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)7 Utlatande (se.inera.intyg.common.support.model.common.internal.Utlatande)7 Vardenhet (se.inera.intyg.common.support.model.common.internal.Vardenhet)6 ModuleApi (se.inera.intyg.common.support.modules.support.api.ModuleApi)6 ArrayList (java.util.ArrayList)5 Before (org.junit.Before)5 Vardgivare (se.inera.intyg.common.support.model.common.internal.Vardgivare)5 Vardgivare (se.inera.intyg.infra.integration.hsa.model.Vardgivare)5 IntygContentHolder (se.inera.intyg.webcert.web.service.intyg.dto.IntygContentHolder)5 Relations (se.inera.intyg.webcert.web.web.controller.api.dto.Relations)5 IOException (java.io.IOException)4 GrundData (se.inera.intyg.common.support.model.common.internal.GrundData)4 ModuleNotFoundException (se.inera.intyg.common.support.modules.registry.ModuleNotFoundException)4 ModuleException (se.inera.intyg.common.support.modules.support.api.exception.ModuleException)4 PersonSvar (se.inera.intyg.infra.integration.pu.model.PersonSvar)4