Creating templates

Home > Synergy > Hints and tips > Clinician

Search

Getting clinical data into mail merge templates – the NoteServer

The syntax of data fields which request clinical data is critical. Eachdifferent type of request has a default – and an expected method of callingwhich appears in the Patient.RDF below. However it can easily be changed. Asample word processing template which has clinical data is included in AppendixB (The standard referral template).

The rules are these:

  1. A field name by itself (if recognised) returns one instance (the first, or next if it has been called before) of a data type.
  2. Enclosing the field name in square brackets causes the template document to loop, recalling the noteserver until the noteserver returns nothing more.
  3. Appending the field name with a “+” symbol causes it to be opened up, so that the entries linked to any item identified by the field name are also returned. So, in the case of the “curproblem” current problem fieldname, “curproblem” by itself will return a single item, (“[curproblem]” will also return only a single item because there is at any one time only a single currently selected problem.) “curproblem+” will return the problem title first, but then the list of entries held under that problem heading.
  4. When a noteserver call finds nothing to return, then a “default” line is returned, which may be passed in from the document template. If no default is given, then the default default is “None”.
  5. Text following an optional colon describes the format of the item to be returned. (see below)
  6. Text following an optional pipe | symbol describes the default text if no entries are found.

The list of field names for clinical data

curtreatment Current medication tab /S /M /Dpar
curproblems Current problems tab /S /M /N /Fpar
dorproblems Dormant problems tab /S /M /N /Fpar
curproblem The currently selected problem tab /S /M /N /Fpar
curreminder Current reminders tab /U /P /M /Fpar
summary All the items in the summary depends on the type of item
sensitivity The patient’s sensitivities tab /S /M
Severity: /V. /Fpar
journal The contents of the journal (filtered a little) depends on the type of item
unlinked The contents of the unlinked problem depends on the type of item

Formatting clinical data

The data returned by the noteserver can be optionally formatted, both interms of how the components of any entry are laid out, and in terms of addingsome crude RTF.

The key points are these:

  1. Most text in the format line is transposed “as is”.
  2. A single uppercase character following a forward slash identifies a field – see the table below :
  3. A single lower case character following a forward slash identifies one of a limited number of text formatting commands, which will be replaced with RTF (see table below)
  4. To create a space within the text, use an UNDERSCORE (_ ). Any real spaces mess it up.

Table of Entry components

ID  Component description
D (Medication only) Dose
E End date
F Free text
M Medical description (Rubric or term)
N Numeric value (with units)
P (Reminder only) Priority
R Read code
S Start date
U (Reminder only) Due date
V (Sensitivity only) Severity

Table of Text (RTF) formatting commands

ID  Component description
t Tab
n New line
/ Forward slash
_ (Underscore) Space

The key points are these :

  1. Most text in the format line is transposed “as is”.
  2. A single uppercase character following a forward slash identifies a field – see the table above.
  3. A single lower case character following a forward slash identifies one of a limited number of text formatting commands, which will be replaced with RTF (also above)
  4. To create a space within the text, use an UNDERSCORE ( _ ). Any real spaces mess it up.

From all that you can see that
/t/S_/M/n
means
<tab>Start date<space>Description<new line>

If this is accidentally in all upper case you will get
something unexpected like
<nothing?>Start date<space>Description Numeric


S6000 templates for Word

The file s:meddatas6000reportformatsdocss6merge.dot is the file thatallows users to create S6000 templates from MS-Word. It needs to be placed inthe MS-Word templates directory, and then open Word, and do file/new and choosethis template. There are two buttons on the left of the toolbar, the leftmostone allows users to enter fields for mail-merge using dialogs similar to thosein S6Word. The other one saves the template to the appropriate directory.

To prevent s6merrge.dot from becoming the default template, change the template in Word menu tools/templates and addins to normal.dot


Advanced templates with forms

There are several things to know about creating effective request forms using Synergy templates:

  1. Tables are allowed – but they may not include merge fields – this will make the whole thing crash
  2. To get a nice layout with boxes containing your merged data you can use text boxes which are placed over the form – this is done in my examples
  3. The tables may include data entry fields
  4. The best way to control data entry is using the ‘forms’ feature of MS word. To access this you need to add the ‘forms’ toolbar then add ‘text’, ‘check box’ or ‘drop down’ fields are required. Right clicking on the entry fields will give access to more options egg the ‘drop down’ filed list.
  5. To make the forms active you need to tools/protect (THIS IS THE ANSWER TO YOUR QUESTION)
  6. To edit the forms tools/unprotect
  7. Name the forms in file/properties

Creating the forms can be fiddly and you have to work within the limitations of the programming but once set up they work fantastically, are a great time saver and create totally legible and complete request forms of different types.

Graham Gibson

Microsoft Word document Creating Referral templates in Word

en English
X
Scroll to Top