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

92 lines
2.8 KiB
Plaintext

maintenance:
title: DOC_FUNC_PRINT_OUTPATIENT_REPORTS;;
mlmname: DOC_FUNC_PRINT_OUTPATIENT_REPORTS;;
arden: version 2.5;;
version: 5.50;;
institution: Allscripts;;
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
;;
keywords:
;;
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];
VisitGUID := thisDocumentCommunication.ClientVisitGUID;
ChartGUID := thisDocumentCommunication.ChartGUID;
ClientGUID := thisDocumentCommunication.ClientGUID;
DocName := thisDocumentCommunication.DocumentName;
PrintRPTObsName := "";
SCMReportVersion := "";
if(DocName matches pattern "%Discharge Instructions%") then
PrintRPTObsName := "SCH_Discharge Instruction Print";
SCMReportVersion := "DischargeInstructionOutpatient";
else
PrintRPTObsName := "SCH_OutPatient MedRec Print";
SCMReportVersion := "Pre-Op Med Rec";
endif;
theParameter := first of (thisparameters where thisparameters.Name = PrintRPTObsName);
theObservation:= first of (thisobservations where thisobservations.ParameterGUID = theParameter.ParameterGUID);
PrintSelected := theObservation.ValueObj.ListItemsList[1].IsSelected;
if PrintSelected
then
Report_Print_MLM := mlm {{{SINGLE-QUOTE}}}SCH_FUNC_PRINT{{{SINGLE-QUOTE}}};
logicalprinter := "Default Report Printer"; physicalprinter:= "";
print1 := call Report_Print_MLM with(SCMReportVersion, logicalprinter, physicalprinter);
endif;
;;
priority: 50
;;
evoke:
;;
logic:
conclude true;
;;
action:
;;
Urgency: 50;;
end: