Difference between revisions of "scheduleNow"

From MGH Learn Pathology
Line 34: Line 34:
 
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
 
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
 
|fields=scheduleFELLservice.FellAbbrev,scheduleFELLservice.TaskAbbrev,residentMGH.full_name,residentMGH.pageid
 
|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}}' AND scheduleFELLservice.Date > '2026-02-02'|format=template
+
|where=YEAR(Date)={{#timel: Y|{{Timezone}}}} AND scheduleFELLservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFELLservice.Date > '2025-02-02'|format=template
 
|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResident}}
 
|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResident}}
 
|}}
 
|}}
Line 45: Line 45:
 
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName,facultyMGH.pageid
 
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName,facultyMGH.pageid
 
|group by=scheduleFACservice.Color
 
|group by=scheduleFACservice.Color
|where=LocationAbbrev = '{{#ifeq: {{#explode:TaskAbbreviation|,|0}} | MGB CV | BWH | 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}}' AND scheduleFACservice.Date > '2026-02-01'
+
|where=LocationAbbrev = '{{#ifeq: {{#explode:TaskAbbreviation|,|0}} | MGB CV | BWH | 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}}' AND scheduleFACservice.Date > '2026-02-01'
 
|limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|}}
 
|}}
Line 101: Line 101:
 
<td style="width: 20%">
 
<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>
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Attending|Attending}}||#000000|}}'''<sup>[1]</sup></center></td></tr></table>
{{#arraymap:{{scheduleDictionaryAPaccessioning-today}}|;|TaskAbbreviation|
+
{{#arraymap:{{scheduleDictionaryCPfaculty}}|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
 
{{#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
 
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),facultyMGH.pageid
 
|group by=scheduleFACservice.Color
 
|group by=scheduleFACservice.Color
|where=LocationAbbrev = '{{#ifeq: {{#explode:TaskAbbreviation|,|0}} | MGB CV | BWH | 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}}'
+
|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|,|2}}}}|format=template|template=scheduleResidentCPfaculty}}
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResidentCPfaculty}}
 
|}}
 
|}}

Revision as of 09:59, March 6, 2026