ABSPOSMG ; IHS/SD/RLT - INSURER BILLING STATUS ; [ 06/13/06 11:20 AM ]
;;1.0;PHARMACY POINT OF SALE;**17**;JUN 7, 2006;Build 38
;
;Reports Insurers in file #9999999.18 that have RX
;BILLING STATUS set to P - BILLED POINT OF SALE or
;to U - UNBILLABLE depending on the report selected.
;The BILLED POINT OF SALE report also shows whether
;the insurer is tied to a POS format.
;----------------------------------------------------------
;----------------------------------------------------------
;
EN ;EP
N RESP
S RESP=$$GETRESP
Q:RESP=""
D DISDATA
Q
GETRESP() ;Prompt for report type
W @IOF
W "Choose from:"
W !,"P BILLED POINT OF SALE - insurers set-up to bill RX's through POS"
W !,"U UNBILLABLE - insurers set to NOT bill RX's"
D ^XBFMK ;kill Fileman variables
S DIR(0)="SO^P:BILLED POINT OF SALE;U:UNBILLABLE"
D ^DIR
Q $TR(X,"pu","PU")
DISDATA ;Display Data
N PGCNT
S PGCNT=0
D RPTHDR
N INSIEN,BILLSTAT,INSNAME,STATDIS,POSLINK
S:RESP="P" STATDIS="BILLED POINT OF SALE"
S:RESP="U" STATDIS="UNBILLABLE"
S INSNAME=""
F S INSNAME=$O(^AUTNINS("B",INSNAME)) Q:INSNAME="" D
. S INSIEN=0
. F S INSIEN=$O(^AUTNINS("B",INSNAME,INSIEN)) Q:'INSIEN D
.. S BILLSTAT=$P($G(^AUTNINS(INSIEN,2)),U,3)
.. Q:BILLSTAT'=RESP
.. S POSLINK="N"
.. S:$P($G(^ABSPEI(INSIEN,100)),U)'="" POSLINK="Y"
.. W !,INSNAME,?35,STATDIS
.. W:RESP="P" ?68,POSLINK
.. I $$EOPQ^ABSPOSU8(2,,"D RPTHDR^"_$T(+0)) S INSIEN="A",INSNAME="ZZZZZ"
D ENDRPT^ABSPOSU5()
Q
RPTHDR ;Report Header
N DASHES,X,RPTDATE,Y,BLANK20,ABSPSITE
S ABSPSITE=$P($G(^DIC(4,DUZ(2),0)),"^")
S PGCNT=PGCNT+1
S $P(DASHES,"-",80)=""
S X="RX BILLING STATUS - "
S:RESP="P" X=X_"BILLED POINT OF SALE"
S:RESP="U" X=X_"UNBILLABLE"
S RPTDATE=$P($$NOWEXT^ABSPOSU1,"@")
S $P(BLANK24," ",24)=""
S $P(BLANK17," ",17)=""
S Y="INSURER NAME"_BLANK24_"RX BILLING STATUS"
S:RESP="P" Y=Y_BLANK17_"LINK TO POS"
W @IOF
W X,?52,RPTDATE,?68,$$RJBF^ABSPOSU9("PAGE "_PGCNT,11)
W !,ABSPSITE
W !!,Y
W !,DASHES
Q
ABSPOSMG ; IHS/SD/RLT - INSURER BILLING STATUS ; [ 06/13/06 11:20 AM ]
+1 ;;1.0;PHARMACY POINT OF SALE;**17**;JUN 7, 2006;Build 38
+2 ;
+3 ;Reports Insurers in file #9999999.18 that have RX
+4 ;BILLING STATUS set to P - BILLED POINT OF SALE or
+5 ;to U - UNBILLABLE depending on the report selected.
+6 ;The BILLED POINT OF SALE report also shows whether
+7 ;the insurer is tied to a POS format.
+8 ;----------------------------------------------------------
+9 ;----------------------------------------------------------
+10 ;
EN ;EP
+1 NEW RESP
+2 SET RESP=$$GETRESP
+3 IF RESP=""
QUIT
+4 DO DISDATA
+5 QUIT
GETRESP() ;Prompt for report type
+1 WRITE @IOF
+2 WRITE "Choose from:"
+3 WRITE !,"P BILLED POINT OF SALE - insurers set-up to bill RX's through POS"
+4 WRITE !,"U UNBILLABLE - insurers set to NOT bill RX's"
+5 ;kill Fileman variables
DO ^XBFMK
+6 SET DIR(0)="SO^P:BILLED POINT OF SALE;U:UNBILLABLE"
+7 DO ^DIR
+8 QUIT $TRANSLATE(X,"pu","PU")
DISDATA ;Display Data
+1 NEW PGCNT
+2 SET PGCNT=0
+3 DO RPTHDR
+4 NEW INSIEN,BILLSTAT,INSNAME,STATDIS,POSLINK
+5 IF RESP="P"
SET STATDIS="BILLED POINT OF SALE"
+6 IF RESP="U"
SET STATDIS="UNBILLABLE"
+7 SET INSNAME=""
+8 FOR
SET INSNAME=$ORDER(^AUTNINS("B",INSNAME))
IF INSNAME=""
QUIT
Begin DoDot:1
+9 SET INSIEN=0
+10 FOR
SET INSIEN=$ORDER(^AUTNINS("B",INSNAME,INSIEN))
IF 'INSIEN
QUIT
Begin DoDot:2
+11 SET BILLSTAT=$PIECE($GET(^AUTNINS(INSIEN,2)),U,3)
+12 IF BILLSTAT'=RESP
QUIT
+13 SET POSLINK="N"
+14 IF $PIECE($GET(^ABSPEI(INSIEN,100)),U)'=""
SET POSLINK="Y"
+15 WRITE !,INSNAME,?35,STATDIS
+16 IF RESP="P"
WRITE ?68,POSLINK
+17 IF $$EOPQ^ABSPOSU8(2,,"D RPTHDR^"_$TEXT(+0))
SET INSIEN="A"
SET INSNAME="ZZZZZ"
End DoDot:2
End DoDot:1
+18 DO ENDRPT^ABSPOSU5()
+19 QUIT
RPTHDR ;Report Header
+1 NEW DASHES,X,RPTDATE,Y,BLANK20,ABSPSITE
+2 SET ABSPSITE=$PIECE($GET(^DIC(4,DUZ(2),0)),"^")
+3 SET PGCNT=PGCNT+1
+4 SET $PIECE(DASHES,"-",80)=""
+5 SET X="RX BILLING STATUS - "
+6 IF RESP="P"
SET X=X_"BILLED POINT OF SALE"
+7 IF RESP="U"
SET X=X_"UNBILLABLE"
+8 SET RPTDATE=$PIECE($$NOWEXT^ABSPOSU1,"@")
+9 SET $PIECE(BLANK24," ",24)=""
+10 SET $PIECE(BLANK17," ",17)=""
+11 SET Y="INSURER NAME"_BLANK24_"RX BILLING STATUS"
+12 IF RESP="P"
SET Y=Y_BLANK17_"LINK TO POS"
+13 WRITE @IOF
+14 WRITE X,?52,RPTDATE,?68,$$RJBF^ABSPOSU9("PAGE "_PGCNT,11)
+15 WRITE !,ABSPSITE
+16 WRITE !!,Y
+17 WRITE !,DASHES
+18 QUIT