Difference between revisions of "The MIRCdocument Schema"
(42 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
The MIRCdocument schema includes all the MIRC-specific elements and attributes that can be included in a document on a MIRC site running the RSNA MIRC software. Where noted below, HTML elements may also be included as well. | The MIRCdocument schema includes all the MIRC-specific elements and attributes that can be included in a document on a MIRC site running the RSNA MIRC software. Where noted below, HTML elements may also be included as well. | ||
− | All elements in the schema include a <b>visible</b> attribute that allows the author to instruct a MIRC site's display software whether to render the contents of the element. Except where noted, the default value of the <b>visible</b> attribute is <b>yes</b>. The rendering behavior described | + | All elements in the schema include a <b>visible</b> attribute that allows the author to instruct a MIRC site's display software whether to render the contents of the element. The attribute can take one of three values: |
+ | * <b>yes</b> renders the element. | ||
+ | * <b>no</b> suppresses rendering of the element. | ||
+ | * <b>owner</b> renders element only if the user is an owner of the document. | ||
+ | Except where noted, the default value of the <b>visible</b> attribute is <b>yes</b>. The rendering behavior described in this article is that provided by the RSNA MIRC software when MIRCdocuments are accessed by a browser (via an HTTP GET). In all cases, if an element's <b>visible</b> attribute is <b>no</b>, none of its children are rendered, and if an element's <b>visible</b> attribute is <b>yes</b>, only children whose <b>visible</b> attributes are <b>yes</b> are rendered. | ||
==The <b>MIRCdocument</b> Element== | ==The <b>MIRCdocument</b> Element== | ||
Line 60: | Line 64: | ||
The description in the section above applies to MIRCdocuments stored on MIRC sites using the RSNA MIRC software. It is important not to confuse the flexibility in the use of the <b>docref</b> attribute described here with the inflexible requirement that a Storage Service provide a fully qualified URL for each document in its <b>MIRCqueryresult</b> reply to a Query Service. | The description in the section above applies to MIRCdocuments stored on MIRC sites using the RSNA MIRC software. It is important not to confuse the flexibility in the use of the <b>docref</b> attribute described here with the inflexible requirement that a Storage Service provide a fully qualified URL for each document in its <b>MIRCqueryresult</b> reply to a Query Service. | ||
− | The <b>MIRCqueryresult</b> schema uses the <b>MIRCdocument</b> element to describe each document meeting the search criteria it received in a MIRCquery. A detailed description of the <b>MIRCqueryresult</b> schema is included in a [[ | + | The <b>MIRCqueryresult</b> schema uses the <b>MIRCdocument</b> element to describe each document meeting the search criteria it received in a MIRCquery. A detailed description of the <b>MIRCqueryresult</b> schema is included in a [[The_MIRCqueryresult_Schema|separate article]]. Briefly, a <b>MIRCqueryresult</b> has the following form: |
<pre> | <pre> | ||
Line 205: | Line 209: | ||
The RSNA MIRC software ignores the value of the <b>visible</b> attribute of the <b>keywords</b> element. | The RSNA MIRC software ignores the value of the <b>visible</b> attribute of the <b>keywords</b> element. | ||
===<b>section</b>=== | ===<b>section</b>=== | ||
− | The optional <b>section</b> element is used to identify separate parts of a MIRCdocument. It | + | The optional <b>section</b> element is used to identify separate parts of a MIRCdocument. It may contain several attributes: |
+ | *<b>heading</b> contains the text heading applied to the section when the MIRCdocument is rendered by a browser. This attribute is required. | ||
+ | *<b>image-width</b> contains the maximum width allocated to an image when it is inserted in the section. The default value is 256. | ||
+ | *<b>min-width</b> contains the minimum width allocated to an image when it is inserted in the section. The default value is zero. The <b>min-width</b> attribute must be less than or equal to the <b>image-width</b>. | ||
+ | *<b>after</b> contains the date after which the section is to be displayed when the document is rendered. The date is required to be in the format YYYYMMDD. This allows a section to be concealed until after a specific date. If the attribute is missing, the section is not concealed. | ||
+ | |||
+ | The value of the <b>section</b> element is the content of the section. HTML may be used for formatting; in particular, HTML paragraph elements should generally be used to identify paragraphs. (The rendering software can display content not contained in paragraphs, and certain third-party authoring software sometimes creates documents in this way, but the Author Service is more strict than the display software, so it is necessary to use HTML paragraphs if the Author Service is to be used to edit the document.) | ||
<pre> | <pre> | ||
Line 293: | Line 303: | ||
*<b>format</b> contains a description of the format of the document to be found at <b>href</b>. | *<b>format</b> contains a description of the format of the document to be found at <b>href</b>. | ||
− | The | + | The <b>format</b> attribute is optional and is not displayed in the MIRCdocument. |
− | The | + | The value text contains the link text that is rendered in the MIRCdocument. |
The RSNA MIRC software ignores the value of the <b>visible</b> attribute of the <b>a</b> element and applies instead the <b>visible</b> attribute of its parent. | The RSNA MIRC software ignores the value of the <b>visible</b> attribute of the <b>a</b> element and applies instead the <b>visible</b> attribute of its parent. | ||
− | + | ====<b>href</b>==== | |
− | + | To simplify the construction of <b>href</b> attribute values in MIRCdocuments that are automatically generated by the DICOM Service, the TCE Service and the Zip Service, the <b>a</b> element also supports the <b>href</b> child element. | |
+ | |||
+ | The text value of the <b>href</b> element is converted into an attribute when a MIRCdocument is rendered by the RSNA MIRC implementation. Ampersands are not allowed in the text value of the element. To provide query parameter separators, during the conversion, all plus sign characters (+) are converted into ampersand entities (&amp;). | ||
+ | |||
+ | In an <b>a</b> element, if an <b>href</b> attribute and an <b>href</b> child element are both present, the attribute takes precedence. | ||
+ | |||
+ | Examples of the use of this element are included in [[MIRC Templates]]. | ||
+ | |||
+ | ===<b>iframe</b>=== | ||
+ | The <b>iframe</b> element inserts an internal frame into a MIRCdocument. The <b>iframe</b> element is taken directly from HTML. All the HTML attributes of this element are supported. | ||
+ | |||
+ | The RSNA MIRC software ignores the value of the <b>visible</b> attribute of the <b>iframe</b> element and applies instead the <b>visible</b> attribute of its parent. | ||
+ | |||
+ | ====<b>src</b>==== | ||
+ | To simplify the construction of <b>src</b> attribute values in MIRCdocuments that are automatically generated by the DICOM Service, the TCE Service and the Zip Service, the <b>iframe</b> element also supports the <b>src</b> child element. | ||
+ | |||
+ | The text value of the <b>src</b> element is converted into an attribute when a MIRCdocument is rendered by the RSNA MIRC implementation. Ampersands are not allowed in the text value of the element. To provide query parameter separators, during the conversion, all plus sign characters (+) are converted into ampersand entities (&amp;). | ||
+ | |||
+ | In an <b>iframe</b> element, if a <b>src</b> attribute and a <b>src</b> child element are both present, the attribute takes precedence. | ||
+ | |||
+ | Examples of the use of this element are included in [[MIRC Templates]]. | ||
===<b>code</b>=== | ===<b>code</b>=== | ||
Line 310: | Line 340: | ||
When rendered by the RSNA MIRC software, the <b>code</b> element is displayed as: | When rendered by the RSNA MIRC software, the <b>code</b> element is displayed as: | ||
− | + | :[<b>coding-system</b> attribute value]:[<b>code</b> element value] ([<b>meaning</b> element value]) | |
− | [<b>coding-system</b> attribute value]:[<b>code</b> element value] ([<b>meaning</b> element value]) | ||
− | |||
For example, the following element: | For example, the following element: | ||
Line 341: | Line 369: | ||
===<b>patient</b>=== | ===<b>patient</b>=== | ||
The <b>patient</b> element is used to encapsulate elements describing specific parameters of a patient. | The <b>patient</b> element is used to encapsulate elements describing specific parameters of a patient. | ||
+ | |||
+ | The <b>patient</b> element supports a special value of the <b>visible</b> attribute (<b>phi-restricted</b>), which suppresses the display of the <b>pt-name</b>, <b>pt-id</b>, and <b>pt-mrn</b> elements when the user viewing the document is not the document owner. All other values of the <b>visible</b> attribute are ignored. | ||
The subsections below describe the child elements unique to the <b>patient</b> element. Here is an example using some of the child elements: | The subsections below describe the child elements unique to the <b>patient</b> element. Here is an example using some of the child elements: | ||
Line 381: | Line 411: | ||
The <b>pt-race</b> element contains the name of the race of the patient. | The <b>pt-race</b> element contains the name of the race of the patient. | ||
====<b>pt-species</b>==== | ====<b>pt-species</b>==== | ||
− | <b>pt-species</b> element contains the name of the species of the patient. This element is intended for use in veterinary medicine and paleontology. | + | The <b>pt-species</b> element contains the name of the species of the patient. This element is intended for use in veterinary medicine and paleontology. |
+ | |||
====<b>pt-breed</b>==== | ====<b>pt-breed</b>==== | ||
The <b>pt-breed</b> element contains the name of the breed of the patient. This element is intended for use in veterinary medicine. | The <b>pt-breed</b> element contains the name of the breed of the patient. This element is intended for use in veterinary medicine. | ||
Line 389: | Line 420: | ||
Its <b>src</b> attribute contains the URL of the image to be displayed. | Its <b>src</b> attribute contains the URL of the image to be displayed. | ||
− | The <b>image</b> element also has the <b>width</b> and <b>height</b> attributes of the HTML <b>img</b> element. These are passed to the browser to set the displayed width and height of the image; they do not refer to the actual size of the image in the file on the server. | + | The <b>image</b> element also has the <b>width</b> and <b>height</b> attributes of the HTML <b>img</b> element. These are passed to the browser to set the displayed width and height of the image in a page-mode display; they do not refer to the actual size of the image in the file on the server. |
The value of an <b>image</b> element may be empty or it one or more <b>alternative-image</b> elements, and optionally <b>patient</b>, <b>diagnosis</b>, <b>anatomy</b>, <b>pathology</b>, and <b>code</b> elements to associate the parameters of the patient and/or the diagnosis with the image. It may also contain the <b>modality</b>, <b>format</b> and <b>compression</b> elements to encode parameters of the image itself. | The value of an <b>image</b> element may be empty or it one or more <b>alternative-image</b> elements, and optionally <b>patient</b>, <b>diagnosis</b>, <b>anatomy</b>, <b>pathology</b>, and <b>code</b> elements to associate the parameters of the patient and/or the diagnosis with the image. It may also contain the <b>modality</b>, <b>format</b> and <b>compression</b> elements to encode parameters of the image itself. | ||
+ | |||
+ | The <b>image</b> and <b>alternative-image</b> elements may also contain <b>w</b> and <b>h</b> attributes which specify the actual width and height of the image in the file on the server. These are used to allow dynamic fitting of the image to a displayed area in a MIRCdocument display. | ||
+ | |||
+ | The <b>image</b> element may also contain <b>image-caption</b> elements to provide static and clickable text captions. | ||
The RSNA MIRC software ignores the value of the <b>visible</b> attribute of the <b>image</b> element and applies instead the <b>visible</b> attribute of its parent. | The RSNA MIRC software ignores the value of the <b>visible</b> attribute of the <b>image</b> element and applies instead the <b>visible</b> attribute of its parent. | ||
Line 434: | Line 469: | ||
<alternative-image role="original-dimensions" src="IMG_1719_orig.jpg"/> | <alternative-image role="original-dimensions" src="IMG_1719_orig.jpg"/> | ||
<alternative-image role="original-format" src="IMG_1719.dcm"/> | <alternative-image role="original-format" src="IMG_1719.dcm"/> | ||
+ | <image-caption display="always">Static caption</image-caption> | ||
+ | <image-caption display="click">Clickable caption</image-caption> | ||
</image> | </image> | ||
</pre> | </pre> | ||
− | In this group, the <b>alternative-image</b> children are different versions of the original image (in this case, <b>IMG_1719.dcm</b>) for various purposes. As in the preceding example, other child elements could have been included to provide additional information about the group. | + | In this group, the <b>alternative-image</b> children are different versions of the original image (in this case, <b>IMG_1719.dcm</b>) for various purposes. This group also includes two <b>image-caption</b> elements. As in the preceding example, other child elements could also have been included to provide additional information about the group. |
====<b>format</b>==== | ====<b>format</b>==== | ||
The <b>format</b> element is used to identify the storage format of an image. | The <b>format</b> element is used to identify the storage format of an image. | ||
Line 466: | Line 503: | ||
*<b>svg</b> identifies the annotation data as scalar vector graphics instructions for displaying the annotations overlaid on the primary image when annotations are to be displayed. | *<b>svg</b> identifies the annotation data as scalar vector graphics instructions for displaying the annotations overlaid on the primary image when annotations are to be displayed. | ||
The <b>alternative-image</b> element may optionally contain the <b>width</b> and <b>height</b> attributes of the HTML <b>img</b> element. | The <b>alternative-image</b> element may optionally contain the <b>width</b> and <b>height</b> attributes of the HTML <b>img</b> element. | ||
− | The <b>alternative-image</b> element is always a child of | + | The <b>alternative-image</b> element is always a child of an <b>image</b> element, and its <b>visible</b> attribute and those of all its children are ignored. |
The <b>alternative-image</b> element may also contain <b>format</b> and <b>compression</b> child elements. | The <b>alternative-image</b> element may also contain <b>format</b> and <b>compression</b> child elements. | ||
+ | ====<b>image-caption</b>==== | ||
+ | The <b>image-caption</b> element provides a text caption for an image. It has one attribute, <b>display</b>, with two possible values: | ||
+ | *<b>always</b> [the default] displays the caption whenever the image is displayed. | ||
+ | *<b>click</b> displays the caption when a prompt (<b>more...</b>) is clicked. | ||
+ | There can be at most one <b>image-caption</b> element with each value of the <b>display</b> attribute, and if two elements are present, the <b>display="always"</b> element is displayed first. | ||
===<b>quiz</b>=== | ===<b>quiz</b>=== | ||
Line 543: | Line 585: | ||
*If the <b>jump-buttons</b> attribute has the value <b>yes</b>, the rendering software inserts two HTML buttons with the values “<<<” and “>>>”. The buttons allow the user to jump up or down to the previous or next <b>text-caption</b>. | *If the <b>jump-buttons</b> attribute has the value <b>yes</b>, the rendering software inserts two HTML buttons with the values “<<<” and “>>>”. The buttons allow the user to jump up or down to the previous or next <b>text-caption</b>. | ||
*If the the <b>show-button</b> attribute has the value <b>yes</b> and the text content of the caption is non-whitespace, then the text content of the caption is initially hidden when the document is rendered and an HTML button with the value “Show Caption” is inserted between the “<<<” and “>>>” buttons, allowing the user to reveal the caption after examining the content above it. | *If the the <b>show-button</b> attribute has the value <b>yes</b> and the text content of the caption is non-whitespace, then the text content of the caption is initially hidden when the document is rendered and an HTML button with the value “Show Caption” is inserted between the “<<<” and “>>>” buttons, allowing the user to reveal the caption after examining the content above it. | ||
− | Note: As described in the [[MIRC Administrator's Manual]], the RSNA MIRC software also supports the substitution of images for the buttons described above. | + | Note: As described in the [[MIRC_Administrator%27s_Manual#The_MIRCdocument.xsl_and_MIRCdocument.css_Files | MIRC Administrator's Manual]], the RSNA MIRC software also supports the substitution of images for the buttons described above. |
===<b>metadata-refs</b>=== | ===<b>metadata-refs</b>=== | ||
Line 561: | Line 603: | ||
=====<b>desc</b>===== | =====<b>desc</b>===== | ||
The <b>desc</b> element describes the metadata file. The MIRCdocument generator attempts to get the description from the file, and if it fails, inserts the file name. | The <b>desc</b> element describes the metadata file. The MIRCdocument generator attempts to get the description from the file, and if it fails, inserts the file name. | ||
+ | |||
+ | ===<b>threadblock</b>=== | ||
+ | The <b>threadblock</b> element encapsulates a thread of comments. It contains one <b>thread</b> element for each topic. Each <b>thread</b> element contains one <b>post</b> element for each comment posting on the thread. The <b>threadblock</b> ande <b>thread</b> elements require <b>id</b> attributes that are globally unique to the MIRCdocument. | ||
+ | |||
+ | <pre> | ||
+ | <threadblock id="CB-1355574747426-0"> | ||
+ | <thread date="2012.12.15 at 06:32:44" | ||
+ | id="20121215063244115" | ||
+ | name="George Jetson" | ||
+ | title="This is a topic" | ||
+ | username="gjetson"> | ||
+ | <post date="2012.12.15 at 06:32:56" | ||
+ | name="Jane Jetson" | ||
+ | username="jjetson"> | ||
+ | This is a comment. | ||
+ | </post> | ||
+ | <post date="2012.12.15 at 06:33:07" | ||
+ | name="Elroy Jetson" | ||
+ | username="ejetson"> | ||
+ | This is another comment. | ||
+ | </post> | ||
+ | </thread> | ||
+ | <thread date="2012.12.15 at 06:33:20" | ||
+ | id="20121215063320492" | ||
+ | name="Astro" | ||
+ | title="This is another topic." | ||
+ | username="astro"> | ||
+ | <post date="2012.12.15 at 06:32:56" | ||
+ | name="Astro" | ||
+ | username="astro"> | ||
+ | Woof. | ||
+ | </post> | ||
+ | </thread> | ||
+ | </threadblock> | ||
+ | </pre> | ||
==Document Description Elements== | ==Document Description Elements== | ||
Line 683: | Line 760: | ||
===<b>DICOM Elements</b>=== | ===<b>DICOM Elements</b>=== | ||
DICOM elements in a template instruct the MIRCdocument generator to insert the values of DICOM dataset elements of a DICOM object into a MIRCdocument. DICOM elements are of the form <GxxxxEyyyy/>. DICOM elements have no child elements or text values. The group (G) and element (E) identifiers (xxxx and yyyy) are 4-place hexadecimal numbers. Upper case and lower case may be mixed anywhere within the element name. | DICOM elements in a template instruct the MIRCdocument generator to insert the values of DICOM dataset elements of a DICOM object into a MIRCdocument. DICOM elements are of the form <GxxxxEyyyy/>. DICOM elements have no child elements or text values. The group (G) and element (E) identifiers (xxxx and yyyy) are 4-place hexadecimal numbers. Upper case and lower case may be mixed anywhere within the element name. | ||
+ | |||
+ | DICOM elements have an optional <b>requireContent</b> attribute which can be used to suppress the processing of the element if the value obtained from the DICOM dataset is blank. An example of the use of this attribute is in situations where CT studies, including scout images, are to be received, and the scanner doesn't populate an element in the scout image. In that case, specifying <b><tt>requireContent="yes"</tt></b> will prevent the scout image from replacing the DICOM element with a blank value and allow a subsequently received image to populate it. | ||
DICOM elements have an optional <b>desc</b> attribute which is typically used to indicate the human-readable name of the DICOM element it references. This attribute is not used by the MIRCdocument generator if the element references a DICOM element in the DICOM dictionary. For private elements in the dataset, however, it can provide a label for the data in a table. Generally it is recommended to supply the <b>desc</b> attribute, if only to make the template file more readable. The following are examples of DICOM elements: | DICOM elements have an optional <b>desc</b> attribute which is typically used to indicate the human-readable name of the DICOM element it references. This attribute is not used by the MIRCdocument generator if the element references a DICOM element in the DICOM dictionary. For private elements in the dataset, however, it can provide a label for the data in a table. Generally it is recommended to supply the <b>desc</b> attribute, if only to make the template file more readable. The following are examples of DICOM elements: | ||
<pre> | <pre> | ||
<g0010e0010 desc="Patient Name"/> | <g0010e0010 desc="Patient Name"/> | ||
− | < | + | <G0010E0020 desc="Patient ID"/> |
<g0011e0030 desc="A Private Element"/> | <g0011e0030 desc="A Private Element"/> | ||
</pre> | </pre> | ||
As a MIRCdocument is created from a template, DICOM elements are removed and replaced by data values from the DICOM object which occasioned the creation of the MIRCdocument in the first place. For this reason, DICOM elements can only be populated from the first DICOM object encountered for the document unless the elements are wrapped in a <b>block</b> element. | As a MIRCdocument is created from a template, DICOM elements are removed and replaced by data values from the DICOM object which occasioned the creation of the MIRCdocument in the first place. For this reason, DICOM elements can only be populated from the first DICOM object encountered for the document unless the elements are wrapped in a <b>block</b> element. | ||
+ | |||
+ | ===<b>DICOM Attributes</b>=== | ||
+ | Any attribute of any element in a template can obtain the value of a DICOM element. Suppose that in the anonymization process, a private element (0021,0040) is created containing a URL, and a link to that URL is to be inserted into a paragraph: | ||
+ | <pre> | ||
+ | <p> | ||
+ | See <a href="@g0021e0040">this reference</a> for more details. | ||
+ | </p> | ||
+ | </pre> | ||
+ | In the construction of the attribute, any special characters in the text value of the identified DICOM element are converted to their XML entities. | ||
+ | |||
===<b>block</b>=== | ===<b>block</b>=== | ||
The <b>block</b> element is used to encapsulate template contents that are to be preserved for application to every object that is inserted into the MIRCdocument. The MIRCdocument generator processes the contents of the <b>block</b> element and inserts them immediately before the <b>block</b> element in the MIRCdocument. The <b>block</b> element itself is not rendered when the MIRCdocument is displayed. | The <b>block</b> element is used to encapsulate template contents that are to be preserved for application to every object that is inserted into the MIRCdocument. The MIRCdocument generator processes the contents of the <b>block</b> element and inserts them immediately before the <b>block</b> element in the MIRCdocument. The <b>block</b> element itself is not rendered when the MIRCdocument is displayed. | ||
Line 713: | Line 802: | ||
===<b>insert-image</b>=== | ===<b>insert-image</b>=== | ||
The <b>insert-image</b> element appears within a <b>section</b> element and instructs the MIRCdocument generator to insert a reference to an image. It supports the following attributes: | The <b>insert-image</b> element appears within a <b>section</b> element and instructs the MIRCdocument generator to insert a reference to an image. It supports the following attributes: | ||
− | *<b>width</b> specifies the maximum width of the JPEG image to be created. The default value is | + | *<b>width</b> specifies the maximum width of the JPEG image to be created. The default value is the width of the inserted image. |
*<b>min-width</b> specifies the minimum width of the JPEG image to be created. The default value is 0. | *<b>min-width</b> specifies the minimum width of the JPEG image to be created. The default value is 0. | ||
*<b>extra-image-min-size</b> specifies the minimum width of an extra JPEG image to be created but not referenced by the MIRCdocument. If the attribute is not present, or if the image being inserted is not a DICOM image, no extra image is created. | *<b>extra-image-min-size</b> specifies the minimum width of an extra JPEG image to be created but not referenced by the MIRCdocument. If the attribute is not present, or if the image being inserted is not a DICOM image, no extra image is created. | ||
Line 724: | Line 813: | ||
===<b>insert-megasave</b>=== | ===<b>insert-megasave</b>=== | ||
The <b>insert-megasave</b> element appears within an <b>image-section</b> element and instructs the MIRCdocument generator to insert a reference to a megasave image group. It supports the following attributes: | The <b>insert-megasave</b> element appears within an <b>image-section</b> element and instructs the MIRCdocument generator to insert a reference to a megasave image group. It supports the following attributes: | ||
− | *<b>width</b> specifies the maximum width of the JPEG image to be created. The default value is 700. | + | *<b>width</b> specifies the maximum width of the JPEG image to be created. The default value is the value of the image-pane-width attribute of the enclosing image-section element, or 700 if there is no enclosing image-section element. |
*<b>min-width</b> specifies the minimum width of the JPEG image to be created. The default value is 0. | *<b>min-width</b> specifies the minimum width of the JPEG image to be created. The default value is 0. | ||
*<b>extra-image-min-size</b> specifies the minimum width of an extra JPEG image to be created but not referenced by the MIRCdocument. If the attribute is not present, or if the image being inserted is not a DICOM image, no extra image is created. | *<b>extra-image-min-size</b> specifies the minimum width of an extra JPEG image to be created but not referenced by the MIRCdocument. If the attribute is not present, or if the image being inserted is not a DICOM image, no extra image is created. | ||
Line 743: | Line 832: | ||
===<b>metadata-refs</b>=== | ===<b>metadata-refs</b>=== | ||
The <b>metadata-refs</b> element instructs the MIRCdocument generator to insert a <b>metadata</b> child element to identify a file referenced by the MIRCdocument. This element and its children are described in the [[#metadata-refs|Special Purpose Elements section]]. | The <b>metadata-refs</b> element instructs the MIRCdocument generator to insert a <b>metadata</b> child element to identify a file referenced by the MIRCdocument. This element and its children are described in the [[#metadata-refs|Special Purpose Elements section]]. | ||
+ | |||
+ | ===<b>ATFI-element</b>=== | ||
+ | The <b>ATFI-</b> elements instruct the MIRCdocument generator to insert text content from an Additional Teaching File Information object. The following elements are supported: | ||
+ | *ATFI-abstract | ||
+ | *ATFI-keywords | ||
+ | *ATFI-history | ||
+ | *ATFI-findings | ||
+ | *ATFI-discussion | ||
+ | *ATFI-differential-diagnosis | ||
+ | *ATFI-diagnosis | ||
+ | *ATFI-anatomy | ||
+ | *ATFI-pathology | ||
+ | *ATFI-organ-system | ||
+ | *ATFI-modality | ||
+ | *ATFI-category | ||
+ | *ATFI-level | ||
+ | |||
+ | These elements insert text from the corresponding container in the ATFI object. They do not provide any special processing for paragraphs. If special characters are encountered (&, <, >, etc.), they are escaped. | ||
+ | |||
+ | ===<b>manifest</b>=== | ||
+ | The <b>manifest</b> element provides a list of UIDs to the TCEStorageService to tell it which objects to insert into the MIRCdocument. The element must be a first-generation child of the root element. The format of the element is: | ||
+ | |||
+ | <pre> | ||
+ | <manifest> | ||
+ | <uid>1.2.3.4.5.1</uid> | ||
+ | <uid>1.2.3.4.5.2</uid> | ||
+ | <uid>1.2.3.4.5.3</uid> | ||
+ | <uid>1.2.3.4.5.4</uid> | ||
+ | <uid>1.2.3.4.5.5</uid> | ||
+ | <uid>1.2.3.4.5.6</uid> | ||
+ | </manifest> | ||
+ | </pre> | ||
+ | Each <b><tt>uid</tt></b> element contains the SOPInstanceUID of one DICOM object to insert into the MIRCdocument created from the template. |
Latest revision as of 12:55, 15 December 2012
1 Introduction
This article describes the XML schema for indexable documents on sites using the RSNA MIRC software. It is intended for engineers implementing MIRC sites and authoring tools as well as for administrators and MIRCdocument authors who wish to exploit the full capabilities of their sites. The article assumes a basic understanding of XML. For more information on XML, see the XML Primer.
The MIRCdocument schema includes all the MIRC-specific elements and attributes that can be included in a document on a MIRC site running the RSNA MIRC software. Where noted below, HTML elements may also be included as well.
All elements in the schema include a visible attribute that allows the author to instruct a MIRC site's display software whether to render the contents of the element. The attribute can take one of three values:
- yes renders the element.
- no suppresses rendering of the element.
- owner renders element only if the user is an owner of the document.
Except where noted, the default value of the visible attribute is yes. The rendering behavior described in this article is that provided by the RSNA MIRC software when MIRCdocuments are accessed by a browser (via an HTTP GET). In all cases, if an element's visible attribute is no, none of its children are rendered, and if an element's visible attribute is yes, only children whose visible attributes are yes are rendered.
2 The MIRCdocument Element
The MIRCdocument element is the root element of all MIRCdocuments. It encloses all the content of a MIRCdocument:
<MIRCdocument> …content… </MIRCdocument>
2.1 The docref Attribute
When a user selects a MIRCdocument for display, the user's browser is directed either to the MIRCdocument itself or to another document. The optional docref attribute provides the link. To understand its use, it is helpful to understand the MIRC search mechanism.
A user accesses a MIRC Query Service from a web browser. The Query Service provides an HTML form into which the user inserts the search criteria. Upon completion of the form, the browser posts it to the Query Service, which then constructs a query from the form data and posts it to the MIRC Storage Services identified in the form. The query is an XML object in a format defined by the MIRCquery schema. Each Storage Service searches its content for documents matching the search criteria, encodes the list of matching documents in an XML object in a format defined by the MIRCqueryresult schema, and sends the list to the Query Service. In the MIRCqueryresult schema, each document that matches the search criteria is identified by a URL. The Query Service compiles the results from all the Storage Services polled and sends the consolidated results to the user's browser. The consolidated results are constructed as an HTML ordered list, where each item in the list describes one document matching the search criteria and provides a link to the document iself. When the user selects an item in the list, the browser obtains the document identified by the link. In the RSNA MIRC implementation, the docref attribute is used to construct the URL that provides that link.
Some MIRCdocuments contain a complete document, allowing them to be self-indexing. Other MIRCdocuments serve as indexable documents describing information in other formats. To accommodate these different kinds of MIRCdocuments on sites using the RSNA MIRC software, the docref attribute may be coded in several ways.
- If the docref attribute is not included in the MIRCdocument element, the RSNA MIRC Storage Service provides a link to the file containing the MIRCdocument. This technique is used when the MIRCdocument element contains a complete document. For example, a teaching file case can be constructed as a MIRCdocument and indexed by a Storage Service. When a user selects the document from a list of search results, the link takes the user to the document itself. In this case, the MIRCdocument element is defined without a docref attribute:
<MIRCdocument> …content… </MIRCdocument>
- If the docref attribute contains the name of a document with no path information, the RSNA MIRC Storage Service provides a link to the named document in the same directory on the Storage Service as the MIRCdocument. This technique is used when the MIRCdocument is only a means to index another kind of content. For example, when the actual content of interest is a presentation in PowerPoint format, it can be indexed by creating a short MIRCdocument containing the title, the authors, and an abstract. This MIRCdocument, called an "index card", is only useful during the user's search for the document, so the docref attribute is set to point to the presentation file itself, and the Storage Service stores the presentation file and the index file in the same directory.
<MIRCdocument docref="presentationfilename"> …content… </MIRCdocument>
- If the docref attribute contains the name of a document with path information, the RSNA MIRC Storage Service provides a link to the named document. This technique is a more general example of the previous case. It is used when the actual document of interest is not stored in the same directory on the Storage Service as the MIRCdocument that indexes it. Since authors generally do not control the actual storage locations of their documents, this mechanism is infrequently used, and then only by MIRC administrators.
This is an example of an index card referencing a presentation stored by a MIRC administrator in a common "presentations" directory under the "MIRCdocuments" directory of the server root:
<MIRCdocument docref="/MIRCdocuments/presentations/filename"> …content… </MIRCdocument>
- If the docref attribute contains the name of a document with a fully qualified path, the RSNA MIRC Storage Service provides a link to the named document. This technique is a more general example of the previous case. It is used when the actual content of interest is a document not stored on the same Storage Service as the MIRCdocument that indexes it. This mechanism can be used to index the contents of a webserver on a MIRC Storage Service without storing the documents on the Storage Service itself.
This is an example of an index card referencing a document stored somewhere on the web:
<MIRCdocument docref="http://www.somewhere.edu/filename"> …content… </MIRCdocument>
2.1.1 Important Note for MIRC Site Implementers
The description in the section above applies to MIRCdocuments stored on MIRC sites using the RSNA MIRC software. It is important not to confuse the flexibility in the use of the docref attribute described here with the inflexible requirement that a Storage Service provide a fully qualified URL for each document in its MIRCqueryresult reply to a Query Service.
The MIRCqueryresult schema uses the MIRCdocument element to describe each document meeting the search criteria it received in a MIRCquery. A detailed description of the MIRCqueryresult schema is included in a separate article. Briefly, a MIRCqueryresult has the following form:
<MIRCqueryresult> <MIRCdocument docref="http://www.somewhere.edu/filename"> …title, author, abstract content… </MIRCdocument> …additional <MIRCdocument> elements – one for each query match… </MIRCqueryresult>
In the MIRCqueryresult schema, each MIRCdocument element is required to provide a fully qualified URL pointing to the document. On sites using the RSNA MIRC software, that URL is generated automatically by the Storage Service as described in the section above for documents with a missing docref attribute or with one that contains a less than fully qualified URL.
2.2 The display Attribute
The MIRCdocument element also supports the optional display attribute, which can be used to instruct the MIRC rendering software on how the author intended the document to be displayed. The RSNA MIRC rendering software supports three values of the display attribute:
- page instructs the rendering software to display the document in a linear, sequential fashion as a normal document would appear. This is the default value.
- tab instructs the rendering software to display the document with each section appearing as a separate tab.
- mstf instructs the rendering software to display the document in a standardized teaching file format oriented toward residents. For compatibility with previous releases, mirctf is a synonym for mstf.
2.3 The first-tab Attribute
The first-tab attribute of the MIRCdocument element instructs the rendering software which tab to display first. This attribute is used in the tab and mstf display formats. It is ignored in the page display format. The default value of the first-tab attribute is 2.
2.4 The show-empty-tabs Attribute
The show-empty-tabs attribute of the MIRCdocument element instructs the rendering software whether to display sections that have no content. This attribute is used in the tab and mstf display formats. It is ignored in the page display format. The possible values are yes and no. The default value of the show-empty-tabs attribute is no.
2.5 The background Attribute
The background attribute of the MIRCdocument element defines the background color of the document when it is displayed. The possible values are light and dark. The default is light.
2.6 The path Attribute
The path attribute of the MIRCdocument element is dynamically generated by the RSNA MIRC software when a MIRCdocument is exported from a storage service. It is used to provide third-party, client-side authoring tools the relative path to the document on the server.
2.7 The as-mode Attribute
The as-mode attribute of the MIRCdocument element is automatically generated by the Author Service when an author edits the MIRCdocument. It defines whether technical elements are displayed in the editor. Its possible values are true and false.
2.8 The visible Attribute
The visible attribute of the MIRCdocument element is ignored by the RSNA MIRC software.
3 Document Structure Elements
Certain first-generation child elements of the MIRCdocument element are used to provide structure for a document, encapsulating titles, authors, abstracts, keywords, and the various content sections of the document. They are used both to encode key information to be matched against search criteria and to organize the entire document for display.
The RSNA MIRC software only displays MIRCdocument content which appears within one of these elements. Information included for indexing purposes only can be placed as text value or child elements of the MIRCdocument element or in a section element with the visible attribute set to no.
3.1 title
The title element contains the title of the document. The title element and the alternative-title element determine the title displayed when the document is rendered or when it appears in a list of search results. See the next section, alternative-title, for details. HTML should not be embedded in the title element.
<MIRCdocument> <title>This is the Title</title> …content… </MIRCdocument>
The RSNA MIRC software ignores the value of the visible attribute of the title element.
3.2 alternative-title
The optional alternative-title element provides a title which is used when the document is requested to be displayed as an unknown case.
HTML should not be embedded in the alternative-title element.
The RSNA MIRC software ignores the the visible attribute of the <alternative-title> element.
When the Storage Service receives a query requesting the results as unknowns, it substitutes the contents of the alternative-title element for the title element when constructing the list of query results. If the alternative-title element is missing, the Storage Service generates a title as described in the section on the category element.
The Storage Service similarly substitutes the contents of the alternative-title element when it is requested to display the document as an unknown.
3.3 author
The optional author element contains information for a single author. When a document has multiple authors, multiple author elements are used.
Within the author element are three optional child elements containing the author's name, affiliation, and contact information.
HTML should not be embedded in the author element or its children.
<MIRCdocument> <title>This is the Title</title> <author> <name>John Author</name> <affiliation>Organization of John Author</affiliation> <contact>Email address of John Author</contact> <contact>Post address of John Author – line 1</contact> <contact>Post address of John Author – line 2</contact> </author> <author> <name>Mary Author</name> <affiliation>Organization of Mary Author</affiliation> <contact>Email address of Mary Author</contact> </author> …content… </MIRCdocument>
The RSNA MIRC software ignores the value of the visible attribute of the author element and its children.
3.3.1 name
The name element contains the author's name. No provision is made for identifying the given name, surname, or titles. The value of each name element appears in the search result list.
3.3.2 affiliation
The affiliation element contains one line of the name of an organization with which the author is affiliated. If multiple lines are required, or if the author is affiliated with multiple organizations, multiple affiliation elements are used. No provision is made for separating multiple organizations.
3.3.3 contact
The contact element contains one line of information on how to contact the author. If multiple lines are required, multiple contact elements are used. No provision is made for identifying the kind of contact information (phone, email, post, etc.) contained in the element.
3.4 abstract
The abstract element contains the abstract of the document. The abstract element and the alternative-abstract element determine the abstract displayed when the document is rendered or when it appears in a list of search results. See the next section, alternative-abstract, for details.
HTML may be used for formatting; in particular, HTML paragraph elements must be used to identify the paragraphs.
<MIRCdocument> …content… <abstract> <p> First <b>paragraph</b> of the abstract. </p> <p> Second <b>paragraph</b> of the abstract. </p> </abstract> …content… </MIRCdocument>
The RSNA MIRC software ignores the value of the visible attribute of the <abstract element.
3.5 alternative-abstract
The alternative-abstract element provides an alternative abstract which is used when the document is requested to be displayed as an unknown case.
HTML may be used for formatting as in the abstract element.
The RSNA MIRC software ignores the visible attribute of the alternative-abstract element.
When the Storage Service receives a query requesting the results as unknowns, it substitutes the contents of the alternative-abstract element for the abstract element when constructing the list of query results. If the alternative-abstract element is missing, the Storage Service generates no abstract element.
For MIRCdocuments with the display attribute set to page, the Storage Service similarly substitutes the contents of the alternative-abstract element when it is requested to display the document as an unknown. (The abstract element is used in MIRCdocuments with the display attribute set to tab or mstf. In these documents, the abstract is included in the first tab and the first tab displayed is typically the second tab, thus concealing the content of the abstract until the user wants to see it.)
3.6 keywords
The optional keywords element contains a list of words under which the document should be indexed. Although all words in a document are indexed, the keywords element makes it also possible to query for only those words explicitly identified as keywords.
HTML should not be embedded in the keywords element.
<MIRCdocument> …content… <keywords>word1 word2 word3</keywords> …content… </MIRCdocument>
The RSNA MIRC software ignores the value of the visible attribute of the keywords element.
3.7 section
The optional section element is used to identify separate parts of a MIRCdocument. It may contain several attributes:
- heading contains the text heading applied to the section when the MIRCdocument is rendered by a browser. This attribute is required.
- image-width contains the maximum width allocated to an image when it is inserted in the section. The default value is 256.
- min-width contains the minimum width allocated to an image when it is inserted in the section. The default value is zero. The min-width attribute must be less than or equal to the image-width.
- after contains the date after which the section is to be displayed when the document is rendered. The date is required to be in the format YYYYMMDD. This allows a section to be concealed until after a specific date. If the attribute is missing, the section is not concealed.
The value of the section element is the content of the section. HTML may be used for formatting; in particular, HTML paragraph elements should generally be used to identify paragraphs. (The rendering software can display content not contained in paragraphs, and certain third-party authoring software sometimes creates documents in this way, but the Author Service is more strict than the display software, so it is necessary to use HTML paragraphs if the Author Service is to be used to edit the document.)
<MIRCdocument> …content… <section heading="Method"> …Method section contents… </section> <section heading="Results"> …Results section contents… </section> …more content… </MIRCdocument>
MIRCdocuments used as index cards generally do not have section elements since index cards are only displayed as query results. For all other applications of the MIRCdocument schema, however, the section element provides the way for the author to group related parts of the document together. This grouping instructs the RSNA MIRC software on how to handle the parts of the document when it is displayed. For example, in tab display mode, the RSNA MIRC software creates a separate tab for each section, using the heading attribute as the title of the tab.
3.8 image-section
The optional image-section element is used to collect groups of related images. The image-section element supports the heading attribute in the page and tab display modes. The heading attribute provides a label for the section containing the images.
The image-section element supports the image-pane-width attribute, which instructs the RSNA display software how much space to allocate for image display in the right pane in the tab and mstf display modes. The default value of the image-pane-width attribute is 700. The RSNA MIRC software enforces a minimum width of 512.
The RSNA MIRC software ignores the value of the visible attribute of the image-section element.
3.9 references
The optional references element encapsulates a set of reference elements in the MIRCdocument. The RSNA MIRC software generates a separate section entitled "References" when the MIRCdocument is displayed. The software automatically generates an ordered list of the reference child elements.
<MIRCdocument> …content… <references> <reference> …text of the first reference… </reference> <reference> …text of the second reference… </reference> …additional references… </references> …content… </MIRCdocument>
The RSNA MIRC software ignores the value of the visible attribute of the references element.
3.9.1 reference
The reference element is a simple container identifying the enclosed content as a reference to a publication. It has no internal formatting, although this is an area open to extension. Numbering of the reference elements is generated automatically by the references element when the MIRCdocument is rendered. HTML may be embedded in the reference element.
The RSNA MIRC software ignores the value of the visible attribute of the reference element.
3.10 rights and publication-date
If the rights element and/or the publication-date element appear as direct children of the MIRCdocument element, the RSNA MIRC software displays their values at the end of the document. If they appear within a section element, they are displayed as part of the section.
See the section below for information about the elements and their contents.
4 Special Purpose Elements
The schema includes many element which identify specific kinds of information. The RSNA MIRC software renders these elements only when they appear within a section element. Each element may appear multiple times in a section element. These elements can also be used to encode non-displayed information for indexing purposes by placing the elements as direct child elements of the MIRCdocument element.
4.1 history
The optional history element allows content to be identified as a patient history for use in specialized searches.
4.2 findings
The optional findings element allows content to be identified as the patient's history for use in specialized searches.
4.3 diagnosis
The optional diagnosis element allows content to be identified as a diagnosis for use in specialized searches.
The text value of the diagnosis element contains the diagnosis. It may also contain one or more code elements to capture diagnostic coding information. In addition, it may contain a confirmation element to describe how the diagnosis was confirmed.
<diagnosis> At <confirmation>autopsy</confirmation>, the patient was determined to have … . <code coding-system="coding system name">12345.67890</code> </diagnosis>
4.3.1 confirmation
The confirmation element describes how a diagnosis was confirmed.
4.4 differential-diagnosis
The optional differential-diagnosis element allows all or part of a part of a section to be identified as the differential diagnosis of the current case for use in specialized searches.
4.5 discussion
The optional discussion element allows all or part of a part of a section to be identified as case discussion for use in specialized searches.
4.6 pathology
The optional pathology element allows all or part of a part of a section to be identified as pathology relating to the case for use in specialized searches.
4.7 anatomy
The optional anatomy element allows all or part of a part of a section to be identified as anatomy relating to the case for use in specialized searches.
4.8 organ-system
The optional organ-system element allows all or part of a part of a section to be identified as anatomy relating to the case for use in specialized searches.
4.9 a
The a element inserts a hyperlink into a MIRCdocument. The a element is taken directly from HTML, with the addition of the format attribute:
- href contains the address of the document to which the value text is linked.
- format contains a description of the format of the document to be found at href.
The format attribute is optional and is not displayed in the MIRCdocument.
The value text contains the link text that is rendered in the MIRCdocument.
The RSNA MIRC software ignores the value of the visible attribute of the a element and applies instead the visible attribute of its parent.
4.9.1 href
To simplify the construction of href attribute values in MIRCdocuments that are automatically generated by the DICOM Service, the TCE Service and the Zip Service, the a element also supports the href child element.
The text value of the href element is converted into an attribute when a MIRCdocument is rendered by the RSNA MIRC implementation. Ampersands are not allowed in the text value of the element. To provide query parameter separators, during the conversion, all plus sign characters (+) are converted into ampersand entities (&).
In an a element, if an href attribute and an href child element are both present, the attribute takes precedence.
Examples of the use of this element are included in MIRC Templates.
4.10 iframe
The iframe element inserts an internal frame into a MIRCdocument. The iframe element is taken directly from HTML. All the HTML attributes of this element are supported.
The RSNA MIRC software ignores the value of the visible attribute of the iframe element and applies instead the visible attribute of its parent.
4.10.1 src
To simplify the construction of src attribute values in MIRCdocuments that are automatically generated by the DICOM Service, the TCE Service and the Zip Service, the iframe element also supports the src child element.
The text value of the src element is converted into an attribute when a MIRCdocument is rendered by the RSNA MIRC implementation. Ampersands are not allowed in the text value of the element. To provide query parameter separators, during the conversion, all plus sign characters (+) are converted into ampersand entities (&).
In an iframe element, if a src attribute and a src child element are both present, the attribute takes precedence.
Examples of the use of this element are included in MIRC Templates.
4.11 code
The code element contains information related to a medical code. It has one attribute and value text:
- coding-system contains the name of the code, e.g., CPT.
- the value text contains the code value itself.
The code element can optionally contain a meaning element.
When rendered by the RSNA MIRC software, the code element is displayed as:
- [coding-system attribute value]:[code element value] ([meaning element value])
For example, the following element:
<code coding-system="MyCode" visible="yes"> 12345.67890 </code>
is displayed by the RSNA MIRC software as: MyCode:12345.67890
4.11.1 meaning
The meaning element is used to encapsulate the human language meaning of the code value. For example, the following element:
<code coding-system="MyCode" visible="yes"> 12345.67890 <meaning visible="yes"> normal variant </meaning> </code>
is displayed by the RSNA MIRC software as: MyCode:12345.67890 (normal variant)
4.12 modality
The optional modality element contains a list of the modalities related to the document. If contained within an image element, it identifies the modality of the image.
4.13 patient
The patient element is used to encapsulate elements describing specific parameters of a patient.
The patient element supports a special value of the visible attribute (phi-restricted), which suppresses the display of the pt-name, pt-id, and pt-mrn elements when the user viewing the document is not the document owner. All other values of the visible attribute are ignored.
The subsections below describe the child elements unique to the patient element. Here is an example using some of the child elements:
<patient> <pt-name>John Doe</pt-name> <pt-id>7654321</pt-id> <pt-mrn>1234567</pt-id> <pt-age> <years>3</years> </pt-age> <pt-sex>male</pt-sex> <pt-race>caucasian</pt-race> </patient>
4.13.1 pt-name
The pt-name element may be used to identify a patient. It is intended for use in clinical situations where access to the patient's protected health information is restricted by the computer system on which the MIRCdocument resides. It should be omitted in situations where access to the document could compromise the privacy of the patient.
4.13.2 pt-id
The pt-id element may also be used to identify a patient. It is intended for use in clinical situations where access to the patient's protected health information is restricted by the computer system on which the MIRCdocument resides. It should be omitted in situations where access to the document could compromise the privacy of the patient.
4.13.3 pt-mrn
The pt-mrn element may be used to identify the medical record number of a patient. It is intended for use in clinical situations where access to the patient's protected health information is restricted by the computer system on which the MIRCdocument resides. It should be omitted in situations where access to the document could compromise the privacy of the patient.
4.13.4 pt-age
The pt-age element encapsulates one or more of the following child elements:
- years
- months
- weeks
- days
4.13.4.1 years
The years element contains the patient age if expressed in years.
4.13.4.2 months
The months element contains the patient age if expressed in months.
4.13.4.3 weeks
The weeks element contains the patient age if expressed in weeks.
4.13.4.4 days
The days element contains the patient age if expressed in days.
4.13.5 pt-sex
The pt-sex element contains one of the values male or female (or neutered in veterinary medicine applications).
4.13.6 pt-race
The pt-race element contains the name of the race of the patient.
4.13.7 pt-species
The pt-species element contains the name of the species of the patient. This element is intended for use in veterinary medicine and paleontology.
4.13.8 pt-breed
The pt-breed element contains the name of the breed of the patient. This element is intended for use in veterinary medicine.
4.14 image
The image element is used to encapsulate an image and related information Its src attribute contains the URL of the image to be displayed.
The image element also has the width and height attributes of the HTML img element. These are passed to the browser to set the displayed width and height of the image in a page-mode display; they do not refer to the actual size of the image in the file on the server.
The value of an image element may be empty or it one or more alternative-image elements, and optionally patient, diagnosis, anatomy, pathology, and code elements to associate the parameters of the patient and/or the diagnosis with the image. It may also contain the modality, format and compression elements to encode parameters of the image itself.
The image and alternative-image elements may also contain w and h attributes which specify the actual width and height of the image in the file on the server. These are used to allow dynamic fitting of the image to a displayed area in a MIRCdocument display.
The image element may also contain image-caption elements to provide static and clickable text captions.
The RSNA MIRC software ignores the value of the visible attribute of the image element and applies instead the visible attribute of its parent.
The following example shows the use of an image element to include a JPEG image directly in the rendered document.
<image src="http://www.abc.edu/images/image1.jpeg"> <format>jpeg</format> </image>
The image appears in sequence with the rest of the text value of the element in which the image element is contained.
The following more complex coding of the previous example shows the use of multiple child elements within an image element.
<a href="http://www.abc.edu/images/image1.dcm"> <image src="http://www.abc.edu/images/image1.jpeg"> <format visible=”no”>DICOM</format> <compression visible=”no”>original</compression> <modality visible=”no”>CT</modality> <anatomy visible=”no”>abdomen</anatomy> <pathology visible=”no”>renal carcinoma</pathology> <patient visible=”no”> <pt-age> <years>86</years> </pt-age> <pt-sex>male</pt-sex> </patient> <diagnosis visible=”no”> renal carcinoma <confirmation>pathology</confirmation> <code coding-system="ABC Code">1234.5678</code> </diagnosis> </image> </a>
The RSNA MIRC implementation often groups related images together within an image element which appears in an image-section. Such groups are sometimes called "megasave groups". The following example shows a megasave group for an image.
<image src="IMG_1719.jpg" width="374"> <alternative-image role="icon" src="IMG_1719_icon"/> <alternative-image role="annotation" src="IMG_1719_an.svg" type="svg"/> <alternative-image role="annotation" src="IMG_1719_an.jpg" type="image"/> <alternative-image role="original-dimensions" src="IMG_1719_orig.jpg"/> <alternative-image role="original-format" src="IMG_1719.dcm"/> <image-caption display="always">Static caption</image-caption> <image-caption display="click">Clickable caption</image-caption> </image>
In this group, the alternative-image children are different versions of the original image (in this case, IMG_1719.dcm) for various purposes. This group also includes two image-caption elements. As in the preceding example, other child elements could also have been included to provide additional information about the group.
4.14.1 format
The format element is used to identify the storage format of an image. The format element has the enumerated values:
- DICOM
- JPEG
- PNG
- GIF
- TIFF
4.14.2 compression
The compression element is used to identify the compression history of an image. The compression element has four enumerated values:
- original
- reversible
- non-reversible
- unknown
A value at any level in the list above implies that the compression history of the image does not include a version at a lower level. Thus, a value of reversible implies that the image in question is not simply a reversibly compressed version of an image that was non-reversibly compressed.
4.14.3 alternative-image
The alternative-image element identifies a version of the parent image element intended to be used for a specific purpose. The alternative-image element has two required attributes.
- src contains the URL of the alternative-image.
- role identifies the purpose of the alternative-image.
The role attribute has four enumerated values:
- icon identifies the alternative-image as a small image intended for use as an icon link to the parent image.
- annotation identifies the alternative-image as annotations for the parent image.
- original-dimensions identifies the alternative-image as a version of the parent image having the same dimensions as the original-format image.
- original-format identifies the alternative-image as the original image acquired by the modality (except for changes required for anonymization).
The alternative-image element with role=”annotation” has one additional attribute, type, that describes the format of the annotation data. The type attribute has two enumerated values:
- image (the default) identifies the annotation data as an image that is to replace the primary image when annotations are displayed.
- svg identifies the annotation data as scalar vector graphics instructions for displaying the annotations overlaid on the primary image when annotations are to be displayed.
The alternative-image element may optionally contain the width and height attributes of the HTML img element. The alternative-image element is always a child of an image element, and its visible attribute and those of all its children are ignored. The alternative-image element may also contain format and compression child elements.
The image-caption element provides a text caption for an image. It has one attribute, display, with two possible values:
- always [the default] displays the caption whenever the image is displayed.
- click displays the caption when a prompt (more...) is clicked.
There can be at most one image-caption element with each value of the display attribute, and if two elements are present, the display="always" element is displayed first.
4.15 quiz
The quiz element is used to contain a quiz that is displayed within a section element in the MIRCdocument. Multiple quiz elements may appear within one section element. Multiple section elements may contain quiz elements. A quiz has the following structure:
<quiz id="…"> <quiz-context> …content defining the context of the quiz… </quiz-context> <question> <question-body> …content defining the question… </question-body> <answer correct="yes|no"> <answer-body> …content shown to the user as a possible selection… </answer-body> <response> …content shown to the user if the answer is selected… </response> </answer> …additional <answer> elements… </question> …additional <question> elements… </quiz>
The quiz element has an id attribute that is intended to allow a CME interface to distinguish all the quizzes in a document. The value of the id attribute should be unique within the MIRCdocument.
HTML and MIRC elements are permitted in all the child elements. Numbering of the questions and answers is generated automatically by the display software.
Within a single quiz element, there is no limit to the number of question elements.
The RSNA MIRC software ignores the visible attribute of the quiz element and all its children.
4.15.1 quiz-context
The optional quiz-context element contains any description required to provide a context for the questions to follow.
4.15.2 question
The question element contains the body of a quiz question and its possible answers. Within a single question element, there is no limit to the number of answer elements.
4.15.2.1 question-body
The question-body element contains the content of a quiz question.
4.15.2.2 answer
The answer element contains the body of an answer to a quiz question and the response which will be provided if the user selects the answer.
The answer element may contain a correct attribute indicating whether the answer is correct (yes) or not (no). At least one answer to a question must be identified as being correct. Multiple answers to a single question may be identified as being correct. The default value of the correct attribute is no.
4.15.2.2.1 answer-body
The answer-body element contains the body of an answer to a quiz question.
4.15.2.2.2 response
The optional response element contains the response which the browser will display if the user selects the answer.
4.16 show
The show element is a special purpose display command for documents in the mstf display mode. It is used within paragraphs in section elements to generate a button that allows the user to display a specific image. The show element has two possible attributes, only one of which may be present in any specific element:
- image=”n” causes the button to display the image corresponding to the src attribute of the n-th image element in the image-section.
- annotation=”n” causes the button to display the image corresponding to the src attribute of the <alternative-image role=”annotation”> child element of the n-th image element in the image-section.
The show element is ignored in the page and tab display modes.
The show element contains no text or element children. The proper usage is:
<show image="3"/>
or
<show annotation="2"/>
4.17 text
The text element is an encapsulating element whose contents are rendered as if they were part of the element’s parent element. Its function has been overtaken by the development of the T25 version of the Author Service, but it remains in the schema for backward compatibility.
The text-caption element is used to embed a centered caption between groups of content in a section element. The text-caption element has several optional attributes:
- display can have the values always and normal. The default is normal.
- jump-buttons can have the values yes and no. The default is no.
- show-button can have the values yes and no. The default is no.
The rendering of the text-caption element depends on its contents and on the values of the display, jump-buttons and show-button attributes:
- If the text-caption element contains only whitespace text, the entire element is ignored when the MIRCdocument is rendered unless the display attribute is present with the value always, in which case the element is rendered, essentially providing an HTML break in the flow.
- If the text-caption element contains any non-whitespace text, the text contents are displayed.
- If the jump-buttons attribute has the value yes, the rendering software inserts two HTML buttons with the values “<<<” and “>>>”. The buttons allow the user to jump up or down to the previous or next text-caption.
- If the the show-button attribute has the value yes and the text content of the caption is non-whitespace, then the text content of the caption is initially hidden when the document is rendered and an HTML button with the value “Show Caption” is inserted between the “<<<” and “>>>” buttons, allowing the user to reveal the caption after examining the content above it.
Note: As described in the MIRC Administrator's Manual, the RSNA MIRC software also supports the substitution of images for the buttons described above.
4.19 metadata-refs
The RSNA MIRC implementation calls all files "metadata files". The metadata-refs element encapsulates a list of references to metadata files. The metadata-refs element may appear anywhere within a section element. It is rendered by the RSNA MIRC software as a table, with each of its metadata child elements being one row. The value of each metadata element's href attribute provides a link to the corresponding metadata file. The RSNA MIRC software ignores the visible attribute of the metadata-refs element and all its children.
4.19.1 metadata
The metadata element identifies a reference to a single data file. It has one required attribute, href, which provides the URL of the data file. There are three child elements.
4.19.1.1 type
The type element identifies the type of the metadata file. MIRC currently defines four classes:
- DicomObject: a DICOM file (image, GSPS, KOS, or SR)
- XmlObject: an XML file of any kind
- ZipObject: a zip file with any contents
- FileObject: any file not meeting the criteria above.
4.19.1.2 date
The date element identifies the date associated with the metadata file. The MIRCdocument generator attempts to get the date from the file, and if it fails, uses the last modified date of the file (typically the date the file was received).
4.19.1.3 desc
The desc element describes the metadata file. The MIRCdocument generator attempts to get the description from the file, and if it fails, inserts the file name.
4.20 threadblock
The threadblock element encapsulates a thread of comments. It contains one thread element for each topic. Each thread element contains one post element for each comment posting on the thread. The threadblock ande thread elements require id attributes that are globally unique to the MIRCdocument.
<threadblock id="CB-1355574747426-0"> <thread date="2012.12.15 at 06:32:44" id="20121215063244115" name="George Jetson" title="This is a topic" username="gjetson"> <post date="2012.12.15 at 06:32:56" name="Jane Jetson" username="jjetson"> This is a comment. </post> <post date="2012.12.15 at 06:33:07" name="Elroy Jetson" username="ejetson"> This is another comment. </post> </thread> <thread date="2012.12.15 at 06:33:20" id="20121215063320492" name="Astro" title="This is another topic." username="astro"> <post date="2012.12.15 at 06:32:56" name="Astro" username="astro"> Woof. </post> </thread> </threadblock>
5 Document Description Elements
Document description elements are used to describe a document at a high level. They typically appear as children of the MIRCdocument element and are therefore not displayed. However, they may also be placed within section elements if display is desired. With the exception of the rights element, HTML may not be used in these elements.
5.1 phi
The phi element identifies the protected health information (PHI) that is contained in the document. Absence of the element is interpreted to mean that the document contains no PHI. If the document contains PHI, the phi element contains one or more study child elements, each identifying one patient study referenced in the document. The contents of the PHI element and its children are not rendered by the RSNA MIRC implementation; they are used only to provide access logging information required by HIPAA.
5.1.1 study
The study element encapsulates the PHI for one patient study. If the document contains PHI for multiple studies, multiple study elements must be present.
5.1.1.1 si-uid
The si-uid element contains the Study Instance UID of the study whose images or patient identifying information are contained in the document.
5.1.1.2 pt-id
The pt-id element contains the identifier of the patient corresponding to the study.
5.1.1.3 pt-name
The pt-name element contains the name of the patient corresponding to the study.
5.2 document-type
The optional document-type element identifies the document as one of the following types:
- radiologic teaching file: a teaching file, which may be a single case or a collection of cases in a single MIRCdocument
- radiologic collection: a document containing references to multiple radiologic teaching files; a course; a conference
- research dataset: a MIRCdocument describing and containing a link to a research dataset
- educational document: an educational document, e.g. a presentation or course
- technical document: a technical document
Since the MIRCdocument schema permits the construction of complex documents combining characteristics of all the listed document types, multiple types may be listed within the element.
5.3 category
The optional category element identifies the document as belonging to one of the American Board of Radiology categories:
- Musculoskeletal
- Pulmonary
- Cardiovascular
- Gastrointestinal
- Genitourinary
- Neuro
- Vascular and Interventional
- Nuclear
- Ultrasound
- Pediatric
- Breast
When searching for teaching file documents, a user may request that query results be displayed as unknowns. In this case, if the document does not contain an alternative-title element, the RSNA MIRC Storage Service generates a title in the form "Unknown - category value".
5.4 level
The optional level element indicates the degree of difficulty of the document. It is intended to allow teaching files to be graded for difficulty, allowing students to search for teaching files corresponding to their level. The level element contains one of:
- primary
- intermediate
- advanced
5.5 lexicon
The optional lexicon element identifies the name of the lexicon used in the document.
5.6 access
The optional access element indicates whether a document is accessible:
- public: accessable by anyone
- restricted: accessible only by certain authenticated users
- owner: accessible only by the owner of the document
This element is automatically generated by the RSNA MIRC site software from the contents of the authorization element.
5.7 authorization
The optional authorization element controls access to the document for various purposes.
5.7.1 owner
The optional owner element defines the owner of the document. The value of the element is specific to the server hosting the document. The RSNA MIRC software uses the element to contain a comma or whitespace delimited list of usernames to be granted all privileges (read, update, export, delete).
5.7.2 read
The optional read element defines the individuals or groups who are authorized to view the the document. The value of the element is specific to the server hosting the document. The RSNA MIRC software uses the element to contain a list of usernames and roles that are authorized to read the document. Individual users can be granted the read privilege by including their usernames in the list enclosed in square brackets as in this example:
<read>resident staff [drjones] [drjohnson] technologist</read>
If the read element is missing, or if the value of the element contains “*”, all users are granted read access.
5.7.3 update
The optional update element defines the individuals or groups who are authorized to modify the document. The value of the element is specific to the server hosting the document. The RSNA MIRC software uses the element to contain a list of usernames and roles that are authorized to access the document through the author service and store modifications back on the server. Individual users can be granted the update privilege by including their usernames in the list enclosed in square brackets as in the example above.
If the update element is missing, updates are not authorized. If the value of the element contains “*”, all users are granted update privileges.
5.7.4 export
The optional export element defines the individuals or groups who are authorized to export the document from the server to their browser in the source format. The value of the element is specific to the server hosting the document. The RSNA MIRC software uses the element to contain a list of usernames and roles that are authorized to export the standard MIRC zip file containing the document’s XML file and all its local references. Individual users can be granted the export privilege by including their usernames in the list enclosed in square brackets as in the example above.
If the export element is missing, or if the value of the element contains “*”, all users are granted export privileges.
5.8 peer-review
The optional peer-review element contains information about the peer-review status of the document. If the peer-review element is missing, the document is assumed not to have been peer-reviewed. If the element is present, it must contain child elements identifying the reviewing authority and the status of the peer-review. If the <peer-review> element is displayed, all its children are displayed.
5.8.1 approval-date
The approval-date element represents the date on which the document was approved by the reviewing authority. The date must be coded in accordance with ISO 8601 (e.g., yyyy-mm-dd).
5.8.2 expiration-date
The optional expiration-date element represents the date on which the reviewing authority's approval of the document will expire. The date must be coded in accordance with ISO 8601 (e.g., yyyy-mm-dd).
5.8.3 reviewing-authority
The reviewing-authority element contains the name of the institution or organization responsible for providing the independent peer review before publication.
5.8.4 reviewer
The optional reviewer element contains the name of the reviewer.
5.9 language
The optional language element specifies the language in which the document is written. The language element has a required code attribute specifying the ISO 639:1988(E) two-letter code for the language, as defined as in http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt.
The following code fragment:
<language code="en">English</language>
generates the word "English".
The RSNA MIRC software does not enforce the correspondence between the value of the code attribute and the value of the element. Query searches on language use the value of the code attribute, so the following fragment will possibly produce unexpected results:
<language code="en">French</language>
5.10 creator
The optional creator element identifies the application program that was used to create the document.
5.11 document-id
The optional document-id element is intended to provide a place to store a unique identifier for the document. This element is not yet implemented in the RSNA MIRC software.
5.12 publication-date
The optional publication-date element contains the date associated with the document, coded in accordance with ISO 8601 (e.g., yyyy-mm-dd).
5.13 revision-history
The optional revision-history element encapsulates a set of revision elements, one for each revision of the document. If the revision-history element is displayed, all its children are displayed.
5.13.1 revision
The optional revision element encapsulates a set of elements that define the author of the revision, the date, and a description of the revision. When present, it must contain the child elements revision-author, revision-date, and revision-description.
5.13.1.1 revision-author
The revision-author element contains the name of the person who authored or revised the document.
5.13.1.2 revision-date
The revision-date element contains the release date of the revision. The date must be coded in accordance with ISO 8601 (e.g., yyyy-mm-dd).
5.13.1.3 revision-description
The revision-description element contains a description of the changes made in the revision.
5.14 rights
The optional rights element can contain any text describing the rights held to the document. HTML may be used to format the presentation of the rights text.
When the rights element is not contained within a section element, the RSNA MIRC software automatically displays the contents of the rights element at the end of a MIRCdocument. This is the only instance where a document description element is displayed when it is not contained within a document structure element.
6 Template Elements
The RSNA MIRC implementation uses XML files as templates for the automatic construction of MIRCdocuments by several of the services provided by a Storage Service. These are:
- the Author Service
- the DICOM Service
- the TCE Service
- the Zip Service
Except in the case of the Author Service, the reception of a file by a service triggers either the construction of a new MIRCdocument or the modification of an existing one. Templates are MIRCdocument files, that is, they obey the MIRCdocument schema, extended to include elements that instruct the automatic document construction mechanism how to insert data from a file into the MIRCdocument. Except where noted below, template elements themselves are not displayed when a MIRCdocument is displayed.
6.1 DICOM Elements
DICOM elements in a template instruct the MIRCdocument generator to insert the values of DICOM dataset elements of a DICOM object into a MIRCdocument. DICOM elements are of the form <GxxxxEyyyy/>. DICOM elements have no child elements or text values. The group (G) and element (E) identifiers (xxxx and yyyy) are 4-place hexadecimal numbers. Upper case and lower case may be mixed anywhere within the element name.
DICOM elements have an optional requireContent attribute which can be used to suppress the processing of the element if the value obtained from the DICOM dataset is blank. An example of the use of this attribute is in situations where CT studies, including scout images, are to be received, and the scanner doesn't populate an element in the scout image. In that case, specifying requireContent="yes" will prevent the scout image from replacing the DICOM element with a blank value and allow a subsequently received image to populate it.
DICOM elements have an optional desc attribute which is typically used to indicate the human-readable name of the DICOM element it references. This attribute is not used by the MIRCdocument generator if the element references a DICOM element in the DICOM dictionary. For private elements in the dataset, however, it can provide a label for the data in a table. Generally it is recommended to supply the desc attribute, if only to make the template file more readable. The following are examples of DICOM elements:
<g0010e0010 desc="Patient Name"/> <G0010E0020 desc="Patient ID"/> <g0011e0030 desc="A Private Element"/>
As a MIRCdocument is created from a template, DICOM elements are removed and replaced by data values from the DICOM object which occasioned the creation of the MIRCdocument in the first place. For this reason, DICOM elements can only be populated from the first DICOM object encountered for the document unless the elements are wrapped in a block element.
6.2 DICOM Attributes
Any attribute of any element in a template can obtain the value of a DICOM element. Suppose that in the anonymization process, a private element (0021,0040) is created containing a URL, and a link to that URL is to be inserted into a paragraph:
<p> See <a href="@g0021e0040">this reference</a> for more details. </p>
In the construction of the attribute, any special characters in the text value of the identified DICOM element are converted to their XML entities.
6.3 block
The block element is used to encapsulate template contents that are to be preserved for application to every object that is inserted into the MIRCdocument. The MIRCdocument generator processes the contents of the block element and inserts them immediately before the block element in the MIRCdocument. The block element itself is not rendered when the MIRCdocument is displayed.
This is an example of a block element being used to create a table of SOP Instance UIDs for the objects inserted into a MIRCdocument in a clinical trial:
<section heading="SOP Instance UIDs"> <p> <table border="1"> <tr><th>Image Number</th><th>SOP Instance UID</th></tr> <block> <tr> <td><g0020e0013 desc="Instance Number"/></td> <td><g0008e0018 desc="SOP Instance UID"/></td> </tr> </block> </table> </p> </section>
6.4 insert-image
The insert-image element appears within a section element and instructs the MIRCdocument generator to insert a reference to an image. It supports the following attributes:
- width specifies the maximum width of the JPEG image to be created. The default value is the width of the inserted image.
- min-width specifies the minimum width of the JPEG image to be created. The default value is 0.
- extra-image-min-size specifies the minimum width of an extra JPEG image to be created but not referenced by the MIRCdocument. If the attribute is not present, or if the image being inserted is not a DICOM image, no extra image is created.
- caption specifies whether a text-caption element is to be generated after the image reference. The value of the caption attribute must be numeric.
- jump-buttons indicates whether the text-caption element is to be generated with a jump-buttons attribute. The possible values of the next-button attribute are yes and no.
- show-button indicates whether the text-caption element is to be generated with a show-button attribute. The possible values of the next-button attribute are yes and no.
The insert-image element has no child elements or text value.
6.5 insert-megasave
The insert-megasave element appears within an image-section element and instructs the MIRCdocument generator to insert a reference to a megasave image group. It supports the following attributes:
- width specifies the maximum width of the JPEG image to be created. The default value is the value of the image-pane-width attribute of the enclosing image-section element, or 700 if there is no enclosing image-section element.
- min-width specifies the minimum width of the JPEG image to be created. The default value is 0.
- extra-image-min-size specifies the minimum width of an extra JPEG image to be created but not referenced by the MIRCdocument. If the attribute is not present, or if the image being inserted is not a DICOM image, no extra image is created.
The insert-megasave element has no child elements or text value.
6.6 insert-dataset
The insert-dataset element instructs the MIRCdocument generator to create a folder hierarchy within the MIRCdocument’s directory and store a copy of a DICOM image within it. The insert-dataset element appears as a first-generation child of the MIRCdocument element.
The insert-dataset element supports the phi attribute, which specifies whether the stored DICOM instance is to contain protected healthcare information. The possible values of the phi attribute are yes and no:
- phi=”yes” creates a folder named phi. Instances are stored unmodified in subdirectories named for the Series Description (if present), the Series Number (if present), or the Series Instance UID.
- phi=”no” creates a folder named no-phi. Instances are first de-identified using the storage service’s anonymization rules and then stored in subdirectories named as described above.
When MIRCdocuments containing insert-dataset elements are displayed, links are provided allowing for the export of a zip file containing the requested dataset.
6.7 metadata-refs
The metadata-refs element instructs the MIRCdocument generator to insert a metadata child element to identify a file referenced by the MIRCdocument. This element and its children are described in the Special Purpose Elements section.
6.8 ATFI-element
The ATFI- elements instruct the MIRCdocument generator to insert text content from an Additional Teaching File Information object. The following elements are supported:
- ATFI-abstract
- ATFI-keywords
- ATFI-history
- ATFI-findings
- ATFI-discussion
- ATFI-differential-diagnosis
- ATFI-diagnosis
- ATFI-anatomy
- ATFI-pathology
- ATFI-organ-system
- ATFI-modality
- ATFI-category
- ATFI-level
These elements insert text from the corresponding container in the ATFI object. They do not provide any special processing for paragraphs. If special characters are encountered (&, <, >, etc.), they are escaped.
6.9 manifest
The manifest element provides a list of UIDs to the TCEStorageService to tell it which objects to insert into the MIRCdocument. The element must be a first-generation child of the root element. The format of the element is:
<manifest> <uid>1.2.3.4.5.1</uid> <uid>1.2.3.4.5.2</uid> <uid>1.2.3.4.5.3</uid> <uid>1.2.3.4.5.4</uid> <uid>1.2.3.4.5.5</uid> <uid>1.2.3.4.5.6</uid> </manifest>
Each uid element contains the SOPInstanceUID of one DICOM object to insert into the MIRCdocument created from the template.