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        | 3 = John Doe      | 4 =                | 5 = 12345          }}
+
|group by=scheduleFACservice.Color
    | {{#cargo_query: table=scheduleFACservice,facultyMGH
+
|where=LocationAbbrev IN ('MGH','MGB') 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'
      |join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
+
|limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
      |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>

Latest revision as of 13:04, March 13, 2026