source: FOIAVistA/trunk/r/QUASAR-ACKQ/ACKQTE9.m@ 1801

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

initial load of FOIAVistA 6/30/08 version

File size: 7.6 KB
Line 
1ACKQTE9 ; ;07/15/03
2 D DE G BEGIN
3DE S DIE="^ACK(509850.6,",DIC=DIE,DP=509850.6,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^ACK(509850.6,DA,""))=""
4 I $D(^(0)) S %Z=^(0) S %=$P(%Z,U,7) S:%]"" DE(17)=%
5 I $D(^(2)) S %Z=^(2) S %=$P(%Z,U,4) S:%]"" DE(1)=%
6 I $D(^(4)) S %Z=^(4) S %=$P(%Z,U,17) S:%]"" DE(22)=% S %=$P(%Z,U,18) S:%]"" DE(23)=% S %=$P(%Z,U,24) S:%]"" DE(24)=%
7 K %Z Q
8 ;
9W W !?DL+DL-2,DLB_": "
10 Q
11O D W W Y W:$X>45 !?9
12 I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
13 W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
14TR R X:DTIME E S (DTOUT,X)=U W $C(7)
15 Q
16A K DQ(DQ) S DQ=DQ+1
17B G @DQ
18RE G PR:$D(DE(DQ)) D W,TR
19N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
20RD G QS:X?."?" I X["^" D D G ^DIE17
21 I X="@" D D G Z^DIE2
22 I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
23T G M^DIE17:DV,^DIE3:DV["V",P:DV'["S" X:$D(^DD(DP,DIFLD,12.1)) ^(12.1) I X?.ANP D SET I 'DDER X:$D(DIC("S")) DIC("S") I W:'$D(DB(DQ)) " "_% G V
24 K DDER G X
25P I DV["P" S DIC=U_DU,DIC(0)=$E("EN",$D(DB(DQ))+1)_"M"_$E("L",DV'["'") S:DIC(0)["L" DLAYGO=+$P(DV,"P",2) G:DV["*" AST^DIED D NOSCR^DIED S X=+Y,DIC=DIE G X:X<0
26 G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
27 I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
28V D @("X"_DQ) K YS
29Z K DIC("S"),DLAYGO I $D(X),X'=U D:$G(DE(DW,"INDEX")) SAVEVALS G:'$$KEYCHK UNIQFERR^DIE17 S DG(DW)=X S:DV["d" ^DISV(DUZ,"DIE",DLB)=X G A
30X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
31 S X="?BAD"
32QS S DZ=X D D,QQ^DIEQ G B
33D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
34Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
35PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
36R I DG["P",@("$D(^"_X_"0))") S X=+$P(^(0),U,2) G RP:'$D(^(Y,0)) S Y=$P(^(0),U),X=$P(^DD(X,.01,0),U,3),DG=$P(^(0),U,2) G R
37 I DG["V",+Y,$P(Y,";",2)["(",$D(@(U_$P(Y,";",2)_"0)")) S X=+$P(^(0),U,2) G RP:'$D(^(+Y,0)) S Y=$P(^(0),U) I $D(^DD(+X,.01,0)) S DG=$P(^(0),U,2),X=$P(^(0),U,3) G R
38 X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
39RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
40I I DV'["I",DV'["#" G RD
41 D E^DIE0 G RD:$D(X),PR
42 Q
43SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
44 I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
45 D ^DIR I 'DDER S %=Y(0),X=Y
46 Q
47SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
48 I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
49 E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
50 Q
51NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
52KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
53BEGIN S DNM="ACKQTE9",DQ=1
541 S DW="2;4",DV="*P509850.3'd",DU="",DLB="STUDENT",DIFLD=7
55 S DE(DW)="C1^ACKQTE9"
56 S DU="ACK(509850.3,"
57 G RE
58C1 G C1S:$D(DE(1))[0 K DB
59 S X=DE(1),DIC=DIE
60 K ^ACK(509850.6,"ST",X,DA)
61 S X=DE(1),DIC=DIE
62 X "D SEND^ACKQUTL5(DA)"
63C1S S X="" G:DG(DQ)=X C1F1 K DB
64 S X=DG(DQ),DIC=DIE
65 S ^ACK(509850.6,"ST",X,DA)=3
66 S X=DG(DQ),DIC=DIE
67 X "D SEND^ACKQUTL5(DA)"
68C1F1 Q
69X1 S DIC("S")="I $D(ACKVD),$$STACT^ACKQUTL(+Y,ACKVD)=-2" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
70 Q
71 ;
722 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=2 D X2 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
73X2 I $$GET1^DIQ(509850.6,ACKVIEN_",",6)="" W !,"A Primary Provider MUST be entered for this Visit !!",! S Y="@325"
74 Q
753 S DQ=4 ;@350
764 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=4 D X4 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
77X4 I ACKEVENT S Y="@372"
78 Q
795 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=5 D X5 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
80X5 D CPTDIS^ACKQUTL4
81 Q
826 D:$D(DG)>9 F^DIE17,DE S DQ=6,D=0 K DE(1) ;10
83 S DIFLD=10,DGO="^ACKQTE10",DC="6^509850.61PA^3^",DV="509850.61M*P509850.4'X",DW="0;1",DOW="PROCEDURE CODE",DLB="Select "_DOW S:D DC=DC_D
84 S DU="ACK(509850.4,"
85 G RE:D I $D(DSC(509850.61))#2,$P(DSC(509850.61),"I $D(^UTILITY(",1)="" X DSC(509850.61) S D=$O(^(0)) S:D="" D=-1 G M6
86 S D=$S($D(^ACK(509850.6,DA,3,0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
87M6 I D>0 S DC=DC_D I $D(^ACK(509850.6,DA,3,+D,0)) S DE(6)=$P(^(0),U,1)
88 G RE
89R6 D DE
90 S D=$S($D(^ACK(509850.6,DA,3,0)):$P(^(0),U,3,4),1:1) G 6+1
91 ;
927 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=7 D X7 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
93X7 I ACKEVENT S Y="@372"
94 Q
958 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=8 D X8 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
96X8 I '$O(^ACK(509850.6,ACKVIEN,3,0)) W !!,$C(7),"You must enter at least one PROCEDURE CODE !!" S Y="@350"
97 Q
989 S DQ=10 ;@370
9910 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=10 D X10 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
100X10 I 'ACKEVENT S Y="@378"
101 Q
10211 S DQ=12 ;@372
10312 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=12 D X12 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
104X12 D EVNTDIS^ACKQUTL5
105 Q
10613 S D=0 K DE(1) ;15
107 S DIFLD=15,DGO="^ACKQTE11",DC="4^509850.615PA^7^",DV="509850.615M*P725'X",DW="0;1",DOW="EVENT CAPTURE PROCEDURE",DLB="Select "_DOW S:D DC=DC_D
108 S DU="EC(725,"
109 G RE:D I $D(DSC(509850.615))#2,$P(DSC(509850.615),"I $D(^UTILITY(",1)="" X DSC(509850.615) S D=$O(^(0)) S:D="" D=-1 G M13
110 S D=$S($D(^ACK(509850.6,DA,7,0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
111M13 I D>0 S DC=DC_D I $D(^ACK(509850.6,DA,7,+D,0)) S DE(13)=$P(^(0),U,1)
112 G RE
113R13 D DE
114 S D=$S($D(^ACK(509850.6,DA,7,0)):$P(^(0),U,3,4),1:1) G 13+1
115 ;
11614 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=14 D X14 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
117X14 I 'ACKEVENT S Y="@378"
118 Q
11915 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=15 D X15 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
120X15 I '$O(^ACK(509850.6,ACKVIEN,7,0)) W !!,$C(7),"You must enter at least one EC PROCEDURE CODE !!" S Y="@372"
121 Q
12216 S DQ=17 ;@378
12317 S DW="0;7",DV="RNJ3,0",DU="",DLB="TIME SPENT (minutes)",DIFLD=.07
124 G RE
125X17 K:+X'=X!(X>999)!(X<0)!(X?.E1"."1N.N) X
126 Q
127 ;
12818 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=18 D X18 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
129X18 I ACKCP'=1!($P($G(^ACK(509850.6,ACKVIEN,4)),U,17)]"") S Y="@999"
130 Q
13119 S DQ=20 ;@380
13220 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=20 D X20 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
133X20 S ACKMODE=1 D SIG^ACKQCP
134 Q
13521 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=21 D X21 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
136X21 S:'$D(ACKSIG) Y="@999"
137 Q
13822 S DW="4;17",DV="F",DU="",DLB="SIGNATURE",DIFLD=4.17
139 S DE(DW)="C22^ACKQTE9"
140 S X=ACKSIG
141 S Y=X
142 S X=Y,DB(DQ)=1,DE(DW,"4/")="" G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
143 G RD:X="@",Z
144C22 G C22S:$D(DE(22))[0 K DB
145 S X=DE(22),DIC=DIE
146 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^ACK(509850.6,D0,0)):^(0),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV D TRIGCP^ACKQUTL X ^DD(509850.6,4.17,1,1,2.4)
147C22S S X="" G:DG(DQ)=X C22F1 K DB
148 S X=DG(DQ),DIC=DIE
149 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^ACK(509850.6,D0,0)):^(0),1:"") S X=$P(Y(1),U,9),X=X S DIU=X K Y S X=DIV D TRIGCP^ACKQUTL X ^DD(509850.6,4.17,1,1,1.4)
150C22F1 Q
151X22 Q
15223 D:$D(DG)>9 F^DIE17,DE S DQ=23,DW="4;18",DV="D",DU="",DLB="DATE SIGNED",DIFLD=4.18
153 S X=DT
154 S Y=X
155 S X=Y,DB(DQ)=1,DE(DW,"4/")="" G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
156 G RD:X="@",Z
157X23 Q
15824 S DW="4;24",DV="F",DU="",DLB="COMPLETER TITLE",DIFLD=4.24
159 S X=ACKTITL
160 S Y=X
161 S X=Y,DB(DQ)=1,DE(DW,"4/")="" G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
162 G RD:X="@",Z
163X24 Q
16425 S DQ=26 ;@999
16526 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=26 D X26 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
166X26 W !
167 Q
16827 G 0^DIE17
Note: See TracBrowser for help on using the repository browser.