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        | 3 = John Doe      | 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,facultyMGH
|limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
+
      |join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
 +
      |fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName,facultyMGH.pageid
 +
      |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'
 +
      |limit=1
 +
      |more results text=
 +
      |default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}
 +
      |format=template
 +
      |template=scheduleResident}}
 +
  }}
 
|}}
 
|}}
 
</td>
 
</td>

Revision as of 23:42, March 12, 2026