The Geneva Document Generator
The Geneva application can create documents and transmit them to Repositories. The documents are created from XML templates. Each document has a unique template that includes both static content and references to information that is part of the registration which triggers the creation of the document. This article describes how to create templates.
Documents are CDA objects. All the files necessary to create a document must be contained in a directory unique to the document.
Documents may or may not contain Base64-encoded PDFs. The document generator creates the PDF from a file called pdfSource.xml in the document's directory. If the file is not present, no PDF is created. The pdfSource.xml file is transformed by the pdfSourceToFO.xsl program (located in the Geneva/docxsl directory). The result is a Formatting Objects XML document which is then transformed to a PDF.
The CDA is created from a file called cdaSource.xml, located in the document's directory. The cdaSource.xml file is transformed by the cdaSourceToCDA.xsl program (located in the Geneva/docxsl directory). The result is an XML document which is then transformed into the XML for transmission to the Repository.
Both the pdfSourceToFO.xsl program and the cdaSourceToCDA.xsl program are passed many parameters from the registration. Each program recognizes XML elements that insert the values of the parameters into the output object.
1 The pdfSourceToFO.xsl Program
Under construction.
2 The cdaSourceToCDA.xsl Program
The cdaCource.xml file must contain XML structured to produce the CDA document. Within the XML can be the following elements to insert content unique to the registration.
2.1 xdsdemo:patientRole classCode="..." root="..."
This element produces a patientRole element in the output. The format is:
<patientRole classCode="{...}> <id root="{...}"/> <addr> <streetAddressLine>{street address from registration}</streetAddressLine> <city>{city from registration}</city> <state>{state from registration}</state> <postalCode>{Zip code from registration}</postalCode> <country>{country from registration}</country> </addr> <patient> <name> <given>{given name from registration}</given> <family>{family name from registration}</family> </name> <administrativeGenderCode codeSystem="2.16.840.1.113883.5.1" code="{sex from registration}"/> <birthTime value="{birth date from registration}"/> </patient> </patientRole>
2.2 xdsdemo:time-element name="..."
This element inserts an element with the name specified in the name attribute and a value attribute containing the date and time values supplied by the Geneva application. The time is always the current time, but the data is specified in the docset element, and may be a specific data or an asterisk, in which case Geeneve supplies the current date.
2.3 xdsdemo:pdf
This element creates a text element to contain the Base64-encoded PDF. If no PDF was created, Geneva supplies an empty string. The format of the element is:
<text mediaType="application/pdf" representation="B64"> {Base64-encoded PDF data} </text>