|
|
(190 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | {{DISPLAYTITLE:Next Week in AP}} | + | {{DISPLAYTITLE:Next Week in AP}}{{varScheduleYear}}{{varScheduleYearNW}}{{#css: @media { .container { width: 95% !important; } }} |
− | | + | <br> |
− | <table class='table borderless'> | + | <table class='table borderless' style="width: 100%"> |
| <tr> | | <tr> |
− | <td style="width: 9%"> | + | <td colspan="3"> |
− | {{#cargo_query: tables=scheduleCallConference,residentMGH
| + | <br> |
− | |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
| + | {{ColorText|'''Resident weekend call schedule'''||#018ab2|6|}} |
− | |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}}
| |
− | |format=template|order by = sort ASC|template=schtableconfcallLeft}}
| |
| </td> | | </td> |
− | <td style="width: 9%"> | + | <td colspan="1"> |
− | {{#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}}}} - 0 }}' AND scheduleCallConference.DayNumber='6' AND NOT ResAbbrev='-'|default={{:schtableempty}}
| |
− | |format=template|order by = sort ASC|template=schtableconfcallLeft}}
| |
− | </td>
| |
− | <td style="width: 9%">
| |
− | {{#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}}}} - 0 }}' AND scheduleCallConference.DayNumber='0' AND NOT ResAbbrev='-'|default={{:schtableempty}}
| |
− | |format=template|order by = sort ASC|template=schtableconfcallLeft}}
| |
− | </td>
| |
− | <td style="width: 5%">
| |
| | | |
| </td> | | </td> |
− | <td style="width: 10%"> | + | <td colspan="8"> |
− | {{#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}}
| |
| <br> | | <br> |
− | {{#cargo_query: tables=scheduleCallConference,residentMGH | + | {{ColorText|'''Weekday call and conference schedule'''||#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='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%"> | + | </tr> |
− | {{#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}} | + | <tr> |
| + | <td style="width: 11%"> |
| + | {{#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}}}} + 1 }}' AND scheduleCallConference.DayNumber='2' 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: 10%"> | + | <td style="width: 12%"> |
− | {{#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}} | + | {{#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}}}} + 1 }}' AND scheduleCallConference.DayNumber='3' 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: 10%"> | + | <td style="width: 11%"> |
− | {{#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}} | + | {{#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}}}} + 1 }}' AND scheduleCallConference.DayNumber='4' 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: 10%"> | + | <td style="width: 2%"> |
− | {{#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}}
| + | |
− | <br>
| + | </td> |
− | {{#cargo_query: tables=scheduleCallConference,residentMGH | + | <td style="width: 9%"> |
− | |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
| + | {{scheduleNWinAPcall|1|Monday}} |
− | |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
| + | {{#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}} |
− | |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='5' AND NOT ResAbbrev='-'|default={{:schtableempty}}
| + | </td> |
− | |format=template|order by = sort ASC|template=schtableconfcallLeft}}
| + | <td style="width: 9%"> |
| + | {{scheduleNWinAPcall|2|Tuesday}} |
| + | </td> |
| + | <td style="width: 9%"> |
| + | {{scheduleNWinAPcall|3|Wednesday}} |
| + | </td> |
| + | <td style="width: 9%"> |
| + | {{scheduleNWinAPcall|4|Thursday}} |
| + | </td> |
| + | <td style="width: 9%"> |
| + | {{scheduleNWinAPcall|5|Friday}} |
| + | </td> |
| + | <td style="width: 9%"> |
| + | {{scheduleNWinAPcall|6|Saturday}} |
| </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%"> |
| + | |
| + | </td> |
| + | </tr> |
| + | <tr> |
| + | <tr> |
| + | <td colspan="12"> |
| + | |
| + | </td> |
| + | </tr> |
| + | </table> |
| + | |
| <br> | | <br> |
− | {{#cargo_query: tables=scheduleCallConference,residentMGH
| + | |
− | |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
| + | <table style="width: 100%"> |
− | |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
| + | <tr> |
− | |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleCallConference.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleCallConference.DayNumber='6' AND NOT ResAbbrev='-'|default={{:schtableempty}}
| + | <td colspan="3"> |
− | |format=template|order by = sort ASC|template=schtableconfcallLeft}}
| + | <br> |
| + | {{ColorText|'''Faculty weekend call schedule'''||#018ab2|6|}} |
| + | </td> |
| + | <td colspan="1"> |
| + | |
| </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%"> |
| + | |
| </td> | | </td> |
| <td style="width: 5%"> | | <td style="width: 5%"> |
− |
| + | <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> |