- ABPAPDB ; GENERATED FROM 'ABPAPDB' PRINT TEMPLATE (#747) ; 08/29/91 ; (FILE 9002270.02, MARGIN=80)
- G BEGIN
- N W !
- T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
- Q
- DT I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
- W Y Q
- M D @DIXX
- Q
- BEGIN ;
- S:'$D(DN) DN=1
- W ?0 S X=DT S X=X S:X X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3) K DIP K:DN Y W X
- S X="AO PRIVATE INSURANCE SYSTEM",X=$J("",$S($D(DIWR)+$D(DIWL)=2:DIWR-DIWL+1,$D(IOM):IOM,1:80)-$L(X)\2-$X)_X K DIP K:DN Y W X
- D N:$X>71 Q:'DN W ?71 W "Page:"
- D N:$X>77 Q:'DN W ?77 S X=$S($D(DC)#2:DC,1:"") K DIP K:DN Y W $E(X,1,2)
- D N:$X>0 Q:'DN W ?0 S X="*** CLAIM/PAYMENTS SCREEN ***",X=$J("",$S($D(DIWR)+$D(DIWL)=2:DIWR-DIWL+1,$D(IOM):IOM,1:80)-$L(X)\2-$X)_X K DIP K:DN Y W X
- D N:$X>0 Q:'DN W ?0 W "==============================================================================="
- D N:$X>0 Q:'DN W ?0 W "Patient:"
- D N:$X>9 Q:'DN W ?9 S DIP(1)=$S($D(^ABPVAO(D0,0)):^(0),1:"") S X=$P(DIP(1),U,1)_" ("_$P(DIP(1),U,3)_")" K DIP K:DN Y W X
- D N:$X>51 Q:'DN W ?51 W "Facility:"
- S X=$S($D(^ABPVAO(D0,0)):^(0),1:"") D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^AUTTLOC(Y,0))#2:$P(^(0),U,1),1:Y) S Y=$S(Y="":Y,$D(^DIC(4,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,18)
- D N:$X>0 Q:'DN W ?0 W "-------------------------------------------------------------------------------"
- K Y
- Q
- HEAD ;
- W !,"--------------------------------------------------------------------------------",!!
- ABPAPDB ; GENERATED FROM 'ABPAPDB' PRINT TEMPLATE (#747) ; 08/29/91 ; (FILE 9002270.02, MARGIN=80)
- +1 GOTO BEGIN
- N WRITE !
- T IF $X
- WRITE !
- IF '$DATA(DIOT(2))
- IF DN
- IF $DATA(IOSL)
- IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
- IF $DATA(^UTILITY($JOB,1))#2
- IF ^(1)?1U1P1E.E
- XECUTE ^(1)
- +1 QUIT
- DT IF Y
- WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
- IF Y#100
- WRITE $JUSTIFY(Y#100\1,2)_","
- WRITE Y\10000+1700
- IF Y#1
- WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
- QUIT
- +1 WRITE Y
- QUIT
- M DO @DIXX
- +1 QUIT
- BEGIN ;
- +1 IF '$DATA(DN)
- SET DN=1
- +2 WRITE ?0
- SET X=DT
- SET X=X
- IF X
- SET X=$EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
- KILL DIP
- IF DN
- KILL Y
- WRITE X
- +3 SET X="AO PRIVATE INSURANCE SYSTEM"
- SET X=$JUSTIFY("",$SELECT($DATA(DIWR)+$DATA(DIWL)=2:DIWR-DIWL+1,$DATA(IOM):IOM,1:80)-$LENGTH(X)\2-$X)_X
- KILL DIP
- IF DN
- KILL Y
- WRITE X
- +4 IF $X>71
- DO N
- IF 'DN
- QUIT
- WRITE ?71
- WRITE "Page:"
- +5 IF $X>77
- DO N
- IF 'DN
- QUIT
- WRITE ?77
- SET X=$SELECT($DATA(DC)#2:DC,1:"")
- KILL DIP
- IF DN
- KILL Y
- WRITE $EXTRACT(X,1,2)
- +6 IF $X>0
- DO N
- IF 'DN
- QUIT
- WRITE ?0
- SET X="*** CLAIM/PAYMENTS SCREEN ***"
- SET X=$JUSTIFY("",$SELECT($DATA(DIWR)+$DATA(DIWL)=2:DIWR-DIWL+1,$DATA(IOM):IOM,1:80)-$LENGTH(X)\2-$X)_X
- KILL DIP
- IF DN
- KILL Y
- WRITE X
- +7 IF $X>0
- DO N
- IF 'DN
- QUIT
- WRITE ?0
- WRITE "==============================================================================="
- +8 IF $X>0
- DO N
- IF 'DN
- QUIT
- WRITE ?0
- WRITE "Patient:"
- +9 IF $X>9
- DO N
- IF 'DN
- QUIT
- WRITE ?9
- SET DIP(1)=$SELECT($DATA(^ABPVAO(D0,0)):^(0),1:"")
- SET X=$PIECE(DIP(1),U,1)_" ("_$PIECE(DIP(1),U,3)_")"
- KILL DIP
- IF DN
- KILL Y
- WRITE X
- +10 IF $X>51
- DO N
- IF 'DN
- QUIT
- WRITE ?51
- WRITE "Facility:"
- +11 SET X=$SELECT($DATA(^ABPVAO(D0,0)):^(0),1:"")
- IF $X>61
- DO N
- IF 'DN
- QUIT
- WRITE ?61
- SET Y=$PIECE(X,U,2)
- SET Y=$SELECT(Y="":Y,$DATA(^AUTTLOC(Y,0))#2:$PIECE(^(0),U,1),1:Y)
- SET Y=$SELECT(Y="":Y,$DATA(^DIC(4,Y,0))#2:$PIECE(^(0),U,1),1:Y)
- WRITE $EXTRACT(Y,1,18)
- +12 IF $X>0
- DO N
- IF 'DN
- QUIT
- WRITE ?0
- WRITE "-------------------------------------------------------------------------------"
- +13 KILL Y
- +14 QUIT
- HEAD ;
- +1 WRITE !,"--------------------------------------------------------------------------------",!!