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;
}
Aggregations