Difference between revisions of "scheduleNow"

From MGH Learn Pathology
Line 42: Line 42:
 
<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:{{scheduleDictionaryAPaccessioning-today}}|;|TaskAbbreviation|
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
+
  {{#ifeq: {{#explode:TaskAbbreviation|,|0}} | MGB CV
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName,facultyMGH.pageid
+
    | {{scheduleResident
|group by=scheduleFACservice.Color
+
        | 1 = Mitchell | 2 = MGB CV
|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'
+
        | 3 = Full Staff Name | 4 = | 5 = 12345 }}
|limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
+
    | {{#cargo_query: table=scheduleFACservice  
|}}
+
      |fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),scheduleFACservice.TaskAbbrev,scheduleFACservice.TaskAbbrev,LocationAbbrev
</td>
+
      |group by=scheduleFACservice.Color
 +
      |where=LocationAbbrev = '{{#ifeq: {{#explode:TaskAbbreviation|,|0}} | MGB CV | BWH | MGH }}'  
 +
      AND YEAR(Date)='{{#var:year}}'
 +
      AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'  
 +
      AND scheduleFACservice.DayNumber='{{formatnum:{{#expr:{{#timel: N|now {{{3|}}} {{{4|}}} day}}}}}}'  
 +
      AND scheduleFACservice.WeekNumber='{{formatnum:{{#expr:{{#timel: W|now {{{1|}}} {{{2|}}} week}}}}}}'
 +
      AND scheduleFACservice.Date > '2025-02-01'
 +
      |default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}
 +
      |format=template
 +
      |template=scheduleResident}}
 +
  }}
 +
|}}</td>
 
<td style="width: 20%">
 
<td style="width: 20%">
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>[[onCallAMPrules|'''{{ColorText|{{#tip-text:Call|
 
<table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>[[onCallAMPrules|'''{{ColorText|{{#tip-text:Call|

Revision as of 23:37, March 12, 2026