Templates in Synapse: How they work (boy are they flexible and powerful!)

Discussion in 'Documentation & Training Resources' started by Jason, Mar 27, 2007.

  1. Jason

    Jason Developer / Handyman Staff Member

    Synapse has a very powerful template engine that allows a doctor to setup templates that capture data exactly how the practitioner wants to do it ! When evaluating Synapse (or any other EMR for that matter) you must realize that you will be spending alot of time documenting, so it needs to be quick and easy to do.

    Many EMRs do not have true templating, and most rely upon just "Spitting out Text" which you can edit. That works in some situations but fails in many situations. We have that same feature (well call it macros) but Synapse's beautiful templates are one of it's greatest strengths.

    Now, with this great strength comes a small tradeoff, you have to learn how to build the templates ! To learn how to build templates, I printed out "the code" that described the template and a picture of the template itself, and it was easy to figure out what code created what part of the template.

    Below is an example of one of a pre-built templates available online. Please see the picture. To illustrate how easy it is to learn the code, I have highlighted some of the code and show how it relates to the finished template.

    Just click on the picture to display it better.

    Attached Files:

  2. Jason

    Jason Developer / Handyman Staff Member

    Another example of synapse template code and the template it creates !

    Note: the 5 major elements in this example

    (1) radio button selections (synapse code term - radio-group )


    (2) drop down menus (synapse code term - edit-list )

    (3) free text field (synapse code term - field )

    (4) free text box (synapse code term - area )

    (5) box (synapse code term - group-box )

    Attached Files:

  3. Jason

    Jason Developer / Handyman Staff Member

    Please see this thread for the various examples of elements that are possible in a synapse template

    Note: see the image for an explanation of the X - Y co-ordinates used in this synpase template.

    Attached Files:

  4. ramid

    ramid New Member

    i went through the writeups on how the templates are formed,think i understood the way they are written.since i do not have any programming knowledge,i request you to guide me how to form the templates, could you guide me where i have to paste the writeups and how the templates will appear?



    ramid
  5. Jason

    Jason Developer / Handyman Staff Member

    Location of Synapse Templates

    (1) To make a new template:

    Click clear, type up your template, then Save New.

    (2) To learn templates, I'd start with an existing one, modify it ... and press Check to see what your modifications have done. If you want to save it, press Save New.

    The templates are not hard, but not simple. Synapse is the only EMR that allows you to create your own templates. Graham said he'd make some for a small fee, but I am not sure he is still offering that.

    Good luck, let us know how it goes. Ask more questions if you need.

    Graham, we probably need a [New] button. (more intuitive language for a user trying to make a new template).



    Attached Files:

  6. Graham

    Graham Developer Staff Member

  7. ramid

    ramid New Member

    dear graham, thanks for the reply,

    i tried to form the same marital status template, but i get the following when i click on check

    make object![

    code:20/'

    type:'synatx



    kindly guide me.



    ramid

    id:naming

    arg1:"end of script/

    arg2 :"["

    arg3:none
  8. Graham

    Graham Developer Staff Member

    Ramid,

    You'll need to upload your template here so I can see what's wrong.

  9. paindoc

    paindoc New Member

    Graham,

    I've been modifying some of your templates for my needs. Presently I'm stuck on a chief complaint template. After the label ". Medical attention", none of the subsequent labels appear in the note, although their respective data selections do.

    Please advise.


    ;Author: Dr Graham Chiu
    ;Date: 30-Aug-2008/6:16:51-5:00
    ;Modified by: John Shaird MD
    ;Date: 30-Aug-2008/19:34:41-5:00
    group-box 60x33 "CHIEF COMPLAINT:" data [
    at 0x5
    radio-group 53x20 data [ "The patient complains of pain affecting the" "Follow-up of pain of the" "requested" "routine"]
    ]

    return

    group-box -1x-1 "" data [
    at 0x0 label ""
    at 0x0 check-group 40x140 data [
    "head" none
    "neck" none
    "both shoulders" none
    "both arms" none
    "both hands" none
    "both legs" none
    "left shoulder" none
    "left arm" none
    "left hand" none
    "right shoulder" none
    "right arm" none
    "right hand" none
    "chest wall" none
    "ribs" none
    "abdomen" none
    "left groin" none
    "right groin" none
    "upper back" none
    "middle back" none
    "lower back" none
    "left hip" none
    "right hip" none
    "left buttock" none
    "right buttock" none
    "left calf" none
    "right calf" none
    "left leg" none
    "right leg" none
    "Workers Comp Visit" none
    ]
    ]

    at 61x0

    group-box -1x-1 "" data [
    radio-group 60x10 data [
    ". Injury occurred"
    ". Symptoms began"
    ]

    return

    bar

    return
    radio-group 20x55 data [
    "1" "2" "3" "4" "6" "7" "8" "9" "10" "11" "12"
    ]

    radio-group 10x55 data [
    "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23"
    ]

    return
    bar
    return

    radio-group 35x25 data [
    "hours ago" "days ago" "weeks ago" "months ago" "years ago"
    ]
    return
    field 60 ""

    return
    bar
    return
    label ". When symptoms began, the patient" return
    radio-group 35x25 data [
    "was at work" "was at home" "was at leisure" "was driving" "was in bed"
    ]
    return
    bar
    return
    label ". Medical attention" return
    radio-group 55x20 data [
    "was sought immediately" "was not sought immediately" "was received within 24 hours" "was eventually sought"
    ]
    ]
    group-box -1x-1 "" data [
    label ". Recent therapies have included" return
    check-group 55x60 data [
    "epidural steroid injections"none
    "trigger point injections"none
    "selective nerve blocks"none
    "joint injections"none
    "OTC analgesics"none
    "chiropractic treatments"none
    "physical therapy"none
    "massage therapy"none
    "prescription pain meds"none
    "prescription muscle relaxants"none
    "prescription medications"none
    "specialist evaluation and treatment"none
    ]
    return
    field 60
  10. Jason

    Jason Developer / Handyman Staff Member

    The labels have been removed.

    See my instructions.

    Attached Files:

  11. paindoc

    paindoc New Member

    Jason,

    Sorry, but I'm not getting it. Why does the previous label ". When symptoms began, the patient" work, but the others don't. The syntax looks similar to me.

    PainDoc
  12. Graham

    Graham Developer Staff Member

    There is a difference.

    Radio-groups will only print the label text if something is being selected. If nothing is being selected, then the label is ignored.

    Check-groups don't modify the label text like this .. so you need to change the "label" to "slabel" aka static label. But this means that even if you don't select a check item, the text will always appear.


    Also, you need to change the last group to a radio-group instead of a check-group as the choices should be mutually exclusive?
  13. paindoc

    paindoc New Member

    Graham,

    I have the GUI template working. Thanks for the tips. On another matter, when I attempt to print the trigger point template/letter to the local pdf, I get "Failed to create the pdf. System call failed with return code of 1 Is Ghostscript installed correctly?" I followed the instructions properly during installation. Any ideas?

    PainDoc


  14. Graham

    Graham Developer Staff Member

    John

    This message indicates that ghostscript failed to convert the postscript file to PDF.

    It could either be due to a faulty ghostscript installation, or, a faulty postscript file ( bug ).

    Try this ... when you get that message, check the www directory where you have Synapse. Find the latest *.ps file and double click on it - it should come up in GSview if you have that installed. If there is a postscript error, you will see the message.

    You can also zip up that ps file and email it to me if there is an errror.
  15. paindoc

    paindoc New Member

    Graham,

    I'm getting a DSC error dialog box whenever I double click on one of the .ps files. Options are to ignore DSC errors, OK, or cancel. Clicking any of the above closes the dialog box and opens the procedure note/image product in GSView. Unfortunately, subsequent attempts at printing to local pdf all arrive at the same error process.

    John
  16. Graham

    Graham Developer Staff Member

    John

    Zip up the offending ps file and email it to me so I can see what's going on.
  17. Graham

    Graham Developer Staff Member

    [​IMG]





    John

    Your postscript file displays fine for me .. so there must be a problem with your ghostscript setup. I suggest trying a different PC to confirm this.

    Then uninstall ghostscript and reinstall, and set the environment paths correctly.
  18. paindoc

    paindoc New Member

    [:D] Done. gmail.



    John
  19. Graham

    Graham Developer Staff Member

  20. paindoc

    paindoc New Member

    Can someone tell me why the text that I input into the "field 60" doesn't print into the note? Here's the template--

    ;Author: Dr Graham Chiu

    ;Date: 30-Aug-2008/6:16:51-5:00

    ;Modified by: John Shaird MD

    ;Date: 30-Aug-2008/19:34:41-5:00

    group-box 60x33 "CHIEF COMPLAINT / HPI :" data [

    at 0x5

    radio-group 53x20 data [ "The patient complains of pain affecting the" "Follow-up of pain of the" "requested" "routine"]

    ]



    return



    group-box -1x-1 "" data [

    at 0x0 label ""

    at 0x0 check-group 40x140 data [

    "head" none

    "neck" none

    "both shoulders" none

    "both arms" none

    "both hands" none

    "both legs" none

    "left shoulder" none

    "left arm" none

    "left hand" none

    "right shoulder" none

    "right arm" none

    "right hand" none

    "chest wall" none

    "ribs" none

    "abdomen" none

    "left groin" none

    "right groin" none

    "upper back" none

    "middle back" none

    "lower back" none

    "left hip" none

    "right hip" none

    "left buttock" none

    "right buttock" none

    "left calf" none

    "right calf" none

    "left leg" none

    "right leg" none

    "Workers Comp Visit" none

    ]

    ]



    at 61x0



    group-box -1x-1 "" data [

    radio-group 60x10 data [

    ". Injury occurred"

    ". Symptoms began"

    ]



    return



    bar



    return

    radio-group 20x55 data [

    "1" "2" "3" "4" "6" "7" "8" "9" "10" "11" "12"

    ]



    radio-group 10x55 data [

    "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23"

    ]



    return

    bar

    return



    radio-group 35x25 data [

    "hours ago" "days ago" "weeks ago" "months ago" "years ago"

    ]

    return



    return

    bar

    return

    slabel ". When symptoms began, the patient" return

    radio-group 35x25 data [

    "was at work" "was at home" "was at leisure" "was driving" "was in bed"

    ]

    return

    field 60 ""



    return

    bar

    return

    slabel ". Medical attention" return

    radio-group 55x20 data [

    "was sought immediately" "was not sought immediately" "was received within 24 hours" "was eventually sought"

    ]

    ]

    group-box -1x-1 "" data [

    slabel ". Recent therapies have included" return

    check-group 55x60 data [

    "epidural steroid injections"none

    "trigger point injections"none

    "selective nerve blocks"none

    "joint injections"none

    "OTC analgesics"none

    "chiropractic treatments"none

    "physical therapy"none

    "massage therapy"none

    "prescription pain meds"none

    "prescription muscle relaxants"none

    "prescription medications"none

    "specialist evaluation and treatment"none</

Share This Page