From bd329a120c251feac8dc8467de6de699feb1f769 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Tue, 5 Jul 2005 22:35:51 +0000 Subject: [PATCH] new code to manage appointments and other calendar events with popup windows --- interface/main/authorizations/authorizations.php | 32 +- interface/main/calendar/add_edit_event.php | 525 +++++++++++++++++++++ interface/main/calendar/find_appt_popup.php | 241 ++++++++++ interface/main/calendar/find_patient_popup.php | 126 +++++ .../pntemplates/default/views/day/default.html | 47 +- .../pntemplates/default/views/week/default.html | 47 +- interface/main/main_screen.php | 99 ++-- interface/patient_file/patient_file.php | 6 +- interface/patient_file/summary/summary_title.php | 134 +++--- 9 files changed, 1064 insertions(+), 193 deletions(-) create mode 100644 interface/main/calendar/add_edit_event.php create mode 100644 interface/main/calendar/find_appt_popup.php create mode 100644 interface/main/calendar/find_patient_popup.php rewrite interface/main/main_screen.php (69%) rewrite interface/patient_file/summary/summary_title.php (85%) diff --git a/interface/main/authorizations/authorizations.php b/interface/main/authorizations/authorizations.php index d7af0afb2..6ee30af9a 100644 --- a/interface/main/authorizations/authorizations.php +++ b/interface/main/authorizations/authorizations.php @@ -1,7 +1,6 @@ - @@ -38,12 +31,11 @@ sqlStatement("update transactions set authorized=1 where pid='".$_GET["pid"]."'" - topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0> - + topmargin='0' rightmargin='0' leftmargin='2' bottommargin='0' + marginwidth='2' marginheight='0'> Authorizations(Find Patient) - " . $iter{"code_text"} . " " . date("n/j/Y",strtotime($iter{"date"})) . "
\n"; - - } //$authorize[$iter{"pid"}]{"billing"} = substr($authorize[$iter{"pid"}]{"billing"},0,strlen($authorize[$iter{"pid"}]{"billing"})); } } - //fetch transaction information: if ($res = sqlStatement("select * from transactions where authorized=0 and groupname='$groupname'")) { @@ -81,7 +70,6 @@ foreach ($result2 as $iter) { $authorize{$iter{"pid"}}{"transaction"} .= "" . $iter{"title"} . ": " . stripslashes(strterm($iter{"body"},25)) . " " . date("n/j/Y",strtotime($iter{"date"})) . "
\n"; - } //$authorize[$iter{"pid"}]{"transaction"} = substr($authorize[$iter{"pid"}]{"transaction"},0,strlen($authorize[$iter{"pid"}]{"transaction"})); @@ -89,7 +77,6 @@ $authorize{$iter{"pid"}}{"transaction"} .= "" . $iter{"title"} } } - //fetch pnotes information: if ($res = sqlStatement("select * from pnotes where authorized=0 and groupname='$groupname'")) { for ($iter = 0;$row = sqlFetchArray($res);$iter++) @@ -100,7 +87,6 @@ foreach ($result3 as $iter) { $authorize{$iter{"pid"}}{"pnotes"} .= "" . stripslashes(strterm($iter{"body"},25)) . " " . date("n/j/Y",strtotime($iter{"date"})) . "
\n"; - } //$authorize[$iter{"pid"}]{"pnotes"} = substr($authorize[$iter{"pid"}]{"pnotes"},0,strlen($authorize[$iter{"pid"}]{"pnotes"})); @@ -108,8 +94,6 @@ $authorize{$iter{"pid"}}{"pnotes"} .= "" . stripslashes(strterm } } - - //fetch forms information: if ($res = sqlStatement("select * from forms where authorized=0 and groupname='$groupname'")) { for ($iter = 0;$row = sqlFetchArray($res);$iter++) @@ -120,24 +104,18 @@ foreach ($result4 as $iter) { $authorize{$iter{"pid"}}{"forms"} .= "" . $iter{"form_name"} . " " . date("n/j/Y",strtotime($iter{"date"})) . "
\n"; - } //$authorize[$iter{"pid"}]{"forms"} = substr($authorize[$iter{"pid"}]{"forms"},0,strlen($authorize[$iter{"pid"}]{"forms"})); } } - - - - ?> -
- -
- - - - diff --git a/interface/main/calendar/add_edit_event.php b/interface/main/calendar/add_edit_event.php new file mode 100644 index 000000000..3db3bee17 --- /dev/null +++ b/interface/main/calendar/add_edit_event.php @@ -0,0 +1,525 @@ + + // + // This program is free software; you can redistribute it and/or + // modify it under the terms of the GNU General Public License + // as published by the Free Software Foundation; either version 2 + // of the License, or (at your option) any later version. + + // The event editor looks something like this: + + //------------------------------------------------------------// + // Category __________________V O All day event // + // Date _____________ [?] O Date ___:___ __V // + // Title ___________________ Duration ____ minutes // + // Provider __________________V X Repeats _____________V // + // Patient ___________________ Until ___________ [?] // + // Comments ________________________________________________ // + // // + // [Save] [Find Available] [Delete] [Cancel] // + //------------------------------------------------------------// + + include_once("../../globals.php"); + include_once("$srcdir/patient.inc"); + + // Things that might be passed by our opener. + // + $eid = $_GET['eid']; // only for existing events + $date = $_GET['date']; // this and below only for new events + $userid = $_GET['userid']; + // + if ($date) + $date = substr($date, 0, 4) . '-' . substr($date, 4, 2) . '-' . substr($date, 6); + else + $date = date("Y-m-d"); + // + $starttimem = '00'; + if (isset($_GET['starttimem'])) + $starttimem = substr('00' . $_GET['starttimem'], -2); + // + if (isset($_GET['starttimeh'])) { + $starttimeh = $_GET['starttimeh']; + if (isset($_GET['startampm'])) { + if ($_GET['startampm'] == '2' && $starttimeh < 12) + $starttimeh += 12; + } + } else { + $starttimeh = date("G"); + } + $startampm = ''; + + $info_msg = ""; + + // If we are saving, then save and close the window. + // + if ($_POST['form_save']) { + + // Compute start and end time strings to be saved. + if ($_POST['form_allday']) { + $tmph = 0; + $tmpm = 0; + $duration = 24 * 60; + } else { + $tmph = $_POST['form_hour'] + 0; + $tmpm = $_POST['form_minute'] + 0; + if ($_POST['form_ampm'] == '2' && $tmph < 12) $tmph += 12; + $duration = $_POST['form_duration']; + } + $starttime = "$tmph:$tmpm:00"; + // + $tmpm += $duration; + while ($tmpm >= 60) { + $tmpm -= 60; + ++$tmph; + } + $endtime = "$tmph:$tmpm:00"; + + // Useless garbage that we must save. + $locationspec = 'a:6:{s:14:"event_location";N;s:13:"event_street1";N;' . + 's:13:"event_street2";N;s:10:"event_city";N;s:11:"event_state";N;s:12:"event_postal";N;}'; + + // More garbage, but this time 1 character of it is used to save the + // repeat type. + if ($_POST['form_repeat']) { + $recurrspec = 'a:5:{s:17:"event_repeat_freq";s:1:"1";' . + 's:22:"event_repeat_freq_type";s:1:"' . $_POST['form_repeat_type'] . '";' . + 's:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";' . + 's:20:"event_repeat_on_freq";s:1:"0";}'; + } else { + $recurrspec = 'a:5:{s:17:"event_repeat_freq";N;s:22:"event_repeat_freq_type";s:1:"0";' . + 's:19:"event_repeat_on_num";s:1:"1";s:19:"event_repeat_on_day";s:1:"0";' . + 's:20:"event_repeat_on_freq";s:1:"1";}'; + } + + if ($eid) { + sqlStatement("UPDATE openemr_postcalendar_events SET " . + "pc_catid = '" . $_POST['form_category'] . "', " . + "pc_aid = '" . $_POST['form_provider'] . "', " . + "pc_pid = '" . $_POST['form_pid'] . "', " . + "pc_title = '" . $_POST['form_title'] . "', " . + "pc_time = NOW(), " . + "pc_hometext = '" . $_POST['form_comments'] . "', " . + "pc_informant = '" . $_SESSION['authUserID'] . "', " . + "pc_eventDate = '" . fixDate($_POST['form_date']) . "', " . + "pc_endDate = '" . fixDate($_POST['form_enddate']) . "', " . + "pc_duration = '" . ($duration * 60) . "', " . + "pc_recurrtype = '" . ($_POST['form_repeat'] ? '1' : '0') . "', " . + "pc_recurrspec = '$recurrspec', " . + "pc_startTime = '$starttime', " . + "pc_endTime = '$endtime', " . + "pc_alldayevent = '" . $_POST['form_allday'] . "' " . + "WHERE pc_eid = '$eid'"); + } else { + sqlInsert("INSERT INTO openemr_postcalendar_events ( " . + "pc_catid, pc_aid, pc_pid, pc_title, pc_time, pc_hometext, " . + "pc_informant, pc_eventDate, pc_endDate, pc_duration, pc_recurrtype, " . + "pc_recurrspec, pc_startTime, pc_endTime, pc_alldayevent, " . + "pc_location, pc_eventstatus, pc_sharing " . + ") VALUES ( " . + "'" . $_POST['form_category'] . "', " . + "'" . $_POST['form_provider'] . "', " . + "'" . $_POST['form_pid'] . "', " . + "'" . $_POST['form_title'] . "', " . + "NOW(), " . + "'" . $_POST['form_comments'] . "', " . + "'" . $_SESSION['authUserID'] . "', " . + "'" . fixDate($_POST['form_date']) . "', " . + "'" . fixDate($_POST['form_enddate']) . "', " . + "'" . ($duration * 60) . "', " . + "'" . ($_POST['form_repeat'] ? '1' : '0') . "', " . + "'$recurrspec', " . + "'$starttime', " . + "'$endtime', " . + "'" . $_POST['form_allday'] . "', " . + "'$locationspec', " . + "1, " . + "1 )"); + } + } + else if ($_POST['form_delete']) { + sqlStatement("DELETE FROM openemr_postcalendar_events WHERE " . + "pc_eid = '$eid'"); + } + + if ($_POST['form_save'] || $_POST['form_delete']) { + // Close this window and refresh the calendar display. + echo "\n\n\n\n\n"; + exit(); + } + + // If we get this far then we are displaying the form. + + $repeats = 0; // if the event repeats + $repeattype = '0'; + $patientid = ''; + if ($_REQUEST['patientid']) $patientid = $_REQUEST['patientid']; + $patientname = " (Click to select)"; + $hometext = ""; + $row = array(); + + // If we are editing an existing event, then get its data. + if ($eid) { + $row = sqlQuery("SELECT * FROM openemr_postcalendar_events WHERE pc_eid = $eid"); + $date = $row['pc_eventDate']; + $userid = $row['pc_aid']; + $patientid = $row['pc_pid']; + $starttimeh = substr($row['pc_startTime'], 0, 2) + 0; + $starttimem = substr($row['pc_startTime'], 3, 2); + $repeats = $row['pc_recurrtype']; + if (preg_match('/"event_repeat_freq_type";s:1:"(\d)"/', $row['pc_recurrspec'], $matches)) { + $repeattype = $matches[1]; + } + $hometext = $row['pc_hometext']; + if (substr($hometext, 0, 6) == ':text:') $hometext = substr($hometext, 6); + } + + // If we have a patient ID, get their name for display. + if ($patientid) { + $prow = sqlQuery("SELECT lname, fname FROM patient_data WHERE pid = '" . + $patientid . "'"); + $patientname = $prow['lname'] . ", " . $prow['fname']; + } + + // Get the providers list. + $ures = sqlStatement("SELECT id, username, fname, lname FROM users WHERE " . + "authorized != 0 ORDER BY lname, fname"); + + // Get event categories. + $cres = sqlStatement("SELECT pc_catid, pc_catname, pc_recurrtype, pc_duration, pc_end_all_day " . + "FROM openemr_postcalendar_categories ORDER BY pc_catname"); + + // Fix up the time format for AM/PM. + $startampm = '1'; + if ($starttimeh >= 12) { // p.m. starts at noon and not 12:01 + $startampm = '2'; + if ($starttimeh > 12) $starttimeh -= 12; + } +?> + + +<? echo $eid ? "Edit" : "Add New" ?> Event + + + + + + + + + + + + + + + onunload='imclosing()'> + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Category: + + + +    + /> + + All day event +
+ Date: + + ' + title='yyyy-mm-dd event date or starting date' + onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' /> + [?] + +    + /> + + Time + + : +   + +
+ Title: + + ' + style='width:100%' + title='Event title' /> + +   + + duration + + minutes +
+ Provider: + + + +    + /> + + Repeats + + +
+ Patient: + + + + +   + + until + + ' + onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' + title='yyyy-mm-dd last date of this event' /> + [?] +
+ Comments: + + +
+ +

+ +  + +  + /> +  + +

+
+
+ + + diff --git a/interface/main/calendar/find_appt_popup.php b/interface/main/calendar/find_appt_popup.php new file mode 100644 index 000000000..b481b4c8c --- /dev/null +++ b/interface/main/calendar/find_appt_popup.php @@ -0,0 +1,241 @@ + + // + // This program is free software; you can redistribute it and/or + // modify it under the terms of the GNU General Public License + // as published by the Free Software Foundation; either version 2 + // of the License, or (at your option) any later version. + + include_once("../../globals.php"); + include_once("$srcdir/patient.inc"); + + // Record an event into the slots array for a specified day. + function doOneDay($catid, $udate, $starttime, $duration) { + global $slots, $slotsecs, $slotstime, $slotbase, $slotcount; + $udate = strtotime($starttime, $udate); + if ($udate < $slotstime) return; + $i = (int) ($udate / $slotsecs) - $slotbase; + $iend = (int) (($duration + $slotsecs - 1) / $slotsecs) + $i; + if ($iend > $slotcount) $iend = $slotcount; + if ($iend <= $i) $iend = $i + 1; + for (; $i < $iend; ++$i) { + if ($catid == 2) { // in office + $slots[$i] |= 1; + break; + } else if ($catid == 3) { // out of office + $slots[$i] |= 2; + break; + } else { // all other events reserve time + $slots[$i] |= 4; + } + } + } + + // seconds per time slot + $slotsecs = $GLOBALS['calendar_interval'] * 60; + + $info_msg = ""; + + $searchdays = 7; // default to a 1-week lookahead + if ($_REQUEST['searchdays']) $searchdays = $_REQUEST['searchdays']; + + // Get a start date. + if ($_REQUEST['startdate'] && preg_match("/(\d\d\d\d)\D*(\d\d)\D*(\d\d)/", + $_REQUEST['startdate'], $matches)) + { + $sdate = $matches[1] . '-' . $matches[2] . '-' . $matches[3]; + } else { + $sdate = date("Y-m-d"); + } + + // Get an end date - actually the date after the end date. + preg_match("/(\d\d\d\d)\D*(\d\d)\D*(\d\d)/", $sdate, $matches); + $edate = date("Y-m-d", + mktime(0, 0, 0, $matches[2], $matches[3] + $searchdays, $matches[1])); + + // compute starting time slot number and number of slots. + $slotstime = strtotime("$sdate 00:00:00"); + $slotetime = strtotime("$edate 00:00:00"); + $slotbase = (int) ($slotstime / $slotsecs); + $slotcount = (int) ($slotetime / $slotsecs) - $slotbase; + + if ($slotcount <= 0 || $slotcount > 100000) die("Invalid date range."); + + $slotsperday = (int) (60 * 60 * 24 / $slotsecs); + + // If we have a provider, search. + // + if ($_REQUEST['providerid']) { + $providerid = $_REQUEST['providerid']; + + // Create and initialize the slot array. Values are bit-mapped: + // bit 0 = in-office occurs here + // bit 1 = out-of-office occurs here + // bit 2 = reserved + // So, values may range from 0 to 7. + // + $slots = array_pad(array(), $slotcount, 0); + + // Note there is no need to sort the query results. + $query = "SELECT pc_eventDate, pc_endDate, pc_startTime, pc_duration, " . + "pc_recurrtype, pc_recurrspec, pc_alldayevent, pc_catid " . + "FROM openemr_postcalendar_events WHERE " . + "pc_aid = '$providerid' AND " . + "((pc_endDate >= '$sdate' AND pc_eventDate < '$edate') OR " . + "(pc_endDate = '0000-00-00' AND pc_eventDate >= '$sdate' AND pc_eventDate < '$edate'))"; + $res = sqlStatement($query); + + while ($row = sqlFetchArray($res)) { + $thistime = strtotime($row['pc_eventDate'] . " 00:00:00"); + if ($row['pc_recurrtype']) { + preg_match('/"event_repeat_freq_type";s:1:"(\d)"/', $row['pc_recurrspec'], $matches); + $repeattype = $matches[1]; + $endtime = strtotime($row['pc_endDate'] . " 00:00:00") + (24 * 60 * 60); + if ($endtime > $slotetime) $endtime = $slotetime; + while ($thistime < $endtime) { + doOneDay($row['pc_catid'], $thistime, $row['pc_startTime'], $row['pc_duration']); + $adate = getdate($thistime); + if ($repeattype == 0) { // daily + $adate['mday'] += 1; + } else if ($repeattype == 1) { // weekly + $adate['mday'] += 7; + } else if ($repeattype == 2) { // monthly + $adate['mon'] += 1; + } else if ($repeattype == 3) { // yearly + $adate['year'] += 1; + } else if ($repeattype == 4) { // work days + if ($adate['wday'] == 5) // if friday, skip to monday + $adate['mday'] += 3; + else if ($adate['wday'] == 6) // saturday should not happen + $adate['mday'] += 2; + else + $adate['mday'] += 1; + } else { + die("Invalid repeat type '$repeattype'"); + } + $thistime = mktime(0, 0, 0, $adate['mon'], $adate['mday'], $adate['year']); + } + } else { + doOneDay($row['pc_catid'], $thistime, $row['pc_startTime'], $row['pc_duration']); + } + } + + // Mark all slots reserved where the provider is not in-office. + // Actually we could do this in the display loop instead. + $inoffice = false; + for ($i = 0; $i < $slotcount; ++$i) { + if (($i % $slotsperday) == 0) $inoffice = false; + if ($slots[$i] & 1) $inoffice = true; + if ($slots[$i] & 2) $inoffice = false; + if (! $inoffice) $slots[$i] |= 4; + } + } +?> + + +Find Available Appointments + + + + + + + + +> + +
+
+ + + + + + + + + + + + + + + +
+
+ + Start date: + + for + + days  + + +
+
+ + + + + + + + + += 4) continue; + $utime = ($slotbase + $i) * $slotsecs; + $thisdate = date("Y-m-d", $utime); + if ($thisdate != $lastdate) { + if ($lastdate) { + echo "\n"; + echo " \n"; + } + $lastdate = $thisdate; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + } else { + echo " \n"; + } +?> +
DayDateAvailable Times
" . date("l", $utime) . "" . date("Y-m-d", $utime) . ""; + } + $adate = getdate($utime); + $anchor = ""; + echo $anchor . date("H:i", $utime) . " "; + } + if ($lastdate) { + echo "
No openings were found for this period.
+ + + +
+
+ + diff --git a/interface/main/calendar/find_patient_popup.php b/interface/main/calendar/find_patient_popup.php new file mode 100644 index 000000000..e2cc30a02 --- /dev/null +++ b/interface/main/calendar/find_patient_popup.php @@ -0,0 +1,126 @@ + + // + // This program is free software; you can redistribute it and/or + // modify it under the terms of the GNU General Public License + // as published by the Free Software Foundation; either version 2 + // of the License, or (at your option) any later version. + + include_once("../../globals.php"); + include_once("$srcdir/patient.inc"); + + $info_msg = ""; + + // If we are searching, search. + // + if ($_REQUEST['searchby'] && $_REQUEST['searchparm']) { + $searchby = $_REQUEST['searchby']; + $searchparm = $_REQUEST['searchparm']; + + if ($searchby == "Last") { + $result = getPatientLnames("$searchparm","*"); + } elseif ($searchby == "ID") { + $result = getPatientId("$searchparm","*"); + } elseif ($searchby == "DOB") { + $result = getPatientDOB("$searchparm","*"); + } elseif ($searchby == "SSN") { + $result = getPatientSSN("$searchparm","*"); + } + } +?> + + +Patient Finder + + + + + + + + +> + +
+
+ + + + + + + + + + + + + + + +
+
+ + Search by: + + for: + ' + title='If name, any part of lastname or lastname,firstname'> +   + + + +
+
+ + + + + + + + + + +"; + echo " "; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " "; + } +?> +
NameSSDOBID
$anchor$iterlname, $iterfname$anchor" . $iter['ss'] . "$anchor" . $iter['DOB'] . "$anchor" . $iter['pubpid'] . "
+ + + +
+
+ + diff --git a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html index 744f12743..78d9798fb 100644 --- a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html +++ b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html @@ -28,24 +28,31 @@ a { text-decoration:none; } .notop { border-top-width:0px; } + + [-php-] @@ -77,7 +84,7 @@ function goPid(pid) { $provinfo = getProviderInfo(); - echo "
\n"; + echo "\n"; echo "
\n"; echo "\n"; echo " \n"; @@ -131,12 +138,12 @@ function goPid(pid) { echo ">$value\n"; } echo " \n"; - echo "  \n"; + echo "  \n"; echo " \n"; // Show the Add and Search buttons. echo " \n"; echo " \n"; diff --git a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html index 744f12743..78d9798fb 100644 --- a/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html +++ b/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html @@ -28,24 +28,31 @@ a { text-decoration:none; } .notop { border-top-width:0px; } + + [-php-] @@ -77,7 +84,7 @@ function goPid(pid) { $provinfo = getProviderInfo(); - echo "\n"; + echo "\n"; echo "
\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo " \n"; echo "
\n"; echo " \n"; @@ -131,12 +138,12 @@ function goPid(pid) { echo ">$value\n"; } echo " \n"; - echo "  \n"; + echo "  \n"; echo " \n"; // Show the Add and Search buttons. echo " \n"; echo " \n"; diff --git a/interface/main/main_screen.php b/interface/main/main_screen.php dissimilarity index 69% index d04bc739f..5f429aa13 100644 --- a/interface/main/main_screen.php +++ b/interface/main/main_screen.php @@ -1,64 +1,35 @@ - - - - -OpenEMR - - -,*" cols="*" frameborder="NO" border="0" framespacing="0"> - - -\n"; - } else { - echo " \n"; - } -?> - - -<body bgcolor="#FFFFFF"> - -</body> - - - - - - -OpenEMR - - -,*" cols="*" frameborder="NO" border="0" framespacing="0"> - - -\n"; - } else { - echo " \n"; - } -?> - - -<body bgcolor="#FFFFFF"> - -</body> - - - + + + + +OpenEMR + + + +,*" + cols="*" frameborder="no" border="0" framespacing="0" + onunload="imclosing()"> + + +\n"; + } else { + if (isset($_GET[mode]) && $_GET{mode} == "loadcalendar") { + echo " \n"; + } else { + echo " \n"; + } + } +?> + +<body bgcolor="#FFFFFF"> +</body> + diff --git a/interface/patient_file/patient_file.php b/interface/patient_file/patient_file.php index c78892797..76647dda9 100644 --- a/interface/patient_file/patient_file.php +++ b/interface/patient_file/patient_file.php @@ -1,17 +1,17 @@ - OpenEMR + -,*" cols="*" frameborder="0" border="0" framespacing="0"> +,*" + cols="*" frameborder="0" border="0" framespacing="0" onunload="imclosing()"> diff --git a/interface/patient_file/summary/summary_title.php b/interface/patient_file/summary/summary_title.php dissimilarity index 85% index 767d0b08b..a74b0647d 100644 --- a/interface/patient_file/summary/summary_title.php +++ b/interface/patient_file/summary/summary_title.php @@ -1,56 +1,78 @@ - - - - - - - - - topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0> - - - -
\n"; - echo " \n"; + echo " \n"; echo " \n"; echo "
- - - - -
- (Age: ID: )      Logged in as: () - -= 12) { - $ampm = 2; -} -$dbconn = $GLOBALS['adodb']['db']; - -$sql = "SELECT pc_catid,pc_catname,pc_catcolor,pc_catdesc, - pc_recurrtype,pc_recurrspec,pc_recurrfreq,pc_duration, - pc_dailylimit,pc_end_date_flag,pc_end_date_type,pc_end_date_freq, - pc_end_all_day FROM openemr_postcalendar_categories - WHERE pc_catid = ".$GLOBALS['default_category']; -$catresult = $dbconn->Execute($sql); - -$event_dur_minutes = ($catresult->fields['pc_duration']%(60 * 60))/60; -$event_dur_hours = ($catresult->fields['pc_duration']/(60 * 60)); -$event_title = $catresult->fields['pc_catname']; -$qstring = "&event_startampm=$ampm&event_starttimeh=" . date("H") ."&event_category=".$GLOBALS['default_category']."&provider_id=". $result['providerID'] ."&event_dur_hours=".$event_dur_hours."&event_dur_minutes=".$event_dur_minutes."&patient_id=".$result['pid']."&event_subject=".$event_title; - -echo 'New Appointment'; -?> - -
- - - - + + + + + + + + + + + topmargin='0' rightmargin='0' leftmargin='2' bottommargin='0' + marginwidth='2' marginheight='0'> + + + + + + + + +
+ + (Age: ID: ) +        + Logged in as: + () + += 12) { + $ampm = 2; + } + $dbconn = $GLOBALS['adodb']['db']; + + $sql = "SELECT pc_catid,pc_catname,pc_catcolor,pc_catdesc, + pc_recurrtype,pc_recurrspec,pc_recurrfreq,pc_duration, + pc_dailylimit,pc_end_date_flag,pc_end_date_type,pc_end_date_freq, + pc_end_all_day FROM openemr_postcalendar_categories + WHERE pc_catid = " . $GLOBALS['default_category']; + $catresult = $dbconn->Execute($sql); + + $event_dur_minutes = ($catresult->fields['pc_duration']%(60 * 60))/60; + $event_dur_hours = ($catresult->fields['pc_duration']/(60 * 60)); + $event_title = $catresult->fields['pc_catname']; + $qstring = "&event_startampm=$ampm&event_starttimeh=" . date("H") . + "&event_category=" . $GLOBALS['default_category'] . + "&provider_id=". $result['providerID'] . + "&event_dur_hours=" . $event_dur_hours . + "&event_dur_minutes=" . $event_dur_minutes . + "&patient_id=" . $result['pid'] . + "&event_subject=" . $event_title; + + echo 'New Appointment'; + ****/ +?> + New Appointment +
+ + + -- 2.11.4.GIT