| 1 | IBXSC8H ; GENERATED FROM 'IB SCREEN8H' INPUT TEMPLATE(#515), FILE 399;04/08/05
|
---|
| 2 | D DE G BEGIN
|
---|
| 3 | DE S DIE="^DGCR(399,",DIC=DIE,DP=399,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DGCR(399,DA,""))=""
|
---|
| 4 | I $D(^("U")) S %Z=^("U") S %=$P(%Z,U,13) S:%]"" DE(14)=% S %=$P(%Z,U,16) S:%]"" DE(3)=% S %=$P(%Z,U,17) S:%]"" DE(4)=%
|
---|
| 5 | I $D(^("U2")) S %Z=^("U2") S %=$P(%Z,U,1) S:%]"" DE(7)=% S %=$P(%Z,U,8) S:%]"" DE(16)=% S %=$P(%Z,U,9) S:%]"" DE(18)=% S %=$P(%Z,U,10) S:%]"" DE(24)=%
|
---|
| 6 | I $D(^("UF3")) S %Z=^("UF3") S %=$P(%Z,U,4) S:%]"" DE(8)=% S %=$P(%Z,U,5) S:%]"" DE(10)=% S %=$P(%Z,U,6) S:%]"" DE(12)=%
|
---|
| 7 | K %Z Q
|
---|
| 8 | ;
|
---|
| 9 | W W !?DL+DL-2,DLB_": "
|
---|
| 10 | Q
|
---|
| 11 | O 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
|
---|
| 14 | TR R X:DTIME E S (DTOUT,X)=U W $C(7)
|
---|
| 15 | Q
|
---|
| 16 | A K DQ(DQ) S DQ=DQ+1
|
---|
| 17 | B G @DQ
|
---|
| 18 | RE G PR:$D(DE(DQ)) D W,TR
|
---|
| 19 | N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
|
---|
| 20 | RD 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
|
---|
| 23 | 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
|
---|
| 24 | K DDER G X
|
---|
| 25 | 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
|
---|
| 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
|
---|
| 28 | V D @("X"_DQ) K YS
|
---|
| 29 | 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
|
---|
| 30 | X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
|
---|
| 31 | S X="?BAD"
|
---|
| 32 | QS S DZ=X D D,QQ^DIEQ G B
|
---|
| 33 | D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
|
---|
| 34 | Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
|
---|
| 35 | PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
|
---|
| 36 | 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
|
---|
| 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=%
|
---|
| 39 | RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
|
---|
| 40 | I I DV'["I",DV'["#" G RD
|
---|
| 41 | D E^DIE0 G RD:$D(X),PR
|
---|
| 42 | Q
|
---|
| 43 | SET 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
|
---|
| 47 | SAVEVALS 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
|
---|
| 51 | NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
|
---|
| 52 | KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
|
---|
| 53 | BEGIN S DNM="IBXSC8H",DQ=1
|
---|
| 54 | N DIEZTMP,DIEZAR,DIEZRXR,DIIENS,DIXR K DIEFIRE,DIEBADK S DIEZTMP=$$GETTMP^DIKC1("DIEZ")
|
---|
| 55 | M DIEZAR=^DIE(515,"AR") S DICRREC="TRIG^DIE17"
|
---|
| 56 | S:$D(DTIME)[0 DTIME=300 S D0=DA,DIIENS=DA_",",DIEZ=515,U="^"
|
---|
| 57 | 1 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=1 D X1 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
|
---|
| 58 | X1 K DIPA S DIPA("I1")=$D(^DGCR(399,DA,"I1")),DIPA("I2")=$D(^("I2")),DIPA("I3")=$D(^("I3"))
|
---|
| 59 | Q
|
---|
| 60 | 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
|
---|
| 61 | X2 S:IBDR20'["81" Y="@82"
|
---|
| 62 | Q
|
---|
| 63 | 3 S DW="U;16",DV="D",DU="",DLB="UNABLE TO WORK FROM",DIFLD=166
|
---|
| 64 | G RE
|
---|
| 65 | X3 S %DT="EX" D ^%DT S X=Y K:Y<1 X
|
---|
| 66 | Q
|
---|
| 67 | ;
|
---|
| 68 | 4 S DW="U;17",DV="D",DU="",DLB="UNABLE TO WORK TO",DIFLD=167
|
---|
| 69 | G RE
|
---|
| 70 | X4 S %DT="EX" D ^%DT S X=Y K:Y<1 X
|
---|
| 71 | Q
|
---|
| 72 | ;
|
---|
| 73 | 5 S DQ=6 ;@82
|
---|
| 74 | 6 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=6 D X6 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
|
---|
| 75 | X6 S:IBDR20'["82" Y="@83"
|
---|
| 76 | Q
|
---|
| 77 | 7 S DW="U2;1",DV="*P80'",DU="",DLB="ADMITTING DIAGNOSIS",DIFLD=215
|
---|
| 78 | S DU="ICD9("
|
---|
| 79 | G RE
|
---|
| 80 | X7 S ICDVDT=$$BDATE^IBACSV(+$G(DA)),DIC("S")="I $$ICD9ACT^IBACSV(+Y,ICDVDT)",DIC("W")="D EN^DDIOL("" ""_$P($$ICD9^IBACSV(+Y,ICDVDT),U,3),,""?0"")" D ^DIC K DIC S DIC=$G(DIE),X=+Y K:Y<0 X
|
---|
| 81 | Q
|
---|
| 82 | ;
|
---|
| 83 | 8 S DW="UF3;4",DV="F",DU="",DLB="PRIMARY INSURANCE ICN/DCN",DIFLD=453
|
---|
| 84 | G RE
|
---|
| 85 | X8 K:$L(X)>23!($L(X)<3) X
|
---|
| 86 | I $D(X),X'?.ANP K X
|
---|
| 87 | Q
|
---|
| 88 | ;
|
---|
| 89 | 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
|
---|
| 90 | X9 S:'DIPA("I2") Y="@825"
|
---|
| 91 | Q
|
---|
| 92 | 10 S DW="UF3;5",DV="F",DU="",DLB="SECONDARY INSURANCE ICN/DCN",DIFLD=454
|
---|
| 93 | G RE
|
---|
| 94 | X10 K:$L(X)>23!($L(X)<3) X
|
---|
| 95 | I $D(X),X'?.ANP K X
|
---|
| 96 | Q
|
---|
| 97 | ;
|
---|
| 98 | 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
|
---|
| 99 | X11 S:'DIPA("I3") Y="@825"
|
---|
| 100 | Q
|
---|
| 101 | 12 S DW="UF3;6",DV="F",DU="",DLB="FORM LOCATOR 37C",DIFLD=455
|
---|
| 102 | G RE
|
---|
| 103 | X12 K:$L(X)>23!($L(X)<3) X
|
---|
| 104 | I $D(X),X'?.ANP K X
|
---|
| 105 | Q
|
---|
| 106 | ;
|
---|
| 107 | 13 S DQ=14 ;@825
|
---|
| 108 | 14 S DW="U;13",DV="FX",DU="",DLB="PRIMARY AUTHORIZATION CODE",DIFLD=163
|
---|
| 109 | G RE
|
---|
| 110 | X14 K:$L(X)>18!($L(X)<1) X
|
---|
| 111 | I $D(X),X'?.ANP K X
|
---|
| 112 | Q
|
---|
| 113 | ;
|
---|
| 114 | 15 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
|
---|
| 115 | X15 S:'DIPA("I2") Y="@83"
|
---|
| 116 | Q
|
---|
| 117 | 16 S DW="U2;8",DV="FX",DU="",DLB="SECONDARY AUTHORIZATION CODE",DIFLD=230
|
---|
| 118 | G RE
|
---|
| 119 | X16 K:$L(X)>18!($L(X)<1) X
|
---|
| 120 | I $D(X),X'?.ANP K X
|
---|
| 121 | Q
|
---|
| 122 | ;
|
---|
| 123 | 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
|
---|
| 124 | X17 S:'DIPA("I3") Y="@83"
|
---|
| 125 | Q
|
---|
| 126 | 18 S DW="U2;9",DV="F",DU="",DLB="TERTIARY AUTHORIZATION CODE",DIFLD=231
|
---|
| 127 | G RE
|
---|
| 128 | X18 K:$L(X)>18!($L(X)<1) X
|
---|
| 129 | I $D(X),X'?.ANP K X
|
---|
| 130 | Q
|
---|
| 131 | ;
|
---|
| 132 | 19 S DQ=20 ;@83
|
---|
| 133 | 20 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
|
---|
| 134 | X20 S:IBDR20'["83" Y="@84"
|
---|
| 135 | Q
|
---|
| 136 | 21 S D=0 K DE(1) ;222
|
---|
| 137 | S DIFLD=222,DGO="^IBXSC8H1",DC="17^399.0222ISA^PRV^",DV="399.0222MR*S",DW="0;1",DOW="FUNCTION",DLB="Select "_DOW S:D DC=DC_D
|
---|
| 138 | S DU="1:REFERRING;2:OPERATING;3:RENDERING;4:ATTENDING;5:SUPERVISING;9:OTHER;"
|
---|
| 139 | G RE:D I $D(DSC(399.0222))#2,$P(DSC(399.0222),"I $D(^UTILITY(",1)="" X DSC(399.0222) S D=$O(^(0)) S:D="" D=-1 G M21
|
---|
| 140 | S D=$S($D(^DGCR(399,DA,"PRV",0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
|
---|
| 141 | M21 I D>0 S DC=DC_D I $D(^DGCR(399,DA,"PRV",+D,0)) S DE(21)=$P(^(0),U,1)
|
---|
| 142 | G RE
|
---|
| 143 | R21 D DE
|
---|
| 144 | S D=$S($D(^DGCR(399,DA,"PRV",0)):$P(^(0),U,3,4),1:1) G 21+1
|
---|
| 145 | ;
|
---|
| 146 | 22 S DQ=23 ;@84
|
---|
| 147 | 23 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=23 D X23 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
|
---|
| 148 | X23 S:IBDR20'["84" Y="@85"
|
---|
| 149 | Q
|
---|
| 150 | 24 S DW="U2;10",DV="*P355.93X",DU="",DLB="NON-VA FACILITY",DIFLD=232
|
---|
| 151 | S DE(DW)="C24^IBXSC8H"
|
---|
| 152 | S DU="IBA(355.93,"
|
---|
| 153 | G RE
|
---|
| 154 | C24 G C24S:$D(DE(24))[0 K DB
|
---|
| 155 | S X=DE(24),DIC=DIE
|
---|
| 156 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X="" X ^DD(399,232,1,1,2.4)
|
---|
| 157 | S X=DE(24),DIC=DIE
|
---|
| 158 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X="" X ^DD(399,232,1,2,2.4)
|
---|
| 159 | C24S S X="" G:DG(DQ)=X C24F1 K DB
|
---|
| 160 | S X=DG(DQ),DIC=DIE
|
---|
| 161 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y X ^DD(399,232,1,1,1.1) X ^DD(399,232,1,1,1.4)
|
---|
| 162 | S X=DG(DQ),DIC=DIE
|
---|
| 163 | ;
|
---|
| 164 | C24F1 Q
|
---|
| 165 | X24 S DIC("S")="I $P(^(0),U,2)=1,$P(^(0),U)'["",""" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
|
---|
| 166 | Q
|
---|
| 167 | ;
|
---|
| 168 | 25 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=25 D X25 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
|
---|
| 169 | X25 S DIPA("NVA_FC")=X S:X="" Y="@842"
|
---|
| 170 | Q
|
---|
| 171 | 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
|
---|
| 172 | X26 S DIPA("NVA_FC-0")=$G(^IBA(355.93,+DIPA("NVA_FC"),0)) S:$P(DIPA("NVA_FC-0"),U,5)'=""&($P(DIPA("NVA_FC-0"),U,6)'="")&($P(DIPA("NVA_FC-0"),U,7)'="") Y="@841"
|
---|
| 173 | Q
|
---|
| 174 | 27 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=27 S I(0,0)=D0 S Y(1)=$S($D(^DGCR(399,D0,"U2")):^("U2"),1:"") S X=$P(Y(1),U,10),X=X S D(0)=+X S X=$S(D(0)>0:D(0),1:"")
|
---|
| 175 | S DGO="^IBXSC8H2",DC="^355.93^IBA(355.93," G DIEZ^DIE0
|
---|
| 176 | R27 D DE G A
|
---|
| 177 | ;
|
---|
| 178 | 28 S DQ=29 ;@841
|
---|
| 179 | 29 D:$D(DG)>9 F^DIE17 G ^IBXSC8H3
|
---|