maintenance: title: DOC_EDUCATION_FS_PRECHECK;; mlmname: DOC_EDUCATION_FS_PRECHECK;; arden: version 2.5;; version: 1.02;; //Release 5.5 SP1/FP1 and 6.0/6.1 SU2 and higher institution: St. Clair, Allscrtips;; author: Shawn Head;; specialist: Debbie Eiler;; date: 2016-04-12;; validation: testing;; library: purpose: This MLM will automatically select values in the education section based on which education flowsheet the user is on. ;; explanation: Modification history: 4.12.2016 - STH CSR#: 33982 - created 5.6.2016 - STH CSR#: 33982 - CA Service Desk Ticket #: 2157915 - 2 new observation values where added to the generic teaching observation list. Need to have MLM uncheck these on all flowsheets. ;; keywords: Objects Plus, Education Log, Worklist, ARRA ;; knowledge: type: data-driven;; data: mlm_name := "DOC_EDUCATION_FS_PRECHECK"; // RS ADD Message box standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}}; include standard_libs; //Include ObjectsPlus Assemblies using "ObjectsPlusXA.SCM.Forms"; using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms"; (thisDocumentCommunication) := argument; /**************Make Changes To Spelling And Flags In This Section**************/ //Set up variables; initialize fire_on_param := "ED_Generic Teaching"; //Document Type FLOWSHEET := "FlowSheet"; //Event Types CHARTOBSERVATION := "ChartObservation"; DOCUMENTCLOSING := "DocumentClosing"; /******************************************************************************/ // Create prototypes for the object types we{{{SINGLE-QUOTE}}}ll need to instantiate ObservationType := OBJECT [ObservationGUID, ClientDocumentGUID, ParameterGUID, DataType, ValueObj]; FreeTextValueType := OBJECT [Value]; ListValueType := OBJECT [ListGuid, ListItemsList, SuggestedTextValue]; ListValueListItemType := OBJECT [ListItemGUID, Value, IsSelected]; //Set Flowsheet DocumentCommunication object model variables via Called MLM (this_fs_doc) := thisDocumentCommunication.DocumentConfigurationObj; (this_parameters) := this_fs_doc.ParametersList; (this_currentObs) := thisDocumentCommunication.CurrentObservationObj; (this_cols) := this_fs_doc.ColumnsList; (this_curr_col) := this_fs_doc.CurrentColumn; (this_chartedObs) := this_curr_col.ChartedObservationsList; document_type := thisDocumentCommunication.DocumentType; event_type := thisDocumentCommunication.EventType; client_guid := thisDocumentCommunication.ClientGUID; visit_guid := thisDocumentCommunication.ClientVisitGUID; chart_guid := thisDocumentCommunication.ChartGUID; if(thisDocumentCommunication.DocumentName matches pattern "%Adult Education Outcome%") then DeslectItems := (1,3,4,15,16,21); elseif(thisDocumentCommunication.DocumentName matches pattern "%OB Education Outcome%") then DeslectItems := (1,3,7,9,14,15,16,21); elseif(thisDocumentCommunication.DocumentName matches pattern "%Pediatric Education Outcome%") then DeslectItems := (1,4,13,14,15,16,21); elseif(thisDocumentCommunication.DocumentName matches pattern "%Newborn Education Outcome%") then DeslectItems := (1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,21); endif; if (document_type = FLOWSHEET) then // AND event_type = CHARTOBSERVATION) then //*************** UNIVERSAL INTERVENTIONS ************************** //Autocheck all values under "Universal Interventions" Observation univIndParameter := first of (this_parameters WHERE this_parameters.Name = fire_on_param); if (exists univIndParameter) then //Define parameter ConfigurationObj to extract Suggested Text value univIndListConfiguration := univIndParameter.ConfigurationObj; univIndObs := first of ( this_chartedObs WHERE this_chartedObs.ParameterGUID = univIndParameter.ParameterGUID); Education_ListItemsList := univIndObs.ValueObj.ListValuesList.ListItemsList; EducationLists := Education_ListItemsList.IsSelected; lst1stitemselected := Education_ListItemsList[1].IsSelected[1]; if(lst1stitemselected) then totalitemct := 0; for x in (1 seqto(count(EducationLists))) do selectedlist := EducationLists[x]; ctselst := count(selectedlist); for y in (1 seqto(count(selectedlist))) do totalitemct := totalitemct + 1; if(totalitemct in DeslectItems) then selectedlist[y] := false; else selectedlist[y] := true; endif; enddo; EducationLists[x] := selectedlist; enddo; Education_ListItemsList.IsSelected := EducationLists; endif; endif; endif; ;; priority: 50 ;; evoke: ;; logic: conclude true; ;; action: return thisDocumentCommunication; ;; Urgency: 50;; end: