use of se.riv.clinicalprocess.healthcond.certificate.types.v3.DatePeriodType 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.types.v3.DatePeriodType in project webcert by sklintyg.
the class NotificationRouteBuilder method initializeJaxbMessageDataFormatV3.
// CHECKSTYLE:OFF LineLength
private JaxbDataFormat initializeJaxbMessageDataFormatV3() throws JAXBException {
// We need to register DatePeriodType with the JAXBContext explicitly for some reason.
JaxbDataFormat jaxbMessageDataFormatV3 = new JaxbDataFormat(JAXBContext.newInstance(CertificateStatusUpdateForCareType.class, DatePeriodType.class, PartialDateType.class));
jaxbMessageDataFormatV3.setPartClass("se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v3.CertificateStatusUpdateForCareType");
jaxbMessageDataFormatV3.setPartNamespace(new QName("urn:riv:clinicalprocess:healthcond:certificate:CertificateStatusUpdateForCareResponder:3", "CertificateStatusUpdateForCare"));
return jaxbMessageDataFormatV3;
}
Aggregations