Search in sources :

Example 1 with DatePeriodType

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;
}
Also used : HosPersonal(se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal) Enhet(se.riv.clinicalprocess.healthcond.certificate.v3.Enhet) TypAvIntyg(se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvIntyg) ArbetsplatsKod(se.riv.clinicalprocess.healthcond.certificate.types.v3.ArbetsplatsKod) Intyg(se.riv.clinicalprocess.healthcond.certificate.v3.Intyg) TypAvIntyg(se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvIntyg) Vardgivare(se.riv.clinicalprocess.healthcond.certificate.v3.Vardgivare) IntygId(se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)

Example 2 with DatePeriodType

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;
}
Also used : PartialDateType(se.riv.clinicalprocess.healthcond.certificate.types.v3.PartialDateType) QName(javax.xml.namespace.QName) CertificateStatusUpdateForCareType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v3.CertificateStatusUpdateForCareType) DatePeriodType(se.riv.clinicalprocess.healthcond.certificate.types.v3.DatePeriodType) JaxbDataFormat(org.apache.camel.converter.jaxb.JaxbDataFormat)

Aggregations

QName (javax.xml.namespace.QName)1 JaxbDataFormat (org.apache.camel.converter.jaxb.JaxbDataFormat)1 CertificateStatusUpdateForCareType (se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v3.CertificateStatusUpdateForCareType)1 ArbetsplatsKod (se.riv.clinicalprocess.healthcond.certificate.types.v3.ArbetsplatsKod)1 DatePeriodType (se.riv.clinicalprocess.healthcond.certificate.types.v3.DatePeriodType)1 IntygId (se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)1 PartialDateType (se.riv.clinicalprocess.healthcond.certificate.types.v3.PartialDateType)1 TypAvIntyg (se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvIntyg)1 Enhet (se.riv.clinicalprocess.healthcond.certificate.v3.Enhet)1 HosPersonal (se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal)1 Intyg (se.riv.clinicalprocess.healthcond.certificate.v3.Intyg)1 Vardgivare (se.riv.clinicalprocess.healthcond.certificate.v3.Vardgivare)1