4 <style type=
"text/css" title=
"mystyles" media=
"all">
12 font-family:helvetica;
16 font-family:helvetica;
20 font-family:helvetica;
24 <script type=
"text/javascript" src=
"library/dialog.js"></script>
25 <script language='JavaScript'
>
27 // This holds all the default drug attributes.
29 var drugopts
= [{$DRUG_ATTRIBUTES
}];
32 // Helper to choose an option from its value.
33 function selchoose(sel
, value
) {
35 for (i
= 0; i
< o
.length
; ++i
) {
36 o
[i
].selected
= (o
[i
].value
== value
);
40 // Fill in default values when a drop-down drug is selected.
41 function drugselected(sel
) {
42 var f
= document
.forms
[0];
43 var i
= f
.drug_id
.selectedIndex
- 1;
47 selchoose(f
.form
, d
[1]);
48 f
.dosage
.value
= d
[2];
50 selchoose(f
.unit
, d
[4]);
51 selchoose(f
.route
, d
[5]);
52 selchoose(f
.interval
, d
[6]);
53 selchoose(f
.substitute
, d
[7]);
54 f
.quantity
.value
= d
[8];
55 f
.disp_quantity
.value
= d
[8];
56 selchoose(f
.refills
, d
[9]);
57 f
.per_refill
.value
= d
[10];
61 // Invoke the popup to dispense a drug.
63 var f
= document
.forms
[0];
64 dlgopen('interface/drugs/dispense_drug.php' +
65 '?drug_id=' + f
.drug_id
.value
+
66 '&prescription=' + f
.id
.value
+
67 '&quantity=' + f
.disp_quantity
.value
+
68 '&fee=' + f
.disp_fee
.value
,
75 <body {$STYLE.BOTTOM_BG_LINE}
>
76 <form name=
"prescribe" method=
"post" action=
"{$FORM_ACTION}">
77 <table CELLSPACING=
"0" CELLPADDING=
"3">
79 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Starting Date
</td>
80 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
81 {html_select_date
start_year=
"-10" end_year=
"+5" time=$prescription-
>start_date
prefix=
"start_date_"}
85 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Provider
</td>
86 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
87 {html_options
name=
"provider_id" options=$prescription-
>provider-
>utility_provider_array() selected=$prescription-
>provider-
>get_id()}
88 <input type=
"hidden" name=
"patient_id" value=
"{$prescription->patient->id}" />
93 <td COLSPAN="1" ALIGN="LEFT" VALIGN="MIDDLE" >Patient Name</td>
94 <td COLSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE" >{$prescription->patient->get_name_display()}</td>
98 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Drug
</td>
99 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
100 <input type=
"input" size=
"20" name=
"drug" value=
"{$prescription->drug}"/><input class=
"button" type=
"BUTTON" onClick=
"drugPopup=window.open('controller.php?prescription&lookup', 'drugPopup', 'width=400,height=50,menubar=no,titlebar=no,left = 825,top = 400'); drugPopup.opener=self; return true;" value=
"Drug Lookup"/>
104 {if $DRUG_ARRAY_VALUES}
106 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" > in-house
</td>
107 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
108 <select name=
"drug_id" onchange=
"drugselected(this)">
109 {html_options values=$DRUG_ARRAY_VALUES output=$DRUG_ARRAY_OUTPUT selected=$prescription-
>get_drug_id()}
116 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Quantity
</td>
117 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
118 <input TYPE=
"TEXT" NAME=
"quantity" SIZE=
"10" MAXLENGTH=
"10" VALUE=
"{$prescription->quantity}" onchange=
"document.getElementById('per_refill').value=this.value"/>
122 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Medicine Units
</td>
123 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
124 <input TYPE=
"TEXT" NAME=
"size" SIZE=
"11" MAXLENGTH=
"10" VALUE=
"{$prescription->size}"/>
125 <select name=
"unit">{html_options options=$prescription-
>unit_array selected=$prescription-
>unit}
</select>
129 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Take
</td>
130 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
131 {if $SIMPLIFIED_PRESCRIPTIONS && !$prescription-
>form && !$prescription-
>route && !$prescription-
>interval}
132 <input TYPE=
"text" NAME=
"dosage" SIZE=
"30" MAXLENGTH=
"100" VALUE=
"{$prescription->dosage}" />
133 <input type=
"hidden" name=
"form" value=
"0" />
134 <input type=
"hidden" name=
"route" value=
"0" />
135 <input type=
"hidden" name=
"interval" value=
"0" />
137 <input TYPE=
"TEXT" NAME=
"dosage" SIZE=
"2" MAXLENGTH=
"10" VALUE=
"{$prescription->dosage}"/> in
138 <select name=
"form">{html_options options=$prescription-
>form_array selected=$prescription-
>form}
</select>
139 <select name=
"route">{html_options options=$prescription-
>route_array selected=$prescription-
>route}
</select>
140 <select name=
"interval">{html_options options=$prescription-
>interval_array selected=$prescription-
>interval}
</select>
145 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Refills
</td>
146 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
147 {html_options
name=
"refills" options=$prescription-
>refills_array selected=$prescription-
>refills}
148 # of tablets:
149 <input TYPE=
"TEXT" ID=
"per_refill" NAME=
"per_refill" SIZE=
"2" MAXLENGTH=
"10" VALUE=
"{$prescription->per_refill}"/></td>
152 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Substitution
</td>
153 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
154 {html_options
name=
"substitute" options=$prescription-
>substitute_array selected=$prescription-
>substitute}
158 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Notes
</td>
159 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
160 <textarea name=
"note" cols=
"30" rows=
"2" wrap=
"virtual">{$prescription-
>note}
</textarea>
163 {if !$WEIGHT_LOSS_CLINIC}
165 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >Add to Medication List
</td>
166 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
167 {html_radios
name=
"medication" options=$prescription-
>medication_array selected=$prescription-
>medication}
173 <input type=
"submit" value=
"Prescribe" />
174 {if $DRUG_ARRAY_VALUES}
175
176 {if $prescription-
>get_refills()
>= $prescription-
>get_dispensation_count()}
177 <input type=
"submit" name=
"disp_button" value=
"Prescribe and Dispense" />
178 <input type=
"text" name=
"disp_quantity" size=
"2" maxlength=
"10" value=
"{$DISP_QUANTITY}" />
180 <input type=
"text" name=
"disp_fee" size=
"5" maxlength=
"10" value=
"{$DISP_FEE}" />
182 This prescription has reached its limit of {$prescription-
>get_refills()} refills.
188 <input type=
"hidden" name=
"id" value=
"{$prescription->id}" />
189 <input type=
"hidden" name=
"process" value=
"{$PROCESS}" />
190 <script language='JavaScript'
>