Initial Checking with all 820 MLMs
This commit is contained in:
165
MLMStripper/bin/Debug/SRG/SRG_CHG_SCH_STATISTICS_POLICY.mlm
Normal file
165
MLMStripper/bin/Debug/SRG/SRG_CHG_SCH_STATISTICS_POLICY.mlm
Normal file
@@ -0,0 +1,165 @@
|
||||
maintenance:
|
||||
|
||||
title: SRG_CHG_SCH_STATISTICS_POLICY ;;
|
||||
mlmname: SRG_CHG_SCH_STATISTICS_POLICY ;;
|
||||
arden: version 2.5;;
|
||||
version: 15.3;;
|
||||
institution: St Clair Hospital ;;
|
||||
author: Courtney Carr;;
|
||||
specialist: Don Warnick;;
|
||||
date: 2018-07-18 ;;
|
||||
validation: testing;;
|
||||
|
||||
|
||||
library:
|
||||
purpose:
|
||||
Statistical Surgery Charges
|
||||
;;
|
||||
|
||||
explanation:
|
||||
|
||||
Change history
|
||||
|
||||
07-18-2018 DW CSR# 26563 Statistical Charges - Created
|
||||
|
||||
;;
|
||||
|
||||
keywords:
|
||||
;;
|
||||
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
|
||||
using "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
using namespace "System";
|
||||
using namespace "System.Collections.Generic";
|
||||
|
||||
log_execution_info := false;
|
||||
|
||||
(case_obj) := argument;
|
||||
|
||||
if called_by_editor then
|
||||
case_obj := read last { SRGCase: THIS Where CaseIdentifier = "1050" };
|
||||
u_name := read last {UserInfo: IDCOde};
|
||||
endif;
|
||||
|
||||
EvokingObject:= case_obj;
|
||||
|
||||
|
||||
// Attain the facility
|
||||
|
||||
|
||||
LocationName := read last
|
||||
{ "
|
||||
select lo.name
|
||||
from CV3Location lo with (nolock)
|
||||
where lo.GUID = " || sql(evokingobject.LocationGUID) || " "
|
||||
};
|
||||
|
||||
if LocationName matches pattern "EN%" then Facility := "ENDO"; StaisticalFacility := "ENDO";
|
||||
elseif LocationName matches pattern "MLSC%" then Facility := "MLSC" ; StaisticalFacility := "MLSC";
|
||||
elseif LocationName matches pattern "ANES FBC%" then Facility := "MAIN OR"; StaisticalFacility := "FBC";
|
||||
else Facility := "MAIN OR"; StaisticalFacility := "MAIN OR";
|
||||
endif;
|
||||
|
||||
|
||||
|
||||
// FACILITY CHARGE CODE SECTION
|
||||
|
||||
|
||||
|
||||
StasticalFacilityChargeCode:= read last
|
||||
{ "
|
||||
select code from SXASRGChargeCode with (nolock)
|
||||
where description = {{{SINGLE-QUOTE}}}statistical charge {{{SINGLE-QUOTE}}} + {{{SINGLE-QUOTE}}}" || StaisticalFacility || "{{{SINGLE-QUOTE}}} "
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// MD SPECIALITY/FACILITY CHARGE CODE SECTION
|
||||
|
||||
|
||||
|
||||
// Attain the case id and the performed primary procedure id
|
||||
|
||||
CaseID := EVOKINGOBJECT.CaseID;
|
||||
|
||||
proc_parts:= evokingobject.SRGCaseProcedure;
|
||||
get_procs:= proc_parts.Records__;
|
||||
|
||||
// Loop through the procedures to find the primary (planned/primary/secondary procedures are in the object)
|
||||
|
||||
for i in 1 seqto count get_procs DO
|
||||
this_proc := get_procs[i];
|
||||
if this_proc.IsPRimary = true and this_proc.HasBeenPerformed = true
|
||||
then
|
||||
ProcedureID := this_proc.CaseProcedureID;
|
||||
endif;
|
||||
enddo;
|
||||
|
||||
|
||||
// Attain the provider discipline
|
||||
|
||||
|
||||
ProviderDiscipline:= read last
|
||||
{ "
|
||||
select srv.Description
|
||||
from SXASRGCaseProcedure cp with (nolock)
|
||||
join SXASRGSurgeryStaff ss with (nolock) on ss.SurgeryStaffID = cp.SurgeryStaffID
|
||||
join SXASRGService srv with (nolock) on srv.ServiceID = ss.ServiceID
|
||||
where cp.CaseID = " || CaseID || " and cp.CaseProcedureID = " || ProcedureID || " "
|
||||
};
|
||||
|
||||
|
||||
// Attain the charge code assocatied with that facilty and discipline
|
||||
|
||||
|
||||
if exists ProviderDiscipline
|
||||
then
|
||||
StasticalSpecialtyFacilityChargeCode:= read last
|
||||
{ "
|
||||
select code from SXASRGChargeCode with (nolock)
|
||||
where description like {{{SINGLE-QUOTE}}}%division {{{SINGLE-QUOTE}}} + {{{SINGLE-QUOTE}}}" || ProviderDiscipline || "{{{SINGLE-QUOTE}}} and substring (description, 1, CHARINDEX ({{{SINGLE-QUOTE}}} division{{{SINGLE-QUOTE}}}, description) ) = {{{SINGLE-QUOTE}}}" || Facility || "{{{SINGLE-QUOTE}}} "
|
||||
};
|
||||
endif;
|
||||
|
||||
|
||||
;;
|
||||
|
||||
priority: 50
|
||||
;;
|
||||
|
||||
evoke:
|
||||
;;
|
||||
|
||||
logic:
|
||||
|
||||
|
||||
charge_codes := new net_object {{{SINGLE-QUOTE}}}List<String>{{{SINGLE-QUOTE}}};
|
||||
|
||||
|
||||
if StasticalFacilityChargeCode is not null
|
||||
then
|
||||
ret := call charge_codes.Add with StasticalFacilityChargeCode ;
|
||||
endif;
|
||||
|
||||
if StasticalSpecialtyFacilityChargeCode is not null
|
||||
then
|
||||
ret := call charge_codes.Add with StasticalSpecialtyFacilityChargeCode ;
|
||||
endif;
|
||||
|
||||
conclude true;
|
||||
|
||||
;;
|
||||
|
||||
action:
|
||||
|
||||
return charge_codes;
|
||||
|
||||
;;
|
||||
|
||||
Urgency: 50
|
||||
;;
|
||||
end:
|
||||
Reference in New Issue
Block a user