Search in sources :

Example 6 with Utlatande

use of se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Utlatande in project webcert by sklintyg.

the class CreateDraftCertificateResponderImplTest method createCertificateType.

private CreateDraftCertificateType createCertificateType() {
    // Type
    TypAvUtlatande utlTyp = new TypAvUtlatande();
    utlTyp.setCode("fk7263");
    // HoSPerson
    HsaId userHsaId = new HsaId();
    userHsaId.setExtension(USER_HSAID);
    userHsaId.setRoot("USERHSAID");
    HsaId unitHsaId = new HsaId();
    unitHsaId.setExtension(UNIT_HSAID);
    unitHsaId.setRoot("UNITHSAID");
    Enhet hosEnhet = new Enhet();
    hosEnhet.setEnhetsId(unitHsaId);
    HosPersonal hosPerson = new HosPersonal();
    hosPerson.setFullstandigtNamn("Abel Baker");
    hosPerson.setPersonalId(userHsaId);
    hosPerson.setEnhet(hosEnhet);
    // Patient
    PersonId personId = new PersonId();
    personId.setRoot("PERSNR");
    personId.setExtension("19121212-1212");
    Patient patType = new Patient();
    patType.setPersonId(personId);
    patType.getFornamn().add("Adam");
    patType.getFornamn().add("Bertil");
    patType.getMellannamn().add("Cesarsson");
    patType.getMellannamn().add("Davidsson");
    patType.setEfternamn("Eriksson");
    Utlatande utlatande = new Utlatande();
    utlatande.setTypAvUtlatande(utlTyp);
    utlatande.setSkapadAv(hosPerson);
    utlatande.setPatient(patType);
    CreateDraftCertificateType certificateType = new CreateDraftCertificateType();
    certificateType.setUtlatande(utlatande);
    return certificateType;
}
Also used : HosPersonal(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.HosPersonal) Enhet(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Enhet) PersonId(se.riv.clinicalprocess.healthcond.certificate.types.v1.PersonId) CreateDraftCertificateType(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.CreateDraftCertificateType) TypAvUtlatande(se.riv.clinicalprocess.healthcond.certificate.types.v1.TypAvUtlatande) Utlatande(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Utlatande) Patient(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Patient) HsaId(se.riv.clinicalprocess.healthcond.certificate.types.v1.HsaId) TypAvUtlatande(se.riv.clinicalprocess.healthcond.certificate.types.v1.TypAvUtlatande)

Aggregations

Utlatande (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Utlatande)6 TypAvUtlatande (se.riv.clinicalprocess.healthcond.certificate.types.v1.TypAvUtlatande)5 Enhet (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Enhet)3 HosPersonal (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.HosPersonal)3 Patient (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Patient)3 HsaId (se.riv.clinicalprocess.healthcond.certificate.types.v1.HsaId)3 PersonId (se.riv.clinicalprocess.healthcond.certificate.types.v1.PersonId)3 Test (org.junit.Test)2 BaseCreateDraftCertificateTest (se.inera.intyg.webcert.web.integration.interactions.createdraftcertificate.BaseCreateDraftCertificateTest)2 CreateNewDraftRequest (se.inera.intyg.webcert.web.service.utkast.dto.CreateNewDraftRequest)2 Map (java.util.Map)1 SchemaVersion (se.inera.intyg.common.support.modules.support.api.notification.SchemaVersion)1 IntygUser (se.inera.intyg.infra.security.common.model.IntygUser)1 Personnummer (se.inera.intyg.schemas.contract.Personnummer)1 SekretessStatus (se.inera.intyg.webcert.common.model.SekretessStatus)1 WebCertServiceException (se.inera.intyg.webcert.common.service.exception.WebCertServiceException)1 TakResult (se.inera.intyg.webcert.integration.tak.model.TakResult)1 Utkast (se.inera.intyg.webcert.persistence.utkast.model.Utkast)1 ResultValidator (se.inera.intyg.webcert.web.integration.validators.ResultValidator)1 CreateDraftCertificateType (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.CreateDraftCertificateType)1