Creating a template from scratch

From $1

Table of contents
No headers

This page will cover the steps involved in creating a new GUI template from scratch.  However, it is better to use an existing template and build upon one of those.

First off you have to decide what type of template you wish to create.  There are a few possibilities

  1. text template that inserts text into the consult
  2. outcome template that inserts text into the consult and also injects values into the database as discrete values
  3. calculator template that allows arithmetic calculations such as a cardiovascular risk calculator, and these values are also injected into the database
  4. a test template that when printed produces a form for some type of test or procedure.  The test or procedure is saved into the ordered tests table for tracking

For our purposes we will first off cover the simple text template, and later on cover the others when time permits.

For our example, we are going to ask the patient a simple question.  "What is their current marital status?"
The possible answers are:

  1. Married
  2. De-Facto relationship
  3. Single
  4. Divorced
  5. Widowed

Although a person can be divorced, widowed and living in a de-facto relationship, we only want the current relationship, and so will assume that each choice is mutually exclusive.

This lends itself to either a radio-group type of widget, or a drop list.  The radio-group is easiest.  Since the most compact way to display this type of group for so many choices is vertical, we will force the widget to display the choices vertically.  This is done by making the y size larger than the x, so we use 20x50 instead of 50x5.

radio-group 20x50 data [ "single" "married" "de-factor" "divorced" "widowed" ] 

we need a label in front of this

at 0x0 label "marital status: "  (thin) radio-group 20x50 data [ "single" "married" "de-facto" "divorced" "widowed" ]

 and we normally wrap a group-box around our template so that the [Save] button will appear outside the group-box.

group-box 110x45 "" data [
   at 0x0 label "marital status: "  (thin) radio-group 20x50 data [ "single" "married" "de-facto" "divorced" "widowed" ]
]

Ok, now that we have created our template we need to actually save it.  This is a "S"ubjective type of template as opposed to a Objective, Assessment, Plan, or Disease template.  Could it be O?  Depends on your outlook.

Navigate to Settings/GUI Templates, and click on the [Clear] button.  Paste the code above into the large text box.  Click on the [Check] button to make sure it works.  Now give it a title, so in the title field, type in "marital state", and change the type to "S".  This means that this template will be found under the "S" filter thereafter.

Now click on the [Save New] button, and the template is saved to your local template library.

Now there is one more step.  The new template has been saved for everyone using your server to access, but has not been selected by you yet and so can not be used until you have done so.

So, to complete this step, click on the [Personalize] button.  Click on the "ID" column so that it orders highest to lowest, and your new template should be at the top.  Click on it to add it to the right hand table, and then click on [Save].  It is now available for use.  To confirm this, open a patient consult, click on the [Templates] tab, and then the [S] button to see the new template.

Tags:
 
Images (0)
 
Comments (0)
You must login to post a comment.