Skip to content

Commit

Permalink
Display Facility Name in Fancy style calendar and use color coding
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccormi committed Apr 25, 2011
1 parent 63d5dd8 commit 97e2a66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,12 @@
[-$event.data.startTime|date_format:"%I:%M %p"-]
</a>
</p>
<p>[-$event.data.duration-][-php-] xl('min','e'); [-/php-]</p>

<p><font color="[-$event.data.facility.color-]">
[-$event.data.facility.name-]
</font></p>

<p>[-$event.data.duration-][-php-] xl('min','e'); [-/php-]</p>

[-if $event.data.pid gt 0-]
<p><a href='javascript:goPid([-$event.data.pid-])'>[-$event.data.patient_name|default:'No name'-]</a></p>
Expand Down
11 changes: 7 additions & 4 deletions interface/main/calendar/modules/PostCalendar/pnuserapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,8 @@ function &postcalendar_userapi_pcQueryEventsFA($args) {
"b.pc_catcolor, b.pc_catname, b.pc_catdesc, a.pc_pid, a.pc_aid, " .
"concat(u.fname,' ',u.lname) as provider_name, " .
"concat(pd.fname,' ',pd.lname) as patient_name, " .
"concat(u2.fname, ' ', u2.lname) as owner_name, pd.DOB as patient_dob " .
"concat(u2.fname, ' ', u2.lname) as owner_name, pd.DOB as patient_dob, " .
"a.pc_facility" .
"FROM ( $table AS a ) " .
"LEFT JOIN $cattable AS b ON b.pc_catid = a.pc_catid " .
"LEFT JOIN users as u ON a.pc_aid = u.id " .
Expand Down Expand Up @@ -806,7 +807,7 @@ function &postcalendar_userapi_pcQueryEventsFA($args) {
$tmp['sharing'], $tmp['prefcatid'], $tmp['catcolor'],
$tmp['catname'], $tmp['catdesc'], $tmp['pid'],
$tmp['aid'], $tmp['provider_name'], $tmp['patient_name'],
$tmp['owner_name'], $tmp['patient_dob']) = $result->fields;
$tmp['owner_name'], $tmp['patient_dob'], $tmp['facility']) = $result->fields;

// grab the name of the topic
$topicname = pcGetTopicName($tmp['topic']);
Expand Down Expand Up @@ -864,6 +865,7 @@ function &postcalendar_userapi_pcQueryEventsFA($args) {
$events[$i]['owner_name'] = $tmp['owner_name'];
$events[$i]['patient_dob'] = $tmp['patient_dob'];
$events[$i]['patient_age'] = date("Y") - substr(($tmp['patient_dob']),0,4);
$events[$i]['facility'] = getfacility($tmp['facility']);
$events[$i]['sharing'] = $tmp['sharing'];
$events[$i]['prefcatid'] = $tmp['prefcatid'];
$events[$i]['aid'] = $tmp['aid'];
Expand Down Expand Up @@ -983,7 +985,7 @@ function &postcalendar_userapi_pcQueryEvents($args)
"concat(u.fname,' ',u.lname) as provider_name, " .
"concat(pd.lname,', ',pd.fname) as patient_name, " .
"concat(u2.fname, ' ', u2.lname) as owner_name, " .
"DOB as patient_dob, pd.pubpid " .
"DOB as patient_dob, a.pc_facility, pd.pubpid " .
"FROM ( $table AS a ) " .
"LEFT JOIN $cattable AS b ON b.pc_catid = a.pc_catid ".
"LEFT JOIN users as u ON a.pc_aid = u.id " .
Expand Down Expand Up @@ -1089,7 +1091,7 @@ function &postcalendar_userapi_pcQueryEvents($args)
$tmp['catname'], $tmp['catdesc'], $tmp['pid'],
$tmp['apptstatus'], $tmp['aid'], $tmp['provider_name'],
$tmp['patient_name'], $tmp['owner_name'], $tmp['patient_dob'],
$tmp['pubpid']) = $result->fields;
$tmp['facility'], $tmp['pubpid']) = $result->fields;

// grab the name of the topic
$topicname = pcGetTopicName($tmp['topic']);
Expand Down Expand Up @@ -1146,6 +1148,7 @@ function &postcalendar_userapi_pcQueryEvents($args)
$events[$i]['owner_name'] = $tmp['owner_name'];
$events[$i]['patient_dob'] = $tmp['patient_dob'];
$events[$i]['patient_age'] = getPatientAge($tmp['patient_dob']);
$events[$i]['facility'] = getFacility($tmp['facility']);
$events[$i]['sharing'] = $tmp['sharing'];
$events[$i]['prefcatid'] = $tmp['prefcatid'];
$events[$i]['aid'] = $tmp['aid'];
Expand Down

0 comments on commit 97e2a66

Please sign in to comment.