Search in sources :

Example 1 with GetCertificateTypeType

use of se.inera.intyg.clinicalprocess.healthcond.certificate.getcertificatetype.v1.GetCertificateTypeType in project webcert by sklintyg.

the class IntygServiceImpl method getIntygsTyp.

@Override
public String getIntygsTyp(String intygsId) {
    GetCertificateTypeType requestType = new GetCertificateTypeType();
    requestType.setIntygsId(intygsId);
    try {
        GetCertificateTypeResponseType responseType = getCertificateTypeService.getCertificateType(logicalAddress, requestType);
        return responseType.getTyp().getCode();
    } catch (WebCertServiceException e) {
        LOG.error("Failed to decide on the type of certificate");
        if (e.getErrorCode() == WebCertServiceErrorCodeEnum.DATA_NOT_FOUND) {
            return null;
        }
        throw e;
    }
}
Also used : GetCertificateTypeType(se.inera.intyg.clinicalprocess.healthcond.certificate.getcertificatetype.v1.GetCertificateTypeType) GetCertificateTypeResponseType(se.inera.intyg.clinicalprocess.healthcond.certificate.getcertificatetype.v1.GetCertificateTypeResponseType) WebCertServiceException(se.inera.intyg.webcert.common.service.exception.WebCertServiceException)

Aggregations

GetCertificateTypeResponseType (se.inera.intyg.clinicalprocess.healthcond.certificate.getcertificatetype.v1.GetCertificateTypeResponseType)1 GetCertificateTypeType (se.inera.intyg.clinicalprocess.healthcond.certificate.getcertificatetype.v1.GetCertificateTypeType)1 WebCertServiceException (se.inera.intyg.webcert.common.service.exception.WebCertServiceException)1