29. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/19/2018 12:36:00 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

29.1 Files compared

# Location File Last Modified
1 ePharmacy_Bundle 12.zip TAS+ePhm+SDD+US4039+v1.01.docx Wed Sep 12 15:17:00 2018 UTC
2 ePharmacy_Bundle 12.zip TAS+ePhm+SDD+US4039+v1.01.docx Wed Sep 19 15:35:05 2018 UTC

29.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 1 2512
Changed 0 0
Inserted 0 0
Removed 0 0

29.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

29.4 Active regular expressions

No regular expressions were active.

29.5 Comparison detail

  1   MCCF EDI T AS US4039
  2   System Des ign Docume nt
  3  
  4  
  5  
  6  
  7  
  8   Department  of Vetera ns Affairs
  9   May 2018
  10   Version 1. 01
  11   User Story  Number: U SRX-
  12   User Story  Name: Cla im Report  Filters Al low Delete
  13   Product Ba cklog ID: 
  14   Backlog Pr iority: 
  15   Initial Si zing Estim ate: 5
  16   Rational I D: 
  17   Rally ID:  US4039
  18   Epic Taxon omy: Updat e
  19  
  20   Design – S ummary
  21   The Claim  Reports fi lter quest ions need  to allow t he user to  delete a  previously  selected  entry.  Th e table be low lists  the prompt s that nee d to be ch anged and  which repo rts are im pacted.
  22  
  23   PROMPT
  24   NYR
  25   PAY
  26   REV
  27   CLO
  28   NBS
  29   REJ
  30   Drug/Drug  Class
  31   x
  32   x
  33   x
  34   x
  35   x
  36   x
  37   Reject Cod e(s)
  38    
  39    
  40    
  41    
  42    
  43   x
  44   Prescriber s
  45    
  46    
  47    
  48    
  49    
  50   x
  51   Patient(s)
  52   x
  53   x
  54   x
  55   x
  56   x
  57   x
  58   Close Clai m Reason
  59    
  60    
  61    
  62   x
  63    
  64    
  65  
  66   List of Co mponents:
  67   Routine: B PSRPT0
  68   Routine: B PSRPT1
  69   Routine: B PSRPT3A
  70   Routine: B PSRPT4
  71  
  72   Design – D etail
  73  
  74   The Reject  Code, Clo se Claim R eason and  Prescriber  filter qu estions wi ll be modi fied to ha ve the sam e function ality as t he Drug/Dr ug Class a nd Patient  prompts.   This will  make futu re updates  to the fu nctionalit y of the f ilter ques tions more  streamlin ed.  The t able below  describes  the modif ications t hat will b e made to  EN^BPSRPT0 .
  75  
  76   Subroutine  Name
  77   EN^BPSRPT0
  78   Enhancemen t Category
  79    New
  80    Modify
  81  
  82  
  83   Current Lo gic
  84  
  85    ; Passed  variables:
  86    ;  The fo llowing lo cal variab les are se t in BPSPR T0 and are  passed th roughout
  87    ;  the BP SRPT* rout ines. They  are used  during the  looping/f iltering o f transact ions
  88    ;  and wh en creatin g the repo rts.
  89    ;  These  local vari able are n ot passed  as paramet ers but as sumed to b e defined.
  90    ; 
  91    ;    BPRT YPE -  rep ort number  (1-9) 
  92    ;      1  = Payable  Claims, 2  = Rejected  Claims, 3  = Claims  Submitted,  Not Yet R eleased, 
  93    ;      4  = Reversed  Claims, 5  = Recent  Transactio ns, 6 = To tals By Da te,
  94    ;      7  = Closed C laims, 8 =  Spending  Account Re port, 9 =  ECME RXs w ith Non-Bi llable Sta tus
  95   .
  96   .
  97   .
  98    
  99    ;    BPBE GDT - Date  Range
  100    ;      BP BEGDT=^-Ex it
  101    ;      BP BEGDT= beg inning dat e ^ ending  date
  102    ;      BP BEGDT=$P(B PBEGDT,U)  - beginnin g date
  103    ;      BP ENDDT=$P(B PBEGDT,U,2 ) - ending  date
  104    ;    BPRL NRL - 2-Re leased, 3- Not Releas ed or 1-Al l
  105    ;      BP RLNRL=(1,2 ,3,^) ^=ex it
  106    ;    BPRE JCD - Spec ific Rejec t Code or  All
  107    ;      BP REJCD=0-AL L, ^-Exit
  108    ;      BP REJCD=ptr  - if multi ple entrie s - BPREJC D=ptr,ptr, .
  109    ;       p tr=Pointer  to Reject  Code in # 9002313.93
  110    ;    BPAU TREV - Aut oReversed- 1 or All-0
  111    ;      BP AUTREV=(0, 1,^)
  112    ;    BPAC REJ - Acce pted-2, Re jected-1 o r All-0
  113    ;      BP ACREJ=(0,1 ,2,^)
  114    ;    BPCC RSN - Spec ific Close  Claim Rea son-ptr or  All-0
  115    ;      BP CCRSN=(0,p tr) - ptr= Pointer to  #356.8
  116    ;    BPEL IG - Eligi bility V-V eteran, T- Tricare, C -Champva o r 0-All
  117    ;      BP ELIG=(V,T, C,0,^)
  118    ;    BPEL IG1 - mult iple Eligi bilities o r All-0 
  119    ;      BP ELIG1=(0,^ )
  120    ;      BP ELIG1=(V,T ,C)   V-Ve teran, T-T ricare, C- Champva
  121    ;       i f multiple  entries B PELIG1=(a  comma deli mited stri ng of user s selectio n, e.g. "C ,T")
  122    ;    BPOP CL - Open- 2, Closed- 1 or All-0
  123    ;      BP OPCL=(0,1, 2,^)
  124    ;    BPRE SC - Selec ted Prescr iber-ptr o r All-0 -  ptr=Pointe r to file  #200
  125    ;      BP RESC=(0,^)
  126    ;      BP RESC=ptr -  if multip le entries  - BPRESC= ptr,ptr,.
  127    ;    BPQS TPAT - sel ect Patien ts-1 or Al l-0
  128    ;      BP QSTPAT=(0, 1,^)
  129    ;    BPPA T - if Pat ients=1 wa s selected  above
  130    ;      BP PAT=ptr -  if multipl e entries  - BPPAT=pt r,ptr  ptr =Pointer t o file #2
  131    ;    BPBI LL - Range  of Billed  Amount-1  or All-0
  132    ;      BP BILL=(0,1, ^) 
  133    ;    BPMI N - if BPB ILL=1 ente r minimum  billed amo unt
  134    ;      BP MIN=amount  entered,  default is  0
  135    ;    BPMA X - if BPB ILL=1 ente r maximum  billed amo unt
  136    ;      BP MAX=amount  entered,  default is  999999
  137    ;    BPAL RC - All-A  or Most R ecent-R (N on-Billabl e Status r eport only , BPRTYPE= 9)
  138    ;      BP ALRC=(A,R, ^)
  139    ;    BPNB STS - Non- Billable S tatus (Non -Billable  Status rep ort only,  BPRTYPE=9)
  140    ;      BP NBSTS=(0-A ll,1-certa in Non-bil lable stat us,^)
  141    ;       i f BPNBSTS= 1 there is  a BPNBSTS  array for  each stat us selecte d
  142    ;      BP NBSTS(ptr) =status  -  for each  status sel ected
  143    ;       p tr=Pointer  to file # 366.17 - s tatus=non- billable r eason from  file #366 .17 field  #.01
  144    ;    BPEX CEL - Exce l capture- detail onl y, if BPSU MDET=0 (de tail forma t)
  145    ;      BP EXCEL=(0-N o, 1-Yes,  ^)
  146    ;    BPQ  - device v ariable -  I POP S BP Q=1 otherw ise BPQ=0
  147    ;
  148    ; The fol lowing loc al variabl es are not  set in BP SRPT0 howe ver they a re used in  several
  149    ; BPSRPT*  routines.   They are  not passe d as param eters but  assumed to  be define d.
  150    ;    BPBL INE - blan k line ind icator, 1- print blan k line
  151    ;    BPGR PLAN - ins urance pla n name
  152    ;    BPSD ATA - tell s whether  data has b een displa yed to the  screen (0 -No,1-Yes)
  153    ;                            
  154   EN(BPRTYPE ) N %,BPAC REJ,BPAUTR EV,BPBEGDT ,BPCCRSN,B PDRGCL,BPD RUG,BPENDD T,BPEXCEL, BPNOW,BPPH ARM,BPINSI NF,BPMWC,B PQ,BPQSTDR G
  155    N BPREJCD ,BPRLNRL,B PRPTNAM,BP RTBCK,BPSC R,BPSUMDET ,CODE,POS, STAT,X,Y,B PINS,BPARR ,BPELIG,BP OPCL
  156    N BPNBSTS ,BPALRC,BP ELIG1,BPRE SC,BPPAT,B PQSTPAT,BP BILL,BPMIN ,BPMAX,BPS LC,BPSUC,B PSCOMMENT
  157    ;
  158    ;Verify t hat a vali d report h as been re quested
  159    I ",1,2,3 ,4,5,6,7,8 ,9,"'[("," _$G(BPRTYP E)_",") W  "<Invalid  Menu Defin ition - Re port Undef ined>" H 3  Q
  160    S BPRPTNA M=$P("PAYA BLE CLAIMS ^REJECTED  CLAIMS^SUB MIT,NOT RE LEASED CLA IMS^REVERS ED CLAIMS^ RECENT TRA NSACTIONS^ TOTALS^CLO SED CLAIMS ^SPENDING  ACCOUNT RE PORT^RXS W ITH NON-BI LLABLE STA TUS","^",B PRTYPE)
  161    ;
  162    ;Needed t o convert  lower case  entries t o upper ca se
  163    S BPSLC=" abcdefghij klmnopqrst uvwxyz"
  164    S BPSUC=" ABCDEFGHIJ KLMNOPQRST UVWXYZ"
  165    ;
  166    ;Get curr ent Date/T ime
  167    D NOW^%DT C S Y=% D  DD^%DT S B PNOW=Y
  168    ;
  169   DIV ;
  170    ;Prompt f or ECME Ph armacy Div ision(s) ( No Default )
  171    ;Sets up  BPPHARM va riable and  array, BP PHARM =0 A LL or BPPH ARM=1,BPPH ARM(ptr) f or list
  172    S X=$$SEL PHARM^BPSR PT3() G:(X ="^")&($G( BPPHARM)=" ") EXIT G: (X="^")&(B PPHARM=1)  DIV
  173   .
  174   .
  175   .
  176  
  177    ;Report S pecific Pr ompts
  178    ;
  179    ;Prompt t o select D ate Range
  180    ;Returns  (Start Dat e^End Date )
  181    S BPBEGDT =$$SELDATE ^BPSRPT3(B PRTYPE) D   I BPBEGDT ="^" G EXI T
  182    .I BPBEGD T="^" Q
  183    .S BPENDD T=$P(BPBEG DT,U,2)
  184    .S BPBEGD T=$P(BPBEG DT,U)
  185    ;
  186    ;Prompt t o Include  (R)ELEASED  or (N)OT  RELEASED o r (A)LL (D efault to  RELEASED)
  187    ;Returns  (1-ALL,2-R ELEASED,3- NOT RELEAS ED)
  188    S BPRLNRL =$S(BPRTYP E=3:3,1:1)  I (",1,2, 4,6,7,8,9, ")[BPRTYPE  S BPRLNRL =$$SELRLNR L^BPSRPT4( $S(BPRTYPE =9:1,1:2))  I BPRLNRL ="^" G EXI T
  189    ;
  190    ;Prompt t o Include  (S)pecific  Reject Co de or (A)L L (Default  to ALL)
  191    ;Returns:  0=ALL
  192    ;          ^=if user  entered " ^"
  193    ;       p tr=string  of ptr's d elimited w ith a comm a e.g. BPR EJCD="95,1 00,"
  194    ;         (ptr is th e Pointer  to the Sel ected Reje ct Code in  #9002313. 93)
  195    S BPREJCD =0 I (",2, ")[BPRTYPE  S BPREJCD =$$SELREJC D^BPSRPT4( ) I BPREJC D="^" G EX IT
  196    ;
  197    ;Prompt t o Include  Auto(R)eve rsed or (A )LL (Defau lt to ALL)
  198    ;Returns  (0-All,1-A utoReverse d)
  199    S BPAUTRE V=0 I (",4 ,")[BPRTYP E S BPAUTR EV=$$SELAU REV^BPSRPT 4(0) I BPA UTREV="^"  G EXIT
  200    ;
  201    ;Prompt t o Include  A(C)cepted  or (R)eje cted or (A )LL (Defau lt to REJE CTED)
  202    ;Returns  (0-All,1-R ejected,2- Accepted)
  203    S BPACREJ =0 I (",4, ")[BPRTYPE  S BPACREJ =$$SELACRE J^BPSRPT4( 1) I BPACR EJ="^" G E XIT
  204    ;
  205   CCR ;
  206    ;Prompt t o Include  (S)pecific  Close Cla im Reason  or (A)ll ( Default to  All)
  207    ;Returns  (0-All,ptr -Pointer t o #356.8)
  208    S BPCCRSN =0 I (",7, ")[BPRTYPE  S BPCCRSN =$$SELCCRS N^BPSRPT4( 0) G:BPCCR SN="" CCR  I BPCCRSN= "^" G EXIT
  209    ;
  210    ;;Prompt  for Eligib ility Indi cator for  payable, r ejected, r eversed an d closed c laims repo rt
  211    ;;Returns  (V=VETERA N,T=TRICAR E,C=CHAMPV A,0=All)
  212    ;;S BPELI G=0 I (",1 ,4,7,")[BP RTYPE S BP ELIG=$$SEL ELIG^BPSRP T3(1) I BP ELIG="^" G  EXIT
  213    ;
  214    ;Prompt f or All or  Most Recen t (Non-Bil lable Stat us Report  only)
  215    ;Returns  A - All, R  - Most Re cent
  216    S BPALRC= 0 I (",9," )[BPRTYPE  S BPALRC=$ $SELALRC^B PSRPT3() I  BPALRC="^ " G EXIT
  217    ;
  218    ;Prompt f or one, mu ltiple or  (A)ll Elig ibility In dicator
  219    ;Returns  (0-All, 1- selection)
  220    ; If 1, B PARR("ELIG ",xx) is s et for eac h eligibil ity select ed - xx="V ", "T" or  "C"
  221    S BPELIG1 =0 I (",1, 2,3,4,7,9, ")[BPRTYPE  S BPELIG1 =$$SELELIG 1^BPSRPT3( ) I BPELIG 1="^" G EX IT
  222    ;
  223    ;Prompt f or Open/Cl osed/All c laims
  224    ;Returns  (1=Closed, 2=Open,0=A ll)
  225    S BPOPCL= 0 I (",2," )[BPRTYPE  S BPOPCL=$ $SELOPCL^B PSRPT3(2)  I BPOPCL=" ^" G EXIT
  226    ;
  227    ;Prompt t o select S PECIFIC PR ESCRIBER(S ) or (A)ll  Prescribe rs
  228    ;Returns:  0=ALL,^=e xit
  229    ;if Speci fic Prescr iber was s elected
  230    ;Returns:  BPRESC=a  string of  prescriber  ien's sep arated by  a comma
  231    S BPRESC= 0 I (",2," )[BPRTYPE  S BPRESC=$ $SELPRESC^ BPSRPT3A()  I BPRESC= "^" G EXIT
  232    ;
  233   PATIENT;     
  234    ;Prompt t o select ( P)atients  or (A)LL P atients
  235    ;Returns:  (0=ALL,1= Patient,^= exit)
  236    S BPQSTPA T=0 I (",1 ,2,3,4,7,9 ,")[BPRTYP E S BPQSTP AT=$$SELPA ^BPSRPT3A( ) I BPQSTP AT="^" G E XIT
  237    ;
  238    ;If (P)at ients was  selected,  prompt for  one or mo re patient s
  239    ;Returns:  BPPAT=a s tring of p atient ien 's separat ed by a co mma
  240    S BPPAT=0
  241    I BPQSTPA T=1 S BPPA T=$$SELPAT ^BPSRPT3A( ) G:BPPAT= "^" EXIT G :BPPAT=0 P ATIENT
  242    ;
  243    ;Prompt t o select(R )ange for  Billed Amo unt or (A) LL
  244    ;Returns:  (0=ALL,1= Range,^=ex it)
  245    S BPBILL= 0 I (",1,2 ,3,4,9,")[ BPRTYPE S  BPBILL=$$S ELBAMT^BPS RPT3A() I  BPBILL="^"  G EXIT
  246    ;If Range  of Billed  Amount wa s selected  prompt fo r Minimum  and Maximu m
  247    ;Returns:  BPMIN=min imum amoun t entered,  BPMAX=max imum amoun t entered
  248    S (BPMIN, BPMAX)=0
  249    I BPBILL= 1 W !,"Ran ge for the  Billed Am ount" D  I  (BPMIN="^ ")!(BPMAX= "^") G EXI T
  250    . S BPMIN =$$SELBMIN ^BPSRPT3A( ) I BPMIN= "^" Q
  251    . S BPMAX =$$SELBMAX ^BPSRPT3A( )
  252    ;
  253    ;Prompt f or Non-Bil lable Stat us (Non-Bi llable Sta tus Report  only)
  254    ;Sets up  BPNBSTS va riable and  array, BP NBSTS=0 AL L or BPNBS TS=1,BPNBS TS(xx) for  list
  255    S BPNBSTS =0 I (",9, ")[BPRTYPE  S BPNBSTS =$$SELNBST S^BPSRPT3( ) I BPNBST S="^" G EX IT
  256    ;
  257    ;Prompt f or Excel C apture (De tail Only)
  258    S BPEXCEL =0 I 'BPSU MDET S BPE XCEL=$$SEL EXCEL^BPSR PT4() I BP EXCEL="^"  G EXIT
  259    ;
  260    ;Prompt f or the Dev ice
  261    I 'BPEXCE L D
  262    .W !!,"WA RNING - TH IS REPORT  REQUIRES T HAT A DEVI CE WITH 13 2 COLUMN W IDTH BE US ED."
  263    .W !,"IT  WILL NOT D ISPLAY COR RECTLY USI NG 80 COLU MN WIDTH D EVICES",!
  264    S BPQ=0 D  DEVICE(BP RPTNAM) Q: BPQ
  265    ;
  266    ;Compile  and Run th e Report
  267    D RUN(BPE XCEL,BPRPT NAM,BPSUMD ET)
  268    I 'BPQ D  PAUSE2^BPS RPT1
  269    ;
  270   EXIT Q
  271  
  272   Modified L ogic (Chan ges are hi ghlighted)
  273  
  274    ; Passed  variables:
  275    ;  The fo llowing lo cal variab les are se t in BPSPR T0 and are  passed th roughout
  276    ;  the BP SRPT* rout ines. They  are used  during the  looping/f iltering o f transact ions
  277    ;  and wh en creatin g the repo rts.
  278    ;  These  local vari able are n ot passed  as paramet ers but as sumed to b e defined.
  279    ; 
  280    ;    BPRT YPE -  rep ort number  (1-9) 
  281    ;      1  = Payable  Claims, 2  = Rejected  Claims, 3  = Claims  Submitted,  Not Yet R eleased, 
  282    ;      4  = Reversed  Claims, 5  = Recent  Transactio ns, 6 = To tals By Da te,
  283    ;      7  = Closed C laims, 8 =  Spending  Account Re port, 9 =  ECME RXs w ith Non-Bi llable Sta tus
  284   .
  285   .
  286   .
  287  
  288    ;    BPBE GDT - Date  Range
  289    ;      BP BEGDT=^-Ex it
  290    ;      BP BEGDT= beg inning dat e ^ ending  date
  291    ;      BP BEGDT=$P(B PBEGDT,U)  - beginnin g date
  292    ;      BP ENDDT=$P(B PBEGDT,U,2 ) - ending  date
  293    ;    BPRL NRL - 2-Re leased, 3- Not Releas ed or 1-Al l
  294    ;      BP RLNRL=(1,2 ,3,^) ^=ex it
  295    ;    BPQS TRC - sele ct Reject  Code-1 or  All-0
  296    ;      BP QSTRC=(0,1 ,^)
  297    ;    BPRE JCD - if R eject Code =1 was sel ected abov e
  298    ;      BP REJCD=ptr  - if multi ple entrie s - BPREJC D=ptr,ptr, .
  299    ;       p tr=Pointer  to Reject  Code in # 9002313.93
  300    ;    BPAU TREV - Aut oReversed- 1 or All-0
  301    ;      BP AUTREV=(0, 1,^)
  302    ;    BPAC REJ - Acce pted-2, Re jected-1 o r All-0
  303    ;      BP ACREJ=(0,1 ,2,^)
  304    ;    BPQS TCR - sele ct Close C laim Reaso n-1 or All -0
  305    ;      BP QSTCR=(0,1 ,^)
  306    ;    BPCC RSN - if S pecific Cl ose Claim  Reason=1 1  was selec ted above
  307    ;      BP CCRSN=ptr  - if multi ple entrie s - BPCCRS N=ptr,ptr   ptr=Point er to file  #356.8
  308    ;    BPEL IG - Eligi bility V-V eteran, T- Tricare, C -Champva o r 0-All
  309    ;      BP ELIG=(V,T, C,0,^)
  310    ;    BPEL IG1 - mult iple Eligi bilities o r All-0 
  311    ;      BP ELIG1=(0,^ )
  312    ;      BP ELIG1=(V,T ,C)   V-Ve teran, T-T ricare, C- Champva
  313    ;       i f multiple  entries B PELIG1=(a  comma deli mited stri ng of user s selectio n, e.g. "C ,T")
  314    ;    BPOP CL - Open- 2, Closed- 1 or All-0
  315    ;      BP OPCL=(0,1, 2,^)
  316    ;    BPQS TPR - sele ct Presscr iber-1 or  All-0
  317    ;      BP QSTPR=(0,1 ,^)
  318    ;    BPRE SC - if Pr escribers= 1 was sele cted above
  319    ;      BP RESC=ptr -  if multip le entries  - BPRESC= ptr,ptr  p tr=Pointer  to file # 200
  320    ;    BPQS TPAT - sel ect Patien ts-1 or Al l-0
  321    ;      BP QSTPAT=(0, 1,^)
  322    ;    BPPA T - if Pat ients=1 wa s selected  above
  323    ;      BP PAT=ptr -  if multipl e entries  - BPPAT=pt r,ptr  ptr =Pointer t o file #2
  324    ;    BPBI LL - Range  of Billed  Amount-1  or All-0
  325    ;      BP BILL=(0,1, ^) 
  326    ;    BPMI N - if BPB ILL=1 ente r minimum  billed amo unt
  327    ;      BP MIN=amount  entered,  default is  0
  328    ;    BPMA X - if BPB ILL=1 ente r maximum  billed amo unt
  329    ;      BP MAX=amount  entered,  default is  999999
  330    ;    BPAL RC - All-A  or Most R ecent-R (N on-Billabl e Status r eport only , BPRTYPE= 9)
  331    ;      BP ALRC=(A,R, ^)
  332    ;    BPNB STS - Non- Billable S tatus (Non -Billable  Status rep ort only,  BPRTYPE=9)
  333    ;      BP NBSTS=(0-A ll,1-certa in Non-bil lable stat us,^)
  334    ;       i f BPNBSTS= 1 there is  a BPNBSTS  array for  each stat us selecte d
  335    ;      BP NBSTS(ptr) =status  -  for each  status sel ected
  336    ;       p tr=Pointer  to file # 366.17 - s tatus=non- billable r eason from  file #366 .17 field  #.01
  337    ;    BPEX CEL - Exce l capture- detail onl y, if BPSU MDET=0 (de tail forma t)
  338    ;      BP EXCEL=(0-N o, 1-Yes,  ^)
  339    ;    BPQ  - device v ariable -  I POP S BP Q=1 otherw ise BPQ=0
  340    ;
  341    ; The fol lowing loc al variabl es are not  set in BP SRPT0 howe ver they a re used in  several
  342    ; BPSRPT*  routines.   They are  not passe d as param eters but  assumed to  be define d.
  343    ;    BPBL INE - blan k line ind icator, 1- print blan k line
  344    ;    BPGR PLAN - ins urance pla n name
  345    ;    BPSD ATA - tell s whether  data has b een displa yed to the  screen (0 -No,1-Yes)
  346    ;                            
  347   EN(BPRTYPE ) N %,BPAC REJ,BPAUTR EV,BPBEGDT ,BPCCRSN,B PDRGCL,BPD RUG,BPENDD T,BPEXCEL, BPNOW,BPPH ARM,BPINSI NF,BPMWC,B PQ,BPQSTDR G
  348    N BPREJCD ,BPRLNRL,B PRPTNAM,BP RTBCK,BPSC R,BPSUMDET ,CODE,POS, STAT,X,Y,B PINS,BPARR ,BPELIG,BP OPCL
  349    N BPNBSTS ,BPALRC,BP ELIG1,BPRE SC,BPPAT,B PQSTPAT,BP BILL,BPMIN ,BPMAX,BPS LC,BPSUC,B PSCOMMENT
  350    N BPQSTCR ,BPQSTPR,B PQSTRC
  351    ;
  352    ;Verify t hat a vali d report h as been re quested
  353    I ",1,2,3 ,4,5,6,7,8 ,9,"'[("," _$G(BPRTYP E)_",") W  "<Invalid  Menu Defin ition - Re port Undef ined>" H 3  Q
  354    S BPRPTNA M=$P("PAYA BLE CLAIMS ^REJECTED  CLAIMS^SUB MIT,NOT RE LEASED CLA IMS^REVERS ED CLAIMS^ RECENT TRA NSACTIONS^ TOTALS^CLO SED CLAIMS ^SPENDING  ACCOUNT RE PORT^RXS W ITH NON-BI LLABLE STA TUS","^",B PRTYPE)
  355    ;
  356    ;Needed t o convert  lower case  entries t o upper ca se
  357    S BPSLC=" abcdefghij klmnopqrst uvwxyz"
  358    S BPSUC=" ABCDEFGHIJ KLMNOPQRST UVWXYZ"
  359    ;
  360    ;Get curr ent Date/T ime
  361    D NOW^%DT C S Y=% D  DD^%DT S B PNOW=Y
  362    ;
  363   DIV ;
  364    ;Prompt f or ECME Ph armacy Div ision(s) ( No Default )
  365    ;Sets up  BPPHARM va riable and  array, BP PHARM =0 A LL or BPPH ARM=1,BPPH ARM(ptr) f or list
  366    S X=$$SEL PHARM^BPSR PT3() G:(X ="^")&($G( BPPHARM)=" ") EXIT G: (X="^")&(B PPHARM=1)  DIV
  367   .
  368   .
  369   .
  370  
  371    ;Report S pecific Pr ompts
  372    ;
  373    ;Prompt t o select D ate Range
  374    ;Returns  (Start Dat e^End Date )
  375    S BPBEGDT =$$SELDATE ^BPSRPT3(B PRTYPE) D   I BPBEGDT ="^" G EXI T
  376    .I BPBEGD T="^" Q
  377    .S BPENDD T=$P(BPBEG DT,U,2)
  378    .S BPBEGD T=$P(BPBEG DT,U)
  379    ;
  380    ;Prompt t o Include  (R)ELEASED  or (N)OT  RELEASED o r (A)LL (D efault to  RELEASED)
  381    ;Returns  (1-ALL,2-R ELEASED,3- NOT RELEAS ED)
  382    S BPRLNRL =$S(BPRTYP E=3:3,1:1)  I (",1,2, 4,6,7,8,9, ")[BPRTYPE  S BPRLNRL =$$SELRLNR L^BPSRPT4( $S(BPRTYPE =9:1,1:2))  I BPRLNRL ="^" G EXI T
  383    ;
  384   REJCD ;
  385    ;Prompt t o Include  (S)pecific  Reject Co de or (A)L L (Default  to ALL)
  386    ;Returns  (0-All,1-R eject Code ,^=exit)
  387    S BPQSTRC =0 I (",2, ")[BPRTYPE  S BPQSTRC =$$SELRC^B PSRPT4(0)  I BPQSTRC= "^" G EXIT
  388    ;
  389    ;If Speci fic Reject  Code was  selected,  prompt for  one or mo re Reject  Codes
  390    ;Returns:  BPREJCD=a  string of  reject co de ien's s eparated b y a comma  (file #900 2313.93)
  391    S BPREJCD =0
  392    I BPQSTRC =1 S BPREJ CD=$$SELRE JCD^BPSRPT 4() G:BPRE JCD=0 REJC D G:BPREJC D="^" EXIT
  393    ;
  394    ;Prompt t o Include  Auto(R)eve rsed or (A )LL (Defau lt to ALL)
  395    ;Returns  (0-All,1-A utoReverse d)
  396    S BPAUTRE V=0 I (",4 ,")[BPRTYP E S BPAUTR EV=$$SELAU REV^BPSRPT 4(0) I BPA UTREV="^"  G EXIT
  397    ;
  398    ;Prompt t o Include  A(C)cepted  or (R)eje cted or (A )LL (Defau lt to REJE CTED)
  399    ;Returns  (0-All,1-R ejected,2- Accepted)
  400    S BPACREJ =0 I (",4, ")[BPRTYPE  S BPACREJ =$$SELACRE J^BPSRPT4( 1) I BPACR EJ="^" G E XIT
  401    ;
  402   CCR ;
  403    ;Prompt t o select ( S)pecific  Close Clai m Reason o r (A)ll (D efault to  All)
  404    ;Returns  (0-All,1-C lose Claim  Reason,^= exit)
  405    S BPQSTCR =0 I (",7, ")[BPRTYPE  S BPQSTCR =$$SELCCR^ BPSRPT4(0)  I BPQSTCR ="^" G EXI T
  406    ;
  407    ;If Speci fic Close  Claim Reas on was sel ected, pro mpt for on e or more  Close Clai m Reasons
  408    ;Returns:  BPCCRSN=a  string of  close cla im reason  ien's sepa rated by a  comma
  409    S BPCCRSN =0
  410    I BPQSTCR =1 S BPCCR SN=$$SELCC RSN^BPSRPT 4() G:BPCC RSN=0 CCR  I BPCCRSN= "^" G EXIT
  411    ;
  412    ;;Prompt  for Eligib ility Indi cator for  payable, r ejected, r eversed an d closed c laims repo rt
  413    ;;Returns  (V=VETERA N,T=TRICAR E,C=CHAMPV A,0=All)
  414    ;;S BPELI G=0 I (",1 ,4,7,")[BP RTYPE S BP ELIG=$$SEL ELIG^BPSRP T3(1) I BP ELIG="^" G  EXIT
  415    ;
  416    ;Prompt f or All or  Most Recen t (Non-Bil lable Stat us Report  only)
  417    ;Returns  A - All, R  - Most Re cent
  418    S BPALRC= 0 I (",9," )[BPRTYPE  S BPALRC=$ $SELALRC^B PSRPT3() I  BPALRC="^ " G EXIT
  419    ;
  420    ;Prompt f or one, mu ltiple or  (A)ll Elig ibility In dicator
  421    ;Returns  (0-All, 1- selection)
  422    ; If 1, B PARR("ELIG ",xx) is s et for eac h eligibil ity select ed - xx="V ", "T" or  "C"
  423    S BPELIG1 =0 I (",1, 2,3,4,7,9, ")[BPRTYPE  S BPELIG1 =$$SELELIG 1^BPSRPT3( ) I BPELIG 1="^" G EX IT
  424    ;
  425    ;Prompt f or Open/Cl osed/All c laims
  426    ;Returns  (1=Closed, 2=Open,0=A ll)
  427    S BPOPCL= 0 I (",2," )[BPRTYPE  S BPOPCL=$ $SELOPCL^B PSRPT3(2)  I BPOPCL=" ^" G EXIT
  428    ;
  429   PRESCR ; 
  430    ;Prompt t o select S PECIFIC PR ESCRIBER(S ) or (A)ll  Prescribe rs
  431    ;Returns:  (0=ALL,1= Prescriber ,^=exit)
  432    S BPQSTPR =0 I (",2, ")[BPRTYPE  S BPQSTPR =$$SELPR^B PSRPT3A()  I BPQSTPR= "^" G EXIT
  433    ;
  434    ;If Speci fic Prescr iber was s elected, p rompt for  one or mor e prescrib ers
  435    ;Returns:  BPRESC=a  string of  prescriber  ien's sep arated by  a comma
  436    S BPRESC= 0
  437    I BPQSTPR =1 S BPRES C=$$SELPRE SC^BPSRPT3 A() G:BPRE SC=0 PRESC R I BPRESC ="^" G EXI T
  438    ; 
  439   PATIENT ;     
  440    ;Prompt t o select ( P)atients  or (A)LL P atients
  441    ;Returns:  (0=ALL,1= Patient,^= exit)
  442    S BPQSTPA T=0 I (",1 ,2,3,4,7,9 ,")[BPRTYP E S BPQSTP AT=$$SELPA ^BPSRPT3A( ) I BPQSTP AT="^" G E XIT
  443    ;
  444    ;If (P)at ients was  selected,  prompt for  one or mo re patient s
  445    ;Returns:  BPPAT=a s tring of p atient ien 's separat ed by a co mma
  446    S BPPAT=0
  447    I BPQSTPA T=1 S BPPA T=$$SELPAT ^BPSRPT3A( ) G:BPPAT= "^" EXIT G :BPPAT=0 P ATIENT
  448    ;
  449    ;Prompt t o select(R )ange for  Billed Amo unt or (A) LL
  450    ;Returns:  (0=ALL,1= Range,^=ex it)
  451    S BPBILL= 0 I (",1,2 ,3,4,9,")[ BPRTYPE S  BPBILL=$$S ELBAMT^BPS RPT3A() I  BPBILL="^"  G EXIT
  452    ;If Range  of Billed  Amount wa s selected  prompt fo r Minimum  and Maximu m
  453    ;Returns:  BPMIN=min imum amoun t entered,  BPMAX=max imum amoun t entered
  454    S (BPMIN, BPMAX)=0
  455    I BPBILL= 1 W !,"Ran ge for the  Billed Am ount" D  I  (BPMIN="^ ")!(BPMAX= "^") G EXI T
  456    . S BPMIN =$$SELBMIN ^BPSRPT3A( ) I BPMIN= "^" Q
  457    . S BPMAX =$$SELBMAX ^BPSRPT3A( )
  458    ;
  459    ;Prompt f or Non-Bil lable Stat us (Non-Bi llable Sta tus Report  only)
  460    ;Sets up  BPNBSTS va riable and  array, BP NBSTS=0 AL L or BPNBS TS=1,BPNBS TS(xx) for  list
  461    S BPNBSTS =0 I (",9, ")[BPRTYPE  S BPNBSTS =$$SELNBST S^BPSRPT3( ) I BPNBST S="^" G EX IT
  462    ;
  463    ;Prompt f or Excel C apture (De tail Only)
  464    S BPEXCEL =0 I 'BPSU MDET S BPE XCEL=$$SEL EXCEL^BPSR PT4() I BP EXCEL="^"  G EXIT
  465    ;
  466    ;Prompt f or the Dev ice
  467    I 'BPEXCE L D
  468    .W !!,"WA RNING - TH IS REPORT  REQUIRES T HAT A DEVI CE WITH 13 2 COLUMN W IDTH BE US ED."
  469    .W !,"IT  WILL NOT D ISPLAY COR RECTLY USI NG 80 COLU MN WIDTH D EVICES",!
  470    S BPQ=0 D  DEVICE(BP RPTNAM) Q: BPQ
  471    ;
  472    ;Compile  and Run th e Report
  473    D RUN(BPE XCEL,BPRPT NAM,BPSUMD ET)
  474    I 'BPQ D  PAUSE2^BPS RPT1
  475    ;
  476   EXIT Q
  477      
  478  
  479  
  480  
  481  
  482   The modifi cations to  SEL^BPSRP T3A, descr ibed below , will all ow the use r to delet e a previo usly selec ted entry.
  483  
  484   Prior to t he changes  for US403 9 only the  Drug/Drug  Class and  Patient f ilter ques tions call ed this su broutine,  however th e Prescrib er filter  question w ill be mod ified to c all this s ubroutine.  The Drug  Class filt er questio n will no  longer cal l SEL^BPSR PT3A.
  485  
  486   Subroutine  Name
  487   SEL^BPSRPT 3A
  488   Enhancemen t Category
  489    New
  490    Modify
  491    Delete
  492    No Change
  493   Current Lo gic
  494  
  495   SEL(FIELD, FILE,BPSAR RAY,DEFAUL T) ; ; Pro vides fiel d selectio n for One  or More N  DIC,DTOUT, DUOUT,QT,Y ,X N BPSAR R ; S DIC= FILE,DIC(0 )="QEZAM", DIC("A")=" Select "_F IELD_": "  I $G(DEFAU LT)'="" S  DIC("B")=D EFAULT ; F   D ^DIC Q :X=""  D   Q:$G(QT) .  ; Check f or "^" or  timeout, i f found se t BPSARRAY ="^" and q uit. . I $ D(DTOUT)!$ D(DUOUT) K  BPSARRAY  S BPSARRAY ="^",QT=1  Q . ; . ;  If selecti on already  exists in  BPSARRAY,  then disp lay messag e . ; "(al ready sele cted)" and  prompt fo r next sel ection. .  I $D(BPSAR RAY(+Y)) W  " (alread y selected )" . S BPS ARRAY(+Y)= $P(Y,"^",2 ) . W " ", $P(Y,"^",2 ),! . ; .  S DIC("A") ="Select " _FIELD_":  " . ; . ;  display a  list of cu rrent sele ctions . I  FIELD="Dr ug Class"  D . . S BP SARR="" .  . F  S BPS ARR=$O(BPS ARRAY(BPSA RR)) Q:'BP SARR  I BP SARR'=+Y W  ?3,$$GET1 ^DIQ(50.60 5,BPSARR,1 )," ",$$GE T1^DIQ(50. 605,BPSARR ,.01),! .  ; . I $D(B PSARRAY),F IELD'="Dru g Class" D  . . S BPS ARR="" F   S BPSARR=$ O(BPSARRAY (BPSARR))  Q:'BPSARR   W ?10,BPS ARRAY(BPSA RR),! . K  DIC("B") ;  ; If noth ing was se lected set  BPSARRAY= 0 I '$D(BP SARRAY) S  BPSARRAY=0  Q
  496  
  497   Modified L ogic (Chan ges are hi ghlighted)
  498  
  499   SEL(FIELD, FILE,BPSAR RAY,DEFAUL T) ;
  500    ; Provide s selectio n of one o r many Dru g, Prescri ber and Pa tients.
  501    ; Note: i f you make  changes t o this sub routine yo u need to  check DCSE L,RCSEL^BP SRPT4, CCR SEL^BPSRPT 4
  502    ;       t hey might  require th e same cha nges.
  503    N DIC,DTO UT,DUOUT,Q T,Y,X
  504    N BPSARR
  505    ;
  506    S DIC=FIL E,DIC(0)=" QEZAM",DIC ("A")="Sel ect "_FIEL D_": "
  507    I FIELD=" Prescriber " S DIC("S ")="I +$G( ^VA(200,Y, ""PS""))"
  508    I $G(DEFA ULT)'="" S  DIC("B")= DEFAULT
  509    ;
  510    F  D ^DIC  Q:X=""  D   Q:$G(QT)
  511    . ; Check  for "^" o r timeout,  if found  set BPSARR AY="^" and  quit.
  512    . I $D(DT OUT)!$D(DU OUT) K BPS ARRAY S BP SARRAY="^" ,QT=1 Q
  513    . ;
  514    . ; If se lection al ready exis ts in BPSA RRAY, ask  user if th ey
  515    . ; want  to Delete  the entry.
  516    . I $D(BP SARRAY(+Y) ) D  Q
  517    . . N P
  518    . . S P=Y  ;Save Ori ginal Valu e
  519    . . S DIR (0)="S^Y:Y ES;N:NO"
  520    . . S DIR ("A")="Del ete "_$P(P ,U,2)_" fr om your li st?"
  521    . . I FIE LD="Drug C lass" S DI R("A")="De lete "_$$G ET1^DIQ(50 .605,+P,1) _" from yo ur list?"
  522    . . S DIR ("B")="NO"  D ^DIR
  523    . . I Y=" Y" K BPSAR RAY(+P),BP SARRAY("B" ,$P(P,U,2) ,+P)
  524    . . ; Dis play a lis t of curre nt selecti ons
  525    . . I $D( BPSARRAY)  D
  526    . . . N X
  527    . . . W ! ,?2,"Selec ted:"
  528    . . . S X ="" F  S X =$O(BPSARR AY("B",X))  Q:X=""  W  ?12,X,!
  529    . E  D
  530    . .  ;Def ine new en tries in B PSCCR arra y
  531    . .  S BP SARRAY(+Y) =$P(Y,U,2)
  532    . .  S BP SARRAY("B" ,$P(Y,U,2) ,+Y)=""
  533    . ;
  534    . ; Displ ay a list  of current  selection s
  535    . N X
  536    . W !,?2, "Selected: "
  537    . S X=""  F  S X=$O( BPSARRAY(" B",X)) Q:X =""  W ?12 ,X,!
  538    . K DIC(" B")
  539    ;
  540    ; If noth ing was se lected set  BPSARRAY= 0
  541    I '$D(BPS ARRAY) S B PSARRAY=0
  542    Q
  543      
  544  
  545   The Drug C lass will  be modifie d to call  a new subr outine whe n the user  is making  their sel ections.  
  546  
  547   Subroutine  Name
  548   DCSEL^BPSR PT3A
  549   Enhancemen t Category
  550    New
  551    Modify
  552    Delete
  553    No Change
  554   Related Ro utines
  555   This Subro utine is C alled By
  556   This Subro utine Call s
  557  
  558   SELDC^BPSR PT3A
  559   -
  560   Related In tegration  Control Re gistration s (ICRs)
  561   N/A
  562   Data Passi ng
  563    Parameter  Input
  564    Parameter  Output
  565    Function  Return Val ue
  566    Global Mo dified
  567   Current Lo gic
  568  
  569   n/a – new  subroutine
  570  
  571   Modified L ogic (Chan ges are hi ghlighted)
  572  
  573   DCSEL(FIEL D,FILE,BPS ARRAY,DEFA ULT) ;
  574    ; Provide s selectio n of one o r many for  Drug Clas ses.
  575    N BPSARR, DIC,DTOUT, DUOUT,QT,Y ,X
  576    ;
  577    S DIC=FIL E,DIC(0)=" QEZAM",DIC ("A")="Sel ect "_FIEL D_": "
  578    I $G(DEFA ULT)'="" S  DIC("B")= DEFAULT
  579    ;
  580    F  D ^DIC  Q:X=""  D   Q:$G(QT)
  581    . ;
  582    . ; Check  for "^" o r timeout,  if found  set BPSARR AY="^" and  quit.
  583    . I $D(DT OUT)!$D(DU OUT) K BPS ARRAY S BP SARRAY="^" ,QT=1 Q
  584    . ;
  585    . ; If se lection al ready exis ts in BPSA RRAY, ask  user if th ey
  586    . ; want  to Delete  the entry
  587    . I $D(BP SARRAY(+Y) ) D  Q
  588    . . N P
  589    . . S P=Y  ;Save Ori ginal Valu e
  590    . . S DIR (0)="S^Y:Y ES;N:NO"
  591    . . S DIR ("A")="Del ete "_$$GE T1^DIQ(50. 605,+P,1)_ " "_$$GET1 ^DIQ(50.60 5,+P,.01)_ " from you r list?"
  592    . . S DIR ("B")="NO"
  593    . . D ^DI R
  594    . . I Y=" Y" K BPSAR RAY(+P),BP SARRAY("B" ,$P(P,U,2) ,+P)
  595    . . ; Dis play list  of current  selection s
  596    . . I $D( BPSARRAY)  D
  597    . . . N X
  598    . . . W ! ,?2,"Selec ted:"
  599    . . . S X ="" F  S X =$O(BPSARR AY(X)) Q:( X="")!(X=" B")  W ?12 ,$$GET1^DI Q(50.605,X ,1)," ",$$ GET1^DIQ(5 0.605,X,.0 1),!
  600    . E  D
  601    . . ;Defi ne new ent ries in BP SCCR array
  602    . . S BPS ARRAY(+Y)= $P(Y,U,2)
  603    . . S BPS ARRAY("B", $P(Y,U,2), +Y)=""
  604    . ;
  605    . ;Displa y a list o f current  selections
  606    . N X
  607    . W !,?2, "Selected: "
  608    . S X=""  F  S X=$O( BPSARRAY(X )) Q:(X="" )!(X="B")   W ?12,$$G ET1^DIQ(50 .605,X,1), " ",$$GET1 ^DIQ(50.60 5,X,.01),!
  609    . K DIC(" B")
  610    ;
  611    ; If noth ing was se lected set  BPSARRAY= 0
  612    I '$D(BPS ARRAY) S B PSARRAY=0
  613    Q
  614      
  615  
  616   A new subr outine, SE LRC^BPSRPT 4, that wi ll prompt  the user t o either s elect a Sp ecific Rej ect Code o r All Reje ct Codes.   This was  previously  part of S ELREJCD^BP SRPT4.
  617  
  618   Subroutine  Name
  619   SELRC^BPSR PT4
  620   Enhancemen t Category
  621    New
  622    Modify
  623    Delete
  624    No Change
  625   Related Ro utines
  626   This Subro utine is C alled By
  627   This Subro utine Call s
  628  
  629   EN^BPSRPT0
  630   -
  631   Related In tegration  Control Re gistration s (ICRs)
  632   N/A
  633   Data Passi ng
  634    Parameter  Input
  635    Parameter  Output
  636    Function  Return Val ue
  637    Global Mo dified
  638   Input Attr ibute Name  and Defin ition
  639   Name: DFLT
  640   Definition : 0 defaul t to All
  641    New       Modify       Delete       No Cha nge
  642   Output Att ribute Nam e and Defi nition
  643   Name:
  644   Definition : 1=Specif ic Reject  Codes, 0=A LL, ^=Exit
  645    New       Modify       Delete       No Cha nge
  646   Current Lo gic
  647  
  648   n/a – new  subroutine
  649  
  650   Modified L ogic (Chan ges are hi ghlighted)
  651  
  652   SELRC(DFLT ) ;
  653    ;
  654    ; Display  (S)pecifi c Reject C odes or (A )ll
  655    ; 
  656    ;    Inpu t Variable  -> DFLT =  ALL
  657    ;                            
  658    ;     Ret urn Value  ->   1 = R eject Code s
  659    ;                         0 = A LL
  660    ;                         ^ = E xit
  661    ;                         
  662    N DIR,DIR UT,DTOUT,D UOUT,X,Y
  663    ;
  664    ;Select t o include  (S)pecific  Reject Co des or (A) ll Reject  Codes
  665    ;
  666    S DIR(0)= "S^S:Speci fic Reject  Code);A:A LL"
  667    S DIR("A" )="Include  (S)pecifi c Reject C ode or (A) LL"
  668    S DIR("B" )="A"
  669    S DIR("L" ,1)="Selec t one of t he followi ng:"
  670    S DIR("L" ,2)=""
  671    S DIR("L" ,3)="      S          Specific R eject Code "
  672    S DIR("L" ,4)="      A          ALL"
  673    D ^DIR
  674    I ($G(DUO UT)=1)!($G (DTOUT)=1)  S Y="^"
  675    S Y=$S(Y= "A":0,Y="S ":1,1:Y)
  676    Q Y
  677  
  678  
  679   SELREJCD^B PSRPT4 wil l be modif ied to no  longer ask  the user  if they wa nt to sele ct a Speci fic Reject  Codes or  All.  It w ill also b e modified  to call R CSEL^BPSRP T4, which  will promp t the user  for a one  or many R eject Code (s).
  680  
  681   Subroutine  Name
  682   SELREJCD^B PSRPT4
  683   Enhancemen t Category
  684    New
  685    Modify
  686    Delete
  687    No Change
  688   Current Lo gic
  689  
  690   SELREJCD()  ; ; User  input will  be tempor arily stor ed in BPS1 15AR for d isplay to  user  ; of  selected  REJECT COD ES. ;  ; I f 'S' is s elected, a t least on e REJECT C ODE must b e selected . If no se lection  ;  was made  the user w ill be re- prompted t o select a  reject co de. ;  ; U pon comple tion of RE JECT CODE( s) entry,  values wil l be place d into a s tring  ; d elimited b y commas.  e.g. BPARR ("REJ")="5 0,60," ;   ; BPSRCAR  = array co ntaining R EJECT CODE  informati on ; BPSRC AR(BPSRC)= BPSRCE ; B PSRC = IEN  from File  #9002313. 93 / BPSRC E = Reject  Code Expl anation  ;  N BPSREJ, DIR,DIRUT, DTOUT,DUOU T,X,Y ; ;  BPSREJ = 1 ^S - Speci fic Reject  Code ; 1^ A - ALL ;  -1 - if us er entered  "^" ; S B PSREJ=$$ED ITFLD^BPSS CRCV(1.1,D UZ,"S^S:Sp ecific Rej ect Code;A :ALL","Inc lude (S)pe cific Reje ct Code or  (A)LL","A LL",.BPARR ) ; ;If (A )LL was se lected, re turn 0 (ze ro) I BPSR EJ["A" Q 0  ;If user  entered "^ " to exit,  return "^ " I BPSREJ =-1 Q "^"  ;BPSREJCD  ; N BPARR, BPSCNT,BPS RC,BPSRCAR ,BPSRCC,BP SRCE,BPSRC X N DFLTVA L,DIR0,PRM TMSG ; ;If  (S)pecifi c Reject C ode was se lected, as sign exist ing entry( s) into BP S115AR arr ay. I $P(B PSREJ,U,2) ="S" D . ; Prompt use r to enter  one or mu ltiple Rej ect Codes  . S BPSRC= "" F  D  Q :BPSRC=-1  . . S DIR0 ="P^BPSF(9 002313.93, " . . S PR MTMSG="Sel ect Reject  Code" . .  S DFLTVAL ="" . . S  BPSRC=$$PR OMPT^BPSSC RCV(DIR0,P RMTMSG,DFL TVAL) . .  ; . . ; If  user didn 't make a  selection  . . I BPSR C=-1 Q . .  ; . . ; G et the Cod e and Expl anation fo r the Reje ct Code se lected . .  S BPSRCC= $$GET1^DIQ (9002313.9 3,BPSRC,.0 1) . . S B PSRCE=$$GE T1^DIQ(900 2313.93,BP SRC,.02) .  . ; . . ;  If entry  doesn't ex ist, add n ew entry i nto BPSRCA R array. .  . I '$D(B PSRCAR(BPS RC)) S BPS RCAR(BPSRC )=BPSRCC_U _BPSRCE .  . ; . . ;  Display ex isting ent ry(s) to u ser. . . I  $D(BPSRCA R) D . . .  S BPSRC=" " F  S BPS RC=$O(BPSR CAR(BPSRC) ) Q:BPSRC= ""  W !,?3 ,$P(BPSRCA R(BPSRC),U ),?13,$P(B PSRCAR(BPS RC),U,2) .  ; . ; If  user selec ted (S)pec ific Rejec t Code, re turn "^" i n order fo r the user  to return  to the me nu . I '$D (BPSRCAR)  S BPARR("R EJCD")="^"  Q . ; . ;  Loop thro ugh select ed reject  codes, set  selected  reject cod es into BP ARR("REJCD ") delimit ed by comm a.  . S BP ARR("REJCD ")="" . S  BPSRC="" F   S BPSRC= $O(BPSRCAR (BPSRC)) Q :BPSRC=""   S BPARR(" REJCD")=BP ARR("REJCD ")_BPSRC_" ," ;SELRCX  ; Q BPARR ("REJCD")
  691  
  692   Modified L ogic (Chan ges are hi ghlighted)
  693  
  694   SELREJCD()  ; ; Allow  user to s elect a si ngle or mu ltiple REJ ECT CODEs.
  695    ;
  696    ; If the  users sele cted one o r more REJ ECT CODEs,  the selec tion will  be stored
  697    ; in BPAR R("RC")sep arated by  a comma. e .g. BPARR( "RC")= ien 1 , ien2
  698    ;
  699   BPSREJCD ;
  700    N DIR,DIR UT,DTOUT,D UOUT,X,Y
  701    N BPARR,B PSARRAY,BP SIEN
  702    ;
  703    S BPARR(" RC")=""
  704    ;
  705    ; This ta g prompts  user to 'S elect Reje ct Code' a nd validat es it agai nst file # 9002313.93 .
  706    D SEL1(.B PSARRAY)
  707    ;
  708    ; If the  user enter ed "^" qui t, no long er prompti ng the use r to 'Sele ct Reject  Code'
  709    I $G(BPSA RRAY)="^"  Q "^"
  710    ;
  711    ; If no R eject Code  was selec ted, retur n the user  to 'Inclu de (S)peci fic Reject  Code or ( A)LL'
  712    I $G(BPSA RRAY)=0 Q  0
  713    ;
  714    M BPARR(" RC")=BPSAR RAY
  715    ;
  716    ; Creates  a string  of all the  Reject Co de ien's s elected se parated by  a comma.
  717    S BPSIEN= ""
  718    F  S BPSI EN=$O(BPAR R("RC",BPS IEN)) Q:BP SIEN=""  I  BPSIEN'=" B" D
  719    . I BPARR ("RC")'=""  S BPARR(" RC")=BPARR ("RC")_","
  720    . S BPARR ("RC")=BPA RR("RC")_B PSIEN
  721    . Q
  722    ;
  723    Q BPARR(" RC")
  724      
  725  
  726   A new subr outine RCS EL^BPSRPT4  will be c reated tha t was mode led after  SEL^BPSRPT 3A.  It wi ll only be  used by t he Reject  Code(s) pr ompt. 
  727   Subroutine  Name
  728   RCSEL^BPSR PT4
  729   Enhancemen t Category
  730    New
  731    Modify
  732    Delete
  733    No Change
  734   Related Ro utines
  735   This Subro utine is C alled By
  736   This Subro utine Call s
  737  
  738   SELREJCD^B PSRPT4
  739   -
  740   Related In tegration  Control Re gistration s (ICRs)
  741   N/A
  742   Data Passi ng
  743    Parameter  Input
  744    Parameter  Output
  745    Function  Return Val ue
  746    Global Mo dified
  747   Input Attr ibute Name  and Defin ition
  748   Name: N/A
  749   Definition
  750    New       Modify       Delete       No Cha nge
  751   Output Att ribute Nam e and Defi nition
  752   Name: BPSA RRAY
  753   Definition : array co ntaining t he reject  code(s) se lected
  754    New       Modify       Delete       No Cha nge
  755   Current Lo gic
  756  
  757   n/a – new  subroutine
  758  
  759   Modified L ogic (Chan ges are hi ghlighted)
  760  
  761   RCSEL(BPSA RRAY) ;
  762    ; Prompts  user to s elect one  or more Re ject Codes
  763    ;
  764    N DIC,DTO UT,DUOUT,Q T,Y,X
  765    N BPSCODE ,BPSEXP
  766    ;
  767    S DIC="^B PSF(900231 3.93,",DIC (0)="AEMNQ "
  768    S DIC("A" )="Select  Reject Cod e: "
  769    I $G(DEFA ULT)'="" S  DIC("B")= DEFAULT
  770    ;
  771    F  D ^DIC  Q:X=""  D   Q:$G(QT)
  772    . ; Check  for "^" o r timeout,  if found  set BPSARR AY="^" and  quit.
  773    . I $D(DT OUT)!$D(DU OUT) K BPS ARRAY S BP SARRAY="^" ,QT=1 Q
  774    . ;
  775    . ; If se lection al ready exis ts in BPSA RRAY, ask  user if th ey
  776    . ; want  to Delete  the entry.
  777    . I $D(BP SARRAY(+Y) ) D  Q
  778    . . N P
  779    . . S P=Y  ;Save Ori ginal Valu e
  780    . . S DIR (0)="S^Y:Y ES;N:NO"
  781    . . S DIR ("A")="Del ete "_$P(B PSARRAY("B ",+P),U,1) _" "_$P(BP SARRAY("B" ,+P),U,2)_ " from you r list?"
  782    . . S DIR ("B")="NO"
  783    . . D ^DI R
  784    . . I Y=" Y" K BPSAR RAY(+P),BP SARRAY("B" ,+P)
  785    . . ; Dis play a lis t of curre nt selecti ons
  786    . . I $D( BPSARRAY)  D
  787    . . . N X
  788    . . . W ! ,?2,"Selec ted:"
  789    . . . S X ="" F  S X =$O(BPSARR AY("B",X))  Q:X=""  D
  790    . . . W ? 12,$P(BPSA RRAY("B",X ),U)," ",$ P(BPSARRAY ("B",X),U, 2),!
  791    . E  D
  792    . . ;Defi ne new ent ries in BP SARRAY
  793    . . ; Get  the Rejec t Code and  Explanati on for the  selected  Reject Cod e
  794    . . S BPS CODE=$$GET 1^DIQ(9002 313.93,+Y, .01)
  795    . . S BPS EXP=$$GET1 ^DIQ(90023 13.93,+Y,. 02)
  796    . . S BPS ARRAY(+Y)= Y
  797    . . S BPS ARRAY("B", +Y)=BPSCOD E_"^"_BPSE XP
  798    . ;
  799    . ; Displ ay a list  of current  selection s
  800    . N X
  801    . W !,?2, "Selected: "
  802    . S X=""  F  S X=$O( BPSARRAY(" B",X)) Q:X =""  W ?12 ,$P(BPSARR AY("B",X), U,1)," ",$ P(BPSARRAY ("B",X),U, 2),!
  803    ;
  804    ; If noth ing was se lected set  BPSARRAY= 0
  805    I '$D(BPS ARRAY) S B PSARRAY=0
  806    Q
  807      
  808  
  809   A new subr outine SEL CCR^BPSRPT 4 will be  created th at will pr ompt the u ser to eit her select  Specific  Close Clai m Reasons  or All Clo se Claim R easons.  T his was pr eviously p art of SEL CCRSN^BPSR PT4.
  810  
  811   Subroutine  Name
  812   SELCCR^BPS RPT4
  813   Enhancemen t Category
  814    New
  815    Modify
  816    Delete
  817    No Change
  818   Related Ro utines
  819   This Subro utine is C alled By
  820   This Subro utine Call s
  821  
  822   EN^BPSRPT0
  823   -
  824   Related In tegration  Control Re gistration s (ICRs)
  825   N/A
  826   Data Passi ng
  827    Parameter  Input
  828    Parameter  Output
  829    Function  Return Val ue
  830    Global Mo dified
  831   Input Attr ibute Name  and Defin ition
  832   Name: DFLT
  833   Definition : 0 defaul t to All
  834    New       Modify       Delete       No Cha nge
  835   Output Att ribute Nam e and Defi nition
  836   Name: 
  837   Definition : 1=Close  Claim Reas ons, 0=ALL , ^=Exit
  838    New       Modify       Delete       No Cha nge
  839   Current Lo gic
  840  
  841   n/a – new  subroutine
  842  
  843   Modified L ogic (Chan ges are hi ghlighted)
  844  
  845   SELCCR(DFL T) ;
  846    ;
  847    ; Display  (S)pecifi c Close Cl aim Reason  or (A)ll
  848    ; 
  849    ;    Inpu t Variable  -> DFLT =  ALL
  850    ;                            
  851    ;     Ret urn Value  ->   1 = C lose Claim  Reasons
  852    ;                         0 = A LL
  853    ;                         ^ = E xit
  854    ;                         
  855    N DIR,DIR UT,DTOUT,D UOUT,X,Y
  856    ;
  857    ;Select t o include  (S)pecific  Close Cla im Reason  or (A)ll C lose Claim  Reasons
  858    ;
  859    S DIR(0)= "S^S:Speci fic Close  Claim Reas on;A:ALL"
  860    S DIR("A" )="Include  (S)pecifi c Close Cl aim Reason  or (A)LL"
  861    S DIR("B" )="A"
  862    D ^DIR
  863    I ($G(DUO UT)=1)!($G (DTOUT)=1)  S Y="^"
  864    S Y=$S(Y= "A":0,Y="S ":1,1:Y)
  865    Q Y
  866      
  867  
  868   SELCCRSN^B PSRPT4 wil l be modif ied to no  longer ask  the user  if they wa nt to sele ct a Speci fic Close  Claim Reas on or All.   It will  be modifie d to call  a new subr outine CCR SEL^BPSRPT 4 which wi ll prompt  the user f or a one o r many Clo se Claim R easons.
  869  
  870   Subroutine  Name
  871   SELCCRSN^B PSRPT4
  872   Enhancemen t Category
  873    New
  874    Modify
  875    Delete
  876    No Change
  877   Current Lo gic
  878   SELCCRSN(D FLT) ; N A RR,BPSARRA Y,BPSCCR,D IC,DIR,DIR UT,DUOUT,R SN,X,Y ; S  DFLT=$S($ G(DFLT)=1: "Specific  Close Clai m Reason", 1:"ALL") S  DIR(0)="S ^S:Specifi c Close Cl aim Reason ;A:ALL" S  DIR("A")=" Include (S )pecific C lose Claim  Reason or  (A)LL",DI R("B")=DFL T D ^DIR ;  ; ALL - B PSCCR=0 /  Specific C lose Claim  Reason -  BPSCCR=1 S  BPSCCR=$S (Y="S":1,Y ="A":0,1:Y ) ; ;If "^ " was ente red or the re was a T imeout, re turn "^" I  ($G(DUOUT )=1)!($G(D TOUT)=1) S  (RSN,Y)=" ^" ; Q:BPS CCR'=1 BPS CCR W ! ;  N DIC,DIRU T,DTOUT,DU OUT,X,Y ;B PSCCR ; ;U ser select ed (S)peci fic Close  Claim Reas on, allow  user to se lect one o r multiple  reasons.  S DIC(0)=" QEAM",DIC= 356.8,DIC( "A")="Sele ct Close C laim Reaso n: " F  D  ^DIC Q:X=" "  D  Q:$G (BPSARRAY) ="^" . ; C heck for " ^" or a ti meout, if  found set  BPSARRAY=" ^" and qui t. . I $D( DUOUT)!$D( DTOUT)!($D (DIRUT)) S  BPSARRAY= "^" Q . ;  . ; Add se lection to  BPSARRAY  and displa y close cl aim reason . . S BPSA RRAY(+Y)=$ P(Y,U,2) .  W " ",$P( Y,"^",2),!  . ; . ; D isplay a l ist of cur rent selec tions. . S  ARR="" F   S ARR=$O( BPSARRAY(A RR)) Q:'AR R  W ?10,B PSARRAY(AR R),! ; ; I f BPSARRAY ="^" quit  and return  "^". I $G (BPSARRAY) ="^" Q "^"  ; ; If no thing was  selected q uit and re turn "". I  '$D(BPSAR RAY) Q ""  ; ; Create  a comma d elimited s tring BPSC CR that co ntains the  selected  close clai m reason i en's. S BP SCCR="" S  ARR="" F   S ARR=$O(B PSARRAY(AR R)) Q:'ARR   S BPSCCR =BPSCCR_AR R_"," ; Q  BPSCCR
  879  
  880   Modified L ogic (Chan ges are hi ghlighted)
  881  
  882   SELCCRSN(D FLT) ;
  883    ;
  884    ; Allow u ser to sel ect a sing le or mult iple CLOSE  CLAIM REA SON(s).
  885    ;
  886    ; If the  users sele cted one o r more CLO SE CLAIM R EASONs, th e selectio n will be  stored
  887    ; in BPAR R("CCR")se parated by  a comma.  e.g. BPARR ("CCR")= i en1 , ien2
  888    ;   NOTE:  the ien's  are point ers to CLA IMS TRACKI NG NON-BIL LABLE REAS ONS (#356. 8)
  889    ;
  890   BPSCCR ;
  891    N DIR,DIR UT,DTOUT,D UOUT,X,Y
  892    N BPARR,B PSARRAY,BP SIEN
  893    ;
  894    S BPARR(" CCR")=""
  895    ;
  896    ; The SEL  tag promp ts user to  'Select C lose Claim  Reason' a nd validat es the sel ection
  897    ;  agains t file #35 6.8 - CLAI MS TRACKIN G NON-BILL ABLE REASO NS.
  898    D CCRSEL( "Close Cla im Reason" ,"^IBE(356 .8,",.BPSA RRAY)
  899    ;
  900    ; If the  user enter ed "^" qui t, no long er prompti ng the use r to 'Sele ct Close C laim Reaso n'
  901    I $G(BPSA RRAY)="^"  Q "^"
  902    ;
  903    ; If no C lose Claim  Reason wa s selected , return t he user to  'Include  (S)pecific  Close Cla im Reason  or (A)LL'
  904    I $G(BPSA RRAY)=0 Q  0
  905    ;
  906    M BPARR(" CCR")=BPSA RRAY
  907    ;
  908    ; Creates  a string  of all the  Close Cla im Reasons  ien's sel ected sepa rated by a  comma.
  909    S BPSIEN= ""
  910    F  S BPSI EN=$O(BPAR R("CCR",BP SIEN)) Q:B PSIEN=""   I BPSIEN'= "B" D
  911    . I BPARR ("CCR")'=" " S BPARR( "CCR")=BPA RR("CCR")_ ","
  912    . S BPARR ("CCR")=BP ARR("CCR") _BPSIEN
  913    . Q
  914    ;
  915    Q BPARR(" CCR")
  916     
  917  
  918   A new subr outine CCR SEL^BPSRPT 4 will be  created th at will pr ompt the u ser to sel ect Specif ic Close C laim Reaso ns.  This  prompt wil l prompt t o user to  delete dup licate ent ries. 
  919  
  920   Subroutine  Name
  921   CCRSEL^BPS RPT4
  922   Enhancemen t Category
  923    New
  924    Modify
  925    Delete
  926    No Change
  927   Related Ro utines
  928   This Subro utine is C alled By
  929   This Subro utine Call s
  930  
  931   SELCCRSN^B PSRPT3A
  932   -
  933   Related In tegration  Control Re gistration s (ICRs)
  934   N/A
  935   Data Passi ng
  936    Parameter  Input
  937    Parameter  Output
  938    Function  Return Val ue
  939    Global Mo dified
  940   Current Lo gic
  941  
  942   n/a – new  subroutine
  943  
  944   Modified L ogic (Chan ges are hi ghlighted)
  945  
  946   CCRSEL(FIE LD,FILE,BP SARRAY,DEF AULT) ;
  947    ; Provide s selectio n of one o r many Clo se Claim R easons.
  948    ;
  949    N BPSARR, DIC,DTOUT, DUOUT,QT,Y ,X
  950    ;
  951    S DIC=FIL E,DIC(0)=" QEZAM",DIC ("A")="Sel ect "_FIEL D_": "
  952    I $G(DEFA ULT)'="" S  DIC("B")= DEFAULT
  953    ;
  954    F  D ^DIC  Q:X=""  D   Q:$G(QT)
  955    . ; Check  for "^" o r timeout,  if found  set BPSARR AY="^" and  quit.
  956    . I $D(DT OUT)!$D(DU OUT) K BPS ARRAY S BP SARRAY="^" ,QT=1 Q
  957    . ;
  958    . ; If se lection al ready exis ts in BPSA RRAY, ask  user if th ey
  959    . ; want  to Delete  the entry
  960    . I $D(BP SARRAY(+Y) ) D  Q
  961    . . N P
  962    . . S P=Y  ;Save Ori ginal Valu e
  963    . . S DIR (0)="S^Y:Y ES;N:NO"
  964    . . S DIR ("A")="Del ete "_$P(P ,U,2)_" fr om your li st?"
  965    . . S DIR ("B")="NO"
  966    . . D ^DI R
  967    . . I Y=" Y" K BPSAR RAY(+P),BP SARRAY("B" ,$P(P,U,2) ,+P)
  968    . . ; Dis play a lis t of curre nt selecti ons
  969    . . I $D( BPSARRAY)  D
  970    . . . N X
  971    . . . W ! ,?2,"Selec ted:"
  972    . . . S X ="" F  S X =$O(BPSARR AY(X)) Q:( X="")!(X=" B")  W ?12 ,BPSARRAY( X),!
  973    . E  D
  974    . . ;Defi ne new ent ries in BP SCCR array
  975    . . S BPS ARRAY(+Y)= $P(Y,U,2)
  976    . . S BPS ARRAY("B", $P(Y,U,2), +Y)=""
  977    . ;
  978    . ;Displa y a list o f current  selections
  979    . N X
  980    . W !,?2, "Selected: "
  981    . S X=""  F  S X=$O( BPSARRAY(X )) Q:(X="" )!(X="B")   W ?12,BPS ARRAY(X),!
  982    . K DIC(" B")
  983    ;
  984    ; If noth ing was se lected set  BPSARRAY= 0
  985    I '$D(BPS ARRAY) S B PSARRAY=0
  986    Q
  987      
  988  
  989   A new subr outine SEL PR^BPSRPT3 A will be  created th at will pr ompt the u ser to eit her select  Specific  Prescriber s or All P rescribers .  This wa s previous ly part of  SELPRESC^ BPSRPT3A.
  990  
  991   Subroutine  Name
  992   SELPR^BPSR PT3A
  993   Enhancemen t Category
  994    New
  995    Modify
  996    Delete
  997    No Change
  998   Related Ro utines
  999   This Subro utine is C alled By
  1000   This Subro utine Call s
  1001  
  1002   EN^BPSRPT0
  1003   -
  1004   Related In tegration  Control Re gistration s (ICRs)
  1005   N/A
  1006   Data Passi ng
  1007    Parameter  Input
  1008    Parameter  Output
  1009    Function  Return Val ue
  1010    Global Mo dified
  1011   Input Attr ibute Name  and Defin ition
  1012   Name: DFLT
  1013   Definition : 0 defaul t to All
  1014    New       Modify       Delete       No Cha nge
  1015   Output Att ribute Nam e and Defi nition
  1016   Name: 
  1017   Definition : 1=Prescr ibers, 0=A LL, ^=Exit
  1018    New       Modify       Delete       No Cha nge
  1019   Current Lo gic
  1020  
  1021   n/a – new  subroutine
  1022  
  1023   Modified L ogic (Chan ges are hi ghlighted)
  1024  
  1025   SELPR(DFLT ) ;
  1026    ;
  1027    ; Display  (P)rescri bers or (A )ll
  1028    ; 
  1029    ;    Inpu t Variable  -> DFLT =  ALL
  1030    ;                            
  1031    ;     Ret urn Value  ->   1 = P rescribers
  1032    ;                         0 = A LL
  1033    ;                         ^ = E xit
  1034    ;                         
  1035    N DIR,DIR UT,DTOUT,D UOUT,X,Y
  1036    ;
  1037    ;Select t o include  (S)pecific  Prescribe r or (A)ll  Prescribe rs
  1038    ;
  1039    S DIR(0)= "S^S:SPECI FIC PRESCR IBER(S);A: ALL PRESCR IBERS"
  1040    S DIR("A" )="Select  Specific P rescriber( s) or incl ude ALL Pr escribers"
  1041    S DIR("B" )="A"
  1042    S DIR("L" ,1)="Selec t one of t he followi ng:"
  1043    S DIR("L" ,2)=""
  1044    S DIR("L" ,3)="      S          Specific P rescriber( s)"
  1045    S DIR("L" ,4)="      A          ALL Prescr ibers"
  1046    D ^DIR
  1047    I ($G(DUO UT)=1)!($G (DTOUT)=1)  S Y="^"
  1048    S Y=$S(Y= "A":0,Y="S ":1,1:Y)
  1049    Q Y
  1050      
  1051  
  1052   SELPRESC^B PSRPT3A wi ll be modi fied to no  longer as k the user  if they w ant to sel ect Specif ic Prescri bers or Al l Prescrib ers.  It w ill also b e modified  to call S EL^BPSRPT3 A which wi ll prompt  the user f or a one o r many Pre scribers.
  1053  
  1054   Subroutine  Name
  1055   SELPRESC^B PSRPT3A
  1056   Enhancemen t Category
  1057    New
  1058    Modify
  1059    Delete
  1060    No Change
  1061   Current Lo gic
  1062  
  1063   SELPRESC()  ; N DIR,D IRUT,DTOUT ,DUOUT,X,Y  ; ;Select  to includ e (S)pecif ic Prescri ber or (A) ll Prescri bers ; S D IR(0)="S^S :SPECIFIC  PRESCRIBER (S);A:ALL  PRESCRIBER S" S DIR(" A")="Selec t Specific  Prescribe r(s) or in clude ALL  Prescriber s" S DIR(" B")="A" S  DIR("L",1) ="Select o ne of the  following: " S DIR("L ",2)="" S  DIR("L",3) =" S Speci fic Prescr iber(s)" S  DIR("L",4 )=" A ALL  Prescriber s" D ^DIR  K DIR ; ;I f (A)LL wa s selected , return 0  (zero) I  Y="A" Q 0  ;If "^" wa s entered  or there w as a Timeo ut, return  "^" I (Y= "^")!($G(D UOUT)=1)!( $G(DTOUT)= 1)!($D(DIR UT)) Q "^"  W ! ;BPPR ESC ; ;Use r selected  (S)pecifi c Prescrib er, allow  user to se lect one o r multiple  Prescribe rs. N DIC, DIRUT,DTOU T,DUOUT,X, Y N ARR,BP SARRAY,BPS RESCAR K D IC,X,Y ; S  DIC(0)="Q EAM",DIC=" ^VA(200,", DIC("A")=" Select Pre scriber: "  S DIC("S" )="I +$G(^ VA(200,Y," "PS""))" F   D ^DIC Q :X=""  D   Q:$G(BPSAR RAY)="^" .  ; Check f or "^" or  a timeout,  if found  set BPSARR AY="^" and  quit. . I  $D(DUOUT) !$D(DTOUT) !($D(DIRUT )) S BPSAR RAY="^" Q  . ; . ; Ad d selectio n to BPSAR RAY and di splay Pres criber's N ame. . S B PSARRAY(+Y )=$P(Y,U,2 ) . W " ", $P(Y,"^",2 ),! . ; .  ; Display  a list of  current se lections.  . I $D(BPS ARRAY) D .  . S ARR=" " F  S ARR =$O(BPSARR AY(ARR)) Q :'ARR  W ? 10,BPSARRA Y(ARR),! ;  ; If BPSA RRAY="^" q uit and re turn "^".  I $G(BPSAR RAY)="^" Q  "^" ; ; I f nothing  was select ed, return  "^" so th e user wil l return t o the menu   I '$D(BP SARRAY) Q  "^" ; ; Cr eate a com ma delimit ed string  BPSRESCAR  that conta ins the se lected Pre scribers i en's. S BP SRESCAR=""  S ARR=""  F  S ARR=$ O(BPSARRAY (ARR)) Q:' ARR  S BPS RESCAR=BPS RESCAR_ARR _"," ; Q B PSRESCAR
  1064  
  1065   Modified L ogic (Chan ges are hi ghlighted)
  1066  
  1067   SELPRESC()  ;
  1068    ; Allow u ser to sel ect a sing le or mult iple PRESC RIBERS(s).
  1069    ;
  1070    ; If the  users sele cted one o r more PRE SCRIBERs,  the select ion will b e stored
  1071    ; in BPAR R("PRESC") separated  by a comma . e.g. BPA RR("PRESC" )= ien1 ,  ien2
  1072    ;
  1073   BPPRESC ;
  1074    N DIR,DIR UT,DTOUT,D UOUT,X,Y
  1075    N BPARR,B PSARRAY,BP SIEN
  1076    ;
  1077    S BPARR(" PRESC")=""
  1078    ;
  1079    ; The SEL  tag promp ts user to  'Select P rescriber'  and valid ates the s election a gainst fil e #200.
  1080    D SEL("Pr escriber", "^VA(200," ,.BPSARRAY )
  1081    ;
  1082    ; If the  user enter ed "^" qui t, no long er prompti ng the use r to 'Sele ct Prescri ber'
  1083    I $G(BPSA RRAY)="^"  Q "^"
  1084    ;
  1085    ; If no P rescriber  was select ed, return  the user  to 'Displa y Selected  (P)rescri bers or (A )LL'
  1086    I $G(BPSA RRAY)=0 Q  0
  1087    ;
  1088    M BPARR(" PRESC")=BP SARRAY
  1089    ;
  1090    ; Creates  a string  of all the  Prescribe r ien's se lected sep arated by  a comma.
  1091    S BPSIEN= ""
  1092    F  S BPSI EN=$O(BPAR R("PRESC", BPSIEN)) Q :BPSIEN=""   I BPSIEN '="B" D
  1093    . I BPARR ("PRESC")' ="" S BPAR R("PRESC") =BPARR("PR ESC")_","
  1094    . S BPARR ("PRESC")= BPARR("PRE SC")_BPSIE N
  1095    . Q
  1096    ;
  1097    Q BPARR(" PRESC")
  1098      
  1099  
  1100   The subrou tine PROCE SS^BPSRPT1  will need  to be mod ified when  checking  the Close  Reason, Re ject Code  and Prescr iber.  The y will no  longer con tain a tra iling “,”.   
  1101  
  1102   Subroutine  Name
  1103   PROCESS^BP SRPT1
  1104   Enhancemen t Category
  1105    New
  1106    Modify
  1107    Delete
  1108    No Change
  1109   Current Lo gic
  1110  
  1111   PROCESS(BP 59) ;
  1112    N BPBILLE D,BPBCK,BP BCKXBPDFN, BPREF,BPPA YBL,BPPLAN ,BPREJ,BPR LSDT,BPRX, BPRXDC,BPR XDRG,BPSTA TUS,BPSEQ, BPSTOP
  1113    ;
  1114    S BPSEQ=$ $COB59^BPS UTIL2(BP59 )
  1115    ;
  1116    ;Get ABSB RXI - ptr  to #52
  1117    S BPRX=+$ P($G(^BPST (BP59,1)), U,11)
  1118    ;
  1119    ;Get ABSB RXR - Pres cription N umber IEN
  1120    S BPREF=+ $P($G(^BPS T(BP59,1)) ,U)
  1121    ;
  1122    ;Get PATI ENT - ptr  to #2
  1123    S BPDFN=+ $P($G(^BPS T(BP59,0)) ,U,6)
  1124    ; 
  1125    ; Skip el igibility  verificati on transac tions
  1126    I $P($G(^ BPST(BP59, 0)),U,15)= "E" G XPRO C
  1127   .
  1128   .
  1129   .
  1130    
  1131  
  1132    ;Check fo r selected  drug
  1133    S BPRXDRG =$$GETDRUG ^BPSRPT6(B PRX) I BPR XDRG=0 G X PROC I BPD RUG D  I B PSTOP=0 G  XPROC . S  BPSTOP=0 .  F I=1:1:$ L(BPDRUG," ,") I BPRX DRG=$P(BPD RUG,",",I)  S BPSTOP= 1 Q
  1134    ;
  1135    ;Check fo r selected  drug clas ses
  1136    I BPDRGCL '=0 S BPRX DC=$$DRGCL NAM^BPSRPT 6($$GETDRG CL^BPSRPT6 (BPRXDRG), 99) D  I B PSTOP=0 G  XPROC
  1137    . S BPSTO P=0
  1138    . F I=1:1 :$L(BPDRGC L,";") I B PRXDC=$P(B PDRGCL,";" ,I) S BPST OP=1 Q
  1139    ;
  1140    ;Check fo r selected  Close Rea son I BPCC RSN D  I B PSTOP=0 G  XPROC
  1141    . S BPSTO P=0
  1142    . F I=1:1 :$L(BPCCRS N,",")-1 I  $P(BPCCRS N,",",I)=$ P($$CLRSN^ BPSRPT7(BP 59),U) S B PSTOP=1 Q
  1143    ;
  1144    ;Check fo r Accepted /Rejected
  1145    I BPACREJ =1,BPSTATU S'["REJECT ED" G XPRO C
  1146    I BPACREJ =2,BPSTATU S'["ACCEPT ED" G XPRO C
  1147    ;
  1148    ;Check fo r Specific  Reject Co de
  1149    I BPREJCD '=0 D  I B PSTOP=0 G  XPROC
  1150    . S BPSTO P=0
  1151    . F I=1:1 :($L(BPREJ CD,",")-1)  I $$CKREJ (BP59,$P(B PREJCD,"," ,I)) S BPS TOP=1 Q
  1152    ;
  1153    ;;Check f or Eligibi lity Code
  1154    ;;I BPELI G'=0,BPELI G'=$$ELIGC ODE^BPSSCR 05(BP59) G  XPROC
  1155    ;
  1156    ;Check fo r Eligibil ity Codes,  when one  or more is  selected  (BPELIG1=1 )
  1157    I (",1,2, 3,4,7,9,") [BPRTYPE,B PELIG1'=0  S ELIG=$$E LIGCODE^BP SSCR05(BP5 9) G:$G(EL IG)="" XPR OC I '$D(B PELIG1(ELI G)) G XPRO C
  1158    ;
  1159    ;Check fo r selected  Prescribe rs
  1160    I BPRESC' =0 D  I BP STOP=0 G X PROC
  1161    . S BPSTO P=0
  1162    . F I=1:1 :$L(BPRESC ,",") I $$ CKPRESC(BP 59,$P(BPRE SC,",",I))  S BPSTOP= 1 Q
  1163    ;
  1164    ;Check fo r selected  Patients
  1165    I BPQSTPA T'=0,$G(BP PAT)'="" D   I BPSTOP =0 G XPROC
  1166    . S BPSTO P=0
  1167    . F I=1:1 :$L(BPPAT, ",") I $P( BPPAT,",", I)=$$GET1^ DIQ(900231 3.59,BP59, 5,"I") S B PSTOP=1 Q
  1168    ;
  1169    ; Check f or Billed  Amount
  1170    I $G(BPBI LL)'=0 S B PBILLED=$$ GET1^DIQ(9 002313.59, BP59,505)  I (BPBILLE D<BPMIN)!( BPBILLED>B PMAX) G XP ROC
  1171    ;
  1172    ;Check Op en/Closed  claim
  1173    I BPOPCL' =0,((BPOPC L=2)&($$CL OSED02^BPS SCR03($P(^ BPST(BP59, 0),U,4))=1 ))!((BPOPC L=1)&($$CL OSED02^BPS SCR03($P(^ BPST(BP59, 0),U,4))'= 1)) G XPRO C
  1174    ;
  1175    ;Save Ent ry for Rep ort
  1176    D SETTMP^ BPSRPT2(BP GLTMP,BPDF N,BPRX,BPR EF,BP59,BP BEGDT,BPEN DDT,.BPPHA RM,BPSUMDE T,BPPLAN,B PRLSDT,BPP AYBL,BPREJ ,BPRXDRG,$ P(BPSTATUS ,U))
  1177    ;
  1178   XPROC Q
  1179  
  1180   Modified L ogic (Chan ges are hi ghlighted)
  1181  
  1182   PROCESS(BP 59) ;
  1183    N BPBILLE D,BPBCK,BP BCKXBPDFN, BPREF,BPPA YBL,BPPLAN ,BPREJ,BPR LSDT,BPRX, BPRXDC,BPR XDRG,BPSTA TUS,BPSEQ, BPSTOP
  1184    ;
  1185    S BPSEQ=$ $COB59^BPS UTIL2(BP59 )
  1186    ;
  1187    ;Get ABSB RXI - ptr  to #52
  1188    S BPRX=+$ P($G(^BPST (BP59,1)), U,11)
  1189    ;
  1190    ;Get ABSB RXR - Pres cription N umber IEN
  1191    S BPREF=+ $P($G(^BPS T(BP59,1)) ,U)
  1192    ;
  1193    ;Get PATI ENT - ptr  to #2
  1194    S BPDFN=+ $P($G(^BPS T(BP59,0)) ,U,6)
  1195    ; 
  1196    ; Skip el igibility  verificati on transac tions
  1197    I $P($G(^ BPST(BP59, 0)),U,15)= "E" G XPRO
  1198   .
  1199   .
  1200   .
  1201    
  1202  
  1203    ;Check fo r selected  drug
  1204    S BPRXDRG =$$GETDRUG ^BPSRPT6(B PRX)
  1205    I BPRXDRG =0 G XPROC
  1206    I BPDRUG  D  I BPSTO P=0 G XPRO C
  1207    . S BPSTO P=0
  1208    . F I=1:1 :$L(BPDRUG ,",") I BP RXDRG=$P(B PDRUG,",", I) S BPSTO P=1 Q
  1209    ;
  1210    ;Check fo r selected  drug clas ses
  1211    I BPDRGCL '=0 S BPRX DC=$$DRGCL NAM^BPSRPT 6($$GETDRG CL^BPSRPT6 (BPRXDRG), 99) D  I B PSTOP=0 G  XPROC
  1212    . S BPSTO P=0
  1213    . F I=1:1 :$L(BPDRGC L,";") I B PRXDC=$P(B PDRGCL,";" ,I) S BPST OP=1 Q
  1214    ;
  1215    ;Check fo r selected  Close Rea son
  1216    I BPCCRSN  D  I BPST OP=0 G XPR OC
  1217    . S BPSTO P=0
  1218    . F I=1:1 :$L(BPCCRS N,",")-1 I  $P(BPCCRS N,",",I)=$ P($$CLRSN^ BPSRPT7(BP 59),U) S B PSTOP=1 Q
  1219    ;
  1220    ;Check fo r Accepted /Rejected
  1221    I BPACREJ =1,BPSTATU S'["REJECT ED" G XPRO C
  1222    I BPACREJ =2,BPSTATU S'["ACCEPT ED" G XPRO C
  1223    ;
  1224    ;Check fo r Specific  Reject Co de
  1225    I BPREJCD '=0 D  I B PSTOP=0 G  XPROC
  1226    . S BPSTO P=0
  1227    . F I=1:1 :($L(BPREJ CD,",")-1)  I $$CKREJ (BP59,$P(B PREJCD,"," ,I)) S BPS TOP=1 Q
  1228    ;
  1229    ;;Check f or Eligibi lity Code
  1230    ;;I BPELI G'=0,BPELI G'=$$ELIGC ODE^BPSSCR 05(BP59) G  XPROC
  1231    ;
  1232    ;Check fo r Eligibil ity Codes,  when one  or more is  selected  (BPELIG1=1 )
  1233    I (",1,2, 3,4,7,9,") [BPRTYPE,B PELIG1'=0  S ELIG=$$E LIGCODE^BP SSCR05(BP5 9) G:$G(EL IG)="" XPR OC I '$D(B PELIG1(ELI G)) G XPRO C
  1234    ;
  1235    ;Check fo r selected  Prescribe rs
  1236    I BPRESC' =0 D  I BP STOP=0 G X PROC
  1237    . S BPSTO P=0
  1238    . F I=1:1 :$L(BPRESC ,",")-1 I  $$CKPRESC( BP59,$P(BP RESC,",",I )) S BPSTO P=1 Q
  1239    ;
  1240    ;Check fo r selected  Patients
  1241    I BPQSTPA T'=0,$G(BP PAT)'="" D   I BPSTOP =0 G XPROC
  1242    . S BPSTO P=0
  1243    . F I=1:1 :$L(BPPAT, ",") I $P( BPPAT,",", I)=$$GET1^ DIQ(900231 3.59,BP59, 5,"I") S B PSTOP=1 Q
  1244    ;
  1245    ; Check f or Billed  Amount
  1246    I $G(BPBI LL)'=0 S B PBILLED=$$ GET1^DIQ(9 002313.59, BP59,505)  I (BPBILLE D<BPMIN)!( BPBILLED>B PMAX) G XP ROC
  1247    ;
  1248    ;Check Op en/Closed  claim
  1249    I BPOPCL' =0,((BPOPC L=2)&($$CL OSED02^BPS SCR03($P(^ BPST(BP59, 0),U,4))=1 ))!((BPOPC L=1)&($$CL OSED02^BPS SCR03($P(^ BPST(BP59, 0),U,4))'= 1)) G XPRO C
  1250    ;
  1251    ;Save Ent ry for Rep ort
  1252    D SETTMP^ BPSRPT2(BP GLTMP,BPDF N,BPRX,BPR EF,BP59,BP BEGDT,BPEN DDT,.BPPHA RM,BPSUMDE T,BPPLAN,B PRLSDT,BPP AYBL,BPREJ ,BPRXDRG,$ P(BPSTATUS ,U))
  1253    ;
  1254   XPROC Q
  1255      
  1256