Difference between revisions of "learn:nextweekinap"
From MGH Learn Pathology
Line 158: | Line 158: | ||
<table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Resident'''||#000000|}}<br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table> | <table class='scheduletable'><tr><td bgcolor="#FFFFFF"><center>{{ColorText|'''Resident'''||#000000|}}<br>{{ColorText|'''Service'''||#FFFFFF|}}</center></td></tr></table> | ||
{{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,FFFFFF;FS-S,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation| | {{#arraymap: AUT,AEAAAA;BR1,FF7E46;BR2,FF7E46;BST,E2EFDA;CV,7AD062;CA,04AAD1;CB,04AAD1;CC,04AAD1;DPA,EDB1FF;DPB,EDB1FF;DPC,EDB1FF;EYE,FFFFFF;FS-S,CCECFF;HN1,04E489;HN2,04E489;GI1,FFC30F;GI2,FFC30F;GI3,FFC30F;GUL,4FA4FF;GUS,4FA4FF;GYL,CD5EB6;GYS,CD5EB6;HPA,92E2AF;HPB,92E2AF;HG,92E2AF;NP,FCE4D6;OB,CD5EB6;PP,7AD062;RP,FFFF8D;|;|TaskAbbreviation| | ||
− | {{#cargo_query: tables= | + | {{#cargo_query: tables=scheduleRESservice,residentMGH |
− | |join on= | + | |join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id |
− | |fields= | + | |fields=GROUP_CONCAT(scheduleRESservice.ResAbbrev),scheduleRESservice.Color,GROUP_CONCAT(residentMGH.full_name),residentMGH.pageid |
− | |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND | + | |group by=scheduleRESservice.Color |
+ | |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleRESservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 1 }}' AND scheduleRESservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtableres}} | ||
|}} | |}} | ||
</td> | </td> |