*Values from the submission form are automatically inserted into the <b>title</b>, <b>author</b>, <b>abstract</b>, and <b>authorization</b> elements.

*Values from the submission form are automatically inserted into the <b>title</b>, <b>author</b>, <b>abstract</b>, and <b>authorization</b> elements.

*The <b>section</b> elements generate places in the form for the creation of content by the user.

*The <b>section</b> elements generate places in the form for the creation of content by the user.

−

*The order of the <b>section</b>, <b>image-section</b>, <b>Notes</b>, and <b>Files</b> elements determines their order in the created MIRCdocument.

+

*The order of the <b>section</b> and <b>image-section</b> elements determines their order in the created MIRCdocument.

*You can add <b>section</b> elements with different <b>heading</b> attributes to include additional sections in the created MIRCdocument.

*You can add <b>section</b> elements with different <b>heading</b> attributes to include additional sections in the created MIRCdocument.

*The <b>Notes</b> section is used to receive the contents of any text files that are submitted along with the form.

*The <b>Notes</b> section is used to receive the contents of any text files that are submitted along with the form.

*The <b>insert-megasave</b> element provides the insertion point for images.

*The <b>insert-megasave</b> element provides the insertion point for images.

*The <b>metadata-refs</b> element provides the insertion point for non-image files.

*The <b>metadata-refs</b> element provides the insertion point for non-image files.

+

*Although you can remove the <b>Notes</b> and <b>Files</b> sections, doing so reduces the capability of the service to handle non-image files.

*All the other elements are not filled in by the New Document Service, but are present in the created MIRCCdocument so that they may be edited by the Author Service if necessary.

*All the other elements are not filled in by the New Document Service, but are present in the created MIRCCdocument so that they may be edited by the Author Service if necessary.

Revision as of 14:07, 8 September 2006

This article provides examples of MIRC templates for MIRC users and administrators to use as guides in constructing their own.

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:

the Author Service

he New Document Service

the DICOM Service

the TCE Service

the Zip Service

Templates are MIRCdocument files; that is, they conform to the MIRCdocument XML schema, extended to include elements that instruct the MIRC automatic document construction mechanism how to insert data from a file into the MIRCdocument. For detailed information on the template elements, see the Template Elements section of The MIRCdocument Schema.

Because templates are XML files, it is critical that they be well-formed, or the system will reject them. For a brief introduction to XML, see the XML Primer.

Contents

1 Author Service Templates

The Author Service provides several templates to give users starting points when they create new MIRCdocuments. Author Service templates are generally simple skeletons of MIRCdocuments. Users add components (text, images, etc.) to a skeleton using the Author Service editor and then save the result as a new MIRCdocument.

The example below shows a simple Author Service template for an mstf MIRCdocument.

Note that no title, author, abstract, or keywords elements are included. The Author Service generates these elements automatically if they are missing in the template. The elements are not forbidden, however, so if you are constructing a template for a special purpose, you can preload these elements by placing them in the template.

Note also the HTML paragraph elements in the various section elements. These are not necessary because the user can insert them with buttons in the editor, but they are a convenience.

Text may be preloaded in any element in the template. For example, if you have a standard copyright that you want to appear on all documents, you can insert a rights element containing the standard text.

Author Service templates do not normally contain any of the special template elements which automatically insert data from files since they are not used by the automatic document generator.

2 New Document Service Templates

The New Document Service provides a single template for the creation of a new MIRCdocument from the contents of a form and any files which the user has attached. It is stored in the Storage Service's newdoc directory under the name template.xml.

Values from the submission form are automatically inserted into the title, author, abstract, and authorization elements.

The section elements generate places in the form for the creation of content by the user.

The order of the section and image-section elements determines their order in the created MIRCdocument.

You can add section elements with different heading attributes to include additional sections in the created MIRCdocument.

The Notes section is used to receive the contents of any text files that are submitted along with the form.

The insert-megasave element provides the insertion point for images.

The metadata-refs element provides the insertion point for non-image files.

Although you can remove the Notes and Files sections, doing so reduces the capability of the service to handle non-image files.

All the other elements are not filled in by the New Document Service, but are present in the created MIRCCdocument so that they may be edited by the Author Service if necessary.

3 Zip Service Templates

The Zip Service uses templates to construct MIRCdocuments and insert files into them. See the Zip Service User's Manual for an overview of its operation. The Zip Service has a default template which is stored in the Storage Service's submit directory under the name template.xml.

are not actually modified by the Zip Service. They are shown in the template only as an indication of where you might include static text when creating special purpose templates. For example, if you were creating a template for a large number of MR cases, you could preload the modality element in a template.xml file that could be included in the root directory of the zip file, thus overriding the default template and causing all the created MIRCdocuments to be indexed as containing MR data.

Zip Service templates can also contain DICOM template elements. This is not typically done for documents being created for teaching files, so they are not shown in the template above. For some special purposes, however, you can use the block and GxxxxEyyyy elements to capture data from DICOM objects inserted into the MIRCdocument.

4 DICOM Service Templates

The DICOM Service is used for clinical trials and research dataset acquisition. It creates or updates MIRCdocuments whenever it receives a DICOM object. It creates one MIRCdocument for each study (e.g., one SOP Instance UID) and adds all the objects that it receives for the study into that MIRCdocument. The DICOM service uses a template that is stored in the Storage Service's trial directory under the name template.xml.

The title element is generated in the form: Perry^John MR Study - 20060101.

The author element is taken from the institution name and protocol in the first DICOM object received for the study.

The Demographic Data section uses a special feature of the DICOM element, described below, to generate table rows with row labels.

The insert-megasave element provides the insertion point for images.

The metadata-refs element provides the insertion point for non-image files.

The not visible section shows how data can be acquired into a MIRCdocument for indexing purposes without being displayed when the document is viewed.

Since the DICOM Service has no way to obtain the owner of document, the owner's username is preloaded in the template.

If predefined privileges for reading, updating, an exporting are known for the trial, they can be preloaded in the template.

Normally, a DICOM element simply extracts data from the element in the object and inserts it in the MIRCdocument as is seen in the title element in the template.

When DICOM elements are first-generation children of a table element, however, they automatically generate one row with two data elements, one containing the name of the DICOM element and one containing that element's data from the object. The name of the element is obtained from a table in the DICOM software library. If the element is not known to the software (for example, because it is a private element), the name is taken from the DICOM element's desc attribute.

When a DICOM element is encountered by the document generator, it is replaced by its value in the object. This means that the values come from the first object received for the study. If it is desired to capture data from all DICOM objects received, then the block template element must be used. The following fragment shows a section element that will contain a series of tables, one for each object received.

The block element can be used anywhere to preserve its contents for application to subsequent objects that are inserted into the MIRCdocument. The following fragment shows an HTML table element that will contain one row from each DICOM object, with each row showing the Instance Number and the corresponding SOP Instance UID.

Note that the reason that the individual DICOM elements do not generate complete rows themselves in this case is that they are not first-generation children of the table element.

5 TCE Service Templates

The TCE Service processes DICOM transmissions received from an IHE TCE Export Manager. These files consist of a manifest, a set of instances, and possibly an Additional Teaching File Information (ATFI) object. All are DICOM objects. The manifest and the ATFI object are examples of DICOM Key Object Selection documents in the forms defined by IHE.

The TCE Service uses a template to create a MIRCdocument for each manifest received. The template is stored in the Storage Service's tce directory under the name template.xml.

The standard TCE template, although it is a separate file stored in a separate place, is identical in contents to the default Zip Service template.

Notes:

The Notes section is used to capture the Key Object Description text from the manifest. The full text is inserted in the section, but it is also parsed according to rules defined by MIRC. If the contents match the MIRC-defined rules, they used to update the text values of other elements as described in the TCE Service User's Manual.

The ATFI object is also parsed, and its contents are used to update the text contents of other elements.