Difference between revisions of "scheduleNow"

From MGH Learn Pathology
 
(82 intermediate revisions by the same user not shown)
Line 1: Line 1:
<table class="table borderless">
+
__NOCACHE__<table class="table borderless">
<tr><td bgcolor="#f5f5f5" colspan="4"><center>'''{{ColorText|Anatomic pathology|||4}}'''</center></td></tr>
+
<tr><td bgcolor="#f0f0f0" colspan="5"><center>'''{{ColorText|Anatomic pathology (AMP)|||4}}'''</center></td></tr>
 
<tr>
 
<tr>
<td style="width: 25%">
+
<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: 25%">
+
<td style="width: 20%">
 
<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>'''{{ColorText|{{#tip-text:Resident|Resident}}||#000000|}}'''</center></td></tr></table>
{{#switch: {{#time: N|{{Timezone}}}}
+
{{#switch: {{#timel: N|{{Timezone}}}}
 
|6
 
|6
 
|7=
 
|7=
{{:schtablemobile6}}
+
{{:scheduleDictionaryAPempty}}
|{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;RP,FFFF8D;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;FS-S,CCECFF;FS-J,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GI4,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;OB,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;PP,7AD062;GR-S,B8A315;AP CHIEF,B39BE9;CP CHIEF,B39BE9;|;|TaskAbbreviation|
+
|{{#arraymap:{{scheduleDictionaryAPresident}}|;|TaskAbbreviation|
 +
{{#cargo_query: tables=scheduleRESservice_view
 +
|fields=
 +
ResAbbrev,
 +
TaskAbbrev,
 +
FullName,
 +
Pager
 +
|group by=WeekNumber
 +
|where=LocationAbbrev='MGH' AND Year={{#timel: Y|{{Timezone}}}} AND WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResidentNew}}
 +
|}}
 +
}}
 +
</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=LocationAbbrev='MGH' AND 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}}
 +
}}||#000000|}}''']]
 +
</center></td></tr></table>
 +
{{:learn:oncallAMP}}
 +
</td>
 +
</tr>
 +
</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: {{#timel: N|{{Timezone}}}}
 +
|6
 +
|7=
 +
{{:scheduleDictionaryCP}}
 +
|{{#arraymap:{{scheduleDictionaryCP}}|;|TaskAbbreviation|
 
{{#cargo_query: tables=scheduleRESservice,residentMGH  
 
{{#cargo_query: tables=scheduleRESservice,residentMGH  
 
|join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id
 
|join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id
|fields=
+
|fields=GROUP_CONCAT(DISTINCT scheduleRESservice.ResAbbrev)
GROUP_CONCAT(DISTINCT scheduleRESservice.ResAbbrev)
+
,scheduleRESservice.TaskAbbrev
,scheduleRESservice.Color
 
 
,GROUP_CONCAT(DISTINCT residentMGH.full_name)
 
,GROUP_CONCAT(DISTINCT residentMGH.full_name)
 
,pageid
 
,pageid
 
|group by=scheduleRESservice.WeekNumber
 
|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|,|1}}}}|format=template|template=schtableres}}
+
|where=LocationAbbrev='MGH' AND YEAR(Date)={{#timel: Y|{{Timezone}}}} AND scheduleRESservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleRESservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResidentCP}}
 
|}}
 
|}}
 
}}
 
}}
 
</td>
 
</td>
<td style="width: 25%">
+
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Fellow|Fellow / Elective-Resident}}||#000000|}}'''</center></td></tr></table>
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Fellow|Fellow / Elective-Resident}}||#000000|}}'''</center></td></tr></table>
{{#switch: {{#time: N|{{Timezone}}}}
+
{{#switch: {{#timel: N|{{Timezone}}}}
 
|6
 
|6
 
|7=
 
|7=
{{:schtablemobile6}}
+
{{:scheduleDictionaryCP}}
|{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;RP,FFFF8D;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;FS-S,CCECFF;FS-J,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GI4,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;OB,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;PP,7AD062;|;|TaskAbbreviation|
+
|{{#arraymap:{{scheduleDictionaryCP}}|;|TaskAbbreviation|
 
{{#cargo_query: tables=scheduleFELLservice,residentMGH  
 
{{#cargo_query: tables=scheduleFELLservice,residentMGH  
 
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
 
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
|fields=scheduleFELLservice.FellAbbrev,scheduleFELLservice.Color,residentMGH.full_name,residentMGH.pageid
+
|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
+
|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|,|1}}}}|template=schtableres}}
+
|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResidentCP}}
 
|}}
 
|}}
 
}}
 
}}
 
</td>
 
</td>
<td style="width: 25%">
+
<td style="width: 20%">
{{#switch: {{#time: N|{{Timezone}}}}
 
|6
 
|7=
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:On call - att.|On call attending}}||#000000|}}'''
 
</center></td></tr></table>
 
|1
 
|2
 
|3
 
|4
 
|5=
 
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Attending|Attending}}||#000000|}}'''<sup>[1]</sup></center></td></tr></table>
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Attending|Attending}}||#000000|}}'''<sup>[1]</sup></center></td></tr></table>
}}
+
{{#arraymap:{{scheduleDictionaryCPfaculty}}|;|TaskAbbreviation|
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;RP,FFFF8D;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;FROZEN SECTION,CCECFF;FROZEN SECTION,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GI4,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;OB,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;PP,7AD062;|;|TaskAbbreviation|
+
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
{{#cargo_query: table=scheduleFACservice  
+
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),facultyMGH.pageid
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.Color,GROUP_CONCAT(scheduleFACservice.StaffFullName)
 
 
|group by=scheduleFACservice.Color
 
|group by=scheduleFACservice.Color
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='{{#time:N|now}}' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0}}'
+
|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}}'
|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtable}}
+
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResidentCPfaculty}}
 
|}}
 
|}}
<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}}
+
{{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>
 
</td>
 
</tr>
 
</tr>
 
</table>
 
</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>

Latest revision as of 09:56, August 5, 2024