source: WorldVistAEHR/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECL.m@ 1211

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

initial load of WorldVistAEHR

File size: 916 bytes
RevLine 
[613]1ECL ;BIR/MAM-Get Event Capture Location ;17 May 89
2 ;;2.0; EVENT CAPTURE ;**25**;8 May 96
3 S ECOUT=0
4 D GETLOC(.LOC)
5 I '$D(LOC(1)) D R X:5 W @IOF Q
6 . W !!,"You have no locations flagged for Event Capture.",!
7 S:'$D(LOC(2)) ECLN=$P(LOC(1),"^"),ECL=$P(LOC(1),"^",2)
8 I $D(LOC(2)) D LL I '$D(ECL) Q
9 I '$G(NOTIOF) W @IOF
10 Q
11GETLOC(LOC) ;Get all event capture locations
12 N I,CNT
13 S (X,CNT)=0
14 F I=0:0 S X=$O(^DIC(4,"LOC",X)) Q:X="" D
15 . S CNT=CNT+1,LOC(CNT)=X,Y=$O(^DIC(4,"LOC",X,0)),LOC(CNT)=LOC(CNT)_"^"_Y
16 Q
17LL ; select location
18 W:'$G(NOTIOF) @IOF W !,"Event Capture Locations: ",!
19 S CNT=0 F I=0:0 S CNT=$O(LOC(CNT)) Q:'CNT W !,CNT_". "_$P(LOC(CNT),"^")
20ASK W !!,"Select Number: " R X:DTIME Q:'$T!("^"[X)!(X="")
21 I '$D(LOC(X)) D G LL
22 . W !!,"Enter the number corresponding to the location you want to "
23 . W "select.",!!,"Press <RET> to continue"
24 . R X:DTIME
25 S ECL=$P(LOC(X),"^",2),ECLN=$P(LOC(X),"^")
26 Q
Note: See TracBrowser for help on using the repository browser.