BARRAGED ; IHS/SD/LSL - AGE OPEN ITEMS RPT JAN 16,1997 ;
;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
;
; ITSC/SD/LSL - 10/18/2002 - V1.7 - NOIS LWI-1002-160087
; Include credit balances
;
; ********************************************************************
START ;EP-Aging reports
;
S BARQUIT=0
W !!
S BAR("SITE")=$P(^DIC(4,DUZ(2),0),"^",1)
S DIR(0)="S^1:0-30;2:31-60;3:61-90;4:91-120;5:120+"
D ^DIR
G:Y<0!($D(DUOUT))!($D(DTOUT)) END
S BAR("SELECTION")=Y(0)
S BARAGE=$S(Y=1:"7.3",Y=2:"7.4",Y=3:"7.5",Y=4:"7.6",Y=5:"7.7")
D INS
Q:BARQUIT
D AGE
D PRINT
;
END ;
Q
; *********************************************************************
;
PRINT ;Print
;
S DIS(0)="S BARX=$$GET1^DIQ(90050.01,D0,BARAGE) I $FN(BARX,""-"")>0"
S DIC="90050.01"
S L=0
S DIOEND="I $E(IOST)=""C"" S DIR(0)=""E"" D ^DIR"
D EN1^DIP
D ^%ZISC,HOME^%ZIS
Q
; *********************************************************************
;
AGE ;Age
S DHD="[BAR AGED HDR]"
I $G(FR)="" S FR="@,@",BAR("CNAME")="ALL"
I $G(TO)="" S TO="zzzz,zzzz"
S FLDS="101;L25;N,.01;L19;105;L11,NUMDATE4(#102);L10,&"_BARAGE ;Y2000
Q
; *********************************************************************
;
INS ;**Single Insurer print
S BY="+3;S1,@101"
K DIC
S DIC("A")="Select Insurer or press <RETURN> for all Insurers: "
S DIC="90050.02"
S DIC(0)="AEMQZ"
S DIC("S")="I $P(^(0),U)[""AUT"",$P(^(0),U,10)=$$VALI^XBDIQ1(200,DUZ,29)"
K DD,DO
D ^DIC
I X["^" S BARQUIT=1
Q:Y<0
S BAR("CNAME")=Y(0,0)
S FR=BAR("CNAME")_","
S TO=BAR("CNAME")_","
Q
BARRAGED ; IHS/SD/LSL - AGE OPEN ITEMS RPT JAN 16,1997 ;
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;;OCT 26, 2005
+2 ;
+3 ; ITSC/SD/LSL - 10/18/2002 - V1.7 - NOIS LWI-1002-160087
+4 ; Include credit balances
+5 ;
+6 ; ********************************************************************
START ;EP-Aging reports
+1 ;
+2 SET BARQUIT=0
+3 WRITE !!
+4 SET BAR("SITE")=$PIECE(^DIC(4,DUZ(2),0),"^",1)
+5 SET DIR(0)="S^1:0-30;2:31-60;3:61-90;4:91-120;5:120+"
+6 DO ^DIR
+7 IF Y<0!($DATA(DUOUT))!($DATA(DTOUT))
GOTO END
+8 SET BAR("SELECTION")=Y(0)
+9 SET BARAGE=$SELECT(Y=1:"7.3",Y=2:"7.4",Y=3:"7.5",Y=4:"7.6",Y=5:"7.7")
+10 DO INS
+11 IF BARQUIT
QUIT
+12 DO AGE
+13 DO PRINT
+14 ;
END ;
+1 QUIT
+2 ; *********************************************************************
+3 ;
PRINT ;Print
+1 ;
+2 SET DIS(0)="S BARX=$$GET1^DIQ(90050.01,D0,BARAGE) I $FN(BARX,""-"")>0"
+3 SET DIC="90050.01"
+4 SET L=0
+5 SET DIOEND="I $E(IOST)=""C"" S DIR(0)=""E"" D ^DIR"
+6 DO EN1^DIP
+7 DO ^%ZISC
DO HOME^%ZIS
+8 QUIT
+9 ; *********************************************************************
+10 ;
AGE ;Age
+1 SET DHD="[BAR AGED HDR]"
+2 IF $GET(FR)=""
SET FR="@,@"
SET BAR("CNAME")="ALL"
+3 IF $GET(TO)=""
SET TO="zzzz,zzzz"
+4 ;Y2000
SET FLDS="101;L25;N,.01;L19;105;L11,NUMDATE4(#102);L10,&"_BARAGE
+5 QUIT
+6 ; *********************************************************************
+7 ;
INS ;**Single Insurer print
+1 SET BY="+3;S1,@101"
+2 KILL DIC
+3 SET DIC("A")="Select Insurer or press <RETURN> for all Insurers: "
+4 SET DIC="90050.02"
+5 SET DIC(0)="AEMQZ"
+6 SET DIC("S")="I $P(^(0),U)[""AUT"",$P(^(0),U,10)=$$VALI^XBDIQ1(200,DUZ,29)"
+7 KILL DD,DO
+8 DO ^DIC
+9 IF X["^"
SET BARQUIT=1
+10 IF Y<0
QUIT
+11 SET BAR("CNAME")=Y(0,0)
+12 SET FR=BAR("CNAME")_","
+13 SET TO=BAR("CNAME")_","
+14 QUIT