use of se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal in project webcert by sklintyg.
the class NotificationTypeConverterTest method buildIntyg.
private Intyg buildIntyg() {
Enhet enhet = new Enhet();
enhet.setArbetsplatskod(new ArbetsplatsKod());
enhet.setVardgivare(new Vardgivare());
// Not accepted value
enhet.setEpost("");
HosPersonal skapadAv = new HosPersonal();
skapadAv.setEnhet(enhet);
Intyg intyg = new Intyg();
intyg.setSkapadAv(skapadAv);
return intyg;
}
use of se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal in project webcert by sklintyg.
the class SendMessageToRecipientTypeBuilder method buildHosPersonalFromWebCertUser.
private static HosPersonal buildHosPersonalFromWebCertUser(WebCertUser user) {
HosPersonal hosPersonal = new HosPersonal();
hosPersonal.setPersonalId(InternalConverterUtil.getHsaId(user.getHsaId()));
hosPersonal.setFullstandigtNamn(user.getNamn());
hosPersonal.setForskrivarkod(user.getForskrivarkod());
hosPersonal.setEnhet(buildEnhet(user));
return hosPersonal;
}
use of se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal in project webcert by sklintyg.
the class NotificationTestHelper method createIntyg.
public static Intyg createIntyg(String intygsTyp) {
Intyg intyg = new Intyg();
IntygId intygId = new IntygId();
intygId.setExtension("intyg123");
intyg.setIntygsId(intygId);
TypAvIntyg typAvIntyg = new TypAvIntyg();
typAvIntyg.setCode(intygsTyp);
intyg.setTyp(typAvIntyg);
intyg.setPatient(buildPatient());
HosPersonal hosPersonal = new HosPersonal();
Enhet enhet = new Enhet();
enhet.setVardgivare(new Vardgivare());
enhet.setArbetsplatskod(new ArbetsplatsKod());
hosPersonal.setEnhet(enhet);
intyg.setSkapadAv(hosPersonal);
// DatePeriodType and PartialDateType must be allowed
intyg.getSvar().add(InternalConverterUtil.aSvar("").withDelsvar("", InternalConverterUtil.aDatePeriod(LocalDate.now(), LocalDate.now().plusDays(1))).withDelsvar("", InternalConverterUtil.aPartialDate(PartialDateTypeFormatEnum.YYYY, Year.of(1999))).build());
return intyg;
}
use of se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal in project webcert by sklintyg.
the class CreateNewDraftRequestBuilderTest method createUtlatande.
private Utlatande createUtlatande() {
Utlatande utlatande = new Utlatande();
// Type
TypAvUtlatande utlTyp = new TypAvUtlatande();
utlTyp.setCode(CERT_TYPE);
utlatande.setTypAvUtlatande(utlTyp);
// HoSPerson
HsaId userHsaId = new HsaId();
userHsaId.setExtension(USER_HSAID);
userHsaId.setRoot("USERHSAID");
HosPersonal hosPerson = new HosPersonal();
hosPerson.setPersonalId(userHsaId);
hosPerson.setFullstandigtNamn(FULLSTANDIGT_NAMN);
HsaId unitHsaId = new HsaId();
unitHsaId.setExtension(UNIT_HSAID);
unitHsaId.setRoot("UNITHSAID");
Enhet hosEnhet = new Enhet();
hosEnhet.setEnhetsId(unitHsaId);
hosPerson.setEnhet(hosEnhet);
utlatande.setSkapadAv(hosPerson);
// Patient
PersonId personId = new PersonId();
personId.setRoot("PERSNR");
personId.setExtension(PERSNR);
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.setPatient(patType);
return utlatande;
}
use of se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal in project webcert by sklintyg.
the class CreateNewDraftRequestBuilderTest method createIntyg.
private Intyg createIntyg() {
Intyg intyg = new Intyg();
TypAvIntyg intygTyp = new TypAvIntyg();
intygTyp.setCode(CERT_TYPE);
intyg.setTypAvIntyg(intygTyp);
HosPersonal hosPerson = new HosPersonal();
HsaId userHsaId = new HsaId();
userHsaId.setExtension(USER_HSAID);
userHsaId.setRoot("USERHSAID");
hosPerson.setPersonalId(userHsaId);
hosPerson.setFullstandigtNamn(FULLSTANDIGT_NAMN);
Enhet hosEnhet = new Enhet();
HsaId unitHsaId = new HsaId();
unitHsaId.setExtension(UNIT_HSAID);
unitHsaId.setRoot("UNITHSAID");
hosEnhet.setEnhetsId(unitHsaId);
hosPerson.setEnhet(hosEnhet);
intyg.setSkapadAv(hosPerson);
Patient patType = new Patient();
PersonId personId = new PersonId();
personId.setRoot("PERSNR");
personId.setExtension(PERSONNUMMER);
patType.setPersonId(personId);
patType.setFornamn(FORNAMN);
patType.setMellannamn(MELLANNAMN);
patType.setEfternamn(EFTERNAMN);
patType.setPostadress(PATIENT_POSTADRESS);
patType.setPostnummer(PATIENT_POSTNUMMER);
patType.setPostort(PATIENT_POSTORT);
intyg.setPatient(patType);
return intyg;
}
Aggregations