Encoding of PN attributes
The JSON example mappings in PS 3.18 show PN attribute values encoded as an object with a property 'Alphabetic' rather than a string:
"00080090": { "vr": "PN", "Value": [ { "Alphabetic": "^Bob^^Dr." } ] },
- Yamada^Tarou=山田^太郎=やまだ^たろう
When the XML mapping was defined, it was decided to give each group component a name rather keep it as a single value separated by an = sign. This is describe in PS 3.19 Table A.1.5-2. DICOMWeb implementors should take note of this as PN is handled differently in XML and JSON mappings than it is in DICOM P10 encodings. I know of one DICOMWeb implementation that is encoding PN as a string rather than an object with the different component groups.
Optionality of Value property
One thing the JSON example mappings in PS 3.18 do not show is that the Value property is optional. The specific rule for this can be found in PS3.19 Table A.1.5-2:
A Value from the Value Field of the DICOM Data Element. There is one Infoset Value element for each DICOM Value or Sequence Item.
|
What this means is that the Value property will not always be present and this needs to be taken into account when parsing the JSON response (and when creating a DICOM JSON document!). I know of one DICOMWeb implementation that omits the Value property for PN attributes and two other implementations that send a zero length value as an empty string rather than omitting the Value property.