Search in sources :

Example 6 with IntygId

use of se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId in project webcert by sklintyg.

the class IntygRelationHelperImplTest method buildRelation.

private Relation buildRelation(String fromIntygId, String toIntygId) {
    Relation r = new Relation();
    IntygId from = new IntygId();
    from.setExtension(fromIntygId);
    IntygId to = new IntygId();
    to.setExtension(toIntygId);
    r.setFranIntygsId(from);
    r.setTillIntygsId(to);
    TypAvRelation typ = new TypAvRelation();
    typ.setCode(RelationKod.ERSATT.value());
    r.setTyp(typ);
    r.setSkapad(LocalDateTime.now());
    return r;
}
Also used : WebcertCertificateRelation(se.inera.intyg.webcert.common.model.WebcertCertificateRelation) TypAvRelation(se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvRelation) Relation(se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation) TypAvRelation(se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvRelation) IntygId(se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)

Example 7 with IntygId

use of se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId in project webcert by sklintyg.

the class IntygRelationHelperImplTest method buildResponse.

private ListRelationsForCertificateResponseType buildResponse() {
    ListRelationsForCertificateResponseType resp = new ListRelationsForCertificateResponseType();
    IntygRelations intygRelations = new IntygRelations();
    IntygId intygId = new IntygId();
    intygId.setExtension(INTYG_ID);
    intygRelations.setIntygsId(intygId);
    intygRelations.getRelation().add(buildRelation(OTHER_INTYG_ID, INTYG_ID));
    resp.getIntygRelation().add(intygRelations);
    return resp;
}
Also used : ListRelationsForCertificateResponseType(se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.ListRelationsForCertificateResponseType) IntygRelations(se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.IntygRelations) IntygId(se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)

Example 8 with IntygId

use of se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId 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 9 with IntygId

use of se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId in project webcert by sklintyg.

the class NotificationWSClientTest method createRequest.

private CertificateStatusUpdateForCareType createRequest() {
    CertificateStatusUpdateForCareType res = new CertificateStatusUpdateForCareType();
    res.setIntyg(new Intyg());
    res.getIntyg().setIntygsId(new IntygId());
    res.getIntyg().getIntygsId().setExtension("intygsId");
    return res;
}
Also used : Intyg(se.riv.clinicalprocess.healthcond.certificate.v3.Intyg) CertificateStatusUpdateForCareType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v3.CertificateStatusUpdateForCareType) IntygId(se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)

Example 10 with IntygId

use of se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId in project webcert by sklintyg.

the class SendMessageToCareResponderImplTest method createIntygsId.

private IntygId createIntygsId(String intygId) {
    IntygId res = new IntygId();
    res.setExtension(intygId);
    res.setRoot("");
    return res;
}
Also used : IntygId(se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)

Aggregations

IntygId (se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)11 ArbetsplatsKod (se.riv.clinicalprocess.healthcond.certificate.types.v3.ArbetsplatsKod)3 Enhet (se.riv.clinicalprocess.healthcond.certificate.v3.Enhet)3 HosPersonal (se.riv.clinicalprocess.healthcond.certificate.v3.HosPersonal)3 Intyg (se.riv.clinicalprocess.healthcond.certificate.v3.Intyg)3 Vardgivare (se.riv.clinicalprocess.healthcond.certificate.v3.Vardgivare)3 Amneskod (se.riv.clinicalprocess.healthcond.certificate.types.v3.Amneskod)2 PersonId (se.riv.clinicalprocess.healthcond.certificate.types.v3.PersonId)2 MeddelandeReferens (se.riv.clinicalprocess.healthcond.certificate.v3.MeddelandeReferens)2 Message (org.apache.camel.Message)1 DefaultMessage (org.apache.camel.impl.DefaultMessage)1 Test (org.junit.Test)1 IntygRelations (se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.IntygRelations)1 ListRelationsForCertificateResponseType (se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.ListRelationsForCertificateResponseType)1 Relation (se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation)1 ModuleApi (se.inera.intyg.common.support.modules.support.api.ModuleApi)1 NotificationMessage (se.inera.intyg.common.support.modules.support.api.notification.NotificationMessage)1 WebcertCertificateRelation (se.inera.intyg.webcert.common.model.WebcertCertificateRelation)1 CertificateStatusUpdateForCareType (se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v3.CertificateStatusUpdateForCareType)1 CreateDraftCertificateResponseType (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v3.CreateDraftCertificateResponseType)1