Difference between revisions of "learn:oncallschedule"

From MGH Learn Pathology
(Created page with "__NOCACHE__<table class="table borderless"> <tr><td bgcolor="#f0f0f0" colspan="5"><center>'''{{ColorText|Anatomic pathology (AMP)|||4}}'''</center></td></tr> <tr> <td style="w...")
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOCACHE__<table class="table borderless">
+
__NOCACHE__{{varScheduleYear}}{{hidecontentheader}}
<tr><td bgcolor="#f0f0f0" colspan="5"><center>'''{{ColorText|Anatomic pathology (AMP)|||4}}'''</center></td></tr>
+
<table class="table borderless">
 +
<tr><td bgcolor="#f0f0f0" colspan="3"><center>'''{{ColorText|MGH Pathology On Call - {{#timel: l, F j, Y|now}}|||4}}'''</center></td></tr>
 
<tr>
 
<tr>
 +
<td style="width: 40%">
 +
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>{{ColorText|'''Weekend call resident'''||#000000|}}</center></td></tr></table>
 +
<center>{{#cargo_query: tables=scheduleCallConference,residentMGH |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id |fields=scheduleCallConference.ResAbbrev,residentMGH.full_name |where=scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleCallConference.Year='{{#var:Sunday}}' AND scheduleCallConference.DayNumber='7' AND TaskAbbrev='Call: Senior' AND scheduleCallConference.Date > '2024-02-02'|default={{:schtableempty}}|format=template|template=acc-call}}</center>
 +
</td>
 
<td style="width: 20%">
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>{{ColorText|'''Service'''||#000000|}}</center></td></tr></table>
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>{{ColorText|'''Service'''||#000000|}}</center></td></tr></table>
 
{{:scheduleDictionaryAP}}
 
{{:scheduleDictionaryAP}}
 
</td>
 
</td>
<td style="width: 20%">
+
<td style="width: 40%">
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Resident|Resident}}||#000000|}}'''</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>[[onCallAMPrules|'''{{ColorText|{{#tip-text:Attending on call|
{{#switch: {{#timel: N|{{Timezone}}}}
 
|6
 
|7=
 
{{:scheduleDictionaryAPempty}}
 
|{{#arraymap:{{scheduleDictionaryAPresident}}|;|TaskAbbreviation|
 
{{#cargo_query: tables=scheduleRESservice,residentMGH,scheduleRESserviceElective_view
 
|join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id,scheduleRESservice.UID=scheduleRESserviceElective_view.UID
 
|fields=
 
GROUP_CONCAT(DISTINCT scheduleRESservice.ResAbbrev)
 
,scheduleRESserviceElective_view.TaskAbbrev
 
,GROUP_CONCAT(DISTINCT residentMGH.full_name)
 
,scheduleRESserviceElective_view.Elective
 
,pageid
 
|group by=scheduleRESservice.WeekNumber
 
|where=YEAR(Date)={{#timel: Y|{{Timezone}}}} AND scheduleRESservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleRESserviceElective_view.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|}}
 
}}
 
</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: {{#timel: N|{{Timezone}}}}
 
|6
 
|7=
 
{{:scheduleDictionaryAPempty}}
 
|{{#arraymap:{{scheduleDictionaryAPresident}}|;|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)={{#timel: Y|{{Timezone}}}} AND scheduleFELLservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' |format=template
 
|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResident}}
 
|}}
 
}}
 
</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:{{scheduleDictionaryAPfaculty}}|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
 
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName,facultyMGH.pageid
 
|group by=scheduleFACservice.Color
 
|where=YEAR(Date)={{#timel: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='{{#timel:N|now}}' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0}}'
 
|limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|}}
 
</td>
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>[[onCallAMPrules|'''{{ColorText|{{#tip-text:Call|
 
 
{{:onCallAMPrules}}
 
{{:onCallAMPrules}}
 
}}||#000000|}}''']]
 
}}||#000000|}}''']]

Latest revision as of 13:27, December 26, 2024