- BPSPRRX2 ;ALB/SS - ePharmacy secondary billing ;16-DEC-08
- ;;1.0;E CLAIMS MGMT ENGINE;**8,11**;JUN 2004;Build 27
- ;;Per VHA Directive 2004-038, this routine should not be modified.
- ;
- ;
- DISPBILL(BPSPAYSQ,BPSINS,BPSBILL,BPSSTAT,BPSRXIEN,BPSREF,BPSDOS,BPDISTTL) ;
- ;Display list of bills
- ;Input:
- ; BPSPAYSQ-CURRENT BILL PAYER SEQUENCE as text
- ; BPSINS-INSURANCE name
- ; BPSBILL-BILL NUMBER to display "Bill #"
- ; BPSSTAT-A/R bill status
- ; BPSRXIEN-Prescription (#52) file IEN
- ; BPSREF-Fill Number
- ; BPSDOS-Date of Service
- ; BPDISTTL (optional)- 1= display title and lines
- N BPSSTR
- S BPSSTR=BPSPAYSQ_": "_BPSINS
- I $G(BPDISTTL) W !,?2,"Payer Responsible",?34,"Bill #",?44,"Status" W:$G(BPSDOS) ?55,"Date"
- I $G(BPDISTTL) W !,?2,"------------------------------",?34,"--------",?44,"------" W:$G(BPSDOS) ?55,"----------"
- W !,?2,$E(BPSSTR,1,30),?34,BPSBILL,?44,BPSSTAT
- W:$G(BPSDOS) ?55,$G(BPSDOS)
- Q
- ;
- RATETYPE(BPSDEFRT) ;
- ;Prompt for the rate type
- ;Input:
- ; BPSDEFRT (optional) - default rate type
- ;Return Value:
- ; -1 - User exited
- ; "" - Unsuccessful lookup
- ; Rate Type Name (#.01) selected by the user
- N X,Y,DUOUT,DTOUT,BPQUIT
- S BPQUIT=0
- N DIC
- S DIC="^DGCR(399.3,"
- S DIC(0)="AEMNQ"
- S DIC("A")="SELECT RATE TYPE: "
- I $G(BPSDEFRT)>0 S DIC("B")=BPSDEFRT
- D ^DIC
- I (X="^")!$D(DUOUT)!$D(DTOUT) S BPQUIT=1
- I BPQUIT=1 Q -1
- I Y=-1,X="" Q ""
- Q $P(Y,U)
- ;
- SUBMCLM(RX,FILL,DOS,BWHERE,PAYSEQ,PLAN,COBDATA,RTYPE) ;
- ;Submit claim and create activity log entry in the Prescription file
- ;Input:
- ; RX (r) = Prescription IEN
- ; FILL (r) = Fill Number
- ; DOS (o) = Date of Service
- ; BWHERE (r) = RX action
- ; PAYSEQ (r) = Payer sequence for the claim: 1-primary, 2-secondary
- ; PLAN (o) = IEN of the entry in the GROUP INSURANCE PLAN file (#355.3)
- ; COBDATA (o) = Local array passed by reference. Contains data needed to submit a secondary claim (used by secondary only)
- ; RTYPE (o) = IEN of the Rate Type file (#399.3)
- ;Output:
- ; Submission result, either "" for invalid parameter or the return value from
- ; EN^BPSNCPDP - RESPONSE^MESSAGE^ELIGIBILITY^CLAIM STATUS
- ;
- N BPSRET
- I '$G(RX) Q ""
- I $G(FILL)="" Q ""
- I $G(BWHERE)="" Q ""
- I '$G(PAYSEQ) Q ""
- S BPSRET=$$EN^BPSNCPDP(RX,FILL,$G(DOS),BWHERE,"","","","","","",PAYSEQ,"F","","",$G(PLAN),.COBDATA,$G(RTYPE))
- D ECMEACT^PSOBPSU1(RX,FILL,"Claim submitted to third party payer: ECME P2 Bill")
- Q BPSRET
- ;
- MORE4SEC(BPSMORE,BPSECNDR) ;
- ; Add COB elements to the MOREDATA array
- ; Called by BPSNCPD4 and BPSNCPD5
- M BPSMORE=BPSECNDR
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HBPSPRRX2 2611 printed Jan 18, 2025@02:53:35 Page 2
- BPSPRRX2 ;ALB/SS - ePharmacy secondary billing ;16-DEC-08
- +1 ;;1.0;E CLAIMS MGMT ENGINE;**8,11**;JUN 2004;Build 27
- +2 ;;Per VHA Directive 2004-038, this routine should not be modified.
- +3 ;
- +4 ;
- DISPBILL(BPSPAYSQ,BPSINS,BPSBILL,BPSSTAT,BPSRXIEN,BPSREF,BPSDOS,BPDISTTL) ;
- +1 ;Display list of bills
- +2 ;Input:
- +3 ; BPSPAYSQ-CURRENT BILL PAYER SEQUENCE as text
- +4 ; BPSINS-INSURANCE name
- +5 ; BPSBILL-BILL NUMBER to display "Bill #"
- +6 ; BPSSTAT-A/R bill status
- +7 ; BPSRXIEN-Prescription (#52) file IEN
- +8 ; BPSREF-Fill Number
- +9 ; BPSDOS-Date of Service
- +10 ; BPDISTTL (optional)- 1= display title and lines
- +11 NEW BPSSTR
- +12 SET BPSSTR=BPSPAYSQ_": "_BPSINS
- +13 IF $GET(BPDISTTL)
- WRITE !,?2,"Payer Responsible",?34,"Bill #",?44,"Status"
- if $GET(BPSDOS)
- WRITE ?55,"Date"
- +14 IF $GET(BPDISTTL)
- WRITE !,?2,"------------------------------",?34,"--------",?44,"------"
- if $GET(BPSDOS)
- WRITE ?55,"----------"
- +15 WRITE !,?2,$EXTRACT(BPSSTR,1,30),?34,BPSBILL,?44,BPSSTAT
- +16 if $GET(BPSDOS)
- WRITE ?55,$GET(BPSDOS)
- +17 QUIT
- +18 ;
- RATETYPE(BPSDEFRT) ;
- +1 ;Prompt for the rate type
- +2 ;Input:
- +3 ; BPSDEFRT (optional) - default rate type
- +4 ;Return Value:
- +5 ; -1 - User exited
- +6 ; "" - Unsuccessful lookup
- +7 ; Rate Type Name (#.01) selected by the user
- +8 NEW X,Y,DUOUT,DTOUT,BPQUIT
- +9 SET BPQUIT=0
- +10 NEW DIC
- +11 SET DIC="^DGCR(399.3,"
- +12 SET DIC(0)="AEMNQ"
- +13 SET DIC("A")="SELECT RATE TYPE: "
- +14 IF $GET(BPSDEFRT)>0
- SET DIC("B")=BPSDEFRT
- +15 DO ^DIC
- +16 IF (X="^")!$DATA(DUOUT)!$DATA(DTOUT)
- SET BPQUIT=1
- +17 IF BPQUIT=1
- QUIT -1
- +18 IF Y=-1
- IF X=""
- QUIT ""
- +19 QUIT $PIECE(Y,U)
- +20 ;
- SUBMCLM(RX,FILL,DOS,BWHERE,PAYSEQ,PLAN,COBDATA,RTYPE) ;
- +1 ;Submit claim and create activity log entry in the Prescription file
- +2 ;Input:
- +3 ; RX (r) = Prescription IEN
- +4 ; FILL (r) = Fill Number
- +5 ; DOS (o) = Date of Service
- +6 ; BWHERE (r) = RX action
- +7 ; PAYSEQ (r) = Payer sequence for the claim: 1-primary, 2-secondary
- +8 ; PLAN (o) = IEN of the entry in the GROUP INSURANCE PLAN file (#355.3)
- +9 ; COBDATA (o) = Local array passed by reference. Contains data needed to submit a secondary claim (used by secondary only)
- +10 ; RTYPE (o) = IEN of the Rate Type file (#399.3)
- +11 ;Output:
- +12 ; Submission result, either "" for invalid parameter or the return value from
- +13 ; EN^BPSNCPDP - RESPONSE^MESSAGE^ELIGIBILITY^CLAIM STATUS
- +14 ;
- +15 NEW BPSRET
- +16 IF '$GET(RX)
- QUIT ""
- +17 IF $GET(FILL)=""
- QUIT ""
- +18 IF $GET(BWHERE)=""
- QUIT ""
- +19 IF '$GET(PAYSEQ)
- QUIT ""
- +20 SET BPSRET=$$EN^BPSNCPDP(RX,FILL,$GET(DOS),BWHERE,"","","","","","",PAYSEQ,"F","","",$GET(PLAN),.COBDATA,$GET(RTYPE))
- +21 DO ECMEACT^PSOBPSU1(RX,FILL,"Claim submitted to third party payer: ECME P2 Bill")
- +22 QUIT BPSRET
- +23 ;
- MORE4SEC(BPSMORE,BPSECNDR) ;
- +1 ; Add COB elements to the MOREDATA array
- +2 ; Called by BPSNCPD4 and BPSNCPD5
- +3 MERGE BPSMORE=BPSECNDR
- +4 QUIT
- +5 ;