BZDMCDER ;routine to print the medicaid stuff errors [ 04/17/2000 1:42 PM ]
D ^XBCLS
S P1=0,P2=0,LINE=0
U 0 W !!,"Medicaid Download Error Report"
R !!,"Enter Month_Year you want Error Report for (ex: 032000): ",MY
I (MY="")!(MY="^") Q
I MY'?6N W *7," ??" H 2 G BZDMCDER
D ^%ZIS
I '$D(^BZDMERST(MY)) U 0 W *7,!!,"NO ERRORS ON FILE FOR THAT MONTH.." H 2 G BZDMCDER
U 0 W !!,"....Please Hold...."
P1 ;
S BZD1=0
F S BZD1=$O(^BZDMERST(MY,BZD1)) Q:BZD1="" D
.S DFN=""
.F S DFN=$O(^BZDMERST(MY,BZD1,"INACT",DFN)) Q:DFN="" D
..I (LINE=0)!(LINE>58)!(P1=0) D HEAD1
..U IO W !,$P(^DPT(DFN,0),"^",1)
..S LINE=LINE+1
S LINE=0
S P2=0
P2 ;
S BZD2=0
F S BZD2=$O(^BZDMERST(MY,BZD2)) Q:BZD2="" D
.S DFN=0
.F S DFN=$O(^BZDMERST(MY,BZD2,2,DFN)) Q:+DFN=0 D
..I (LINE=0)!(LINE>58)!(P2=0) D HEAD2
..U IO W !,$P(^DPT(DFN,0),"^",1)
..S LINE=LINE+1
G END
HEAD1 ;
U IO
S P1=P1+1
W #
W ?5,"Medicaid Download Errors--Inactive HRN",?60,"PAGE: ",P1
W !,?5,"Download Month: ",$E(MY,1,2)_"-"_$E(MY,3,6),!
S LINE=3
Q
HEAD2 ;
U IO
S P2=P2+1
W #
W ?5,"Medicaid Download Errors",?60,"PAGE: ",P2
W !,?5,"Download Month: ",$E(MY,1,2)_"-"_$E(MY,3,6),!
S LINE=3
Q
END ;
K P1,P2,BZD1,BZD2,LINE,DFN,MY
D ^%ZISC
Q
BZDMCDER ;routine to print the medicaid stuff errors [ 04/17/2000 1:42 PM ]
+1 DO ^XBCLS
+2 SET P1=0
SET P2=0
SET LINE=0
+3 USE 0
WRITE !!,"Medicaid Download Error Report"
+4 READ !!,"Enter Month_Year you want Error Report for (ex: 032000): ",MY
+5 IF (MY="")!(MY="^")
QUIT
+6 IF MY'?6N
WRITE *7," ??"
HANG 2
GOTO BZDMCDER
+7 DO ^%ZIS
+8 IF '$DATA(^BZDMERST(MY))
USE 0
WRITE *7,!!,"NO ERRORS ON FILE FOR THAT MONTH.."
HANG 2
GOTO BZDMCDER
+9 USE 0
WRITE !!,"....Please Hold...."
P1 ;
+1 SET BZD1=0
+2 FOR
SET BZD1=$ORDER(^BZDMERST(MY,BZD1))
IF BZD1=""
QUIT
Begin DoDot:1
+3 SET DFN=""
+4 FOR
SET DFN=$ORDER(^BZDMERST(MY,BZD1,"INACT",DFN))
IF DFN=""
QUIT
Begin DoDot:2
+5 IF (LINE=0)!(LINE>58)!(P1=0)
DO HEAD1
+6 USE IO
WRITE !,$PIECE(^DPT(DFN,0),"^",1)
+7 SET LINE=LINE+1
End DoDot:2
End DoDot:1
+8 SET LINE=0
+9 SET P2=0
P2 ;
+1 SET BZD2=0
+2 FOR
SET BZD2=$ORDER(^BZDMERST(MY,BZD2))
IF BZD2=""
QUIT
Begin DoDot:1
+3 SET DFN=0
+4 FOR
SET DFN=$ORDER(^BZDMERST(MY,BZD2,2,DFN))
IF +DFN=0
QUIT
Begin DoDot:2
+5 IF (LINE=0)!(LINE>58)!(P2=0)
DO HEAD2
+6 USE IO
WRITE !,$PIECE(^DPT(DFN,0),"^",1)
+7 SET LINE=LINE+1
End DoDot:2
End DoDot:1
+8 GOTO END
HEAD1 ;
+1 USE IO
+2 SET P1=P1+1
+3 WRITE #
+4 WRITE ?5,"Medicaid Download Errors--Inactive HRN",?60,"PAGE: ",P1
+5 WRITE !,?5,"Download Month: ",$EXTRACT(MY,1,2)_"-"_$EXTRACT(MY,3,6),!
+6 SET LINE=3
+7 QUIT
HEAD2 ;
+1 USE IO
+2 SET P2=P2+1
+3 WRITE #
+4 WRITE ?5,"Medicaid Download Errors",?60,"PAGE: ",P2
+5 WRITE !,?5,"Download Month: ",$EXTRACT(MY,1,2)_"-"_$EXTRACT(MY,3,6),!
+6 SET LINE=3
+7 QUIT
END ;
+1 KILL P1,P2,BZD1,BZD2,LINE,DFN,MY
+2 DO ^%ZISC
+3 QUIT