Welcome to SynapseDirect Sign in | Join | Help
in Search

SynapseDirect

Customizing your Prescriptions

Last post 10-16-2008, 9:08 PM by Jason. 52 replies.
Page 1 of 4 (53 items)   1 2 3 4 Next >
Sort Posts: Previous Next
  •  12-10-2006, 10:28 PM 1803

    Synapse is very powerful in that it allows many easy customizations of items such as Scripts, Requests, Letters, Invoices.

    Here is a quick tutorial on how to customize your prescriptions.

    Once you understand the (1) variables, (2) visible text, and (3) locations... it becomes quite easy !

     

     

     




    Developer
  •  12-10-2006, 10:31 PM 1804 in reply to 1803

    Re: Customizing your Prescriptions

    Attachment: rxpreview.png

    This is what the prescription looks like when it is printed.

     




    Developer
  •  12-10-2006, 10:42 PM 1805 in reply to 1804

    Re: Customizing your Prescriptions

    Here is the text in the >Custom>PostScript> Tab for creating this prescription

    pagesize A4
    font Times-BoldItalic 30
    linewidth 1
    color (blue)
    at 190x750 "Dr. Imthe Demodoc, MD"
    color (black)
    font Times-Roman 12
    newpath at 75x725 line1
    at 75x715 line2
    at 75x705 line3
    at 440x725 "Ph: "
    at 460x725 ph
    at 440x710 "Fx: "
    at 460x710 fx
    at 75x680 "Date:"  font Times-Bold at 105x680 today
    font Times-Roman 14
    at 75x655 patient-table
    at 360x660 "Dob:" at 400x660 dob
    newpath at 75x740 line 530x740
    newpath at 75x700 line 530x700
    font Times-Roman 12
    at 75x580 prescription 30 60 250x600
    font Times-Roman 12
    at 140x72 "Signature:"
    at 210x72 line 380x72
    at 390x72 "Registration: "
    at 455x72 medical-registration
    at 400x150 "Generic Substitution Permitted"
    showpage 

     



    Developer
  •  12-10-2006, 10:44 PM 1806 in reply to 1805

    Re: Customizing your Prescriptions

    Custom/PostScript

    A template called "A4 script generic" which is below:

    pagesize A4
    font Times-BoldItalic 30
    linewidth 1
    at 190x750 My-Name
    color (black)
    font Times-Roman 12
    newpath at 75x725 line1
    at 75x715 line2
    at 75x705 line3
    at 440x725 "Reg: "
    at 465x725 medical-registration
    at 445x715 "Ph: "
    at 465x715 ph
    at 445x705 "Fx: "
    at 465x705 fx
    at 75x680 "Date:"  font Times-Bold at 105x680 today
    font Times-Roman 14
    at 75x655 patient-table
    at 360x660 "Dob:" at 400x660 dob
    newpath at 75x740 line 530x740
    newpath at 75x700 line 530x700
    font Times-Roman 12
    at 75x570 prescription 30 60 250x600
    font Times-Roman 12
    at 140x72 "Signature:"
    at 210x72 line 380x72
    at 400x150 "Generic Substitution Permitted"
    at 400x120 "Generic Substitution Not Permitted"
    showpage
               

    The "at nxn" tells the printer where to place the following item on the page. The item can be a keyword such as "My-name", or "patient-table" which takes information from the database or configuration settings.  Or, it can be text as long as there is a font directive before that.

    So, lets go thru this template line by line

    pagesize A4

    Set the pagesize to A4.  Can be letter, or A5.

    font Times-BoldItalic 30

    Use the PostScript font, Times-BoldItalic in a 30 point size for the heading

    linewidth 1

    Use a linewidth of 1 point for any lines we draw.  We are going to draw 3 lines in this template later on.

    at 190x750 My-Name

    On the page measured from the bottom left, place My-name at 190x750 points where there are 72 points per inch. My-name is set up in Settings.

    color (black)

    Use the color black for any printing until we change the color. Note the ( ).

    font Times-Roman 12

    Change the font to Times-Roman at 12 point size 

    newpath at 75x725 line1

    Start a newpath ( ie. we've finished with the text now ), and at 75x725 place the text corresponding to Line1 of the doctors address in Settings.

    at 75x715 line2
    at 75x705 line3

    Print Line2 and Line3 of the doctors address

    at 440x725 "Reg: "

    At 440x725 put the text "Reg: " still using the same font as last set. 

    at 465x725 medical-registration

    Now at 465x725 ( on the same y setting, but 25 points to the right of "Reg: " ) put the medical registration as taken from the doctor's Settings. 

    at 445x715 "Ph: "
    at 465x715 ph
    at 445x705 "Fx: "
    at 465x705 fx

    Do similar for the phone and fax from Setttings


    at 75x680 "Date:"  font Times-Bold at 105x680 today

    Put the text "Date: " and then change to a bold font before printing today's date.

    font Times-Roman 14

    Change to a larger font size of 14 

    at 75x655 patient-table

    Now at 75x655, print the patient's address details as taken from the database. 

    at 360x660 "Dob:" at 400x660 dob

    Print the date of birth 

    newpath at 75x740 line 530x740
    newpath at 75x700 line 530x700

    Draw a couple of parallel lines across the page 75x740 to 530x740, and 75x700 to 530x700



    font Times-Roman 12

    Change to a 12 point font

    at 75x570 prescription 30 60 250x600

    Print the prescription at 75x570. The 30x60 specifies the lowest point on the page it can print.  If it goes beyond that, start a new column at 250x600 

    font Times-Roman 12

    Reduce the font to point 12 

    at 140x72 "Signature:"

    More text


    at 210x72 line 380x72

    Draw another line from 210x72 to 380x72 where we can sign our name

    at 400x150 "Generic Substitution Permitted"
    at 400x120 "Generic Substitution Not Permitted"

    More text on the page 

    showpage

    Finished .  Tell the printer to print it out.

     

     

     

     

     



    Developer
  •  12-10-2006, 10:47 PM 1807 in reply to 1806

    Re: Customizing your Prescriptions

    Attachment: line1.line2.line3.jpg

    Note:

    Line1, Line2, Line3 correspond to the Lines in the >Settings> Tab.

    as seen below 




    Developer
  •  12-10-2006, 10:50 PM 1808 in reply to 1807

    Re: Customizing your Prescriptions

    By my calculations,

    On a A4 paper, with font size = 12, you can have 28 characters as a maximum for the drug name and your prescription allows a maximum of 27 drugs per prescription page.

     




    Developer
  •  12-11-2006, 9:46 PM 1817 in reply to 1808

    Re: Customizing your Prescriptions

    Graham: Is there anyway to include images yet ?  I want my prescriptions to look pretty.

    Which Postscript is being used in Synpase ?

    ( I want to look up the documentation ) 

     

    Where you want a PostScript image to appear, use the \includegraphics command, possibly with scaling or rotation options, e.g.,

      \includegraphics{myfig.eps}
    \includegraphics[width=60mm]{myfig.eps}
    \includegraphics[height=60mm]{myfig.eps}
    \includegraphics[scale=0.75]{myfig.eps}
    \includegraphics[angle=45,width=52mm]{myfig.eps}
    Will those work ?
     
     

     



    Developer
  •  12-11-2006, 9:51 PM 1818 in reply to 1817

    Re: Customizing your Prescriptions

    If your image is in eps format, I may be able to do something about accommodating images.

     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  12-11-2006, 9:56 PM 1819 in reply to 1818

    Re: Customizing your Prescriptions

    what postscript ?

    what are the commands ?

     



    Developer
  •  12-11-2006, 9:58 PM 1820 in reply to 1819

    Re: Customizing your Prescriptions

    None at present, but if you have an EPS image, I can look at implementing the appropriate support for printing them.

     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  12-11-2006, 10:00 PM 1821 in reply to 1820

    Re: Customizing your Prescriptions

    what language is this ?  is this a dialect you made up ?

    I can make .eps files easily. 

     

     



    Developer
  •  12-11-2006, 10:40 PM 1822 in reply to 1821

    Re: Customizing your Prescriptions

    Yes, it's one of many domain specific languages I have implemented Synapse.

    It tries to be as close as possible to PostScript.

     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  12-11-2006, 11:17 PM 1824 in reply to 1822

    Re: Customizing your Prescriptions

    Please email me the EPS file, and where you want it on the page .. and I'll see what I can do.

    Perhaps send me a mockup of what the page is supposed to look like.

     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  12-12-2006, 12:48 PM 1830 in reply to 1824

    Re: Customizing your Prescriptions

    Just confirming that adding this code after the pagesize command line

    at 72x700 eps %logo.eps

    where logo.eps is the name of an EPS file, places an image on the page of the superbill as well.

    the syntax is

    at nxn eps %path-to-filename

    so, this is also correct

    at 100x600 eps %/c/synapse/images/mywatermark.eps

    where the file is in c:\synapse\images\mywatermark.eps
     


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
  •  12-12-2006, 1:44 PM 1832 in reply to 1830

    Re: Customizing your Prescriptions

    On my hard drive in the c:\texmf directory,  I found a sample eps file called demofig.eps which is a tiny cat sketch.

    The file header is this :

    %!PS-Adobe-2.0 EPSF-2.0
    %%BoundingBox: 44 525 80 559
    %%Creator: COREL DRAW
    %%Title: CAT.TMP
    %%CreationDate: Sat Jan 18 17:29:05 1992

    So, the bounding box specifies that the image is to be placed on the page in the box described by the two corners 44x525 and 80x559

    I need to change my implementation so that it alters the origin of the bounding box so that it goes where we want the image, as otherwise it will appear on the page at the same place each time as described in the eps file.

    BTW, you could use an eps file to put your signature on the prescription. 


    Graham Chiu
    Beta Downloads and Documentation Wiki
    Developer Forum
    Filed under: ,
Page 1 of 4 (53 items)   1 2 3 4 Next >
View as RSS news feed in XML
Try-out the Click to try-out Synapse EMR Express Edition Free Synapse EMR Express Edition Click to try-out Synapse EMR Express Edition · ©2006 SynapseDirect · Terms and Conditions · Privacy Policy · help us keep Synapse EMR Express free for all Doctors

managing your electronic medical records · Unique Visits Dell Computer