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
- the DICOM Service
- the TCE Service
- the Zip Service
Templates are MIRCdocument files, that is, they obey 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
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.
<?xml version="1.0" encoding="UTF-8"?> <MIRCdocument display="mstf"> <title>Enter a title here</title> <section heading="History"> <p/> </section> <section heading="Findings"> <p/> </section> <section heading="Diagnosis"> <p/> </section> <section heading="DDx"> <p/> </section> <section heading="Discussion"> <p/> </section> <image-section heading="Images" image-pane-width="600"/> <document-type>Radiologic Teaching File</document-type> <publication-date/> </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 pre-load 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 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.
The default template is shown below.
<?xml version="1.0" encoding="iso-8859-1"?> <MIRCdocument display="tab" first-tab="1"> <title>Untitled</title> <author> <name>Anonymous</name> <affiliation/> <contact/> </author> <abstract><p>None.</p></abstract> <keywords/> <section heading="Notes"> </section> <image-section heading="Images"> <insert-megasave width="512"/> </image-section> <section heading="Files"> <p> <metadata-refs/> </p> </section> <document-type>radiologic teaching file</document-type> <findings/> <discussion/> <differential-diagnosis/> <diagnosis/> <anatomy/> <pathology/> <organ-system/> <modality/> <category/> <level/> <authorization> <owner/> <read/> <update/> <export/> </authorization> </MIRCdocument>