source: FOIAVistA/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECMFLOC.m@ 1397

Last change on this file since 1397 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1ECMFLOC ;ALB/JAM-Event Capture Management Location Filer ;16 Feb 01
2 ;;2.0; EVENT CAPTURE ;**25**;8 May 96
3 ;
4FILE ;Used by the RPC broker to file local procedures in #4
5 ; Variables passed in
6 ; ECIEN - Location IEN
7 ; ECST - Location Status
8 ;
9 ; Variable return
10 ; ^TMP($J,"ECMSG",n)=Success or failure to file in #4^Message
11 ;
12 N ECERR,ECNO
13 S ECERR=0 D CHKDT I ECERR Q
14 K DIC S DIC=4,DIC(0)="XN",X=ECIEN D ^DIC I Y<0 D Q
15 . S ^TMP($J,"ECMSG",1)="0^Location Not on File"
16 I ECST="C" D
17 . K DIE,DR S DIE=4,DR="720///1",DA=ECIEN D ^DIE
18 . S ^TMP($J,"ECMSG",1)="1^Location flagged for Event Capture"
19 I ECST="R" D
20 . S ECNO=0 I '$D(^DIC(4,ECIEN,"EC")) S ECNO=1
21 . I $D(^DIC(4,ECIEN,"EC")),+$P(^("EC"),"^")=0 S ECNO=1
22 . I ECNO S ^TMP($J,"ECMSG",1)="0^Not flagged as current location." Q
23 . K DIE,DR S DIE=4,DA=ECIEN,DR="720///@" D ^DIE
24 . S ^TMP($J,"ECMSG",1)="1^Location inactivated for Event Capture"
25 K DA,DR,DIE,DIC
26 Q
27CHKDT ;Required Data Check
28 N I,C
29 S C=1
30 F I="ECIEN","ECST" D
31 .I $G(@I)="" S ^TMP($J,"ECMSG",C)="0^Key data missing "_I,C=C+1,ECERR=1
32 Q
33 ;
34HFS ;Used by the RPC broker to add/update or delete an entry in the
35 ;PARAMETER file #8989.5
36 ; Variables passed in
37 ; ECDIV - Division IEN
38 ; ECHFS - Directory/path
39 ; ECOPER - Operation (add/update or delete)
40 ;
41 ; Variable return
42 ; ^TMP($J,"ECMSG",n)=Success or failure to file in #8989.5^Message
43 ;
44 N ECERR,ECPAR
45 S ECERR=0 D CHKDT1 I ECERR Q
46 K DIC S DIC=4,DIC(0)="XN",X=ECDIV D ^DIC I Y<0 D Q
47 . S ^TMP($J,"ECMSG",1)="0^Division Not on File"
48 I '$G(^DIC(4,ECDIV,"EC")) S ^TMP($J,"ECMSG",1)="0^Not an EC Division" Q
49 S ECDIV=ECDIV_";DIC(4,",ECPAR="EC HFS SCRATCH"
50 I ECOPER="A" D Q
51 . D EN^XPAR(ECDIV,ECPAR,,ECHFS,.ECERR)
52 . I '+ECERR S ^TMP($J,"ECMSG",1)="1^Directory successful added" Q
53 . S ^TMP($J,"ECMSG",1)="0^Error adding directory"
54 I ECOPER="D" D
55 . D NDEL^XPAR(ECDIV,ECPAR,.ECERR)
56 . I '+ECERR S ^TMP($J,"ECMSG",1)="1^Directory successful deleted" Q
57 . S ^TMP($J,"ECMSG",1)="0^Error deleting directory"
58 Q
59CHKDT1 ;Required Data Check
60 N I,C
61 S C=1
62 F I="ECDIV","ECHFS","ECOPER" D
63 .I $G(@I)="" S ^TMP($J,"ECMSG",C)="0^Key data missing "_I,C=C+1,ECERR=1
64 Q
Note: See TracBrowser for help on using the repository browser.