Initial Checking with all 820 MLMs
This commit is contained in:
85
MLMStripper/bin/Debug/DOC/DOC_FUNC_BMI_CHECK.mlm
Normal file
85
MLMStripper/bin/Debug/DOC/DOC_FUNC_BMI_CHECK.mlm
Normal file
@@ -0,0 +1,85 @@
|
||||
maintenance:
|
||||
|
||||
title: BMI Checking;;
|
||||
mlmname: DOC_FUNC_BMI_Check;;
|
||||
arden: version 5.0;;
|
||||
version: 2.00;;
|
||||
institution: St.Clair Hospital;;
|
||||
author: Teresa Spicuzza;;
|
||||
specialist: ;;
|
||||
date: 2011-06-28;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose:
|
||||
;;
|
||||
explanation:
|
||||
Change history
|
||||
|
||||
06.28.2011 TS Created
|
||||
01.30.2012 DW Optimized for FP1
|
||||
|
||||
;;
|
||||
keywords:
|
||||
;;
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
|
||||
//Message box
|
||||
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
||||
include standard_libs;
|
||||
|
||||
using "ObjectsPlusXA.SCM.Forms";
|
||||
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
||||
|
||||
|
||||
// Receive arguments from the structured note
|
||||
(thisDocumentCommunication) := argument;
|
||||
// Get the user, charte, client and visit GUIDs
|
||||
userGuid := thisDocumentCommunication.UserGUID;
|
||||
clientGuid := thisDocumentCommunication.ClientGUID;
|
||||
clientvisitGuid := thisDocumentCommunication.ClientVisitGUID;
|
||||
chartGuid := thisDocumentCommunication.ChartGUID;
|
||||
|
||||
/* Get the current user{{{SINGLE-QUOTE}}}s occupation*/
|
||||
UserCode := read last
|
||||
{"Select occupationcode "
|
||||
||" From cv3user "
|
||||
||" Where Guid = " || SQL(userguid) };
|
||||
|
||||
|
||||
// Chart Observation Section
|
||||
|
||||
IF thisdocumentCommunication.EventType ="DocumentOpening" and usercode is in ("RN", "LPN", "CNA", "PCA", "GN", "IT") then
|
||||
|
||||
BMIvaluetext, obsname := read last {"Select o.ValueText, oci.name from CV3ClientDocumentcur cd "
|
||||
|| " join CV3ClientDocDetailcur cdd on (cdd.ClientDocumentGUID = cd.GUID AND cdd.ClientGUID = " || SQL(ClientGuid) || ") "
|
||||
|| " join CV3ObservationDocumentcur od on cdd.CLientDocumentGUID = od.OwnerGUID and od.active = 1 "
|
||||
|| " join CV3ObsCatalogMasterItem on od.ObsMasterItemGUID = CV3ObsCatalogMasterItem.GUID "
|
||||
|| " join CV3Observationcur o on o.GUID = od.ObservationGUID "
|
||||
|| " LEFT OUTER JOIN CV3User u ON o.UserGUID = u.GUID "
|
||||
|| " join cv3obscatalogitem oci on oci.guid = o.obsitemguid and oci.name = {{{SINGLE-QUOTE}}}SCH_vs_BMI{{{SINGLE-QUOTE}}} "
|
||||
|| " where cd.clientguid = " || SQL(ClientGuid) || " and cd.chartguid = " || SQL(ChartGuid)
|
||||
|| " and o.ValueText is not null "
|
||||
|| " order by cd.authoreddtm asc " };
|
||||
|
||||
If BMIvaluetext is null then
|
||||
msg:= "This patient does not have a documented BMI."
|
||||
|| "\n\nPlease document the patient{{{SINGLE-QUOTE}}}s Height/Length and Admission/Current Weight in the same time column to calculate the BMI.";
|
||||
|
||||
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with msg,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
||||
endif;
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
;;
|
||||
evoke:
|
||||
;;
|
||||
logic: conclude true;
|
||||
;;
|
||||
action: return thisDocumentCommunication;
|
||||
;;
|
||||
Urgency: 50;;
|
||||
end:
|
||||
Reference in New Issue
Block a user