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|
  {{#ifeq: {{#explode:TaskAbbreviation|,|0}} | MGB CV
+
{{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
    | {{scheduleResident
+
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName,facultyMGH.pageid
        | 1 = Mitchell | 2 = MGB CV
+
|group by=scheduleFACservice.Color
        | 3 = Full Staff Name | 4 = | 5 = 12345 }}
+
|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'
    | {{#cargo_query: table=scheduleFACservice
+
|limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
      |fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),scheduleFACservice.TaskAbbrev,scheduleFACservice.TaskAbbrev,LocationAbbrev
+
|}}
      |group by=scheduleFACservice.Color
+
</td>
      |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:41, March 12, 2026