Initial Checking with all 820 MLMs
This commit is contained in:
130
MLMStripper/bin/Debug/DOC/DOC_FUNC_COUMADIN_EDUCATION_OBS.mlm
Normal file
130
MLMStripper/bin/Debug/DOC/DOC_FUNC_COUMADIN_EDUCATION_OBS.mlm
Normal file
@@ -0,0 +1,130 @@
|
||||
maintenance:
|
||||
|
||||
title: DOC_FUNC_COUMADIN_EDUCATION_OBS;;
|
||||
mlmname: DOC_FUNC_COUMADIN_EDUCATION_OBS;;
|
||||
arden: version 5.5;;
|
||||
version: 2.50;;
|
||||
institution: St.Clair Hospital;;
|
||||
author: Juliet Law;;
|
||||
specialist: Debbie Eiler;;
|
||||
date: 2011-09-08;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose:
|
||||
;;
|
||||
explanation:
|
||||
|
||||
Change history
|
||||
|
||||
09.08.2011 JML Create date.
|
||||
;;
|
||||
keywords:
|
||||
;;
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
|
||||
// .Net assemblies required for ObjectsPlus
|
||||
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
||||
include standard_libs;
|
||||
|
||||
// Receive arguments from the structured note
|
||||
(thisDocumentCommunication) := argument;
|
||||
|
||||
// Configured parameter names that will be selected
|
||||
USER_CONFIGURED_PARAMETER_NAMES := ("SCH_PHCO Warfarin Education",
|
||||
"SCH_PHCO Warfarin Physician Contact",
|
||||
"SCH_PHCO Warfarin Labwork");
|
||||
|
||||
//Document Types
|
||||
STRUCTUREDNOTE := "StructuredNote";
|
||||
|
||||
//Event Types
|
||||
DOCUMENTCLOSING := "DocumentClosing";
|
||||
CHARTOBSERVATION := "ChartObservation";
|
||||
|
||||
//Setting debugFlag to True will allow popup dialogs containing debug information to appear
|
||||
debugFlag := false;
|
||||
|
||||
// DocumentCommunication Object Model variables
|
||||
(thisStructuredNoteDoc) := thisDocumentCommunication.DocumentConfigurationObj;
|
||||
(thisParameters) := thisStructuredNoteDoc.ParametersList;
|
||||
(thisObservations) := thisStructuredNoteDoc.ChartedObservationsList;
|
||||
|
||||
// Get the client, visit, chart, and user GUIDs
|
||||
clientGuid := thisDocumentCommunication.ClientGUID;
|
||||
visitGuid := thisDocumentCommunication.ClientVisitGUID;
|
||||
chartGuid := thisDocumentCommunication.ChartGUID;
|
||||
userGuid := thisDocumentCommunication.UserGUID;
|
||||
|
||||
//Set up debugging information to be captured
|
||||
messageText := "";
|
||||
if (debugFlag = true) then
|
||||
messageText := "Debug Information:\n\n";
|
||||
messageText := messageText || " DOC_FUNC_PT_CONSULT_FROM_ADM_OBS mlm called.\n\n";
|
||||
endif;
|
||||
|
||||
// Parameter that will trigger selecting all coumadin edu obs
|
||||
theParameterName := "SCH_PHCO Warfarin Education Y/N";
|
||||
|
||||
// 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];
|
||||
|
||||
if (thisDocumentCommunication.EventType = CHARTOBSERVATION) then
|
||||
theParameter := first of (thisParameters where thisParameters.Name = theParameterName);
|
||||
theObservation := first of (thisObservations where thisObservations.ParameterGUID = theParameter.ParameterGUID);
|
||||
|
||||
if (thisDocumentCommunication.CurrentObservationObj.ParameterGUID = theParameter.ParameterGUID) then
|
||||
|
||||
canSelectAll := exists (theObservation.ValueObj.ListItemsList.Value
|
||||
where theObservation.ValueObj.ListItemsList.Value = "Yes..."
|
||||
and theObservation.ValueObj.ListItemsList.IsSelected = true);
|
||||
|
||||
if (canSelectAll) then
|
||||
For parameterName IN USER_CONFIGURED_PARAMETER_NAMES Do
|
||||
selectParameter := first of (thisParameters where thisParameters.Name = parameterName);
|
||||
|
||||
if (exists selectParameter) then
|
||||
this_currentObj := NEW ObservationType;
|
||||
this_currentObj.ClientDocumentGUID := thisStructuredNoteDoc.ClientDocumentGUID;
|
||||
this_currentObj.ParameterGUID := selectParameter.ParameterGUID;
|
||||
this_currentObj.DataType := "ListValue";
|
||||
this_currentObj.ValueObj := NEW ListValueType;
|
||||
this_currentObj.ValueObj.ListGUID := selectParameter.ConfigurationObj.ListGUID;
|
||||
listItems := ();
|
||||
for item IN selectParameter.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;
|
||||
enddo;
|
||||
endif;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
if (debugFlag = true) then
|
||||
messageText := messageText || "\n DOC_FUNC_PT_CONSULT_FROM_ADM_OBS mlm completed.\n\n";
|
||||
thisDocumentCommunication.DisplayMessage := true;
|
||||
thisDocumentCommunication.Message := messageText;
|
||||
endif;
|
||||
;;
|
||||
evoke:
|
||||
;;
|
||||
logic: conclude true;
|
||||
;;
|
||||
action: return thisDocumentCommunication;
|
||||
;;
|
||||
Urgency: 50;;
|
||||
end:
|
||||
Reference in New Issue
Block a user