Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This is the way errors was handled in the Tiani solution. This code is a part from the epSOS-Web and how it handled the errorCodes from the tiani solution. The advantage with using Objects for this is that you can handle more then one exception which is the case for a CDA that can have many errors or partial errors. As its done now in the openNCP only one error is handled since its throwing an exception directly in the code. Another thing that was also contained in the object that tiani had was the actual exception offcourse.

        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>

 

 

 

  • No labels