Skip to content

qie.parseDICOMString

Signature: qie.parseDICOMString(input*)

Returns: DICOM Message dicomMessage - the associated DICOM message object

Parse the XML, JSON, bytes, or DICOM formatted input string as a DICOM message and return the associated DICOM message object.

Note

If no input is provided, the DICOM message object returned will be empty.

Note

XML and JSON parameters can be either a Message or a String.

Note

The return value CAN NEVER be assigned to the bound-in message object; it should be assigned to a locally declared variable.

Parameters

Type Name Description Default
Object input* (optional) One of the following: XML string formatted DICOM, JSON string formatted DICOM, XML Message formatted DICOM, JSON Message formatted DICOM, DICOM Message, DICOM as raw bytes or raw String null

Example

var jsonDicomString =`
{
    "00100010": {
        "vr": "PN",
        "Value": [
            {
                "Alphabetic": "John^Doe"
            }
        ]
    },
    "00100020": {
        "vr": "LO",
        "Value": [
            "12345"
        ]
    },
    "00100030": {
        "vr": "DA",
        "Value": [
            "19800101"
        ]
    },
    "0020000D": {
        "vr": "UI",
        "Value": [
            "1.2.3.4.5.6.7.8"
        ]
    },
    "00200010": {
        "vr": "LO",
        "Value": [
            "Chest X-Ray"
        ]
    },
    "0020000E": {
    "vr": "UI",
    "Value": [
    "1.2.3.4.5.6.7.9"
    ]
    },
    "00200011": {
    "vr": "LO",
    "Value": [
    "Chest X-Ray - PA View"
    ]
    },
    "00080060": {
    "vr": "CS",
    "Value": [
    "CR"
    ]
    },
    "00080018": {
    "vr": "UI",
    "Value": [
    "1.2.3.4.5.6.7.10"
    ]
    },
    "00080016": {
    "vr": "UI",
    "Value": [
    "1.2.840.10008.5.1.4.1.1.1"
    ]
    },
    "7FE00010": {
    "vr": "OB",
    "InlineBinary": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wQAAwAB/ocL1QAAAABJRU5ErkJggg=="
    }
}
`;

var aNewDicomMessage = qie.parseDICOMString(jsonDicomString); // DICOM Message
var patientName = aNewDicomMessage.getNode("0010,0010");      // John^Doe