maintenance: title: SCH_LOGDOCTORASIN;; mlmname: SCH_LOGDOCTORASIN;; arden: version 2;; version: 4.00;; institution: St Clair Memorial Hospital;; author: Robert Spence;; specialist: ;; date: 2010-04-22;; validation: testing;; library: purpose: This MLM calls an Objects+ DLL which statuses doctors as "in house" on the Physician Directory. IMPORTANT NOTE: THIS MLM SHOULD ONLY BE IN PRODUCTION STATUS IN THE PROD DATABASE. IT WILL STATUS A DOCTOR AS IN HOUSE FROM ANY DATABASE, WHICH IS INAPPROPRIATE IN DEV OR TRAIN ;; explanation: Change history 12.23.2010 DW Altered for 5.5. Change event UserLogon to ActivateApplication 08.02.2016 DW H.D. ????? Physician login not working. - Updated this MLM in Prod with no change, just to see if perhaps it was corrupted and this would fix it ;; keywords: ;; knowledge: type: data-driven;; data: //Logging level of execution information log_execution_info:=FALSE; using "PhysicianIn"; using namespace "PhysicianIn"; standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}}; include standard_libs; using "ObjectsPlusXA.SCM.Forms"; using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms"; //The evoking event for this MLM is OrderInit evoking_event_order:= EVENT {ActivateApplication User UserInfo: WHERE CareProvider is NOT NULL And OrderRoleType Matches Pattern "%Physician%"}; test:= new net_object {{{SINGLE-QUOTE}}}PhysicianIn.PhysicianForm{{{SINGLE-QUOTE}}}; (user_workstation_GUID ) := read last { StateInfo: WorkstationGUID }; loc := read last {" select l.name " || " from cv3workstation ws with (nolock) " || " join cv3location l with (nolock) on l.guid = ws.locationguid " || " where ws.guid = " || SQL(user_workstation_GUID) || " and (l.code like {{{SINGLE-QUOTE}}}%|Offices |%{{{SINGLE-QUOTE}}} or l.code like {{{SINGLE-QUOTE}}}%|Offsite(WAN) |%{{{SINGLE-QUOTE}}} " || " or l.code like {{{SINGLE-QUOTE}}}%|FNA Offices |%{{{SINGLE-QUOTE}}} or ws.idcode like {{{SINGLE-QUOTE}}}schtermserv%{{{SINGLE-QUOTE}}}) " || " and l.name <> {{{SINGLE-QUOTE}}}UPTCT Cancer Center{{{SINGLE-QUOTE}}} "}; // dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " " || wsname,"Test","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}; userguid :=read last {UserInfo: guid}; rettype := read last {" select typecode " || " from cv3careprovider with (nolock) " || " where guid = " || SQL(userguid) || " and typecode not like {{{SINGLE-QUOTE}}}Non Staff%{{{SINGLE-QUOTE}}} " || " and typecode like {{{SINGLE-QUOTE}}}%Physician%{{{SINGLE-QUOTE}}} " }; if (rettype is null) or (not (exists rettype )) or (exists loc) then triggerme := false; else triggerme := true; endif; ;; evoke: evoking_event_order; ;; logic: //provider list for the pilot /* prov_list:= ("7000001175119001",//Spence, Robert "6000001149119001", "4000001091119001", "9000002364101190", "1000001064119001", "7000001272119001", "1000001032119001", "3000001032119001", "4000001244119001", "6000001208119001"); */ if (triggerme = true) then oeUnsigned:=CALL test.ShowDialog; conclude true; else conclude false; endif; ;; action: //all of the action is done by the call to the FFI ;; Urgency: 50;; end: