GithubHelp home page GithubHelp logo

Comments (4)

StevenBorg avatar StevenBorg commented on May 12, 2024

Thank you, @brunoterkaly ! I'm looking through the return responses, and trying to determine one that telegraphs a "Your DICOM file didn't pass validation". We've settled on Conflict, but that's not necessarily a good one. A client could assume a file has already been uploaded (Conflict), but in actuality, it's a malformed / non-complaint DICOM file, and is just being rejected.

The following workflow would be necessarily to handle the returned value.

  1. Client uploads a file and gets a 409
  2. Client must retrieve the metadata for that a matching file (or query and check results) to ensure that the file actually is on the server.
  3. Client uses result of get to determine if they need to fix and re-upload (for bad file), delete and re-upload (to update file), or skip further processing (to leave existing file).

That's not ideal. It would be better to have an explicit return code, or barring that, a reason for the return code.

from dicom-server.

StevenBorg avatar StevenBorg commented on May 12, 2024

OK. Upon additional research we do return an additional error which provides specific context as to the upload error. Here's the code file, which maps the numeric error codes to strings. https://github.com/microsoft/dicom-server/blob/b3b7336eb35eaf69b99fc3cd4c00223c0f688c74/src/Microsoft.Health.Dicom.Core/Features/Store/FailureReasonCodes.cs

It can also be found in the conformance document here: https://github.com/microsoft/dicom-server/blob/master/docs/resources/conformance-statement.md#store-failure-reason-codes

@brunoterkaly, can you see if you're getting the error codes returned when you get a 409 for DICOM files without StudyInstanceUID? You should be seeing a 43264 error returned for a DICOM file which will fail validation.

If you're getting that code returned, I'm hoping that will resolve your issue cleanly. Here are the codes (from the conformance link above) which highlight what errors we discover:

Code Description
272 The store transaction did not store the instance because of a general failure in processing the operation.
43264 The DICOM instance failed the validation.
43265 The provided instance StudyInstanceUID did not match the specified StudyInstanceUID in the store request.
45070 A DICOM instance with the same StudyInstanceUID, SeriesInstanceUID and SopInstanceUID has already been stored. If you wish to update the contents, delete this instance first.
45071 A DICOM instance is being created by another process, or the previous attempt to create has failed and the cleanup process has not had chance to clean up yet. Please delete the instance first before attempting to create again.

from dicom-server.

jackliums avatar jackliums commented on May 12, 2024

This behavior is actually defined by the DICOMWeb spec: http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.5.3

If the request itself is malformed, the server should return 400. If the request is formed correctly but the server cannot store the instance for any reasons, then 409 is returned with the response body containing data structure describing the error: http://dicom.nema.org/medical/dicom/current/output/html/part18.html#chapter_I

from dicom-server.

StevenBorg avatar StevenBorg commented on May 12, 2024

After speaking with @brunoterkaly I'm planning on closing this issue. As @jackliums mentioned, we're likely aligned with the DICOM standard. But more importantly, we are providing a response error code that @brunoterkaly was able to use to determine why the request failed, eliminating the need for the additional server call noted above.

from dicom-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.