Difference between revisions of "scheduleNow"

From MGH Learn Pathology
Line 59: Line 59:
 
</tr>
 
</tr>
 
</table>
 
</table>
<p></p>
 
__NOCACHE__<table class="table borderless">
 
<tr><td bgcolor="#f0f0f0" colspan="5"><center>'''{{ColorText|Clinical pathology (LMM)|||4}}'''</center></td></tr>
 
<tr>
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>{{ColorText|'''Service'''||#000000|}}</center></td></tr></table>
 
{{:scheduleDictionaryCP}}
 
</td>
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Resident|Resident}}||#000000|}}'''</center></td></tr></table>
 
{{#switch: {{#time: N|{{Timezone}}}}
 
|6
 
|7=
 
{{:scheduleDictionaryCP}}
 
|{{#arraymap:{{scheduleDictionaryCP}}|;|TaskAbbreviation|
 
{{#cargo_query: tables=scheduleRESservice,residentMGH
 
|join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id
 
|fields=GROUP_CONCAT(DISTINCT scheduleRESservice.ResAbbrev)
 
,scheduleRESservice.TaskAbbrev
 
,GROUP_CONCAT(DISTINCT residentMGH.full_name)
 
,pageid
 
|group by=scheduleRESservice.WeekNumber
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleRESservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleRESservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResidentCP}}
 
|}}
 
}}
 
</td>
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Fellow|Fellow / Elective-Resident}}||#000000|}}'''</center></td></tr></table>
 
{{#switch: {{#time: N|{{Timezone}}}}
 
|6
 
|7=
 
{{:scheduleDictionaryCP}}
 
|{{#arraymap:{{scheduleDictionaryCP}}|;|TaskAbbreviation|
 
{{#cargo_query: tables=scheduleFELLservice,residentMGH
 
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
 
|fields=scheduleFELLservice.FellAbbrev,scheduleFELLservice.TaskAbbrev,residentMGH.full_name,residentMGH.pageid
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFELLservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' |format=template
 
|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResidentCP}}
 
|}}
 
}}
 
</td>
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Attending|Attending}}||#000000|}}'''<sup>[1]</sup></center></td></tr></table>
 
{{#arraymap:{{scheduleDictionaryCPfaculty}}|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACserviceDowntime,facultyMGH|join on=scheduleFACserviceDowntime.StaffAbbrev=facultyMGH.copath_id
 
|fields=GROUP_CONCAT(scheduleFACserviceDowntime.StaffAbbrev),scheduleFACserviceDowntime.TaskAbbrev,GROUP_CONCAT(scheduleFACserviceDowntime.StaffFullName),facultyMGH.pageid
 
|group by=scheduleFACserviceDowntime.Color
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACserviceDowntime.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACserviceDowntime.DayNumber='{{#time:N|now}}' AND scheduleFACserviceDowntime.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0}}'
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResidentCPfaculty}}
 
|}}
 
{{scheduleImmunoException}}
 
</td>
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Call|On call attending}}||#000000|}}'''
 
</center></td></tr></table>
 
{{:learn:oncallfaculty}}
 
</td>
 
</tr>
 
</table>
 
<p align="left"><sup>{{ColorText|[1]|||1}}</sup>{{ColorText|Faculty schedule displayed using the <htmltag tagname="a" href="https://app.qgenda.com/Link/view?linkKey=9a12a547-f1b4-4998-bdca-acf3204a120e&landingPageId=40221bd9-4ac1-4a0b-8a00-da4f05d88f2e" target="_blank">QGenda API</htmltag>.|||2}}</p>
 

Revision as of 10:58, December 19, 2021