145 lines
5.2 KiB
Plaintext
145 lines
5.2 KiB
Plaintext
maintenance:
|
|
|
|
title: DOC_FUNC_FOREIGN_TRAVEL_ALERT;;
|
|
mlmname: DOC_FUNC_FOREIGN_TRAVEL_ALERT;;
|
|
arden: version 5.0;;
|
|
version: 2.00;;
|
|
institution: St.Clair Hospital;;
|
|
author: Dean Miklavik;;
|
|
specialist: Don Warnick ;;
|
|
date: 2014-10-15;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose:
|
|
;;
|
|
explanation: This MLM will return an alert to have the nurese notify Infection Control when the patient has a fever and has recently traveled
|
|
outside of the country or has had contact with someone who has recently traveled
|
|
|
|
|
|
Change history
|
|
|
|
10.15.2014 DW CSR# 32793 - Created
|
|
12.01.2014 DW CSR# 32793 - Introduced text messaging to Infection Control
|
|
|
|
;;
|
|
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];
|
|
|
|
// Get the client and visit GUIDs
|
|
clientGuid := thisDocumentCommunication.ClientGUID;
|
|
visitGuid := thisDocumentCommunication.ClientVisitGUID;
|
|
chartGuid := thisDocumentCommunication.ChartGUID;
|
|
userGuid := thisDocumentCommunication.UserGUID;
|
|
|
|
|
|
|
|
// CHART OBSERVATION SECTION
|
|
|
|
|
|
|
|
IF thisdocumentCommunication.EventType = "ChartObservation"
|
|
|
|
then
|
|
|
|
|
|
// Determine if a fever was indicated
|
|
|
|
theParameter := first of (thisparameters where thisparameters.Name = "SCHCK_Fever_Risk_Assessment");
|
|
theObservation := first of (thisobservations where thisobservations.ParameterGUID = theParameter.ParameterGUID);
|
|
if true in (theObservation.ValueObj.ListItemsList.IsSelected where theObservation.ValueObj.ListItemsList.Value = "yes...")
|
|
then Fever := "yes";
|
|
endif;
|
|
|
|
|
|
// Determine if a foreign travel was indicated
|
|
|
|
theParameter := first of (thisparameters where thisparameters.Name = "SCHCK_Travel_Risk_Assessment1");
|
|
theObservation := first of (thisobservations where thisobservations.ParameterGUID = theParameter.ParameterGUID);
|
|
if true in (theObservation.ValueObj.ListItemsList.IsSelected where theObservation.ValueObj.ListItemsList.Value = "yes...")
|
|
then ForeignTravel := "yes";
|
|
endif;
|
|
|
|
|
|
// Determine if the foreign travel was to a country of interest
|
|
|
|
theParameter := first of (thisparameters where thisparameters.Name = "SCHCK_Travel_Risk_Assessment3");
|
|
theObservation := first of (thisobservations where thisobservations.ParameterGUID = theParameter.ParameterGUID);
|
|
if true in (theObservation.ValueObj.ListItemsList.IsSelected where theObservation.ValueObj.ListItemsList.Value = "none of these countries")
|
|
then CountryOfInterest := "no";
|
|
endif;
|
|
|
|
if true in (theObservation.ValueObj.ListItemsList.IsSelected where theObservation.ValueObj.ListItemsList.Value <> "none of these countries")
|
|
then CountryOfInterest := "yes";
|
|
endif;
|
|
|
|
|
|
// Decide whehter to fire the alert
|
|
|
|
|
|
If Fever = "yes" and ForeignTravel = "yes" and CountryOfInterest = "yes"
|
|
|
|
then
|
|
|
|
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with " Notify the Infection Prevention Nurse STAT at Ext 2230 or 2211. ", "Important Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
|
|
|
// Gather the patien{{{SINGLE-QUOTE}}}t nursing unit
|
|
|
|
CurrentLocation := read last {"Select CurrentLocation From cv3Clientvisit with (nolock) Where Guid = " || SQL(visitGuid)||" and VisitStatus = {{{SINGLE-QUOTE}}}ADM{{{SINGLE-QUOTE}}}" };
|
|
EndOfUnit := find "-" in string CurrentLocation;
|
|
|
|
If EndofUnit <> 0
|
|
then Unit:= SUBSTRING EndOfUnit -1 CHARACTERS STARTING AT 1 from CurrentLocation;
|
|
else Unit:= CurrentLocation;
|
|
endif;
|
|
|
|
// Send a Text Message Section
|
|
|
|
PhoneNumber := read last {" select p.AreaCode + p.PhoneNumber from CV3User u with (nolock) join Cv3Phone p with (nolock) on p.PersonGUID = u.GUID " ||
|
|
" where u.displayname = {{{SINGLE-QUOTE}}}SCM, Text Messaging{{{SINGLE-QUOTE}}} and p.PhoneNote = {{{SINGLE-QUOTE}}}Infection Control Department Manager{{{SINGLE-QUOTE}}} "};
|
|
|
|
Page_MLM := mlm {{{SINGLE-QUOTE}}}SCH_FUNC_PAGE{{{SINGLE-QUOTE}}};
|
|
MessageSubject:= "Important Message";
|
|
MessageBody := " Please call unit " || Unit || " for a fever travel risk patient. St.Clair main# 412-942-4000";
|
|
void := call Page_MLM with(PhoneNumber, MessageSubject, MessageBody);
|
|
|
|
|
|
endif; // Fire the Alert
|
|
|
|
|
|
endif; // EventType = "ChartObservation"
|
|
|
|
;;
|
|
evoke:
|
|
;;
|
|
logic: conclude true;
|
|
;;
|
|
action: return thisDocumentCommunication;
|
|
;;
|
|
Urgency: 50;;
|
|
end:
|