How to generate documents from your OW database

10 Jun 2009

OrthoWave can generate various documents based upon data previously inputted in any Patient form, in order to be saved, printed or exported. These documents can be surgical or hospital stay reports, or letters to be sent to GPs or Patients for recall, or again memorandums summing up the various details of arthroplasty previously recorded data.

Roughly speaking, any variable belonging to the OrthoWave database can be embedded into a text which thus will become a “template” for any document related to the current Patient form. Two serial steps must be considered: firstly to design through the MS Word software facilities these templates, secondly to upload once for all these templates into the OW database. Any uploaded template will then belong to the list of available templates of the database, while being used at will either to generate any document linked to the current Patient form or to edit letters for requested patients visit.

This creation of documents has been split in three serial parts:

1. Link of the OW database to Microsoft Word (*.doc and *.rtf extensions paths)

2. Editing templates by embedding variables to the text of the document.

3. Upload of these templates into the database, and generating documents for any given Patient.

1- Link of the OW database to external applications, including Microsoft Office (Tutorial #1)

This link consists in settling appropriate extension paths for OW to get connected to MS Word (or any other application software) from their localization on the local hard disk, which can be specific on each local unit…

The “extension path window” can be reached from the “Tools” menu item of the User Section. Click on the “External documents mapping” in order to get access to the “External documents file mapping” window.

Would the .doc and .rtf extensions already be present in the list, simply verify or modify the path. If not already inputted, first type “doc” (without the dot +++) in the “extension” field, then click on the “browse” button to open the browser of the local hard disk… As usual, localize the Microsoft Office suite, generally included in the Program files, then find the “WINWORD.EXE” file, which must be selected. Once for all, OW knows on this database how to get connected with MS Word for regular documents. Confirm by clicking the validation button.

Please bear in mind that the .docx extensions of Microsoft Office 2007 can be added to the list of existing extensions upon the same procedure, however, even if one uses MW Office 2007, the .doc extension has to be recorded for opening the “matrix” of OW documents.

The procedure is similar for the .rtf extension (Rich Text Format), which is the devoted format for texts to be shared between various programs, such as MS Word and OrthoWave… Open the browser by clicking on the “Browse” button after having typed .rtf in the “extension” field, then localize WINWOD.EXE, and select it as well… Just validate, done! Your OW now enables you to edit and use templates…

As a matter of fact, this procedure of “external documents mapping” can be used for any extension related to any document or file, be it a spread sheet (.xls or .xlsx), slide shows (.ppt or .pptx), texts (.pdf) or again images (.bmp, .jpg, .pic, …), or any other application to be “connected” to OrthoWave.

2 – Design OW Templates from MS Word (tutorial #2)

The link to the file which enables to create templates is locate in the “home page” of the User section, as the “[TOOLS] > Edit Template” button.

Provided that the path to MS Word has been previously correctly registered (as above-mentioned), click on this “Edit Template” button automatically open the “DocToInsert_tmp.doc” file, with the mention <OW6DOCUMENTTEMPLATE> …

At launch of the MS Word program, Macros are disabled… Activate them is mandatory. Click on the “Options” button, then tick off the “Enable this content” button and validate. The menu item “Add_Ins” comes up at the right of the menu bar… click on this button to open the “XML Tree” window, then the “Load XML” button. The list of all the variables belonging to OrthoWave gets displayed in the window, and each variable can be reached through the usual lift.

Edit the template becomes easy now just by inserting the appropriate variable from the “insert value” function of the XML Tree into the text of the template. This text can be either type at the time the variables are inserted, or at best typed before and displayed in the template through a copy&paste procedure… Anyway, the tutorial demonstrates how easy it is to simply localize the place where each variable has to be inserted, select the related variable from the list, click on the “insert” button, and so on… We thus can see how the Surgeon’s name is inserted, then the surgery date, name and age of the patient, and so on…At any time, it remains possible to complete or modify the previously typed text. However, no modification has to be made to the alphanumeric chain of each variable, especially regarding the $ sign before and after each variable!..

When finished, the template has to be saved. Simply shut the “XML Tree” window, and use the “File > Save as” MS Word menu item. A location for the template has to be chosen, anywhere in the hard disk (just remember where you located it!), then type the name of the template (here as “MySurgicalReport”). The “Save as type” drop down list must be used to select the “Rich Text Format” format (.rtf). If not saved as a .rtf format, the template will not be readable by OrthoWave +++ . Click on “Save”. Would any message prevent from losing all macros under this rtf format while selected, confirm by typing “yes” to confirm the rtf format +++.

Here we are, the template is ready to be uploaded in the OW database …

3 – How to import these previously designed templates, and create documents (tutorial #3)

From any “arthroplasty” form of any Patient form, you will find the “Documents” menu item on the menu bar, between “User Defined Fields” and “Additional Files”… Click on this “Documents” item to open this “Documents” window. This window comprises three parts: On the left is a section where the document template list is displayed, while on the right the section displays the “Patient Documents” listing all documents that have been added to the patient form. In between is located an arrow to add a selected template to generate a document to be added to the Patient’s documents.

The list on the left side of the window shows all available templates in the database… Our “MySurgicalReport” doesn’t belong to that list, and must be uploaded by clicking on the “upload” button (blue arrow on diskette). Simply find the location of the previously designed template via the browser as usual (the file is a .rtf format +++). Select and validate… the template now belongs to the available templates list, once for all. Naturally, each template can be deleted from this directory by simply clicking on the “delete” button, at the right of the “upload” button.

In order to generate a document to be added to the current Patient arthroplasty form, simply highlight the selected template, and click on the white arrow in between the two sections. The new document can be renamed as well (by default, template name + patient name + date…), here “MyDocumentTest”.

The above-mentioned document is thus added to the list of the Patient’s documents. Would you like to immediately open it, simply double click on it, and the document file gets open in MS Word. This document can be naturally modified and enhanced thanks to the MW Word features, before being saved or printed as well. Of course, this document will remain stored in the Patient documents list, and can be exported (red arrow on diskette) or deleted by using the related buttons, at bottom right of the patients documents list.

Please bear in mind that this directory of templates, specifically linked to each database, and growing up step by step with each new designed template, will be used as well for patient recall to be reviewed at the time of follow-up.