source: WorldVistAEHR/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECSCPT.m@ 1764

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1ECSCPT ;ALB/JAM,-Event Code Screen With CPT Codes ;22 Jul 05
2 ;;2.0; EVENT CAPTURE ;**72,92**;8 May 96;Build 3
3LOC K ECL S EC1=0 D ^ECL S:$D(LOC(2)) EC1=1 K LOC I '$D(ECL) S ECOUT=1 G END
4UNIT ;set var and sel dss unit
5 S ECJLP=0
6 S (ECOUT,ECALL)=0,ECPG=1
7 W @IOF F Q=0:0 D Q:%
8 .W !!,"Do you want to list all DSS Units for "_ECLN S %=1 D YN^DICN Q:%
9 .W !!?5,"Enter <RET> to list all your DSS Units for this location, or"
10 .W !?11,"NO to select a specific DSS Unit"
11 G:%<0 END I %=1 S ECALL=1 G ECCPT
12 W @IOF,! K DIC S DIC=724,DIC(0)="QEAMZ",DIC("A")="Select DSS Unit: "
13 S:ECL DIC("S")="I $D(^ECJ(""AP"",ECL,+Y))"
14 D ^DIC K DIC G:Y<0 END S ECD=+Y,ECDN=$P(Y,"^",2)
15 S ECDN=ECDN_$S($P($G(^ECD(+ECD,0)),"^",6):" **Inactive**",1:"")
16 S ECJLP=+$P(^ECD(ECD,0),"^",11)
17SEL ;
18 I 'ECJLP S ECC=0,ECCN="None" G ECCPT
19 W @IOF F Q=0:0 D Q:%
20 .W !!,"Do you want to list all categories for "_ECDN S %=1 D YN^DICN Q:%
21 .W !!,"Enter <RET> if you would like to list all categories for this "
22 .W "DSS Unit,",!," or NO to select a specific category"
23 G:%<0 END I %=1 S ECC="ALL" G ECCPT
24 W @IOF,! K DIC S DIC=726,DIC(0)="QEAMZ",DIC("A")="Select Category for "
25 S DIC("A")=DIC("A")_ECDN_" DSS Unit: "
26 S:ECD DIC("S")="I $D(^ECJ(""AP"",ECL,ECD,+Y))"
27 D ^DIC K DIC G:Y<0 END S ECC=+Y,ECCN=$P(Y,"^",2)
28ECCPT ;CPT Codes to display
29 K DIR
30 S DIR(0)="SO^A:Active CPT Codes;I:Inactive CPT Codes;B:Both"
31 S DIR("B")="I",DIR("A")="CPT Codes to display"
32 S DIR("?",1)="Enter an A for Event Code screens with Active CPT Codes,"
33 S DIR("?",1)=DIR("?",1)_" I for Inactive Codes,"
34 S DIR("?")="B for a consolidated report of CPT codes, or ^ to quit."
35 S DIR("??")="ECSCPT^"
36 D ^DIR K DIR I $D(DIRUT) G END
37 S ECCPT=Y
38DEV W !! K IOP,POP,IO("Q"),%ZIS,ZTSK
39 S %ZIS="QM",%ZIS("A")="Select Device: " D ^%ZIS I POP S ECOUT=1 G END
40 I $D(IO("Q")) K IO("Q") D G END
41 .S ZTDESC="CATEGORY AND PROCEDURE SUMMARY",ZTRTN="START^ECSCPT",ZTIO=ION
42 .D SAVE,^%ZTLOAD,HOME^%ZIS K ZTSK
43 U IO
44START ;
45 S %H=$H D YX^%DTC S ECRDT=Y
46 S ECOUT=0,ECPG=1
47 D ^ECSCPT1
48CLEAR I $E(IOST,1,2)'="C-" G END
49 G:ECOUT END
50 I ECPG W !!!!!,"Press <RET> to continue " R X:DTIME I '$T!(X="^") S ECOUT=1 G END
51 G:ECALL END
52ASK ;
53 W @IOF F Q=0:0 D I % Q
54 .W !!,"Would you like to list another DSS Unit for this Location"
55 .S %=2 D YN^DICN I % Q
56 .W !!,"Enter YES to list another DSS Unit or <RET> to continue"
57 G:%<0 END I %=1 D G UNIT
58 .K ECD,ECDN,ECC,ECCN,ECP,ECPN,NATN,ECFILE,ECCPT
59 K ECD,ECDN,ECC,ECCN,ECP,ECPN,NATN,ECFILE,ECCPT
60 I EC1 G LOC
61END ;
62 D ^ECKILL Q:$D(ECGUI) W @IOF D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
63 Q
64SAVE ;
65 S (ZTSAVE("ECALL"),ZTSAVE("ECJLP"),ZTSAVE("ECC*"),ZTSAVE("ECD*"),ZTSAVE("ECL*"),ZTSAVE("ECP*"))=""
66 Q
Note: See TracBrowser for help on using the repository browser.