Difference between revisions of "acc-wknd"

From MGH Learn Pathology
(Created page with "<table class='table borderless'> <tr> <td class='align-bottom' colspan="1"> <center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=scheduleFA...")
 
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
<table class='table borderless'>
+
{{varScheduleYear}}{{#vardefine:saturdayDate|{{#time: Y-m-d|{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Saturday}}' AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFACservice.TaskAbbrev='BR1'|no html|limit=1|more results text=|order by=scheduleFACservice.Date DESC}}}}}}<table class='table borderless'>
 
<tr>
 
<tr>
 
<td class='align-bottom' colspan="1">
 
<td class='align-bottom' colspan="1">
<center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}<p></p></center>
+
<center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=Date='{{#var:saturdayDate}}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}<p></p></center>
 
</td>
 
</td>
 
<td class='align-bottom' colspan="1">
 
<td class='align-bottom' colspan="1">
<center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=scheduleFACservice.DayNumber='1' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}<p></p></center>
+
<center>{{#cargo_query: tables=scheduleFACservice |fields=scheduleFACservice.Date |where=YEAR(Date)='{{#var:Sunday}}' AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|}} + 0 }}' AND scheduleFACservice.TaskAbbrev='BR1' |format=template|template=datedisplaycurrent}}<p></p></center>
 
</td>
 
</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
 
<td colspan="1">
 
<td colspan="1">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>'''{{ColorText|{{#tip-text:A|Attending}}||#000000|}}'''</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>'''{{ColorText|{{#tip-text:ATT|Attending}}||#000000|}}'''</center></td></tr></table>
{{#arraymap: AUT,BR1,BR2,BST,CV,DPA,DPB,DPC,Frozen Section,HN1,HN2,GI1,GI2,GI3,GUL,GUS,GYL,GYS,HPA,HPB,NP,OB,PP,RP|,|TaskAbbreviation|
+
{{#arraymap:{{scheduleDictionaryAPaccessioning}}|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice  
 
{{#cargo_query: table=scheduleFACservice  
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.Color,scheduleFACservice.StaffFullName
+
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName
|where=scheduleFACservice.TaskAbbrev='TaskAbbreviation' AND scheduleFACservice.DayNumber='6' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 0}}'
+
|group by=scheduleFACservice.Color
|default={{:schtableempty}}|format=template|template=schtable}}
+
|where=Date='{{#var:saturdayDate}}' AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'
 +
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|}}
 
|}}
 
</td>
 
</td>
 
<td colspan="1">
 
<td colspan="1">
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>'''{{ColorText|{{#tip-text:A|Attending}}||#000000|}}'''</center></td></tr></table>
+
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>'''{{ColorText|{{#tip-text:ATT|Attending}}||#000000|}}'''</center></td></tr></table>
{{#arraymap: AUT,BR1,BR2,BST,CV,DPA,DPB,DPC,Frozen Section,HN1,HN2,GI1,GI2,GI3,GUL,GUS,GYL,GYS,HPA,HPB,NP,OB,PP,RP|,|TaskAbbreviation|
+
{{#arraymap:{{scheduleDictionaryAPaccessioning}}|;|TaskAbbreviation|
 
{{#cargo_query: table=scheduleFACservice  
 
{{#cargo_query: table=scheduleFACservice  
|fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.Color,scheduleFACservice.StaffFullName
+
|fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName)
|where=scheduleFACservice.TaskAbbrev='TaskAbbreviation' AND scheduleFACservice.DayNumber='1' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 1}}'
+
|group by=scheduleFACservice.Color
|default={{:schtableempty}}|format=template|template=schtable}}
+
|where=YEAR(Date)='{{#var:Sunday}}' AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='7' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} + 0}}'
 +
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
 
|}}
 
|}}
 
</td>
 
</td>
 
</tr>
 
</tr>
 
</table>
 
</table>

Latest revision as of 09:37, January 10, 2025