Transformation / Translation Errors

Related issues

INT-29 - Getting issue details... STATUS

Transformation / Translation Errors

In the Tiani solution the errors for CDA documents was handled in an object. The advantage with using Objects for this is that you can handle more then one exception which is the case for a CDA documents that can have many errors or partial errors. At the moment in the openNCP (epsos-client-connector) these errors is not handled at all what I have seen. I can se the messages in the NCP-B log, but they aint sent over to the portal. Dont know if it is handled at all in the other parts in the openNCP.

Here is an example of how this is handled in the epSOS-Web.

        if (!rsp.getPartialErros().isEmpty()) {
            for (int i = 0; i < rsp.getPartialErros().size(); i++) {
                ErrorFeedback error = new ErrorFeedback();
                error.setErrorCode(rsp.getPartialErros().get(i).getErrorCode());
                error.setErrorMessage(rsp.getPartialErros().get(i).getCodeContext());
                error.setSeverityType(rsp.getPartialErros().get(i).getSeverity());
                errorList.add(error);
            }
        }

My suggestion is that we do it in the Tiani way. And uses an object to handle the errors in the response to the portal.

Example of a XCA error message:

<RegistryResponse
            status="urn:ihe:iti:2007:ResponseStatusType:PartialSuccess" xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">
            <RegistryErrorList>
               <a:RegistryError codeContext="Not valid CDA document"
                  errorCode="4504"
                  severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" xmlns:a="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">ECDATransformationHandler.Error.toEpSOSPivot(4504 / Not valid CDA document)</a:RegistryError>
               <a:RegistryError
                  codeContext="Code System not found [CodedElement [code=459099, codeSystemName=Nordisk Produktkod, oid(codeSystem)=1.2.752.129.2.1.5.1]]"
                  errorCode="4501"
                  severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" xmlns:a="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">ECDATransformationHandler.Error.toEpSOSPivot(4501 / Code System not found [CodedElement [code=459099, codeSystemName=Nordisk Produktkod, oid(codeSystem)=1.2.752.129.2.1.5.1]])</a:RegistryError>
               <a:RegistryError
                  codeContext="Code System not found [CodedElement [code=SUBST, codeSystemName=ActClass, oid(codeSystem)=2.16.840.1.113883.5.6]]"
                  errorCode="4501"
                  severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" xmlns:a="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">ECDATransformationHandler.Error.toEpSOSPivot(4501 / Code System not found [CodedElement [code=SUBST, codeSystemName=ActClass, oid(codeSystem)=2.16.840.1.113883.5.6]])</a:RegistryError>
               <a:RegistryError
                  codeContext="CodeSystem name doesn't match provided name [SubstanceAdminSubstitution != substanceAdminSubstitution]"
                  errorCode="2508"
                  severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Warning" xmlns:a="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">ECDATransformationHandler.Error.toEpSOSPivot(2508 / CodeSystem name doesn't match provided name [SubstanceAdminSubstitution != substanceAdminSubstitution])</a:RegistryError>
            </RegistryErrorList>
         </RegistryResponse>

If we do it like this there will be changes in the wsdl (client-connectors return messages). Since there is no way to handle it with the current api.

Error messages handling

Error messages handling