Difference between revisions of "testpageEMI"

From MGH Learn Pathology
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#expr:{{#timel: W|now +2 week}}}}
+
{{DISPLAYTITLE:Next Week in AP}}{{varScheduleYear}}{{varScheduleYearNW}}{{#css: @media { .container { width: 95% !important; } }}
 
 
 
<br>
 
<br>
 
+
<table class='table borderless' style="width: 100%">
{{#expr:{{#timel: Y|now +2 week}}}}
+
<tr>
 
+
<td colspan="3">
 
<br>
 
<br>
 
+
{{ColorText|'''Resident weekend call schedule'''||#018ab2|6|}}
{{#cargo_query: tables= scheduleCallConference |fields=Year|where=Date=December 30, 2024|limit=1|more results text=|no html}}
+
</td>
 
+
<td colspan="1">
 +
&nbsp;
 +
</td>
 +
<td colspan="8">
 
<br>
 
<br>
 
+
{{ColorText|'''Weekday call and conference schedule'''||#018ab2|6|}}
{{#time: l|now}}
+
</td>
 
+
</tr>
Monday
+
<tr>
{{#switch:{{#time: l|now}}|Monday=0|Tuesday=-1|Wednesday=-2|Thursday=-3|Thursday=-4|Friday=-5|Saturday=-6|Sunday=-7}}
+
<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
Tuesday
+
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
{{#switch:{{#time: l|now}}|Monday=+1|Tuesday=-0|Wednesday=-1|Thursday=-2|Thursday=-3|Friday=-4|Saturday=-5|Sunday=-6}}
+
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
+
    |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}}
 +
</td>
 +
<td style="width: 12%">
 +
{{#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
Wednesday
+
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
{{#switch:{{#time: l|now}}|Monday=+2|Tuesday=+1|Wednesday=0|Thursday=-1|Friday=-2|Saturday=-3|Sunday=-4}}
+
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
+
    |where=Date='{{#var:saturdayDate}}' AND NOT ResAbbrev='-'|default={{:schtableempty}}
 
+
    |format=template|order by = sort ASC|template=schtableconfcallLeft}}
<br>
+
</td>
 
+
<td style="width: 11%">
Thursday
+
{{#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}}
{{#switch:{{#time: l|now}}|Monday=+3|Tuesday=+2|Wednesday=+1|Thursday=0|Friday=-1|Saturday=-2|Sunday=-3}}
 
 
 
 
 
 
<br>
 
<br>
 
+
{{#cargo_query: tables=scheduleCallConference,residentMGH
Friday
+
    |join on=scheduleCallConference.ResAbbrev=residentMGH.copath_id
{{#switch:{{#time: l|now}}|Monday=+4|Tuesday=+3|Wednesday=+2|Thursday=+1|Friday=0|Saturday=-1|Sunday=-2}}
+
    |fields=scheduleCallConference.ResAbbrev,scheduleCallConference.Color,residentMGH.full_name,scheduleCallConference.TaskAbbrev,scheduleCallConference.Sort=sort
 
+
    |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}}
 +
</td>
 +
<td style="width: 2%">
 +
&nbsp;
 +
</td>
 +
<td style="width: 9%">
 +
{{scheduleNWinAPcall|1|Monday}}
 +
{{#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}}
 +
</td>
 +
<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 style="width: 9%">
 +
{{scheduleNWinAPcall|7|Sunday}}
 +
</td>
 +
<td style="width: 1%">
 +
&nbsp;
 +
</td>
 +
</tr>
 +
<tr>
 +
<tr>
 +
<td colspan="12">
 +
&nbsp;
 +
</td>
 +
</tr>
 +
</table>
  
 
<br>
 
<br>
  
Saturday
+
<table style="width: 100%">
{{#switch:{{#time: l|now}}|Monday=+5|Tuesday=+4|Wednesday=+3|Thursday=+2|Friday=+1|Saturday=0|Sunday=-1}}
+
<tr>
 
+
<td colspan="3">
 
 
 
<br>
 
<br>
 
+
{{ColorText|'''Faculty weekend call schedule'''||#018ab2|6|}}
Sunday
+
</td>
{{#switch:{{#time: l|now}}|Monday=+6|Tuesday=+5|Wednesday=+4|Thursday=+3|Friday=+2|Saturday=+1|Sunday=0}}
+
<td colspan="1">
 
+
&nbsp;
 +
</td>
 +
<td colspan="8">
 
<br>
 
<br>
 
+
{{ColorText|'''Integrated service schedules'''||#018ab2|6|}}
{{#time: Y|now +5 days}}
+
</td>
 +
</tr>
 +
<tr>
 +
<td style="width: 10%">
 +
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Service'''||#000000|}}<br><br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
 +
{{:scheduleDictionaryAP}}
 +
</td>
 +
<td style="width: 9%">
 +
<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:{{scheduleDictionaryAPfaculty}}|;|TaskAbbreviation|
 +
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
 +
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),facultyMGH.pageid
 +
|group by=scheduleFACservice.Color
 +
|where=Date='{{#var:saturdayDate}}' AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'
 +
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 +
|}}
 +
</td>
 +
<td style="width: 9%">
 +
<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:{{scheduleDictionaryAPfaculty}}|;|TaskAbbreviation|
 +
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
 +
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),facultyMGH.pageid
 +
|group by=scheduleFACservice.Color
 +
|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|,|2}}}}|format=template|template=scheduleResident}}
 +
|}}
 +
</td>
 +
</td>
 +
<td style="width: 2%">
 +
&nbsp;
 +
</td>
 +
<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 style="width: 5%">
 +
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Resident'''||#000000|}}<br><br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
 +
{{#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 style="width: 5%">
 +
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Fellow'''||#000000|}}<br><br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table>
 +
{{#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)='{{#var:MondayNW}}' AND scheduleFELLservice.WeekNumber='{{formatnum:{{#expr:{{#timel: W|now + 1 week}}}}}}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' |format=template
 +
|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResident}}
 +
|}}
 +
</td>
 +
<td style="width: 10%">
 +
{{scheduleNWinAPservice|1|Monday}}
 +
</td>
 +
<td style="width: 10%">
 +
{{scheduleNWinAPservice|2|Tuesday}}
 +
</td>
 +
<td style="width: 10%">
 +
{{scheduleNWinAPservice|3|Wednesday}}
 +
</td>
 +
<td style="width: 10%">
 +
{{scheduleNWinAPservice|4|Thursday}}
 +
</td>
 +
<td style="width: 10%">
 +
{{scheduleNWinAPservice|5|Friday}}
 +
</td>
 +
</tr>
 +
</table>

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



Resident weekend call schedule

 


Weekday call and conference schedule

Friday
Jan 17


Mark Sabbagh - MFS
Joshua Sciurba - HUA
Saturday
Jan 18


Mark Sabbagh - MFS
Denis Smirnov - DSV
Sunday
Jan 19


Mark Sabbagh - MFS
Denis Smirnov - DSV

 

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 18

REX
HNG
BAY
BAY
BAY
REX
REX
WSB
WSB
WSB
KMC
KMC
KMC
ANA
-
-
SGS
SGS
SGS
SGS
KMC
KMC
LHL
LHL
LHL
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