Files
St.Clair/MLMStripper/bin/Debug/DOC/DOC_FUNC_OUTPATIENT_CLEARPRINTBUTTON.mlm

122 lines
4.6 KiB
Plaintext

maintenance:
title: DOC_FUNC_OUTPATIENT_CLEARPRINTBUTTON;;
mlmname: DOC_FUNC_OUTPATIENT_CLEARPRINTBUTTON;;
arden: version 2.5;;
version: 0.00;;
institution: St. Clair Hospital;;
author: Shawn Head x7468;;
specialist: ;;
date: 2017-08-23;;
validation: testing;;
library:
purpose: print Outpatient reports when print button selected on outpatient structured notes.
;;
explanation: The MLM is called from outpatient structured notes. Depending on the structured note that called the report determines which report(s) to print.
Change history
08.23.2017 STH - CSR#: 35320 - Created
04.25.2018 DW - HD# : 3196602 - Corrected an issue with the print button that was discovered during the early days of the activation
;;
keywords:
;;
citations:
;;
knowledge:
type: data-driven;;
data:
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
include standard_libs;
using "ObjectsPlusXA.SCM.Forms";
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
// Recieve arguments from the structured note
(thisDocumentCommunication) := argument;
// Extract interesting parts of the object model
(thisStructuredNoteDoc) := thisDocumentCommunication.DocumentConfigurationObj;
(thisParameters) := thisStructuredNoteDoc.ParametersList;
(thisObservations) := thisStructuredNoteDoc.ChartedObservationsList;
// Create prototypes for the object types we{{{SINGLE-QUOTE}}}ll need to instantiate
ObservationType := OBJECT [ObservationGUID, ClientDocumentGUID, ParameterGUID, DataType, ValueObj];
FreeTextValueType := OBJECT [Value];
DateValueType := OBJECT [Value];
ListValueType := OBJECT [ListGuid,ListItemsList, SuggestedTextValue];
ListValueListItemType := OBJECT [ListItemGUID, Value, IsSelected];
IF (thisdocumentCommunication.EventType = "DocumentOpening")
then
theParameter := first of (thisparameters where thisparameters.Name = "SCH_Discharge Instruction Print");
theObservation:= first of (thisobservations where thisobservations.ParameterGUID = theParameter.ParameterGUID);
this_parametername := first of (thisParameters where thisParameters.Name = "SCH_Discharge Instruction Print");
this_currentObj := NEW ObservationType;
this_currentObj.ClientDocumentGUID:= thisStructuredNoteDoc.ClientDocumentGUID;
this_currentObj.ParameterGUID := this_parametername.ParameterGUID;
this_currentObj.DataType := "ListValue";
this_currentObj.ValueObj := New ListValueType;
this_currentObj.ValueObj.ListGUID:= this_parametername.ConfigurationObj.ListGUID;
listItems := ();
FOR item IN this_parametername.ConfigurationObj.ListItemsList DO
selectedItem := NEW ListValueListItemType;
selectedItem.ListItemGUID := item.ListItemGUID;
selectedItem.Value := item.Value;
selectedItem.IsSelected := false;
listItems := (listItems, selectedItem);
ENDDO;
this_currentobj.ValueObj.ListItemsList := listItems;
thisStructuredNoteDoc.ChartedObservationsList := (thisstructuredNoteDoc.ChartedObservationsList, this_currentObj);
// Set the HIS only "dummy" button to true to activate the SAVE button
theParameter := first of (thisparameters where thisparameters.Name = "CXD Testing MLM Only");
theObservation:= first of (thisobservations where thisobservations.ParameterGUID = theParameter.ParameterGUID);
this_parametername := first of (thisParameters where thisParameters.Name = "CXD Testing MLM Only");
this_currentObj := NEW ObservationType;
this_currentObj.ClientDocumentGUID:= thisStructuredNoteDoc.ClientDocumentGUID;
this_currentObj.ParameterGUID := this_parametername.ParameterGUID;
this_currentObj.DataType := "ListValue";
this_currentObj.ValueObj := New ListValueType;
this_currentObj.ValueObj.ListGUID:= this_parametername.ConfigurationObj.ListGUID;
listItems := ();
FOR item IN this_parametername.ConfigurationObj.ListItemsList DO
selectedItem := NEW ListValueListItemType;
selectedItem.ListItemGUID := item.ListItemGUID;
selectedItem.Value := item.Value;
selectedItem.IsSelected := true;
listItems := (listItems, selectedItem);
ENDDO;
this_currentobj.ValueObj.ListItemsList := listItems;
thisStructuredNoteDoc.ChartedObservationsList := (thisstructuredNoteDoc.ChartedObservationsList, this_currentObj);
endif;
;;
priority: 50
;;
evoke:
;;
logic: conclude true;
;;
action: return thisDocumentCommunication;
;;
Urgency: 50;;
end: