|
|
Line 7: |
Line 7: |
| </td> | | </td> |
| <td style="width: 20%"> | | <td style="width: 20%"> |
− | <table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Resident|Resident}}||#000000|}}'''</center></td></tr></table>
| + | <table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>[[onCallAMPrules|'''{{ColorText|{{#tip-text:On call| |
− | {{#switch: {{#timel: N|{{Timezone}}}}
| |
− | |6
| |
− | |7=
| |
− | {{:scheduleDictionaryAPempty}}
| |
− | |{{#arraymap:{{scheduleDictionaryAPresident}}|;|TaskAbbreviation|
| |
− | {{#cargo_query: tables=scheduleRESservice,residentMGH,scheduleRESserviceElective_view
| |
− | |join on=scheduleRESservice.ResAbbrev=residentMGH.copath_id,scheduleRESservice.UID=scheduleRESserviceElective_view.UID
| |
− | |fields=
| |
− | GROUP_CONCAT(DISTINCT scheduleRESservice.ResAbbrev)
| |
− | ,scheduleRESserviceElective_view.TaskAbbrev
| |
− | ,GROUP_CONCAT(DISTINCT residentMGH.full_name)
| |
− | ,scheduleRESserviceElective_view.Elective
| |
− | ,pageid
| |
− | |group by=scheduleRESservice.WeekNumber
| |
− | |where=YEAR(Date)={{#timel: Y|{{Timezone}}}} AND scheduleRESservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleRESserviceElective_view.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}'|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
| |
− | |}}
| |
− | }}
| |
− | </td>
| |
− | <td style="width: 20%">
| |
− | <table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Fellow|Fellow / Elective-Resident}}||#000000|}}'''</center></td></tr></table>
| |
− | {{#switch: {{#timel: N|{{Timezone}}}}
| |
− | |6
| |
− | |7=
| |
− | {{:scheduleDictionaryAPempty}}
| |
− | |{{#arraymap:{{scheduleDictionaryAPresident}}|;|TaskAbbreviation|
| |
− | {{#cargo_query: tables=scheduleFELLservice,residentMGH
| |
− | |join on=scheduleFELLservice.FellAbbrev=residentMGH.copath_id
| |
− | |fields=scheduleFELLservice.FellAbbrev,scheduleFELLservice.TaskAbbrev,residentMGH.full_name,residentMGH.pageid
| |
− | |where=YEAR(Date)={{#timel: Y|{{Timezone}}}} AND scheduleFELLservice.WeekNumber='{{#expr: {{#timel: W|{{Timezone}}}} - 0 }}' AND scheduleFELLservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' |format=template
| |
− | |group by=scheduleFELLservice.WeekNumber|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|template=scheduleResident}}
| |
− | |}}
| |
− | }}
| |
− | </td>
| |
− | <td style="width: 20%">
| |
− | <table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>'''{{ColorText|{{#tip-text:Attending|Attending}}||#000000|}}'''<sup>[1]</sup></center></td></tr></table>
| |
− | {{#arraymap:{{scheduleDictionaryAPfaculty}}|;|TaskAbbreviation|
| |
− | {{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id
| |
− | |fields=scheduleFACservice.StaffAbbrev,scheduleFACservice.TaskAbbrev,scheduleFACservice.StaffFullName,facultyMGH.pageid
| |
− | |group by=scheduleFACservice.Color
| |
− | |where=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}}'
| |
− | |limit=1|more results text=|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleResident}}
| |
− | |}}
| |
− | </td>
| |
− | <td style="width: 20%">
| |
− | <table class='scheduletable'><tr><td bgcolor="#f5f5f5"><center>[[onCallAMPrules|'''{{ColorText|{{#tip-text:Call| | |
| {{:onCallAMPrules}} | | {{:onCallAMPrules}} |
| }}||#000000|}}''']] | | }}||#000000|}}''']] |