Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BPSRPT4

BPSRPT4.m

Go to the documentation of this file.
  1. BPSRPT4 ;BHAM ISC/BEE - ECME REPORTS (CONT) ;14-FEB-05
  1. ;;1.0;E CLAIMS MGMT ENGINE;**1,5,7,8,10,11,19,23,24,28**;JUN 2004;Build 22
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. Q
  1. ;
  1. ; Include Rxs - (R)ELEASED or (N)OT RELEASED or (A)LL
  1. ;
  1. ; Input Variable -> DFLT = 3 NOT RELEASED
  1. ; 2 RELEASED
  1. ; 1 ALL
  1. ;
  1. ; Return Value -> 3 = NOT RELEASED
  1. ; 2 = RELEASED
  1. ; 1 = ALL
  1. ; ^ = Exit
  1. ;
  1. SELRLNRL(DFLT) N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. S DFLT=$S($G(DFLT)=1:"ALL",$G(DFLT)=3:"NOT RELEASED",1:"RELEASED")
  1. S DIR(0)="S^R:RELEASED;N:NOT RELEASED;A:ALL"
  1. S DIR("A")="Include Rxs - (R)ELEASED or (N)OT RELEASED or (A)LL",DIR("B")=DFLT
  1. D ^DIR
  1. ;
  1. ;Check for "^", timeout, or blank entry
  1. I ($G(DUOUT)=1)!($G(DTOUT)=1)!($G(X)="") S Y="^"
  1. ;
  1. S Y=$S(Y="A":1,Y="R":2,Y="N":3,1:Y)
  1. ;
  1. Q Y
  1. ;
  1. SELRC(DFLT) ;
  1. ;
  1. ; Display (S)pecific Reject Codes or (A)ll
  1. ;
  1. ; Input Variable -> DFLT = ALL
  1. ;
  1. ; Return Value -> 1 = Reject Codes
  1. ; 0 = ALL
  1. ; ^ = Exit
  1. ;
  1. N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. ;
  1. ;Select to include (S)pecific Reject Codes or (A)ll Reject Codes
  1. ;
  1. S DIR(0)="S^S:Specific Reject Code;A:ALL"
  1. S DIR("A")="Include (S)pecific Reject Code or (A)LL"
  1. S DIR("B")="A"
  1. S DIR("L",1)="Select one of the following:"
  1. S DIR("L",2)=""
  1. S DIR("L",3)=" S Specific Reject Code"
  1. S DIR("L",4)=" A ALL"
  1. D ^DIR
  1. I ($G(DUOUT)=1)!($G(DTOUT)=1) S Y="^"
  1. S Y=$S(Y="A":0,Y="S":1,1:Y)
  1. Q Y
  1. ;
  1. SELREJCD() ;
  1. ; Allow user to select a single or multiple REJECT CODEs.
  1. ;
  1. ; If the users selected one or more REJECT CODEs, the selection will be stored
  1. ; in BPARR("RC")separated by a comma. e.g. BPARR("RC")= ien1 , ien2
  1. ;
  1. BPSREJCD ;
  1. N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. N BPARR,BPSARRAY,BPSIEN
  1. ;
  1. S BPARR("RC")=""
  1. ;
  1. ; This tag prompts user to 'Select Reject Code' and validates it against file #9002313.93.
  1. D RCSEL(.BPSARRAY)
  1. ;
  1. ; If the user entered "^" quit, no longer prompting the user to 'Select Reject Code'
  1. I $G(BPSARRAY)="^" Q "^"
  1. ;
  1. ; If no Reject Code was selected, return the user to 'Include (S)pecific Reject Code or (A)LL'
  1. I $G(BPSARRAY)=0 Q 0
  1. ;
  1. M BPARR("RC")=BPSARRAY
  1. ;
  1. ; Creates a string of all the Reject Code ien's selected separated by a comma.
  1. S BPSIEN=""
  1. F S BPSIEN=$O(BPARR("RC",BPSIEN)) Q:BPSIEN="" I BPSIEN'="B" D
  1. . I BPARR("RC")'="" S BPARR("RC")=BPARR("RC")_","
  1. . S BPARR("RC")=BPARR("RC")_BPSIEN
  1. . Q
  1. ;
  1. Q BPARR("RC")
  1. ;
  1. ; Include Auto(R)eversed or (A)LL
  1. ;
  1. ; Input Variable -> DFLT = 1 AutoReversed
  1. ; 0 ALL
  1. ;
  1. ; Return Value -> 1 = AutoReversed
  1. ; 0 = ALL
  1. ; ^ = Exit
  1. ;
  1. SELAUREV(DFLT) N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. ;
  1. S DFLT=$S($G(DFLT)=1:"AutoReversed",1:"ALL")
  1. S DIR(0)="S^R:AutoReversed;A:ALL"
  1. S DIR("A")="Include Auto(R)eversed or (A)LL",DIR("B")=DFLT
  1. D ^DIR
  1. ;
  1. ;Check for "^", timeout, or blank entry
  1. I ($G(DUOUT)=1)!($G(DTOUT)=1)!($G(X)="") S Y="^"
  1. ;
  1. S Y=$S(Y="A":0,Y="R":1,1:Y)
  1. ;
  1. Q Y
  1. ;
  1. ; Include A(C)cepted or (R)ejected or (A)LL
  1. ;
  1. ; Input Variable -> DFLT = 2 Accepted
  1. ; 1 Rejected
  1. ; 0 ALL
  1. ;
  1. ; Return Value -> 2 = Accepted
  1. ; 1 = Rejected
  1. ; 0 = ALL
  1. ; ^ = Exit
  1. ;
  1. SELACREJ(DFLT) N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. ;
  1. S DFLT=$S($G(DFLT)=2:"Accepted",$G(DFLT)=1:"Rejected",1:"ALL")
  1. S DIR(0)="S^C:Accepted;R:Rejected;A:ALL"
  1. S DIR("A")="Include A(C)cepted or (R)ejected or (A)LL",DIR("B")=DFLT
  1. D ^DIR
  1. ;
  1. ;Check for "^", timeout, or blank entry
  1. I ($G(DUOUT)=1)!($G(DTOUT)=1)!($G(X)="") S Y="^"
  1. ;
  1. S Y=$S(Y="C":2,Y="R":1,Y="A":0,1:Y)
  1. ;
  1. Q Y
  1. ;
  1. SELCCR(DFLT) ;
  1. ;
  1. ; Display (S)pecific Close Claim Reason or (A)ll
  1. ;
  1. ; Input Variable -> DFLT = ALL
  1. ;
  1. ; Return Value -> 1 = Close Claim Reasons
  1. ; 0 = ALL
  1. ; ^ = Exit
  1. ;
  1. N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. ;
  1. ;Select to include (S)pecific Close Claim Reason or (A)ll Close Claim Reasons
  1. ;
  1. S DIR(0)="S^S:Specific Close Claim Reason;A:ALL"
  1. S DIR("A")="Include (S)pecific Close Claim Reason or (A)LL"
  1. S DIR("B")="A"
  1. D ^DIR
  1. I ($G(DUOUT)=1)!($G(DTOUT)=1) S Y="^"
  1. S Y=$S(Y="A":0,Y="S":1,1:Y)
  1. Q Y
  1. ;
  1. SELCCRSN(DFLT) ;
  1. ;
  1. ; Allow user to select a single or multiple CLOSE CLAIM REASON(s).
  1. ;
  1. ; If the users selected one or more CLOSE CLAIM REASONs, the selection will be stored
  1. ; in BPARR("CCR")separated by a comma. e.g. BPARR("CCR")= ien1 , ien2
  1. ; NOTE: the ien's are pointers to CLAIMS TRACKING NON-BILLABLE REASONS (#356.8)
  1. ;
  1. BPSCCR ;
  1. N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. N BPARR,BPSARRAY,BPSIEN
  1. ;
  1. S BPARR("CCR")=""
  1. ;
  1. ; The SEL tag prompts user to 'Select Close Claim Reason' and validates the selection
  1. ; against file #356.8 - CLAIMS TRACKING NON-BILLABLE REASONS.
  1. D CCRSEL("Close Claim Reason","^IBE(356.8,",.BPSARRAY)
  1. ;
  1. ; If the user entered "^" quit, no longer prompting the user to 'Select Close Claim Reason'
  1. I $G(BPSARRAY)="^" Q "^"
  1. ;
  1. ; If no Close Claim Reason was selected, return the user to 'Include (S)pecific Close Claim Reason or (A)LL'
  1. I $G(BPSARRAY)=0 Q 0
  1. ;
  1. M BPARR("CCR")=BPSARRAY
  1. ;
  1. ; Creates a string of all the Close Claim Reasons ien's selected separated by a comma.
  1. S BPSIEN=""
  1. F S BPSIEN=$O(BPARR("CCR",BPSIEN)) Q:BPSIEN="" I BPSIEN'="B" D
  1. . I BPARR("CCR")'="" S BPARR("CCR")=BPARR("CCR")_","
  1. . S BPARR("CCR")=BPARR("CCR")_BPSIEN
  1. . Q
  1. ;
  1. Q BPARR("CCR")
  1. ;
  1. RCSEL(BPSARRAY) ;
  1. ; Prompts user to select one or more Reject Codes
  1. ;
  1. N DIC,DTOUT,DUOUT,QT,Y,X
  1. N BPSCODE,BPSEXP
  1. ;
  1. S DIC="^BPSF(9002313.93,",DIC(0)="AEMNQ"
  1. S DIC("A")="Select Reject Code: "
  1. I $G(DEFAULT)'="" S DIC("B")=DEFAULT
  1. ;
  1. F D ^DIC Q:X="" D Q:$G(QT)
  1. . ; Check for "^" or timeout, if found set BPSARRAY="^" and quit.
  1. . I $D(DTOUT)!$D(DUOUT) K BPSARRAY S BPSARRAY="^",QT=1 Q
  1. . ;
  1. . ; If selection already exists in BPSARRAY, ask user if they
  1. . ; want to Delete the entry.
  1. . I $D(BPSARRAY(+Y)) D Q
  1. . . N P
  1. . . S P=Y ;Save Original Value
  1. . . S DIR(0)="S^Y:YES;N:NO"
  1. . . S DIR("A")="Delete "_$P(BPSARRAY("B",+P),U,1)_" "_$P(BPSARRAY("B",+P),U,2)_" from your list?"
  1. . . S DIR("B")="NO"
  1. . . D ^DIR
  1. . . I Y="Y" K BPSARRAY(+P),BPSARRAY("B",+P)
  1. . . ; Display a list of current selections
  1. . . I $D(BPSARRAY) D
  1. . . . N X
  1. . . . W !,?2,"Selected:"
  1. . . . S X="" F S X=$O(BPSARRAY("B",X)) Q:X="" D
  1. . . . . W ?12,$P(BPSARRAY("B",X),U)," ",$P(BPSARRAY("B",X),U,2),!
  1. . E D
  1. . . ;Define new entries in BPSARRAY
  1. . . ; Get the Reject Code and Explanation for the selected Reject Code
  1. . . S BPSCODE=$$GET1^DIQ(9002313.93,+Y,.01)
  1. . . S BPSEXP=$$GET1^DIQ(9002313.93,+Y,.02)
  1. . . S BPSARRAY(+Y)=Y
  1. . . S BPSARRAY("B",+Y)=BPSCODE_"^"_BPSEXP
  1. . ;
  1. . ; Display a list of current selections
  1. . N X
  1. . W !,?2,"Selected:"
  1. . S X="" F S X=$O(BPSARRAY("B",X)) Q:X="" W ?12,$P(BPSARRAY("B",X),U,1)," ",$P(BPSARRAY("B",X),U,2),!
  1. ;
  1. ; If nothing was selected set BPSARRAY=0
  1. I '$D(BPSARRAY) S BPSARRAY=0
  1. Q
  1. ;
  1. CCRSEL(FIELD,FILE,BPSARRAY,DEFAULT) ;
  1. ; Provides selection of one or many Close Claim Reasons.
  1. ;
  1. N BPSARR,DIC,DTOUT,DUOUT,QT,Y,X
  1. ;
  1. S DIC=FILE,DIC(0)="QEZAM",DIC("A")="Select "_FIELD_": "
  1. I $G(DEFAULT)'="" S DIC("B")=DEFAULT
  1. ;
  1. F D ^DIC Q:X="" D Q:$G(QT)
  1. . ; Check for "^" or timeout, if found set BPSARRAY="^" and quit.
  1. . I $D(DTOUT)!$D(DUOUT) K BPSARRAY S BPSARRAY="^",QT=1 Q
  1. . ;
  1. . ; If selection already exists in BPSARRAY, ask user if they
  1. . ; want to Delete the entry
  1. . I $D(BPSARRAY(+Y)) D Q
  1. . . N P
  1. . . S P=Y ;Save Original Value
  1. . . S DIR(0)="S^Y:YES;N:NO"
  1. . . S DIR("A")="Delete "_$P(P,U,2)_" from your list?"
  1. . . S DIR("B")="NO"
  1. . . D ^DIR
  1. . . I Y="Y" K BPSARRAY(+P),BPSARRAY("B",$P(P,U,2),+P)
  1. . . ; Display a list of current selections
  1. . . I $D(BPSARRAY) D
  1. . . . N X
  1. . . . W !,?2,"Selected:"
  1. . . . S X="" F S X=$O(BPSARRAY(X)) Q:(X="")!(X="B") W ?12,BPSARRAY(X),!
  1. . E D
  1. . . ;Define new entries in BPSCCR array
  1. . . S BPSARRAY(+Y)=$P(Y,U,2)
  1. . . S BPSARRAY("B",$P(Y,U,2),+Y)=""
  1. . ;
  1. . ;Display a list of current selections
  1. . N X
  1. . W !,?2,"Selected:"
  1. . S X="" F S X=$O(BPSARRAY(X)) Q:(X="")!(X="B") W ?12,BPSARRAY(X),!
  1. . K DIC("B")
  1. ;
  1. ; If nothing was selected set BPSARRAY=0
  1. I '$D(BPSARRAY) S BPSARRAY=0
  1. Q
  1. ;
  1. ;Pull Selected BPS Pharmacies for Display
  1. ;
  1. ; Input Variables:
  1. ; BPPHARM/BPPHARM(ptr) - Set to 0 for all pharmacies, if set to 1 array of internal
  1. ; pointers of selected pharmacies
  1. ; - BPLEN = The length of the display field
  1. ; Returned value -> List of selected BPS Pharmacies (possibly cut short)
  1. ;
  1. GETDIVS(BPLEN,BPPHARM) N BPDIV,BPSTR,BPQUIT
  1. I $G(BPPHARM)=0 S BPSTR="ALL"
  1. E D
  1. .S BPDIV="",BPQUIT=0,BPSTR=""
  1. .F S BPDIV=$O(BPPHARM(BPDIV)) Q:+BPDIV=0 D Q:BPQUIT=1
  1. .. I $L(BPSTR_$$DIVNAME^BPSSCRDS(BPDIV))>(BPLEN-4) D S BPQUIT=1 Q
  1. ... S BPSTR=$$LJ^BPSSCR02(BPSTR_",...",BPLEN)
  1. .. S BPSTR=BPSTR_$S(BPSTR]"":", ",1:"")_$$DIVNAME^BPSSCRDS(BPDIV)
  1. Q BPSTR
  1. ;
  1. ;Get the Reject Code
  1. ;
  1. ; Input variable -> 0 for All Reject Codes or
  1. ; lookup to BPS NCPDP REJECT CODES (#9002313.93)
  1. ; Returned value -> ALL or the selected Reject Code
  1. ;
  1. GETREJ(REJ) ;
  1. I REJ="0" S REJ="ALL"
  1. E S REJ=$P($G(^BPSF(9002313.93,+REJ,0)),U,2)
  1. Q REJ
  1. ;
  1. ;Print Header 2 Line 1
  1. ;
  1. ; Input variable: BPRTYPE -> Report Type (1-7)
  1. ;
  1. HEADLN1(BPRTYPE) ;
  1. I (",1,2,3,4,5,7,8,9,10,")[(","_BPRTYPE_",") W !,"PATIENT NAME",?27,"Pt.ID"
  1. ;
  1. I (BPRTYPE=1)!(BPRTYPE=4) D Q
  1. . W ?35,"ELIG"
  1. . W ?40,"RX#"
  1. . W ?52,"REF/ECME#"
  1. . W ?73,"DATE"
  1. . W ?83,$J("$BILLED",10)
  1. . W ?102,$J("$INS RESPONSE",13)
  1. . W ?122,$J("$COLLECT",10)
  1. ;
  1. I BPRTYPE=2 D Q
  1. . W ?35,"ELIG"
  1. . W ?40,"RX#"
  1. . W ?52,"REF/ECME#"
  1. . W ?73,"DATE"
  1. . W ?83,"RELEASED ON"
  1. . W ?96,"RX INFO"
  1. . W ?114,"COB"
  1. . W ?121,"OPEN/CLOSED"
  1. ;
  1. I BPRTYPE=3 D Q
  1. . W ?35,"RX#"
  1. . W ?47,"REF/ECME#"
  1. . W ?68,"DATE"
  1. . W ?100,$J("$BILLED",10)
  1. . W ?119,$J("$INS RESPONSE",13)
  1. ;
  1. I BPRTYPE=5 D Q
  1. . W ?35,"RX#"
  1. . W ?47,"REF/ECME#"
  1. . W ?65,"COMPLETED"
  1. . W ?83,"TRANS TYPE"
  1. . W ?100,"PAYER RESPONSE"
  1. . W ?125,"COB"
  1. ;
  1. I BPRTYPE=6 D Q
  1. . W !,?33,$J("AMOUNT",17)
  1. . W ?51,$J("RETURNED",17)
  1. . W ?69,$J("RETURNED",17)
  1. . W ?87,$J("AMOUNT",17)
  1. ;
  1. I BPRTYPE=7 D Q
  1. . W ?35,"ELIG"
  1. . W ?40,"RX#"
  1. . W ?52,"REF/ECME#"
  1. . W ?70,"RX INFO"
  1. . W ?89,"DRUG"
  1. . W ?118,"NDC"
  1. ;
  1. I (BPRTYPE=8) D Q
  1. . W ?35,"RX#"
  1. . W ?47,"REF/ECME#"
  1. . W ?68,"DATE"
  1. . W ?78,$J("$BILLED",10)
  1. . W ?97,$J("$INS RESPONSE",13)
  1. . W ?122,$J("$COLLECT",10)
  1. ;
  1. I BPRTYPE=9 D Q
  1. . W ?35,"ELIG"
  1. . W ?40,"RX#"
  1. . W ?52,"REF"
  1. . W ?64,"DATE"
  1. . W ?84,$J("$DRUG COST",10)
  1. ;
  1. I BPRTYPE=10 D Q
  1. . W ?35,"ELIG"
  1. . W ?45,"REF/ECME#"
  1. . W ?65,"DATE"
  1. . W ?77,$J("$BILLED",10)
  1. . W ?90,$J("$INS RESPONSE",13)
  1. . W ?106,$J("$COLLECT",10)
  1. . W ?118,$J("Pt.RESP(INS)",12)
  1. Q
  1. ;
  1. ;Print Header 2 Line 2
  1. ;
  1. ; Input variable: BPRTYPE -> Report Type (1-10)
  1. ;
  1. HEADLN2(BPRTYPE) ;
  1. I (BPRTYPE=1)!(BPRTYPE=4) D Q
  1. . W !,?4,"DRUG"
  1. . W ?36,"NDC"
  1. . I BPRTYPE=1 W ?47,"RELEASED ON"
  1. . W ?68,"RX INFO"
  1. . I BPRTYPE=4 W ?92,"COB"
  1. . I BPRTYPE=1 W ?120,"BILL#",?129,"COB"
  1. ;
  1. I BPRTYPE=2 D Q
  1. . W !,?3,"CARDHOLD.ID"
  1. . W ?26,"GROUP ID"
  1. . W ?41,$J("$BILLED",10)
  1. . W ?54,"QTY"
  1. . W ?61,"NDC#"
  1. . W ?82,"PRESCRIBER ID"
  1. . W ?98,"NAME"
  1. ;
  1. I BPRTYPE=3 D Q
  1. . W !,?4,"DRUG"
  1. . W ?43,"NDC"
  1. . W ?68,"RX INFO"
  1. . W ?88,"COB"
  1. . W ?96,"ELIG"
  1. ;
  1. I BPRTYPE=5 D Q
  1. . W !,?4,"DRUG"
  1. . W ?32,"NDC"
  1. . W ?47,"RX INFO"
  1. . W ?69,"INSURANCE"
  1. . W ?112,"ELAP TIME IN SECONDS"
  1. ;
  1. I BPRTYPE=6 D Q
  1. .W !,?1,"DATE"
  1. .W ?15,$J("#CLAIMS",17)
  1. .W ?33,$J("SUBMITTED",17)
  1. .W ?51,$J("REJECTED",17)
  1. .W ?69,$J("PAYABLE",17)
  1. .W ?87,$J("TO RECEIVE",17)
  1. .W ?115,$J("DIFFERENCE",17)
  1. ;
  1. I BPRTYPE=7 D Q
  1. . W !,?3,"CARDHOLD.ID"
  1. . W ?27,"GROUP ID"
  1. . W ?46,"CLOSE DATE/TIME"
  1. . W ?65,"CLOSED BY"
  1. . W ?93,"CLOSE REASON"
  1. . W ?126,"COB"
  1. ;
  1. I BPRTYPE=8 D Q
  1. . W !,?2,"DRUG"
  1. . W ?38,"RX INFO"
  1. . W ?54,"INS GROUP#"
  1. . W ?72,"INS GROUP NAME"
  1. . W ?125,"BILL#"
  1. ;
  1. I BPRTYPE=9 D Q
  1. . W !,?4,"DRUG"
  1. . W ?36,"NDC"
  1. . W ?47,"RELEASED ON"
  1. . W ?62,"RX INFO"
  1. . W ?75,"NON-BILLABLE STATUS"
  1. ;
  1. I BPRTYPE=10 D Q
  1. . W !,?4,"DRUG"
  1. . W ?36,"NDC"
  1. . W ?47,"RELEASED ON"
  1. . W ?68,"RX INFO"
  1. . W ?94,"BILL#"
  1. . W ?112,"COB"
  1. . W ?119,"STATUS"
  1. Q
  1. ;
  1. ;Print Header 2 Line 3
  1. ;
  1. ; Input variable: BPRTYPE -> Report Type (1-7)
  1. ;
  1. HEADLN3(BPTYP) ;
  1. I BPTYP=4 D Q
  1. . W !,?6,"RELEASED ON"
  1. . W ?22,"REVERSAL METHOD/RETURN STATUS/REASON"
  1. ;
  1. I BPTYP=8 D Q
  1. . W !,?4,"$PROVIDER NETWORK"
  1. . W ?23,"$BRAND DRUG"
  1. . W ?38,"$NON-PREF FORM"
  1. . W ?56,"$BRAND NON-PREF FORM"
  1. . W ?81,"$COVERAGE GAP"
  1. . W ?96,"$HEALTH ASST"
  1. . W ?111,"$SPEND ACCT REMAINING"
  1. Q
  1. ;
  1. SELEXCEL() ; - Returns whether to capture data for Excel report.
  1. ; Output: EXCEL = 1 - YES (capture data) / 0 - NO (DO NOT capture data)
  1. ;
  1. N EXCEL,DIR,DIRUT,DTOUT,DUOUT,DIROUT
  1. I ",1,2,3,4,"[(","_BPRTYPE_",") D
  1. . W !!,"Data fields VA Ingredient Cost, VA Dispensing Fee, Ingredient Cost Paid,",!
  1. . W "Dispensing Fee Paid and Patient Responsibility (INS) will only be included",!
  1. . W "when the report is captured for an Excel document. All additional data fields",!
  1. . W "may not be present for all reports."
  1. I BPRTYPE=7 D
  1. . W !!,"Data field for billed amount will only be included when the report is captured",!
  1. . W "for an Excel document. All additional data fields may not be present for all",!
  1. . W "reports."
  1. I BPRTYPE=10 D
  1. . W !!,"Data fields VA Ingredient Cost, VA Dispensing Fee, Ingredient Cost Paid",!
  1. . W "and Dispensing Fee Paid will only be included when the report is captured",!
  1. . W "for an Excel document. All additional data fields may not be present for all",!
  1. . W "reports."
  1. ;
  1. S DIR(0)="Y",DIR("B")="NO",DIR("T")=DTIME W !
  1. S DIR("A")="Do you want to capture report data for an Excel document"
  1. S DIR("?")="^D HEXC^BPSRPT4"
  1. D ^DIR K DIR I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) Q "^"
  1. K DIROUT,DTOUT,DUOUT,DIRUT
  1. S EXCEL=0 I Y S EXCEL=1
  1. ;
  1. ;Display Excel display message
  1. I EXCEL=1 D EXMSG
  1. ;
  1. Q EXCEL
  1. ;
  1. HEXC ; - 'Do you want to capture data...' prompt
  1. W !!," Enter: 'Y' - To capture detail report data to transfer"
  1. W !," to an Excel document"
  1. W !," '<CR>' - To skip this option"
  1. W !," '^' - To quit this option"
  1. Q
  1. ;
  1. ;Display the message about capturing to an Excel file format
  1. ;
  1. EXMSG ;
  1. I (",1,2,3,4,7,9,")'[BPRTYPE D
  1. . W !!?5,"Before continuing, please set up your terminal to capture the"
  1. . W !?5,"detail report data. On some terminals, this can be done by"
  1. . W !?5,"clicking on the 'Tools' menu above, then click on 'Capture"
  1. . W !?5,"Incoming Data' to save to Desktop. This report may take a"
  1. . W !?5,"while to run."
  1. . W !!?5,"Note: To avoid undesired wrapping of the data saved to the"
  1. . W !?5," file, please enter '0;256;999' at the 'DEVICE:' prompt.",!
  1. E D
  1. . W !!?5,"Before continuing, please set up your terminal to capture the"
  1. . W !?5,"detail report data and save the detail report data in a text file"
  1. . W !?5,"to a local drive. This report may take a while to run."
  1. . W !!?5,"Note: To avoid undesired wrapping of the data saved to the file,"
  1. . W !?5," please enter '0;256;99999' at the 'DEVICE:' prompt.",!
  1. Q