Search in sources :

Example 1 with UtlatandeType

use of se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType 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 UtlatandeType

use of se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType 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 UtlatandeType

use of se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType 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)

Example 4 with UtlatandeType

use of se.riv.clinicalprocess.healthcond.certificate.certificatestatusupdateforcareresponder.v1.UtlatandeType in project webcert by sklintyg.

the class NotificationStoreTest method populateNotificationsMap.

private void populateNotificationsMap(int nbr, NotificationStoreImpl notificationStore, LocalDateTime baseTime) {
    Iterator<String> intygsIdIter = Iterables.cycle(INTYG_IDS).iterator();
    for (int i = 0; i < nbr; i++) {
        String intygsId = intygsIdIter.next();
        Handelse handelse = new Handelse();
        handelse.setHandelsetidpunkt(baseTime.minusMinutes(nbr - i));
        UtlatandeType utl = new UtlatandeType();
        utl.setHandelse(handelse);
        utl.setUtlatandeId(new UtlatandeId());
        utl.getUtlatandeId().setExtension(intygsId);
        CertificateStatusUpdateForCareType type = new CertificateStatusUpdateForCareType();
        type.setUtlatande(utl);
        notificationStore.put(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

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