Difference between revisions of "acc-todayha"

From MGH Learn Pathology
 
(2 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
{{#cargo_query: tables=scheduleRESservice,residentMGH  
 
{{#cargo_query: tables=scheduleRESservice,residentMGH  
 
|join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id
 
|join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id
|fields=GROUP_CONCAT(scheduleRESservice.ResAbbrev),scheduleRESservice.Color,GROUP_CONCAT(residentMGH.full_name),residentMGH.pageid
+
|fields=GROUP_CONCAT(DISTINCT scheduleRESservice.ResAbbrev),scheduleRESservice.Color,GROUP_CONCAT(DISTINCT residentMGH.full_name)
|group by=scheduleRESservice.Color
+
|group by=scheduleRESservice.WeekNumber
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleRESservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleRESservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtableres}}
 
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleRESservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleRESservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|format=template|template=schtableres}}
 
|}}
 
|}}
Line 22: Line 22:
 
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
 
|join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
 
|fields=scheduleFELLservice.FellAbbrev,scheduleFELLservice.Color,residentMGH.full_name,residentMGH.pageid
 
|fields=scheduleFELLservice.FellAbbrev,scheduleFELLservice.Color,residentMGH.full_name,residentMGH.pageid
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFELLservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' |format=template|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|template=schtableres}}
+
|where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFELLservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0 }}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' |format=template|group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|1}}}}|template=schtableres}}
 
|}}
 
|}}
 
</td>
 
</td>

Latest revision as of 15:29, July 30, 2020