3 {php}html_header_show();{/php}
6 <style type=
"text/css" title=
"mystyles" media=
"all">
10 font-family:helvetica;
14 font-family:helvetica;
18 font-family:helvetica;
22 font-family:helvetica;
26 <script type=
"text/javascript" src=
"library/dialog.js"></script>
27 <script language='JavaScript'
>
29 // This holds all the default drug attributes.
31 var drugopts
= [{$DRUG_ATTRIBUTES
}];
34 // Helper to choose an option from its value.
35 function selchoose(sel
, value
) {
37 for (i
= 0; i
< o
.length
; ++i
) {
38 o
[i
].selected
= (o
[i
].value
== value
);
42 // Fill in default values when a drop-down drug is selected.
43 function drugselected(sel
) {
44 var f
= document
.forms
[0];
45 var i
= f
.drug_id
.selectedIndex
- 1;
49 selchoose(f
.form
, d
[1]);
50 f
.dosage
.value
= d
[2];
52 selchoose(f
.unit
, d
[4]);
53 selchoose(f
.route
, d
[5]);
54 selchoose(f
.interval
, d
[6]);
55 selchoose(f
.substitute
, d
[7]);
56 f
.quantity
.value
= d
[8];
57 f
.disp_quantity
.value
= d
[8];
58 selchoose(f
.refills
, d
[9]);
59 f
.per_refill
.value
= d
[10];
63 // Invoke the popup to dispense a drug.
65 var f
= document
.forms
[0];
66 dlgopen('interface/drugs/dispense_drug.php' +
67 {/literal
}'?drug_id={$prescription->get_drug_id()}' +{literal
}
68 '&prescription=' + f
.id
.value
+
69 '&quantity=' + f
.disp_quantity
.value
+
70 '&fee=' + f
.disp_fee
.value
,
74 function quantityChanged() {
75 var f
= document
.forms
[0];
76 f
.per_refill
.value
= f
.quantity
.value
;
77 if (f
.disp_quantity
) {
78 f
.disp_quantity
.value
= f
.quantity
.value
;
85 <body {$STYLE.BOTTOM_BG_LINE}
>
86 <form name=
"prescribe" method=
"post" action=
"{$FORM_ACTION}" onsubmit=
"return top.restoreSession()">
87 <table CELLSPACING=
"0" CELLPADDING=
"3">
89 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Currently Active'}
</td>
90 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
91 <input type=
"checkbox" name=
"active" value=
"1"{if $prescription-
>get_active()
> 0} checked{/if}
/>
95 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Starting Date'}
</td>
96 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
97 {html_select_date
field_order=
"DMY" start_year=
"-10" end_year=
"+5" time=$prescription-
>start_date
prefix=
"start_date_"}
101 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Provider'}
</td>
102 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
103 {html_options
name=
"provider_id" options=$prescription-
>provider-
>utility_provider_array() selected=$prescription-
>provider-
>get_id()}
104 <input type=
"hidden" name=
"patient_id" value=
"{$prescription->patient->id}" />
109 <td COLSPAN="1" ALIGN="LEFT" VALIGN="MIDDLE" >Patient Name</td>
110 <td COLSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE" >{$prescription->patient->get_name_display()}</td>
114 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Drug'}
</td>
115 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
116 <input type=
"input" size=
"20" name=
"drug" value=
"{$prescription->drug}"/>
120 {if $DRUG_ARRAY_VALUES}
122 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" > {xl t='in-house'}
</td>
123 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
124 <select name=
"drug_id" onchange=
"drugselected(this)">
125 {html_options values=$DRUG_ARRAY_VALUES output=$DRUG_ARRAY_OUTPUT}
132 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Quantity'}
</td>
133 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
134 <input TYPE=
"TEXT" NAME=
"quantity" SIZE=
"10" MAXLENGTH=
"31"
135 VALUE=
"{$prescription->quantity}"
136 onchange=
"quantityChanged()" />
139 {if $SIMPLIFIED_PRESCRIPTIONS && !$prescription-
>size}
140 <tr style='display:none;'
>
144 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Medicine Units'}
</td>
145 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
146 <input TYPE=
"TEXT" NAME=
"size" SIZE=
"11" MAXLENGTH=
"10" VALUE=
"{$prescription->size}"/>
147 <select name=
"unit">{html_options options=$prescription-
>unit_array selected=$prescription-
>unit}
</select>
151 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Take'}
</td>
152 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
153 {if $SIMPLIFIED_PRESCRIPTIONS && !$prescription-
>form && !$prescription-
>route && !$prescription-
>interval}
154 <input TYPE=
"text" NAME=
"dosage" SIZE=
"30" MAXLENGTH=
"100" VALUE=
"{$prescription->dosage}" />
155 <input type=
"hidden" name=
"form" value=
"0" />
156 <input type=
"hidden" name=
"route" value=
"0" />
157 <input type=
"hidden" name=
"interval" value=
"0" />
159 <select name=
"interval">{html_options options=$prescription-
>interval_array selected=$prescription-
>interval}
</select>
160 <input TYPE=
"TEXT" NAME=
"dosage" SIZE=
"2" MAXLENGTH=
"10" VALUE=
"{$prescription->dosage}"/>
165 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Refills'}
</td>
166 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
167 {html_options
name=
"refills" options=$prescription-
>refills_array selected=$prescription-
>refills}
168 {if $SIMPLIFIED_PRESCRIPTIONS}
169 <input TYPE=
"hidden" ID=
"per_refill" NAME=
"per_refill" VALUE=
"{$prescription->per_refill}" />
171 {xl t='# of tablets:'}
172 <input TYPE=
"TEXT" ID=
"per_refill" NAME=
"per_refill" SIZE=
"2" MAXLENGTH=
"10" VALUE=
"{$prescription->per_refill}" />
178 <td COLSPAN="1" ALIGN="LEFT" VALIGN="MIDDLE" >{xl t='Substitution'}</td>
179 <td COLSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE" >
180 {html_options name="substitute" options=$prescription->substitute_array selected=$prescription->substitute}
185 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Notes'}
</td>
186 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
187 <textarea name=
"note" cols=
"30" rows=
"2" wrap=
"virtual">{$prescription-
>note}
</textarea>
191 {if $WEIGHT_LOSS_CLINIC}
192 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" ></td>
193 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
196 <td COLSPAN=
"1" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >{xl t='Add to Medication List'}
</td>
197 <td COLSPAN=
"2" ALIGN=
"LEFT" VALIGN=
"MIDDLE" >
198 {html_radios
name=
"medication" options=$prescription-
>medication_array selected=$prescription-
>medication}
204 <input type=
"submit" value=
"{xl t='Save'}" />
205 {if $DRUG_ARRAY_VALUES}
206
207 {if $prescription-
>get_refills()
>= $prescription-
>get_dispensation_count()}
208 <input type=
"submit" name=
"disp_button" value=
"{xl t='Save and Dispense'}" />
209 <input type=
"text" name=
"disp_quantity" size=
"2" maxlength=
"10" value=
"{$DISP_QUANTITY}" />
211 <input type=
"text" name=
"disp_fee" size=
"5" maxlength=
"10" value=
"{$DISP_FEE}" />
213 {xl t=' prescription has reached its limit of'} {$prescription-
>get_refills()} {xl t='refills'}.
219 <input type=
"hidden" name=
"id" value=
"{$prescription->id}" />
220 <input type=
"hidden" name=
"process" value=
"{$PROCESS}" />
221 <script language='JavaScript'
>