[623] | 1 | DVBHCE ; GENERATED FROM 'DVBHINQ UPDATE' INPUT TEMPLATE(#960), FILE 2;12/27/07
|
---|
[613] | 2 | D DE G BEGIN
|
---|
| 3 | DE S DIE="^DPT(",DIC=DIE,DP=2,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DPT(DA,""))=""
|
---|
[623] | 4 | I $D(^(.32)) S %Z=^(.32) S %=$P(%Z,U,4) S:%]"" DE(23)=% S %=$P(%Z,U,5) S:%]"" DE(21)=% S %=$P(%Z,U,6) S:%]"" DE(19)=% S %=$P(%Z,U,7) S:%]"" DE(20)=% S %=$P(%Z,U,8) S:%]"" DE(24)=%
|
---|
[613] | 5 | K %Z Q
|
---|
| 6 | ;
|
---|
| 7 | W W !?DL+DL-2,DLB_": "
|
---|
| 8 | Q
|
---|
| 9 | O D W W Y W:$X>45 !?9
|
---|
| 10 | I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
|
---|
| 11 | W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
|
---|
| 12 | TR R X:DTIME E S (DTOUT,X)=U W $C(7)
|
---|
| 13 | Q
|
---|
| 14 | A K DQ(DQ) S DQ=DQ+1
|
---|
| 15 | B G @DQ
|
---|
| 16 | RE G PR:$D(DE(DQ)) D W,TR
|
---|
| 17 | N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
|
---|
| 18 | RD G QS:X?."?" I X["^" D D G ^DIE17
|
---|
| 19 | I X="@" D D G Z^DIE2
|
---|
| 20 | I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
|
---|
| 21 | T 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
|
---|
| 22 | K DDER G X
|
---|
| 23 | P 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
|
---|
| 24 | G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
|
---|
| 25 | I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
|
---|
| 26 | V D @("X"_DQ) K YS
|
---|
| 27 | Z 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
|
---|
| 28 | X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
|
---|
| 29 | S X="?BAD"
|
---|
| 30 | QS S DZ=X D D,QQ^DIEQ G B
|
---|
| 31 | D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
|
---|
| 32 | Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
|
---|
| 33 | PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
|
---|
| 34 | R 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
|
---|
| 35 | 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
|
---|
| 36 | X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
|
---|
| 37 | RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
|
---|
| 38 | I I DV'["I",DV'["#" G RD
|
---|
| 39 | D E^DIE0 G RD:$D(X),PR
|
---|
| 40 | Q
|
---|
| 41 | SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
|
---|
| 42 | I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
|
---|
| 43 | D ^DIR I 'DDER S %=Y(0),X=Y
|
---|
| 44 | Q
|
---|
| 45 | SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
|
---|
| 46 | I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
|
---|
| 47 | E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
|
---|
| 48 | Q
|
---|
| 49 | NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
|
---|
| 50 | KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
|
---|
| 51 | BEGIN S DNM="DVBHCE",DQ=1
|
---|
| 52 | N DIEZTMP,DIEZAR,DIEZRXR,DIIENS,DIXR K DIEFIRE,DIEBADK S DIEZTMP=$$GETTMP^DIKC1("DIEZ")
|
---|
| 53 | M DIEZAR=^DIE(960,"AR") S DICRREC="TRIG^DIE17"
|
---|
| 54 | S:$D(DTIME)[0 DTIME=300 S D0=DA,DIIENS=DA_",",DIEZ=960,U="^"
|
---|
| 55 | 1 S DQ=2 ;@101
|
---|
| 56 | 2 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
|
---|
| 57 | X2 W @$S('$D(IOF):"#",IOF="":"#",1:IOF),! K ^UTILITY($J) D ^DVBHSVER
|
---|
| 58 | Q
|
---|
| 59 | 3 S DQ=4 ;@7
|
---|
| 60 | 4 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
|
---|
| 61 | X4 D Q^DVBHUTIL
|
---|
| 62 | Q
|
---|
| 63 | 5 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
|
---|
| 64 | X5 S DIE("NO^")=""
|
---|
| 65 | Q
|
---|
| 66 | 6 S DQ=7 ;@1001
|
---|
| 67 | 7 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
|
---|
| 68 | X7 D ^DVBHS1 S Y="@5"
|
---|
| 69 | Q
|
---|
| 70 | 8 S DQ=9 ;@1
|
---|
| 71 | 9 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=9 D X9 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
|
---|
| 72 | X9 D ^DVBHS2 S Y="@5" W !
|
---|
| 73 | Q
|
---|
| 74 | 10 S DQ=11 ;@2
|
---|
| 75 | 11 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=11 D X11 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
|
---|
| 76 | X11 D ^DVBHS3 S Y="@5"
|
---|
| 77 | Q
|
---|
| 78 | 12 S DQ=13 ;@3
|
---|
| 79 | 13 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=13 D X13 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
|
---|
| 80 | X13 D ^DVBHS4 S Y="@5"
|
---|
| 81 | Q
|
---|
| 82 | 14 S DQ=15 ;@1006
|
---|
| 83 | 15 S DQ=16 ;@30
|
---|
| 84 | 16 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=16 D X16 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
|
---|
| 85 | X16 I Z2'[1 S Y="@32"
|
---|
| 86 | Q
|
---|
| 87 | 17 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=17 D X17 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
|
---|
| 88 | X17 S DVBSCR=1 D ^DVBHS4 W !,?34,DVBON,"[LAST]",DVBOFF X DVBLIT1
|
---|
| 89 | Q
|
---|
| 90 | 18 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
|
---|
| 91 | X18 S DVBJC=$S('$D(^DPT(DFN,.32)):"",1:$P(^(0),U,5))
|
---|
| 92 | Q
|
---|
| 93 | 19 S DW=".32;6",DV="RDX",DU="",DLB="L-EOD",DIFLD=.326
|
---|
| 94 | S DE(DW)="C19^DVBHCE",DE(DW,"INDEX")=1
|
---|
| 95 | G RE
|
---|
| 96 | C19 G C19S:$D(DE(19))[0 K DB
|
---|
| 97 | S X=DE(19),DIC=DIE
|
---|
| 98 | ;
|
---|
| 99 | S X=DE(19),DIC=DIE
|
---|
| 100 | D EVENT^IVMPLOG(DA)
|
---|
| 101 | S X=DE(19),DIC=DIE
|
---|
| 102 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
| 103 | C19S S X="" G:DG(DQ)=X C19F1 K DB
|
---|
| 104 | S X=DG(DQ),DIC=DIE
|
---|
| 105 | ;
|
---|
| 106 | S X=DG(DQ),DIC=DIE
|
---|
| 107 | D EVENT^IVMPLOG(DA)
|
---|
| 108 | S X=DG(DQ),DIC=DIE
|
---|
| 109 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
| 110 | C19F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
| 111 | F DIXR=648 S DIEZRXR(2,DIXR)=""
|
---|
| 112 | Q
|
---|
| 113 | X19 S %DT="E",%DT(0)=-DT D ^%DT K %DT S X=Y K:Y<1 X I $D(X) S DFN=DA D SV^DGLOCK I $D(X) K:'$$VALMSE^DGRPMS(DFN,X,0,"MSL") X I $D(X) S DGFRDT=X I $D(^DG(43,1)) S SD1=1 D POS^DGINP
|
---|
| 114 | Q
|
---|
| 115 | ;
|
---|
| 116 | 20 D:$D(DG)>9 F^DIE17,DE S DQ=20,DW=".32;7",DV="RDX",DU="",DLB="L-RAD",DIFLD=.327
|
---|
| 117 | S DE(DW)="C20^DVBHCE",DE(DW,"INDEX")=1
|
---|
| 118 | G RE
|
---|
| 119 | C20 G C20S:$D(DE(20))[0 K DB
|
---|
| 120 | S X=DE(20),DIC=DIE
|
---|
| 121 | D EVENT^IVMPLOG(DA)
|
---|
| 122 | S X=DE(20),DIC=DIE
|
---|
| 123 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
| 124 | C20S S X="" G:DG(DQ)=X C20F1 K DB
|
---|
| 125 | S X=DG(DQ),DIC=DIE
|
---|
| 126 | D EVENT^IVMPLOG(DA)
|
---|
| 127 | S X=DG(DQ),DIC=DIE
|
---|
| 128 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
| 129 | C20F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
| 130 | F DIXR=303,648 S DIEZRXR(2,DIXR)=""
|
---|
| 131 | Q
|
---|
| 132 | X20 S %DT="E",%DT(0)=-DT D ^%DT K %DT S X=Y K:Y<1 X I $D(X) S DFN=DA D SV^DGLOCK I $D(X) K:'$$VALMSE^DGRPMS(DFN,X,1,"MSL") X I $D(X),$D(^DG(43,1)) S SD1=1 D PS^DGINP
|
---|
| 133 | Q
|
---|
| 134 | ;
|
---|
| 135 | 21 D:$D(DG)>9 F^DIE17,DE S DQ=21,DW=".32;5",DV="P23'X",DU="",DLB="L-Bran.. Ser.",DIFLD=.325
|
---|
| 136 | S DE(DW)="C21^DVBHCE",DE(DW,"INDEX")=1
|
---|
| 137 | S DU="DIC(23,"
|
---|
| 138 | G RE
|
---|
| 139 | C21 G C21S:$D(DE(21))[0 K DB
|
---|
| 140 | S X=DE(21),DIC=DIE
|
---|
| 141 | S A1B2TAG="PAT" D ^A1B2XFR
|
---|
| 142 | S X=DE(21),DIC=DIE
|
---|
| 143 | I $P($G(^DPT(DA,.321)),U,14)]"" D FVP^DGRPMS
|
---|
| 144 | S X=DE(21),DIC=DIE
|
---|
| 145 | D EVENT^IVMPLOG(DA)
|
---|
| 146 | S X=DE(21),DIC=DIE
|
---|
| 147 | X "S DGXRF=.325 D ^DGDDC Q"
|
---|
| 148 | C21S S X="" G:DG(DQ)=X C21F1 K DB
|
---|
| 149 | S X=DG(DQ),DIC=DIE
|
---|
| 150 | S A1B2TAG="PAT" D ^A1B2XFR
|
---|
| 151 | S X=DG(DQ),DIC=DIE
|
---|
| 152 | ;
|
---|
| 153 | S X=DG(DQ),DIC=DIE
|
---|
| 154 | D EVENT^IVMPLOG(DA)
|
---|
| 155 | S X=DG(DQ),DIC=DIE
|
---|
| 156 | ;
|
---|
| 157 | C21F1 N X,X1,X2 S DIXR=408 D C21X1(U) K X2 M X2=X D C21X1("O") K X1 M X1=X
|
---|
| 158 | D
|
---|
| 159 | . N DIEXARR M DIEXARR=X S DIEZCOND=1
|
---|
| 160 | . S X=X2(1)=""
|
---|
| 161 | . S DIEZCOND=$G(X) K X M X=DIEXARR Q:'DIEZCOND
|
---|
| 162 | . D DELMSE^DGRPMS(DA,1)
|
---|
| 163 | G C21F2
|
---|
| 164 | C21X1(DION) K X
|
---|
| 165 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,.325,DION),$P($G(^DPT(DA,.32)),U,5))
|
---|
| 166 | S X=$G(X(1))
|
---|
| 167 | Q
|
---|
| 168 | C21F2 Q
|
---|
| 169 | X21 S DFN=DA K:X=$O(^DIC(23,"B","B.E.C.","")) X I $D(X) D SV^DGLOCK S DGCOMBR=$G(Y) Q
|
---|
| 170 | Q
|
---|
| 171 | ;
|
---|
| 172 | 22 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=22 D X22 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
|
---|
| 173 | X22 I X'=DVBJC S DVBJ2=1
|
---|
| 174 | Q
|
---|
| 175 | 23 D:$D(DG)>9 F^DIE17,DE S DQ=23,DW=".32;4",DV="RP25'X",DU="",DLB="L-Char. Ser.",DIFLD=.324
|
---|
| 176 | S DE(DW)="C23^DVBHCE"
|
---|
| 177 | S DU="DIC(25,"
|
---|
| 178 | G RE
|
---|
| 179 | C23 G C23S:$D(DE(23))[0 K DB
|
---|
| 180 | S X=DE(23),DIC=DIE
|
---|
| 181 | D EVENT^IVMPLOG(DA)
|
---|
| 182 | C23S S X="" G:DG(DQ)=X C23F1 K DB
|
---|
| 183 | S X=DG(DQ),DIC=DIE
|
---|
| 184 | D EVENT^IVMPLOG(DA)
|
---|
| 185 | C23F1 Q
|
---|
| 186 | X23 S DFN=DA I $D(X) D SV^DGLOCK Q
|
---|
| 187 | Q
|
---|
| 188 | ;
|
---|
| 189 | 24 D:$D(DG)>9 F^DIE17,DE S DQ=24,DW=".32;8",DV="FX",DU="",DLB="L-Ser. Num.",DIFLD=.328
|
---|
| 190 | S DE(DW)="C24^DVBHCE"
|
---|
| 191 | G RE
|
---|
| 192 | C24 G C24S:$D(DE(24))[0 K DB
|
---|
[623] | 193 | D ^DVBHCE1
|
---|
[613] | 194 | C24S S X="" G:DG(DQ)=X C24F1 K DB
|
---|
[623] | 195 | D ^DVBHCE2
|
---|
[613] | 196 | C24F1 Q
|
---|
| 197 | X24 S DFN=DA D SV^DGLOCK I $D(X) S:X?1"SS".E L=$S($D(^DPT(DA,0)):$P(^(0),U,9),1:X) W:X?1"SS".E " ",L S:X?1"SS".E X=L K:$L(X)>15!($L(X)<1)!'(X?.N) X
|
---|
| 198 | I $D(X),X'?.ANP K X
|
---|
| 199 | Q
|
---|
| 200 | ;
|
---|
| 201 | 25 S DQ=26 ;@32
|
---|
| 202 | 26 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
|
---|
| 203 | X26 I Z2'[2 S Y="@31"
|
---|
| 204 | Q
|
---|
| 205 | 27 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=27 D X27 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
|
---|
| 206 | X27 I '$D(^DPT(D0,.32)) W !!,*7,?17,DVBON,"No Last episode can't edit NTLast <RET>",DVBOFF X DVBLIT1 R DVBZ:DTIME K DVBZ S Y="@33"
|
---|
| 207 | Q
|
---|
| 208 | 28 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=28 D X28 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
|
---|
| 209 | X28 I $P(^DPT(D0,.32),U,6)="" W !!,*7,?17,DVBON,"No last episode can't edit NTLast <RET>",DVBOFF X DVBLIT1 R DVBZ:DTIME K DVBZ S Y="@33"
|
---|
| 210 | Q
|
---|
| 211 | 29 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=29 D X29 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
|
---|
| 212 | X29 S DVBSCR=1 D ^DVBHS4 W !,?34,DVBON,"[NTLAST]",DVBOFF X DVBLIT1
|
---|
| 213 | Q
|
---|
[623] | 214 | 30 D:$D(DG)>9 F^DIE17 G ^DVBHCE3
|
---|