Difference between revisions of "learn:oncallAMP"
Line 1: | Line 1: | ||
+ | {{#cargo_query: table=scheduleFACservice,facultyMGH|join on=scheduleFACservice.StaffAbbrev=facultyMGH.copath_id | ||
+ | |fields=GROUP_CONCAT(scheduleFACservice.StaffAbbrev),scheduleFACservice.TaskAbbrev,GROUP_CONCAT(scheduleFACservice.StaffFullName),facultyMGH.pageid | ||
+ | |group by=scheduleFACservice.Color | ||
+ | |where=YEAR(Date)={{#time: Y|{{Timezone}}}} AND scheduleFACservice.TaskAbbrev='{{#explode:TaskAbbreviation|,|0}}' AND scheduleFACservice.DayNumber='{{#time:N|now}}' AND scheduleFACservice.WeekNumber='{{#expr: {{#time: W|{{Timezone}}}} - 0}}' AND DayNumer=7 | ||
+ | |default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleFaculty}} | ||
+ | |||
+ | |||
{{#arraymap: | {{#arraymap: | ||
AUT,Autopsy,859ca0,AUT; BSTalt,Bone and Soft Tissue,c9d8e7,BST; BR1,Breast,ff9a86,BR; BR1,Breast,ff9a86,BR; CV,Cardiovascular,6cad90,CV; RP,Renal,6cad90,RP; CB,Cytology,94c9da,CYT; CB,Cytology,94c9da,CYT; CB,Cytology,94c9da,CYT; | AUT,Autopsy,859ca0,AUT; BSTalt,Bone and Soft Tissue,c9d8e7,BST; BR1,Breast,ff9a86,BR; BR1,Breast,ff9a86,BR; CV,Cardiovascular,6cad90,CV; RP,Renal,6cad90,RP; CB,Cytology,94c9da,CYT; CB,Cytology,94c9da,CYT; CB,Cytology,94c9da,CYT; |
Revision as of 12:10, September 9, 2021
Query: SELECT GROUP_CONCAT(`cargo__scheduleFACservice`.`StaffAbbrev`) AS `StaffAbbrev)`,`cargo__scheduleFACservice`.`TaskAbbrev` AS `TaskAbbrev`,GROUP_CONCAT(`cargo__scheduleFACservice`.`StaffFullName`) AS `StaffFullName)`,`cargo__facultyMGH`.`pageid` AS `pageid` FROM `cargo__scheduleFACservice` LEFT OUTER JOIN `cargo__facultyMGH` ON ((`cargo__scheduleFACservice`.`StaffAbbrev`=`cargo__facultyMGH`.`copath_id`)) WHERE YEAR(Date)=2025 AND `cargo__scheduleFACservice`.`TaskAbbrev`='TaskAbbreviation' AND `cargo__scheduleFACservice`.`DayNumber`='1' AND `cargo__scheduleFACservice`.`WeekNumber`='4' AND DayNumer=7 GROUP BY `cargo__scheduleFACservice`.`Color` ORDER BY GROUP_CONCAT(`cargo__scheduleFACservice`.`StaffAbbrev`),`cargo__scheduleFACservice`.`TaskAbbrev`,GROUP_CONCAT(`cargo__scheduleFACservice`.`StaffFullName`),`cargo__facultyMGH`.`pageid` LIMIT 100000 Function: CargoSQLQuery::run Error: 1054 Unknown column 'DayNumer' in 'WHERE' (172.27.81.126:30004)