use of se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Enhet 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;
}
use of se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.Enhet 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;
}
Aggregations