|
|
Template LanguageFrom $1Table of contentsSynapse EMR uses a simple template language to build graphical objects ( known as widgets ) which are displayed on screen. The user interacts with these widgets with the keyboard and mouse, and the data so captured is then either:
Furthermore, widgets may be prefilled with data from the patients record such as their existing diagnoses, gender, drugs etc. The source for all of the templates can be found in the Settings/GUI Templates screen, and users can either modify the existing templates, or, create their own. The purpose of this document is to provide enough information for users to create their own templates. Templates can then be shared online in the template Online Library. The two main areas to be covered include how widgets are displayed on screen, and how the captured data is then processed. Screen DisplayThe template language is infact almost identical to the language used to create Synapse EMR's own GUI. It is called RebGUI, and full documentation can be found on the principal author's website at http://www.dobeash.com/RebGUI/user-guide.html . There are some features which have been disabled and new ones added principally to control the text generation. Absolute PositioningThe simplest way to place a widget on screen is to use absolute positioning. Now the co-ordinate system is with 0x0 ( this is known as a pair; we do not use algebraic notation such as 0,0 ) at the left top corner. So, to place a widget near the top left we can do the following: at 10x0 slabel "Sciatic nerve stretch test" which gives the following display.
Tip: IMPORTANT: click here to see how you can learn "Template Code" by entering code bits into Synapse. You will note that there is a default margin of 4x4, and then the text is indented to the right by another 10 units. So, our label is really at 14x4 in our coordinate system. We can specify other characteristics of our label such as size and colour by following the above with these values. at 10x0 slabel "Sciatic nerve stretch test" red 60 giving the following appearance.
Relative Positioning Now we can place our next widget using the absolute positioning technique above, or we can take advantage of the default relative positioning when no absolute positioning is used. In essence, a widget is placed to the right of the last widget, and separated by some default spacing when absolute positioning is not specified. at 10x0 slabel "Sciatic nerve stretch test" red 60 field
Now say we want our next widget to got to the line below. We can specify this using absolute positioning like at 0x0 slabel "Sciatic nerve stretch test" red 60 field or, we can use the keyword return which tells the layout engine to put the widget one line below and as far left as it can. at 0x0 slabel "Sciatic nerve stretch test" red 60 field return
Now this doesn't give us the exact display in both cases as the relative method will use various default spacing that is operative at the time. The absolute method above will produce a layout with very little vertical space as it only specified 5 units of y descent from the top of the widget above. This of course can be changed. But the point of using relative positioning is that if you need to change the widgets by adding in another one in the middle of the layout, it should work with no problems, whereas with absolute positioning, you would have to recalculate manually the new locations. You can read about the other directives to control spacing, and layout at the Dobeash site mentioned above, and these include: after, tight, margin, #L#V, space, reverse, indent, and pad. Widget List and other control wordsStandard RebGUI Widgets
radio-groupThe radio-group widget is a structure that only accepts a single input via mouse click. Although there is more than one area to select, those areas are deselected in a mutually exclusive fashion. Because of this, the radio-group acts as a control to determine whether the text following it will be used or not. By convention, the first radio is considered negative, and the second radio is considered positive. If the positive radio is clicked, then following text will be included. If neither radio button is used, then no text is included. Let us see some examples to explain how this works. label "Tinel's test" (wide) radio-group "" 20x5 data [ "-v" "+v" ] field " with thenar wasting"
Here the first radio has been selected. This will result in the following text being inserted Tinel's test negative If the second radio is selected instead, then the following will be inserted: Tinel's test positive with thenar wasting If neither radio was selected, then no text will be inserted. This example also shows how some abbreviations are used and expanded from the text in the radio-group. The table below shows what is currently available:
If you use some text that is not one of the abbreviations above, then it will be included as written. The other facets of the radio-group are the "" following which can be used as default text, and the 20x5 which is specifying the size of the radio-group. The (wide) following the label is specifying a default width for the label to help align columns of labels. The width sizes are in the table below:
Synapse Text Widgets
Synapse Outcome Widgets
Patient VariablesThe following variables are available inside a template <$diagnoses>They generally are replaced with single values except for the first three which return tables of data. Synapse Directives
Text Processing.
Tags:
|
||||||||||||||||||||||||