source: WorldVistAEHR/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECSECT.m@ 1042

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1ECSECT ;BIR/MAM,JPW-Create DSS Units for Event Capture ;1 May 96
2 ;;2.0; EVENT CAPTURE ;**4,5**;8 May 96
3 ;
4SECT ;entry
5 S (MSG1,MSG2)=0
6 W @IOF,!,"Enter/Edit DSS Units for Event Capture"
7 W !!,?5,"If you elect to send data to PCE for DSS Unit, you must answer the",!,?5,"""Send to PCE"" prompt."
8 W !! K DA,DIC S (ECOUT,ECJLP)=0,DIC=724,DLAYGO=724
9 S DIC("S")="I $P(^(0),""^"",8)=1",DIC(0)="QEAMZL",DIC("DR")="1T;3T;2T",DIC("A")="Select DSS Unit: " D ^DIC S DIE=DIC K DIC,DLAYGO I Y<0 G END
10 S ECDA=+Y D CHK I ECFLG W !!,"Cateories are "_$S($P($G(^ECD(+ECDA,0)),"^",11):"used",1:"not used")_" to group procedures. You have event codes screens defined",!,"and cannot change the use of categories.",!
11 I $P(Y,"^",3) K DR,DA S DA=ECDA,DR=$S(ECFLG:"4T;7///1;11T;12T;13T",1:"4T;7///1;10T;11T;12T;13T") D ^DIE K DIE,DA,DR D SCCHK(ECDA) G:$D(Y) END G:$D(DTOUT) END D MSG G SECT
12 D DIE G SECT
13END ;D ^ECKILL W @IOF
14 Q
15REACT ; reactivate DSS Unit
16 W !!,"This DSS Unit has been inactivated.",!!,"Would you like to reactivate it ? YES// " R ECYN:DTIME I '$T!(ECYN="^") S ECOUT=1 Q
17 S ECYN=$E(ECYN) S:ECYN="" ECYN="Y" I "YyNn"'[ECYN W !!,"Enter <RET> to make this DSS Unit valid for use in the Event Capture",!,"software, or NO if this DSS Unit should remain inactive." G REACT
18 I "Nn"[ECYN S ECOUT=1 Q
19 K DIE,DR,DA S DIE=724,DR="5///0",DA=ECDA D ^DIE K DIE,DR,DA
20 Q
21DIE ; enter DSS Unit info
22 S MSG1=1
23 I $P($G(^ECD(ECDA,0)),"^",13)']"" S MSG2=1
24 I $P(^ECD(ECDA,0),"^",6) D REACT I ECOUT Q
25 K DIE,DR,DA
26 S DA=ECDA,DIE=724,DLAYGO=724,DR=$S(ECFLG:".01T;1T;3T;2T;4T;7///1;11T;13T",1:".01T;1T;3T;2T;4T;7///1;10T;11T;13T")
27 D ^DIE
28 K DR,DIE,DLAYGO,DA
29 ;
30 D SCCHK(ECDA) ;* Check to prompt for Associated Stop Code
31 ;
32 ;* If sending to PCE, remove Associated Stop Code
33 I $P(^ECD(ECDA,0),"^",14)'="",($P(^ECD(ECDA,0),"^",14)'="N") DO
34 .S DA=ECDA,DIE=724,DR="9////@"
35 .D ^DIE
36 K ECDA,DA,DR,DIE
37MSG W !!,"Press <RET> to continue " R X:DTIME
38 Q
39CHK ;loop thru screens
40 S ECFLG=0
41 S JJ=0 F S JJ=$O(^ECJ("AP",JJ)) Q:'JJ!(ECFLG) I $D(^ECJ("AP",JJ,ECDA)) S ECFLG=1
42 Q
43 ;
44SCCHK(ECDA) ;** Check to see if sending to PCE
45 I $P(^ECD(ECDA,0),"^",14)=""!($P(^ECD(ECDA,0),"^",14)="N") DO
46 .S DA=ECDA,DIE=724,DR="9T"
47 .D ^DIE
48 Q
Note: See TracBrowser for help on using the repository browser.