Difference between revisions of "learn:nextweekinap"

From MGH Learn Pathology
 
(184 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Next Week in AP}}<table class='table borderless' style="width: 100%">
+
{{DISPLAYTITLE:Next Week in AP}}{{varScheduleYear}}{{varScheduleYearNW}}{{#css: @media { .container { width: 95% !important; } }}
 +
<br>
 +
<table class='table borderless' style="width: 100%">
 
<tr>
 
<tr>
 
<td colspan="3">
 
<td colspan="3">
{{ColorText|'''Resident Weekend Call Schedule'''||#931A00|4|}}
+
<br>
 +
{{ColorText|'''Resident weekend call schedule'''||#018ab2|6|}}
 
</td>
 
</td>
 
<td colspan="1">
 
<td colspan="1">
 
&nbsp;
 
&nbsp;
 
</td>
 
</td>
<td colspan="7">
+
<td colspan="8">
{{ColorText|'''Weekday Call and Conference Schedule'''||#931A00|4|}}
+
<br>
 +
{{ColorText|'''Weekday call and conference schedule'''||#018ab2|6|}}
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td style="width: 9%">
+
<td style="width: 11%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='5' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Friday}}' AND scheduleFACservice.DayNumber='5' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac|limit=1|more results text=}}
 
<br>
 
<br>
 
{{#cargo_query: tables=scheduleCallConference,residentMGH  
 
{{#cargo_query: tables=scheduleCallConference,residentMGH  
 
     |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
     |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
     |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
     |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
     |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleCallConference.DayNumber='5' AND NOT ResAbbrev='-'|default={{:schtableempty}}
+
     |where=YEAR(Date)='{{#var:Friday}}' AND scheduleCallConference.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleCallConference.DayNumber='5' AND NOT ResAbbrev='-' AND NOT TaskAbbrev IN ('Outs','Thoracic')|default={{:schtableempty}}
 
     |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
     |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
</td>
 
</td>
<td style="width: 9%">
+
<td style="width: 12%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{#vardefine:saturdayDate|{{#time: Y-m-d|{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Saturday}}' AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1'|no html|limit=1|more results text=|order by=scheduleFACservice.Date DESC}}}}}}{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Saturday}}' AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac|limit=1|more results text=|order by=scheduleFACservice.Date DESC}}
 
<br>
 
<br>
 
{{#cargo_query: tables=scheduleCallConference,residentMGH  
 
{{#cargo_query: tables=scheduleCallConference,residentMGH  
 
     |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
     |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
     |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
     |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
     |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleCallConference.DayNumber='6' AND NOT ResAbbrev='-'|default={{:schtableempty}}
+
     |where=Date='{{#var:saturdayDate}}' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
     |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
     |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
</td>
 
</td>
<td style="width: 9%">
+
<td style="width: 11%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Sunday}}' AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac|limit=1|more results text=|order by=scheduleFACservice.Date DESC}}
 
<br>
 
<br>
 
{{#cargo_query: tables=scheduleCallConference,residentMGH  
 
{{#cargo_query: tables=scheduleCallConference,residentMGH  
 
     |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
     |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
     |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
     |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
     |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleCallConference.DayNumber='0' AND NOT ResAbbrev='-'|default={{:schtableempty}}
+
     |where=YEAR(Date)='{{#var:Sunday}}' AND scheduleCallConference.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleCallConference.DayNumber='7' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
     |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
     |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
</td>
 
</td>
<td style="width: 5%">
+
<td style="width: 2%">
 
&nbsp;
 
&nbsp;
 
</td>
 
</td>
<td style="width: 10%">
+
<td style="width: 9%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='1' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{scheduleNWinAPcall|1|Monday}}
<br>
+
{{#cargo_query: tables= conferenceMPR,residentMGH |join on=conferenceMPR.ResAbbrev=residentMGH.copath_id |fields=conferenceMPR.ResAbbrev,conferenceMPR.Color,residentMGH.full_name,conferenceMPR.TaskAbbrev |where=YEAR(conferenceMPR.Date)='{{#timel: Y|now}}' AND conferenceMPR.WeekNumber='{{#expr: {{#timel: W|now}} - 0 }}'|default= |format=template|template=schtableconfcallLeft}}
{{#cargo_query: tables=scheduleCallConference,residentMGH  
+
</td>
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
+
<td style="width: 9%">
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
+
{{scheduleNWinAPcall|2|Tuesday}}
    |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='1' AND NOT ResAbbrev='-' AND NOT TaskAbbrev IN ('Call: Autopsy', 'Call: Junior CP', 'Call: BB/CP', 'HP Journal Club')|default={{:schtableempty}}
 
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
 
</td>
 
</td>
<td style="width: 10%">
+
<td style="width: 9%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='2' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{scheduleNWinAPcall|3|Wednesday}}
<br>
 
{{#cargo_query: tables=scheduleCallConference,residentMGH
 
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
    |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='2' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
 
</td>
 
</td>
<td style="width: 10%">
+
<td style="width: 9%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='3' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{scheduleNWinAPcall|4|Thursday}}
<br>
 
{{#cargo_query: tables=scheduleCallConference,residentMGH
 
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
    |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='3' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
 
</td>
 
</td>
<td style="width: 10%">
+
<td style="width: 9%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='4' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{scheduleNWinAPcall|5|Friday}}
<br>
 
{{#cargo_query: tables=scheduleCallConference,residentMGH
 
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
    |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='4' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
 
</td>
 
</td>
<td style="width: 10%">
+
<td style="width: 9%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='5' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{scheduleNWinAPcall|6|Saturday}}
<br>
 
{{#cargo_query: tables=scheduleCallConference,residentMGH
 
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
    |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='5' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
 
</td>
 
</td>
 
<td style="width: 9%">
 
<td style="width: 9%">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
+
{{scheduleNWinAPcall|7|Sunday}}
 +
</td>
 +
<td style="width: 1%">
 +
&nbsp;
 +
</td>
 +
</tr>
 +
<tr>
 +
<tr>
 +
<td colspan="12">
 +
&nbsp;
 +
</td>
 +
</tr>
 +
</table>
 +
 
 +
<br>
 +
 
 +
<table style="width: 100%">
 +
<tr>
 +
<td colspan="3">
 
<br>
 
<br>
{{#cargo_query: tables=scheduleCallConference,residentMGH
+
{{ColorText|'''Faculty weekend call schedule'''||#018ab2|6|}}
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
+
</td>
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
+
<td colspan="1">
    |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='6' AND NOT ResAbbrev='-'|default={{:schtableempty}}
+
&nbsp;
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
 
</td>
 
</td>
<td style="width: 9%">
+
<td colspan="8">
{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplayfac}}
 
 
<br>
 
<br>
{{#cargo_query: tables=scheduleCallConference,residentMGH
+
{{ColorText|'''Integrated service schedules'''||#018ab2|6|}}
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
 
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
    |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='0' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
 
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td style="width: 9%">
+
<td style="width: 10%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Service'''||#000000|}}<br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Service'''||#000000|}}<br><br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
{{:learn:schedule-list}}
+
{{:scheduleDictionaryAP}}
 
</td>
 
</td>
 
<td style="width: 9%">
 
<td style="width: 9%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Saturday}}' AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} + 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent|limit=1|more results text=|order by=scheduleFACservice.Date DESC}}</center><br></td></tr></table>
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,EDB1FF;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
+
{{#arraymap:{{scheduleDictionaryAPfaculty}}|;|TaskAbbreviation|
{{#cargo_query: table=scheduleFACservice  
+
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
+
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),facultyMGH.pageid
 
|group by=scheduleFACservice.Color
 
|group by=scheduleFACservice.Color
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0}}'
+
|where=Date='{{#var:saturdayDate}}' AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
+
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|}}
 
|}}
 
</td>
 
</td>
 
<td style="width: 9%">
 
<td style="width: 9%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Sunday}}' AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} + 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent|limit=1|more results text=|order by=scheduleFACservice.Date DESC}}</center><br></td></tr></table>
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,9effef;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
+
{{#arraymap:{{scheduleDictionaryAPfaculty}}|;|TaskAbbreviation|
{{#cargo_query: table=scheduleFACservice  
+
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
+
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),facultyMGH.pageid
 
|group by=scheduleFACservice.Color
 
|group by=scheduleFACservice.Color
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0}}'
+
|where=YEAR(Date)='2024' AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0}}'
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
+
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|}}
 
|}}
 
</td>
 
</td>
 +
</td>
 +
<td style="width: 2%">
 +
&nbsp;
 
</td>
 
</td>
 
<td style="width: 5%">
 
<td style="width: 5%">
&nbsp;
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Service'''||#000000|}}<br><br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
 +
{{:scheduleDictionaryAP}}
 
</td>
 
</td>
<td style="width: 10%">
+
<td style="width: 5%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Service'''||#000000|}}<br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Resident'''||#000000|}}<br><br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
{{:learn:schedule-list}}
+
{{#arraymap:{{scheduleDictionaryAPresident}}|;|TaskAbbreviation|
 +
{{#cargo_query: tables=scheduleRESservice_view
 +
|fields=
 +
ResAbbrev,
 +
TaskAbbrev,
 +
FullName,
 +
Pager
 +
|group by=WeekNumber
 +
|where=LocationAbbrev='MGH' AND Year='{{#var:MondayNW}}' AND WeekNumber='{{formatnum:{{#expr:{{#timel: W|now + 1 week}}}}}}' AND TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResidentNew}}
 +
|}}
 
</td>
 
</td>
<td style="width: 10%">
+
<td style="width: 5%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='1' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Fellow'''||#000000|}}<br><br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,9effef;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
+
{{#arraymap:{{scheduleDictionaryAPresident}}|;|TaskAbbreviation|
{{#cargo_query: table=scheduleFACservice
+
{{#cargo_query: tables=scheduleFELLservice,residentMGH
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
+
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
|group by=scheduleFACservice.Color
+
|fields=scheduleFELLservice.FellAbbrev,scheduleFELLservice.TaskAbbrev,residentMGH.full_name,residentMGH.pageid
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='1' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1}}'
+
|where=YEAR(Date)='{{#var:MondayNW}}' AND scheduleFELLservice.WeekNumber='{{formatnum:{{#expr:{{#timel: W|now + 1 week}}}}}}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' |format=template
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
+
|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResident}}
 
|}}
 
|}}
 
</td>
 
</td>
 
<td style="width: 10%">
 
<td style="width: 10%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='1' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
{{scheduleNWinAPservice|1|Monday}}
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,9effef;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice
 
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
 
|group by=scheduleFACservice.Color
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='1' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1}}'
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
 
|}}
 
 
</td>
 
</td>
 
<td style="width: 10%">
 
<td style="width: 10%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='2' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
{{scheduleNWinAPservice|2|Tuesday}}
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,9effef;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice
 
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
 
|group by=scheduleFACservice.Color
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='2' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1}}'
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
 
|}}
 
 
</td>
 
</td>
 
<td style="width: 10%">
 
<td style="width: 10%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='3' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
{{scheduleNWinAPservice|3|Wednesday}}
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,9effef;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice
 
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
 
|group by=scheduleFACservice.Color
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='3' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1}}'
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
 
|}}
 
 
</td>
 
</td>
<td style="width: 9%">
+
<td style="width: 10%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='4' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
{{scheduleNWinAPservice|4|Thursday}}
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,9effef;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice
 
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
 
|group by=scheduleFACservice.Color
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='4' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1}}'
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
 
|}}
 
 
</td>
 
</td>
<td style="width: 9%">
+
<td style="width: 10%">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.DayNumber='5' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}</center></td></tr></table>
+
{{scheduleNWinAPservice|5|Friday}}
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,9effef;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice
 
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
 
|group by=scheduleFACservice.Color
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='5' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1}}'
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
 
|}}
 
 
</td>
 
</td>
 
</tr>
 
</tr>
 
</table>
 
</table>

Latest revision as of 09:43, January 10, 2025



Resident weekend call schedule

 


Weekday call and conference schedule

Friday
Jan 24


Derek Loneman - DLO
Kaitlin Ross - RAK
Saturday
Jan 25


Derek Loneman - DLO
Bence Kovari - BKV
Sunday
Jan 26


Derek Loneman - DLO
Bence Kovari - BKV

 

Monday
Jan 27


Lisa Yuen - LYU
Kaitlin Ross - RAK


Tuesday
Jan 28


Maxwell Roth - MAX
Negar Taheri - NXT
Wednesday
Jan 29


Anh Huynh - AHU
Joshua Sciurba - HUA
Thursday
Jan 30


Miekan Stonhill - STO
Sangeetha Sonney - SAN
Friday
Jan 31


Albert Sy - SYA
Joshua Sciurba - HUA
Saturday
Feb 01


Albert Sy - SYA
Alicia Kenyon - AKE
Sunday
Feb 02


Albert Sy - SYA
Alicia Kenyon - AKE

 

 



Faculty weekend call schedule

 


Integrated service schedules

Service

Service
AUT
BST
BR1
BR2
BR3
CV
RP
CA
CB
CC
DPA
DPB
DPC
EYE
FSJ
FSS
GI1
GI2
GI3
GI4
GU1
GU2
GYL
GYS
OB
HN1
HN2
HPA
HPB
NP
NPAUT
PP
GR-S
AP CHIEF
Saturday
Jan 25

KLN
HNG
MJL
MJL
MJL
REX
REX
IAC
IAC
IAC
HOA
HOA
HOA
DRY
-
-
GLK
GLK
GLK
GLK
KYD
KYD
KYD
KYD
DRU
VAN
VAN
ARA
ARA
ASR
ASR
HNG
-
-
Sunday
Jan 26

REX
HNG
MJL
MJL
-
REX
REX
LZH
LZH
LZH
RKF
RKF
RKF
DRY
-
-
LZH
LZH
LZH
LZH
KMC
KMC
KYD
KYD
DRU
BAY
BAY
ARA
ARA
ASR
ASR
HNG
-
-

 

Service

Service
AUT
BST
BR1
BR2
BR3
CV
RP
CA
CB
CC
DPA
DPB
DPC
EYE
FSJ
FSS
GI1
GI2
GI3
GI4
GU1
GU2
GYL
GYS
OB
HN1
HN2
HPA
HPB
NP
NPAUT
PP
GR-S
AP CHIEF
Resident

Service
RAK
YQG (E)
FXR (D)
-
-
SAN
SAN
-
-
MDR
BKV
-
-
-
HUA
TZO
STO
DSV
-
-
BBC
-
NXT (D)
AKE
AKE
MCH
JPB
LHV
RLD
RSC
-
-
-
LYU
Fellow

Service
-
-
-
SSB
-
-
-
-
OHA
KWA
-
SJB
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
RGJ
-
EZR
-
-
-
-
Monday
Jan 27

DIB
GUN
MJL
AMY
OPEN
REX
CTA
WCF
WCF
LZH
HOA
RKF
LMD
-
SGS
SGS
SGS
DXM
GLK
MRM
MND
KMC
OLI
RHY
KLN
VAN
PET
LD351
NDI
MML
MPF
LDA
-
-
Tuesday
Jan 28

DIB
GUN
MJL
AMY
OPEN
REX
CTA
WCF
WCF
LZH
HOA
RKF
LMD
-
GUN
GUN
SGS
DXM
GLK
MRM
MND
KMC
OLI
RHY
KLN
VAN
PET
LD351
NDI
MML
MPF
LDA
-
-
Wednesday
Jan 29

DIB
GUN
MJL
AMY
OPEN
REX
CTA
WCF
WCF
LZH
HOA
RKF
LMD
-
SGS
SGS
SGS
DXM
GLK
MRM
MND
KMC
OLI
RHY
KLN
VAN
PET
LD351
NDI
MML
MPF
LDA
-
-
Thursday
Jan 30

DIB
GUN
MJL
AMY
OPEN
REX
CTA
WCF
WCF
LZH
HOA
RKF
ANA
-
SGS
SGS
SGS
DXM
GLK
MRM
MND
KMC
OLI
RHY
KLN
VAN
PET
RPH
NDI
MML
MPF
LDA
-
-
Friday
Jan 31

DIB
GUN
MJL
AMY
OPEN
REX
CTA
WCF
WCF
LZH
HOA
RKF
ANA
-
SGS
SGS
SGS
DXM
GLK
MRM
MND
KMC
OLI
RHY
KLN
VAN
PET
RPH
NDI
MML
MPF
HNG
-
-