Search in sources :

Example 1 with UtlatandeId

use of se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId in project webcert by sklintyg.

the class RouteIT method setupConverter.

private void setupConverter() throws ModuleException {
    when(mockFk7263Transform.createCertificateStatusUpdateForCareType(any(NotificationMessage.class))).thenAnswer(invocation -> {
        NotificationMessage msg = (NotificationMessage) invocation.getArguments()[0];
        if (msg == null) {
            return null;
        }
        CertificateStatusUpdateForCareType request = new CertificateStatusUpdateForCareType();
        UtlatandeType utlatande = new UtlatandeType();
        UtlatandeId id = new UtlatandeId();
        id.setExtension(msg.getIntygsId());
        utlatande.setUtlatandeId(id);
        request.setUtlatande(utlatande);
        return request;
    });
}
Also used : NotificationMessage(se.inera.intyg.common.support.modules.support.api.notification.NotificationMessage) UtlatandeId(se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId) UtlatandeType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType) CertificateStatusUpdateForCareType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.CertificateStatusUpdateForCareType)

Example 2 with UtlatandeId

use of se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId in project webcert by sklintyg.

the class NotificationTransformerTest method setupInternalToNotification.

private void setupInternalToNotification() throws ModuleException {
    when(internalToNotification.createCertificateStatusUpdateForCareType(any())).thenAnswer(invocation -> {
        NotificationMessage msg = (NotificationMessage) invocation.getArguments()[0];
        if (msg == null) {
            return null;
        }
        CertificateStatusUpdateForCareType request = new CertificateStatusUpdateForCareType();
        UtlatandeType utlatande = new UtlatandeType();
        UtlatandeId utlatandeId = new UtlatandeId();
        utlatandeId.setExtension(msg.getIntygsId());
        utlatande.setUtlatandeId(utlatandeId);
        request.setUtlatande(utlatande);
        return request;
    });
}
Also used : NotificationMessage(se.inera.intyg.common.support.modules.support.api.notification.NotificationMessage) UtlatandeId(se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId) UtlatandeType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType) CertificateStatusUpdateForCareType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.CertificateStatusUpdateForCareType)

Example 3 with UtlatandeId

use of se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId in project webcert by sklintyg.

the class NotificationWSClientTest method createRequest.

private CertificateStatusUpdateForCareType createRequest() {
    CertificateStatusUpdateForCareType res = new CertificateStatusUpdateForCareType();
    res.setUtlatande(new UtlatandeType());
    res.getUtlatande().setUtlatandeId(new UtlatandeId());
    res.getUtlatande().getUtlatandeId().setExtension("intygsId");
    return res;
}
Also used : UtlatandeId(se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId)

Example 4 with UtlatandeId

use of se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId in project webcert by sklintyg.

the class CreateDraftCertificateResponderImpl method createSuccessResponse.

/**
 * The response sent back to caller when creating a certificate draft succeeded.
 */
private CreateDraftCertificateResponseType createSuccessResponse(String nyttUtkastsId) {
    ResultType result = ResultTypeUtil.okResult();
    UtlatandeId utlId = new UtlatandeId();
    utlId.setRoot("utlatandeId");
    utlId.setExtension(nyttUtkastsId);
    CreateDraftCertificateResponseType response = new CreateDraftCertificateResponseType();
    response.setResult(result);
    response.setUtlatandeId(utlId);
    return response;
}
Also used : CreateDraftCertificateResponseType(se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.CreateDraftCertificateResponseType) UtlatandeId(se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId) ResultType(se.riv.clinicalprocess.healthcond.certificate.v1.ResultType)

Example 5 with UtlatandeId

use of se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId in project webcert by sklintyg.

the class IntegrationTest method buildNotificationV1.

private CertificateStatusUpdateForCareType buildNotificationV1() {
    Handelse handelse = new Handelse();
    handelse.setHandelsetidpunkt(LocalDateTime.now().minusMinutes(1));
    UtlatandeType utl = new UtlatandeType();
    utl.setHandelse(handelse);
    utl.setUtlatandeId(new UtlatandeId());
    utl.getUtlatandeId().setExtension(UUID.randomUUID().toString());
    CertificateStatusUpdateForCareType type = new CertificateStatusUpdateForCareType();
    type.setUtlatande(utl);
    return type;
}
Also used : UtlatandeId(se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId) UtlatandeType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType) CertificateStatusUpdateForCareType(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.CertificateStatusUpdateForCareType) Handelse(se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.Handelse)

Aggregations

UtlatandeId (se.riv.clinicalprocess.healthcond.certificate.types.v1.UtlatandeId)6 CertificateStatusUpdateForCareType (se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.CertificateStatusUpdateForCareType)4 UtlatandeType (se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType)4 NotificationMessage (se.inera.intyg.common.support.modules.support.api.notification.NotificationMessage)2 Handelse (se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.Handelse)2 CreateDraftCertificateResponseType (se.riv.clinicalprocess.healthcond.certificate.createdraftcertificateresponder.v1.CreateDraftCertificateResponseType)1 ResultType (se.riv.clinicalprocess.healthcond.certificate.v1.ResultType)1