Search in sources :

Example 16 with VardpersonReferens

use of se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens in project webcert by sklintyg.

the class CreateUtkastFromTemplateBuilderTest method createOriginalUtkast.

private Utkast createOriginalUtkast() {
    Utkast orgUtkast = new Utkast();
    orgUtkast.setIntygsId(INTYG_COPY_ID);
    orgUtkast.setIntygsTyp(INTYG_TYPE_1);
    orgUtkast.setPatientPersonnummer(PATIENT_SSN);
    orgUtkast.setPatientFornamn(PATIENT_FNAME);
    orgUtkast.setPatientMellannamn(PATIENT_MNAME);
    orgUtkast.setPatientEfternamn(PATIENT_LNAME);
    orgUtkast.setEnhetsId(VARDENHET_ID);
    orgUtkast.setEnhetsNamn(VARDENHET_NAME);
    orgUtkast.setVardgivarId(VARDGIVARE_ID);
    orgUtkast.setVardgivarNamn(VARDGIVARE_NAME);
    orgUtkast.setModel(INTYG_JSON);
    VardpersonReferens vpRef = new VardpersonReferens();
    vpRef.setHsaId(HOSPERSON_ID);
    vpRef.setNamn(HOSPERSON_NAME);
    orgUtkast.setSenastSparadAv(vpRef);
    orgUtkast.setSkapadAv(vpRef);
    return orgUtkast;
}
Also used : Utkast(se.inera.intyg.webcert.persistence.utkast.model.Utkast) VardpersonReferens(se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens)

Example 17 with VardpersonReferens

use of se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens in project webcert by sklintyg.

the class UtkastIntygDecoratorTest method buildVardpersonReferens.

private VardpersonReferens buildVardpersonReferens(HoSPersonal person) {
    VardpersonReferens vardperson = new VardpersonReferens();
    vardperson.setHsaId(person.getPersonId());
    vardperson.setNamn(person.getFullstandigtNamn());
    return vardperson;
}
Also used : VardpersonReferens(se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens)

Example 18 with VardpersonReferens

use of se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens in project webcert by sklintyg.

the class UtkastIntygDecoratorTest method setup.

@Before
public void setup() {
    HoSPersonal person = buildHosPerson();
    VardpersonReferens vardperson = buildVardpersonReferens(person);
    signedUtkast = buildUtkast(INTYG_ID, INTYG_TYPE, UtkastStatus.SIGNED, INTYG_JSON, vardperson);
}
Also used : HoSPersonal(se.inera.intyg.common.support.model.common.internal.HoSPersonal) VardpersonReferens(se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens) Before(org.junit.Before)

Example 19 with VardpersonReferens

use of se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens in project webcert by sklintyg.

the class SendNotificationStrategyTest method createUtkast.

private Utkast createUtkast(String intygId, String intygsTyp, String enhetsId) {
    VardpersonReferens vardperson = new VardpersonReferens();
    vardperson.setHsaId("SE12345678-0000");
    vardperson.setNamn("Dr Börje Dengroth");
    Utkast utkast = new Utkast();
    utkast.setIntygsId(intygId);
    utkast.setIntygsTyp(intygsTyp);
    utkast.setEnhetsId(enhetsId);
    utkast.setEnhetsNamn("Vårdenheten");
    utkast.setPatientPersonnummer(Personnummer.createPersonnummer("19121212-1212").get());
    utkast.setPatientFornamn("Tolvan");
    utkast.setPatientEfternamn("Tolvansson");
    utkast.setStatus(UtkastStatus.DRAFT_INCOMPLETE);
    utkast.setModel("{model}");
    utkast.setSkapadAv(vardperson);
    utkast.setSenastSparadAv(vardperson);
    return utkast;
}
Also used : Utkast(se.inera.intyg.webcert.persistence.utkast.model.Utkast) VardpersonReferens(se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens)

Example 20 with VardpersonReferens

use of se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens in project webcert by sklintyg.

the class UtkastServiceImplTest method setup.

@Before
public void setup() {
    hoSPerson = new HoSPersonal();
    hoSPerson.setPersonId("AAA");
    hoSPerson.setFullstandigtNamn("Dr Dengroth");
    hoSPerson.getBefattningar().add("Befattning");
    hoSPerson.getSpecialiteter().add("Ortoped");
    defaultPatient = new Patient();
    defaultPatient.setPersonId(PERSONNUMMER);
    defaultPatient.setFornamn("fornamn");
    defaultPatient.setMellannamn("mellannamn");
    defaultPatient.setPostadress("pa1");
    defaultPatient.setPostnummer("0000");
    defaultPatient.setPostort("ort");
    se.inera.intyg.common.support.model.common.internal.Vardgivare vardgivare = new se.inera.intyg.common.support.model.common.internal.Vardgivare();
    vardgivare.setVardgivarid("SE234234");
    vardgivare.setVardgivarnamn("Vårdgivaren");
    se.inera.intyg.common.support.model.common.internal.Vardenhet vardenhet = new se.inera.intyg.common.support.model.common.internal.Vardenhet();
    vardenhet.setArbetsplatsKod("00000");
    vardenhet.setEnhetsnamn("Vårdenheten");
    vardenhet.setEnhetsid("SE234897348");
    vardenhet.setPostadress("Sjukvägen 1");
    vardenhet.setPostnummer("12345");
    vardenhet.setPostort("Testberga");
    vardenhet.setTelefonnummer("0123-456789");
    vardenhet.setEpost("ingen@ingen.se");
    vardenhet.setVardgivare(vardgivare);
    VardpersonReferens vardperson = new VardpersonReferens();
    vardperson.setHsaId(hoSPerson.getPersonId());
    vardperson.setNamn(hoSPerson.getFullstandigtNamn());
    hoSPerson.setVardenhet(vardenhet);
    utkast = createUtkast(INTYG_ID, UTKAST_VERSION, INTYG_TYPE, UtkastStatus.DRAFT_INCOMPLETE, INTYG_JSON, vardperson, PERSONNUMMER);
    signedUtkast = createUtkast(INTYG_ID, INTYG_VERSION, INTYG_TYPE, UtkastStatus.SIGNED, INTYG_JSON, vardperson, PERSONNUMMER);
}
Also used : Patient(se.inera.intyg.common.support.model.common.internal.Patient) Vardgivare(se.inera.intyg.infra.integration.hsa.model.Vardgivare) Vardenhet(se.inera.intyg.infra.integration.hsa.model.Vardenhet) HoSPersonal(se.inera.intyg.common.support.model.common.internal.HoSPersonal) ValidateDraftResponse(se.inera.intyg.common.support.modules.support.api.dto.ValidateDraftResponse) SaveDraftResponse(se.inera.intyg.webcert.web.service.utkast.dto.SaveDraftResponse) VardpersonReferens(se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens) Before(org.junit.Before)

Aggregations

VardpersonReferens (se.inera.intyg.webcert.persistence.utkast.model.VardpersonReferens)33 Utkast (se.inera.intyg.webcert.persistence.utkast.model.Utkast)21 Before (org.junit.Before)5 Signatur (se.inera.intyg.webcert.persistence.utkast.model.Signatur)5 Test (org.junit.Test)4 HoSPersonal (se.inera.intyg.common.support.model.common.internal.HoSPersonal)4 Vardenhet (se.inera.intyg.common.support.model.common.internal.Vardenhet)4 SchemaVersion (se.inera.intyg.common.support.modules.support.api.notification.SchemaVersion)4 IntygUser (se.inera.intyg.infra.security.common.model.IntygUser)4 TakResult (se.inera.intyg.webcert.integration.tak.model.TakResult)4 BaseCreateDraftCertificateTest (se.inera.intyg.webcert.web.integration.interactions.createdraftcertificate.BaseCreateDraftCertificateTest)4 IntegreradEnhetEntry (se.inera.intyg.webcert.web.integration.registry.dto.IntegreradEnhetEntry)4 ResultValidator (se.inera.intyg.webcert.web.integration.validators.ResultValidator)4 CreateNewDraftRequest (se.inera.intyg.webcert.web.service.utkast.dto.CreateNewDraftRequest)4 Vardgivare (se.inera.intyg.common.support.model.common.internal.Vardgivare)3 PagaendeSignering (se.inera.intyg.webcert.persistence.utkast.model.PagaendeSignering)3 CreateDraftCertificateResponseType (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v3.CreateDraftCertificateResponseType)3 CreateDraftCertificateType (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v3.CreateDraftCertificateType)3 Intyg (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v3.Intyg)3 TypAvIntyg (se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvIntyg)3