Difference between revisions of "learn:oncallAMP"

From MGH Learn Pathology
(Replaced content with "{{onCallAMP}}")
(Tag: Replaced)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#vardefine:DPattending|{{#cargo_query:table=scheduleFACservice|fields=StaffAbbrev|where=YEAR(Date)={{#timel: Y|now }} AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|now }} - 0}}' AND scheduleFACservice.DayNumber='3' AND TaskAbbrev='DPC'|format=template|template=text|no html}}}}{{#vardefine:DPservice|{{#cargo_query:table=scheduleFACservice|fields=TaskAbbrev|where=YEAR(Date)={{#timel: Y|now }} AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|now }} - 0}}' AND scheduleFACservice.DayNumber='4' AND StaffAbbrev='{{#var:DPattending}}'|format=template|template=text|no html|limit=1|more results text=}}}}{{#vardefine:GIattending|{{#cargo_query:table=scheduleFACservice|fields=StaffAbbrev|where=YEAR(Date)={{#timel: Y|now }} AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|now }} - 0}}' AND scheduleFACservice.DayNumber='7' AND TaskAbbrev='GI1'|format=template|template=text|no html}}}}{{#vardefine:GIservice|{{#cargo_query:table=scheduleFACservice|fields=TaskAbbrev|where=YEAR(Date)={{#timel: Y|now }} AND scheduleFACservice.WeekNumber='{{#expr: {{#timel: W|now }} - 0}}' AND scheduleFACservice.DayNumber='5' AND StaffAbbrev='{{#var:GIattending}}'|format=template|template=text|no html|limit=1|more results text=}}}}{{#arraymap:
+
{{onCallAMP}}
AUT,Autopsy,c8d2d4,AUT; BST,Bone and Soft Tissue,e8edf5,BST; BR1,Breast,ffd1c8,BR; BR1,Breast,ffd1c8,BR; CV,Cardiovascular,a9d8c3,CV; RP,Renal,a9d8c3,RP; CB,Cytology,cfe7ef,CYT; CB,Cytology,cfe7ef,CYT; CB,Cytology,cfe7ef,CYT;
 
{{#var:DPservice}},Dermatopathology,fceef5,DP; {{#var:DPservice}},Dermatopathology,fceef5,DP; {{#var:DPservice}},Dermatopathology,fceef5,DP; EYE,Eye,fffef8,EYE; Frozen Sectionalt,Frozen Section,e4f5f1,FS;  Frozen Sectionalt,Frozen Section,e4f5f1,FS; {{#var:GIservice}},Gastrointestinal,ffeeba,GI; {{#var:GIservice}},Gastrointestinal,ffeeba,GI; {{#var:GIservice}},Gastrointestinal,ffeeba,GI; {{#var:GIservice}},Gastrointestinal,ffeeba,GI; GUL,Genitourinary,b6d1e4,GU; GUL,Genitourinary,b6d1e4,GU; GYL,Gynecologic,e4cce0,GYN; GYL,Gynecologic,e4cce0,GYN; OB,Obstetrical,e4cce0,OB;HN2,Head and Neck,c6e8e4,HN; HN2,Head and Neck,c6e8e4,HN; HPA,Hematopathology,ebfbea,HP; HPA,Hematopathology,ebfbea,HP; NP,Neuropathology,bbdfc9,NP; PP,Pulmonary Pathology,f0f4ca,PP;RLS,RLS,fff9e8,RLS; AP CHIEF,AP Chief,eaeaea,AP Chief;
 
|;|TaskAbbreviation|
 
{{#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}}'
 
|default={{schtableempty|{{#explode:TaskAbbreviation|,|2}}}}|format=template|template=scheduleFacultyOnCall}}
 
|}}
 

Latest revision as of 09:10, November 6, 2021