Files
St.Clair/MLMStripper/bin/Debug/FORM/FORM_C_SECTION_ADMISSION_OS.mlm

133 lines
4.3 KiB
Plaintext

maintenance:
title: FORM_C_Section_Admission_OS;;
mlmname: FORM_C_Section_Admission_OS;;
arden: version 2.5;;
version: 6.10;;
institution: St. Clair Hospital ;;
author: Shivprasad Jadhav;;
specialist: Shivprasad Jadhav, Allscripts;;
date: 2015-02-07;;
validation: testing;;
library:
purpose: Ø User should be able to select only one from cefazolin or clindamycin ;;
explanation:
;;
keywords:
;;
citations:
;;
knowledge:
type: data-driven;;
data:
(this_communication, // Communication object
this_form, // Form object
client_info_obj //Arden ClientInfo object
) := argument;
field_list:= this_form.Fields;
field_list := this_form.fields;
client_guid := this_communication.ClientGUID;
visit_guid := this_communication.ClientVisitGUID;
chart_guid := this_communication.ChartGUID;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
CallingItem := CallingField.Records_;
Medication := last of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid"
and field_list.Control_MultiFieldOccNum = 49 );
Medication_Val := Medication.Value;
CBC_48_Hours := last of ( field_list WHERE field_list.DataItemName = "MultiOrderCheckBox"
and field_list.Control_MultiFieldOccNum = 5 );
CBC_48_Hours_Val := CBC_48_Hours.Value;
Type_Screen := last of ( field_list WHERE field_list.DataItemName = "MultiOrderCheckBox"
and field_list.Control_MultiFieldOccNum = 6 );
Type_Screen_Val := Type_Screen.Value;
Val1 := Type_Screen.Value[1];
MLM_Medical_Imaging := MLM {{{SINGLE-QUOTE}}}FORM_MEDICAL_IMAGING_INDICATIONS_FOR_OS{{{SINGLE-QUOTE}}} ;
(this_communication, this_form) := CALL MLM_Medical_Imaging with this_communication ;
// *********** Objects for first flow *************
item1 := Medication_Val[1];
item2 := Medication_Val[2];
Val1 := Type_Screen.Value[1];
//********* objects for Second Flow **********
// first flow ***************************************************************************************************
If item1.IsSelected = True Then
item2.IsReadonly := True;
EndIf;
If item2.IsSelected = True Then
item1.IsReadonly := True;
EndIf;
If (item1.IsSelected = False And item2.IsSelected = False ) Then
item1.IsReadonly := False;
item2.IsReadonly := False;
EndIf;
//Check to see if patient had these labs drawn in last 96 hours
( lab_name_CBC ) := read {"SELECT o.Name"
|| " FROM CV3ClientVisit cv WITH (NOLOCK) JOIN CV3Order o WITH (NOLOCK)"
//|| " ON cv.GUID = o.ClientVisitGUID"
|| " On cv.ClientGUID = o.ClientGUID"
|| " AND cv.ChartGUID = o.ChartGUID"
|| " WHERE cv.ClientGUID = " || Sql(client_guid)
|| " AND o.NAME IN ({{{SINGLE-QUOTE}}}CBC (Includes Diff){{{SINGLE-QUOTE}}} )"
|| " AND DATEDIFF(MINUTE, o.ARRIVALDTM, GetDate()) <= 2880 "
|| " AND o.OrderStatusCode IN ({{{SINGLE-QUOTE}}}SPRV{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESI{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESC{{{SINGLE-QUOTE}}})"};
if ( exists lab_name_CBC ) then
CBC_48_Hours.Value[1].IsSelected := False;
else
CBC_48_Hours.Value[1].IsSelected := True ;
endif;
//Check to see if patient had these labs drawn in last 96 hours
lab_name_TypeScreen := read {"SELECT Distinct o.Name"
|| " FROM CV3ClientVisit cv WITH (NOLOCK) JOIN CV3Order o WITH (NOLOCK)"
//|| " ON cv.GUID = o.ClientVisitGUID"
|| " On cv.ClientGUID = o.ClientGUID"
|| " AND cv.ChartGUID = o.ChartGUID"
|| " WHERE cv.ClientGUID = " || Sql(client_guid)
|| " AND o.NAME IN ({{{SINGLE-QUOTE}}}Type and Screen{{{SINGLE-QUOTE}}} )"
|| " AND DATEDIFF(MINUTE, o.ARRIVALDTM, GetDate()) <= 4320 "
|| " AND o.OrderStatusCode IN ({{{SINGLE-QUOTE}}}SPRV{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESI{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESC{{{SINGLE-QUOTE}}})"};
if ( exists lab_name_TypeScreen ) then
Val1.IsSelected := False;
else
Val1.IsSelected := True ;
endif;
;;
priority: 50
;;
evoke:
;;
logic: conclude true;
;;
action: return this_communication, this_form;
;;
Urgency: 50;;
end: