QIDO-RS: wrong serialization of number values


Orthanc does not correctly serialize “IS” VR in the JSON.

The DICOM standard in Part 18, Sect. F.2.3 (http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_F.2.3.html) clearly says, that each VR is mapped to a JSON Data Type.
If you compare the given table there, the VR of “IS” (Integer String) should be encoded in JSON as Number, so as e.g. [ 1234 ] and not [ “1234” ].

When you look at the samples of the standard (here: http://dicom.nema.org/medical/dicom/current/output/chtml/part18/sect_F.4.html) you can see, that IS is serialized as numbers:

        "00201206": {
            "vr": "IS",
            "Value": [ 4 ]
        "00201208": {
            "vr": "IS",
            "Value": [ 942 ]

When you query Orthanc, IS is serialized as strings:

Filed bug: https://bitbucket.org/sjodogne/orthanc/issues/112/qido-rs-wrong-serialization-of-number