ECFLRPC ;ALB/JAM-Event Capture Filer RPC ;10/17/16 12:56
;;2.0;EVENT CAPTURE;**25,101,134**;8 May 96;Build 12
;
FILE(RESULTS,ECARY) ;Broker entry point to file data in Event Capture files
;This RPC is called when filing any data for ECS.
; RPC: EC FILER
;INPUTS ECARY - array with data to be filed
; ECARY("ECFILE")=file #
; ECARY(sub)=data ;data relevant to file
;
;OUTPUTS RESULTS - Success or failure to file
;
D SETENV^ECUMRPC
D PARSE
K ^TMP($J,"ECMSG")
I $G(ECFILE)="" S ^TMP($J,"ECMSG",1)="0^File Not defined" D END Q
I ECFILE=721 D ^ECEFPAT,END Q ; Event Capture Patient File
;134 added call to file users in file 722
I ECFILE=722 D ^ECPRVDR,END Q ; Event Capture Provider File
I ECFILE=724 D ^ECMFDSSU,END Q ; DSS Unit
I ECFILE=720.3 D ^ECMFECS,END Q ; EC Event Code Screens
I ECFILE=720.4 D REASON^ECMFECS,END Q ;Event Code Reasons
I ECFILE=725 D ^ECMFLPX,END Q ; EC Local Procedure
I ECFILE=726 D ^ECMFCAT,END Q ; Event Capture Category
I ECFILE=4 D ^ECMFLOC,END Q ; Event Capture Locations
I ECFILE=200 D USER^ECMFDSSU,END Q ; Allocate/Deallocate users to Unit
I ECFILE="200A" D DSSU^ECMFDSSU,END Q ; Allocate/Deallocate Unts to usr
;I ECFILE=8989.5 D HFS^ECMFLOC,END Q ; Update HFS directory
S ^TMP($J,"ECMSG",1)="0^Filer Not Available"
;
END ;
D KILLVAR
S RESULTS=$NA(^TMP($J,"ECMSG"))
Q
;
PARSE ;Parse data from array for filing
N SUB
S SUB="" F S SUB=$O(ECARY(SUB)) Q:SUB="" S @SUB=ECARY(SUB)
Q
KILLVAR ;Kill variables
N SUB
S SUB="" F S SUB=$O(ECARY(SUB)) Q:SUB="" K @SUB
K ECARY,ECIEN
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECFLRPC 1683 printed Sep 02, 2024@18:42:39 Page 2
ECFLRPC ;ALB/JAM-Event Capture Filer RPC ;10/17/16 12:56
+1 ;;2.0;EVENT CAPTURE;**25,101,134**;8 May 96;Build 12
+2 ;
FILE(RESULTS,ECARY) ;Broker entry point to file data in Event Capture files
+1 ;This RPC is called when filing any data for ECS.
+2 ; RPC: EC FILER
+3 ;INPUTS ECARY - array with data to be filed
+4 ; ECARY("ECFILE")=file #
+5 ; ECARY(sub)=data ;data relevant to file
+6 ;
+7 ;OUTPUTS RESULTS - Success or failure to file
+8 ;
+9 DO SETENV^ECUMRPC
+10 DO PARSE
+11 KILL ^TMP($JOB,"ECMSG")
+12 IF $GET(ECFILE)=""
SET ^TMP($JOB,"ECMSG",1)="0^File Not defined"
DO END
QUIT
+13 ; Event Capture Patient File
IF ECFILE=721
DO ^ECEFPAT
DO END
QUIT
+14 ;134 added call to file users in file 722
+15 ; Event Capture Provider File
IF ECFILE=722
DO ^ECPRVDR
DO END
QUIT
+16 ; DSS Unit
IF ECFILE=724
DO ^ECMFDSSU
DO END
QUIT
+17 ; EC Event Code Screens
IF ECFILE=720.3
DO ^ECMFECS
DO END
QUIT
+18 ;Event Code Reasons
IF ECFILE=720.4
DO REASON^ECMFECS
DO END
QUIT
+19 ; EC Local Procedure
IF ECFILE=725
DO ^ECMFLPX
DO END
QUIT
+20 ; Event Capture Category
IF ECFILE=726
DO ^ECMFCAT
DO END
QUIT
+21 ; Event Capture Locations
IF ECFILE=4
DO ^ECMFLOC
DO END
QUIT
+22 ; Allocate/Deallocate users to Unit
IF ECFILE=200
DO USER^ECMFDSSU
DO END
QUIT
+23 ; Allocate/Deallocate Unts to usr
IF ECFILE="200A"
DO DSSU^ECMFDSSU
DO END
QUIT
+24 ;I ECFILE=8989.5 D HFS^ECMFLOC,END Q ; Update HFS directory
+25 SET ^TMP($JOB,"ECMSG",1)="0^Filer Not Available"
+26 ;
END ;
+1 DO KILLVAR
+2 SET RESULTS=$NAME(^TMP($JOB,"ECMSG"))
+3 QUIT
+4 ;
PARSE ;Parse data from array for filing
+1 NEW SUB
+2 SET SUB=""
FOR
SET SUB=$ORDER(ECARY(SUB))
if SUB=""
QUIT
SET @SUB=ECARY(SUB)
+3 QUIT
KILLVAR ;Kill variables
+1 NEW SUB
+2 SET SUB=""
FOR
SET SUB=$ORDER(ECARY(SUB))
if SUB=""
QUIT
KILL @SUB
+3 KILL ECARY,ECIEN
+4 QUIT