2 <!-- main navigation -->
3 [-*Load the Language Definitions*-]
4 [-config_load
file=
"lang.$USER_LANG"-]
5 [-include
file=
"$TPL_NAME/views/header.html"-]
8 <SCRIPT LANGUAGE=
"JavaScript">
10 function popUp(location) {
12 id =
"findfirstpopup";
14 var provid = document.find_first.event_userid.options[document.find_first.event_userid.selectedIndex].value;
15 var patient_id = document.find_first.event_pid.options[document.find_first.event_pid.selectedIndex].value;
16 var title = document.find_first.event_subject.value;
17 var category = document.find_first.event_category.options[document.find_first.event_category.selectedIndex].value;
18 var duration_m = document.find_first.event_dur_minutes.options[document.find_first.event_dur_minutes.selectedIndex].value;
19 var duration_h = document.find_first.event_dur_hours.options[document.find_first.event_dur_hours.selectedIndex].value;
20 var s_day = document.find_first.event_startday.options[document.find_first.event_startday.selectedIndex].value;
21 var s_month = document.find_first.event_startmonth.options[document.find_first.event_startmonth.selectedIndex].value;
22 var s_year = document.find_first.event_startyear.options[document.find_first.event_startyear.selectedIndex].value;
23 var s_hour = document.find_first.event_starttimeh.options[document.find_first.event_starttimeh.selectedIndex].value;
24 var s_min = document.find_first.event_starttimem.options[document.find_first.event_starttimem.selectedIndex].value;
25 var s_ampm = document.find_first.event_startampm.options[document.find_first.event_startampm.selectedIndex].value;
28 location = location + '&provider_id=' + provid;
29 location = location + '&patient_id=' + patient_id;
32 if (title !=
"undefined") {
33 location = location + '&event_subject=' + title;
35 if (category !=
"undefined") {
36 location = location + '&event_category=' + category;
38 if (duration_m !=
"undefined") {
40 location = location + '&event_dur_minutes=' + duration_m;
44 if (duration_h !=
"undefined") {
45 location = location + '&event_dur_hours=' + duration_h;
48 if (s_day !=
"undefined") {
49 location = location + '&event_startday=' + s_day;
51 if (s_month !=
"undefined") {
52 location = location + '&event_startmonth=' + s_month;
54 if (s_year !=
"undefined") {
55 location = location + '&event_startyear=' + s_year;
57 if (s_hour !=
"undefined") {
58 location = location + '&event_starttimeh=' + s_hour;
60 if (s_min !=
"undefined") {
62 location = location + '&event_starttimem=' + s_min;
64 if (s_ampm !=
"undefined") {
65 location = location + '&event_startampm=' + s_ampm;
70 eval(
"page" + id +
" = window.open(location, '" + id +
"', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=350,height=400,left = 825,top = 400');");
74 function reloadForm(select) {
75 var provid = select.options[select.selectedIndex].value;
76 var title = document.find_first.event_subject.value;
77 var category = document.find_first.event_category.options[document.find_first.event_category.selectedIndex].value;
78 var duration_m = document.find_first.event_dur_minutes.options[document.find_first.event_dur_minutes.selectedIndex].value;
79 var duration_h = document.find_first.event_dur_hours.options[document.find_first.event_dur_hours.selectedIndex].value;
80 var s_day = document.find_first.event_startday.options[document.find_first.event_startday.selectedIndex].value;
81 var s_month = document.find_first.event_startmonth.options[document.find_first.event_startmonth.selectedIndex].value;
82 var s_year = document.find_first.event_startyear.options[document.find_first.event_startyear.selectedIndex].value;
83 var s_hour = document.find_first.event_starttimeh.options[document.find_first.event_starttimeh.selectedIndex].value;
84 var s_min = document.find_first.event_starttimem.options[document.find_first.event_starttimem.selectedIndex].value;
85 var s_ampm = document.find_first.event_startampm.options[document.find_first.event_startampm.selectedIndex].value;
86 var location = 'find_patient.php?[-/literal-][-$qstring-][-literal-]';
88 location = location + '&provider_id=' + provid;
90 if (title !=
"undefined") {
91 location = location + '&event_subject=' + title;
93 if (category !=
"undefined") {
94 location = location + '&event_category=' + category;
96 if (duration_m !=
"undefined") {
97 location = location + '&event_dur_minutes=' + duration_m;
99 if (duration_h !=
"undefined") {
100 alter(
"here is durationh". duration_h);
101 location = location + '&event_dur_hours=' + duration_h;
104 if (s_day !=
"undefined") {
105 location = location + '&event_startday=' + s_day;
107 if (s_month !=
"undefined") {
108 location = location + '&event_startmonth=' + s_month;
110 if (s_year !=
"undefined") {
111 location = location + '&event_startyear=' + s_year;
113 if (s_hour !=
"undefined") {
114 location = location + '&event_starttimeh=' + s_hour;
116 if (s_min !=
"undefined") {
118 location = location + '&event_starttimem=' + s_min;
120 if (s_ampm !=
"undefined") {
121 location = location + '&event_startampm=' + s_ampm;
123 top.restoreSession();
124 window.location.href=location;
128 function populateOffice(select) {
129 var EventCats = new Array();
130 [-/literal-][-foreach item=cat from=$category-][-literal-]
132 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"] = new Array();
134 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"name"]=
"[-/literal-][-$cat.name-][-literal-]";
135 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"duration"]=
"[-/literal-][-$cat.event_duration-][-literal-]";
136 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"repeat"]=
"[-/literal-][-$cat.event_repeat-][-literal-]";
137 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"repeat_freq"]=
"[-/literal-][-$cat.event_repeat_freq-][-literal-]";
138 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"repeat_freq_type"]=
"[-/literal-][-$cat.event_repeat_freq_type-][-literal-]";
139 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"repeat_on_num"]=
"[-/literal-][-$cat.event_repeat_on_num-][-literal-]";
140 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"repeat_on_day"]=
"[-/literal-][-$cat.event_repeat_on_day-][-literal-]";
141 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"repeat_on_freq"]=
"[-/literal-][-$cat.event_repeat_on_freq-][-literal-]";
142 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"recurrspec"]=
"[-/literal-][-$cat.event_recurrspec-][-literal-]";
143 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"durationh"]=
"[-/literal-][-$cat.event_durationh-][-literal-]";
144 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"durationm"]=
"[-/literal-][-$cat.event_durationm-][-literal-]";
145 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"end_date_flag"]=
"[-/literal-][-$cat.end_date_flag-][-literal-]";
146 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"end_date_type"]=
"[-/literal-][-$cat.end_date_type-][-literal-]";
147 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"end_date_freq"]=
"[-/literal-][-$cat.end_date_freq-][-literal-]";
148 EventCats[
"value[-/literal-][-$cat.id-][-literal-]"][
"all_day"]=
"[-/literal-][-$cat.end_all_day-][-literal-]";
151 [-/literal-][-/foreach-][-literal-]
154 var that = select.value;
157 document.find_first.event_subject.value = EventCats.eval(cat).name;
160 var found_dur_min =
0;
162 document.find_first.event_repeat_on_freq = EventCats.eval(cat).repeat_on_freq;
163 for(var i=
0;i < document.find_first.event_dur_minutes.length;i++){
164 if(document.find_first.event_dur_minutes.options[i].value == EventCats.eval(cat).durationm){
166 document.find_first.event_dur_minutes.options[i].selected =true;
170 if(found_dur_min !=
1){
171 document.find_first.event_dur_minutes.options[document.find_first.event_dur_minutes.options.length++]= new Option(EventCats.eval(cat).durationm,EventCats.eval(cat).durationm,false,true);
175 for(var i=
0;i < document.find_first.event_allday.length;i++){
177 if(document.find_first.event_allday[i].value == EventCats.eval(cat).all_day){
179 document.find_first.event_allday[i].checked =true;
183 for(var i=
0;i < document.find_first.event_repeat.length;i++){
184 if(document.find_first.event_repeat[i].value == EventCats.eval(cat).repeat){
186 document.find_first.event_repeat[i].checked =true;
190 for(var i=
0;i < document.find_first.event_endtype.length;i++){
191 if(document.find_first.event_endtype[i].value == EventCats.eval(cat).end_date_type){
193 document.find_first.event_endtype[i].checked =true;
197 document.find_first.event_repeat_freq_type.value = EventCats.eval(cat).repeat_freq_type;
199 document.find_first.event_repeat_on_num.value = EventCats.eval(cat).repeat_on_num;
201 document.find_first.event_repeat_on_day.value = EventCats.eval(cat).repeat_on_day;
203 for(var i=
0;i < document.find_first.event_dur_hours.length;i++){
204 if(document.find_first.event_dur_hours.options[i].value == EventCats.eval(cat).durationh){
206 document.find_first.event_dur_hours.options[i].selected =true;
211 date.setDate(document.find_first.event_startday.options[document.find_first.event_startday.selectedIndex].value);
212 date.setMonth(document.find_first.event_startmonth.options[document.find_first.event_startmonth.selectedIndex].value -
1 );
213 date.setFullYear(document.find_first.event_startyear.options[document.find_first.event_startyear.selectedIndex].value);
215 if(EventCats.eval(cat).end_date_flag
> 0)
217 var num = parseInt(EventCats.eval(cat).end_date_freq);
218 switch(EventCats.eval(cat).end_date_type)
222 date.setDate(date.getDate() + num);
225 date.setDate(date.getDate() + (num *
7));
228 date.setMonth(date.getMonth() + num);
231 date.setFullYear(date.getFullYear() + num);
234 document.find_first.event_endday = date.getDate();
235 document.find_first.event_endmonth = (date.getMonth() +
1);
236 document.find_first.event_endyear = date.getFullYear();
246 [-if $double_book eq
1-]
247 [-assign var=disable
value=
"disabled"-]
250 <form name=
"find_first" action=
"find_patient.php?no_nav=1" method=
"post" enctype=
"application/x-www-form-urlencoded" onsubmit=
"return top.restoreSession()">
251 <table width=
"100%" border=
"0" cellpadding=
"2" cellspacing=
"0" >
252 <!-- EVENT INFO ROWS -->
256 [-$EventTitle-]
<span style=
"font-size:8pt;">[-$Required-]
</span><br />
257 <input type=
"text" name=
"[-$InputEventTitle-]" value=
"[-$ValueEventTitle-]" [-$disable-]
/><br />
259 <input type=
"hidden" name=
"[-$InputEventTitle-]" value=
"[-$ValueEventTitle-]"/>
261 [-$DateTimeTitle-]
<span style=
"font-size:8pt;">[-$Required-]
</span><br />
262 [-$SelectDateTime-]
<br /><br />
264 <input type=
"hidden" name=
"event_startday" value=
"[-$event_startday-]">
267 <input type=
"hidden" name=
"event_startmonth" value=
"[-$event_startmonth-]">
270 <input type=
"hidden" name=
"event_startyear" value=
"[-$event_startyear-]">
272 <input type=
"hidden" name=
"event_sharing" value=
"1"><!-- default of 1 is ahring type "public" -->
277 <td align=
"left" valign=
"top">
278 <table cellpadding=
"0" cellspacing=
"0">
279 <tr><td>Provider
</td>
282 <select name=
"event_userid" onChange=
"reloadForm(this);" [-$disable-]
>
283 <option value=
"">Unassigned
</option>
284 [-foreach item=provider from=$user-]
285 <option value=
"[-$provider.id-]"
286 [-if $ProviderID eq $provider.id-]
289 >[-$provider.lname-], [-$provider.fname-]
</option>
295 <input type=
"hidden" name=
"event_userid" value=
"[-$ProviderID-]">
303 <select name=
"event_pid" [-$disable-]
>
304 [-if count($PatientList)
> 1-]
305 <option value=
"">None Specified
</option>
307 [-foreach item=patient from=$PatientList-]
308 <option value=
"[-$patient.pid-]">[-$patient.lname-], [-$patient.fname-]
</option>
310 [-if count($PatientList) <
2-]
311 <option value=
"">None Specified
</option>
316 <input type=
"hidden" name=
"event_pid" value=
"[-$patient.pid-]">
322 <td>Category
</td>
323 <tr><td>Time
</td></td></tr>
325 <tr><td>[-$TimedDurationTitle-]
</td>
330 <select name=
"[-$InputEventCategory-]" onChange=
"populateOffice(this);" [-$disable-]
>
331 [-foreach item=category from=$categories-]
332 <option value=
"[-$category.value-]" [-$category.selected-]
>[-$category.name-]
</option>
337 <input type=
"hidden" name=
"[-$InputEventCategory-]" value=
"[-$hidden_event_category-]">
340 [-$SelectTimedHours-] [-$SelectTimedMinutes-] [-$SelectTimedAMPM-]
342 <input type=
"hidden" name=
"event_starttimeh" value=
"[-$event_starttimeh-]">
345 <input type=
"hidden" name=
"event_starttimem" value=
"[-$event_starttimem-]">
348 <input type=
"hidden" name=
"event_startampm" value=
"[-$event_startampm-]">
354 <!--<select name="[-$InputTimedDurationHours-]">
355 [-foreach item=time from=$TimedDurationHours-]
356 <option value="[-$time.value-]" [-$time.selected-]>[-$time.name-]</option>
360 <input type=
"hidden" name=
"[-$InputTimedDurationHours-]" value=
"[-$event_dur_hours-]" />
362 <select name=
"[-$InputTimedDurationHours-]" [-$disable-]
>
363 [-foreach item=timeh from=$TimedDurationHours-]
364 <option value=
"[-$timeh.value-]" [-$timeh.selected-]
>[-$timeh.name-]
</option>
367 <select name=
"[-$InputTimedDurationMinutes-]" [-$disable-]
>
368 [-foreach item=time from=$TimedDurationMinutes-]
369 <option value=
"[-$time.value-]" [-$time.selected-]
>[-$time.name-]
</option>
374 <input type=
"hidden" name=
"[-$InputTimedDurationMinutes-]" value=
"[-$event_dur_minutes-]">
378 [-if $displayTopics eq
1-]
379 <tr><td>[-$EventTopicTitle-]
</td>
382 <select name=
"[-$InputEventTopic-]" [-$disable-]
>
383 [-foreach item=topic from=$topics-]
384 <option value=
"[-$topic.value-]" [-$topic.selected-]
>[-$topic.name-]
</option>
389 <input type=
"hidden" name=
"[-$InputEventTopic-]" value=
"[-$topic.value-]">
400 <td colspan=
"3" align=
"center">
403 $plussevend = strtotime(
"+7 days");
405 $eday = date(
"d",$plussevend);
406 $emonth = date(
"m",$plussevend);
407 $eyear = date(
"Y",$plussevend);
408 $this-
>assign(
"endd",$eday);
409 $this-
>assign(
"endm",$emonth);
410 $this-
>assign(
"endy",$eyear);
412 [-if $double_book ne
1-]
413 <A HREF=
"javascript:popUp('index.php?no_nav=1&module=PostCalendar&func=search&submit=Find%20First')" style=
"font-size:10pt;font-family:san-serif;">First Available Appointment
</A>
415 [-$FormSubmit-]
421 [-if $ValueEventDesc -]
422 <input type=
"hidden" name=
"[-$InputEventDesc-]" value=
"[-$ValueEventDesc-]" />
424 <input type=
"hidden" name=
"[-$InputEventDesc-]" value=
"no description" />
426 <input type=
"hidden" name=
"[-$InputTimed-]" value=
"[-$ValueTimed-]" />
427 <!-- EVENT INFO ROWS -->
428 <!-- baggage from regular size submit form -->
429 <input type=
"hidden" name=
"[-$InputNoRepeat-]" value=
"[-$ValueNoRepeat-]" [-$SelectedNoRepeat-]
/>
430 <input type=
"hidden" name=
"[-$InputRepeatOnFreq-]" value=
"[-$InputRepeatOnFreqVal-]" size=
"4" />
431 <input type=
"hidden" name=
"event_repeat_freq_type" value=
"[-$InputRepeatOnFreqVal-]" size=
"4" />
432 <input type=
"hidden" name=
"event_repeat_on_num" value=
"[-$InputRepeatOnFreqVal-]" size=
"4" />
433 <input type=
"hidden" name=
"event_repeat_on_day" value=
"[-$InputRepeatOnFreqVal-]" size=
"4" />
434 <input type=
"hidden" name=
"[-$InputEndOn-]" value=
"[-$ValueEndOn-]" [-$SelectedEndOn-]
/>
435 <input type=
"hidden" name=
"event_endmonth" id=
"event_endmonth" value=
"01">
436 <input type=
"hidden" name=
"event_endday" id=
"event_day" value=
"01">
437 <input type=
"hidden" name=
"event_endyear" id=
"event_day" value=
"1994">
438 <input type=
"hidden" name=
"[-$InputNoEnd-]" value=
"[-$ValueNoEnd-]" [-$SelectedNoEnd-]
/>
439 <input type=
"hidden" name=
"double_book" value=
"[-$double_book-]"/>
440 <!-- REPEATING ROWS -->
441 <input type=
"hidden" name=
"pc_html_or_text" value=
"text" selected
>
442 [-*$EventHTMLorText*-]
449 [-include
file=
"$TPL_NAME/views/footer.html"-]