7. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 8/2/2017 2:39:14 PM Eastern 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.

7.1 Files compared

# Location File Last Modified
1 OSCIF_MCCF EDI TAS_ PRCA_4.5_318_July_2017.zip MCCF EDI TAS US55 SDD.docx Wed Jun 21 18:23:38 2017 UTC
2 OSCIF_MCCF EDI TAS_ PRCA_4.5_318_July_2017.zip MCCF EDI TAS US55 SDD.docx Tue Aug 1 20:46:29 2017 UTC

7.2 Comparison summary

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

7.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

7.4 Active regular expressions

No regular expressions were active.

7.5 Comparison detail

  1   MCCF EDI T AS US55
  2   System Des ign Docume nt
  3   PRCA*4.5*3 18
  4  
  5  
  6  
  7  
  8   Department  of Vetera ns Affairs
  9   January 20 17
  10   Version 1. 1
  11   User Story  Number: U S55
  12   User Story  Name: Use r needs a  new report  that deta ils all re ceipts ass ociated wi th each au to-posted  ERA/EFT. ( Backlog ID #252, Row# 197)
  13   Story
  14   As a user  I need to  ensure tha t all rece ipts have  posted to  ensure pay ments are  posted to  patients 3 rd party c laims paym ents AND t hat we are  meeting o ur account ing regula tions requ irements.   
  15   Conversati on
  16   User needs  a report  that detai ls all rec eipts asso ciated wit h each aut o-posted E RA/EFT, in cluding to tal, to en sure all l ine items  have poste d and noth ing is ‘hu ng up.’ If  payments  are 'hung  up' and no t processe d timely,  it impacts  the veter ans negati vely along  with maki ng us deli nquent on  accounting  audits. 
  17   The report  is necess ary for ma nagers to  see how lo ng a payme nt has bee n on the A PAR list.   
  18  
  19   Report des cription a nd Behavio r:
  20   This repor t must be  exportable  to Excel  and also h ave the op tion to be  displayed  in a List man templa te.  A new  menu opti on “AUTO-P OSTED RECE IPT REPORT ” [RCDPE A UTO-POST R ECEIPT REP ORT] with  a shortcut  of “APR”  will be ad ded to the  following  menu: as  shown in t he functio nal design  document.   The func tional des ign docume nt demonst rates exac tly where  the client  wants the  option to  appear in  the menus  listed be low:
  21   EDI Lockbo x (ePaymen ts) Report  Menu (RCD PE EDI LOC KBOX REPOR TS MENU)
  22   Agent Cash ier Menu ( RCDP AGENT  CASHIER M ENU)
  23  
  24   The title  of the new  report wi ll be ‘Aut o-Posted R eceipt Rep ort’. It w ill have t he filter  and sort c riteria as  shown in  the functi onal desig n document .
  25   Filters wi ll include :
  26   Divisions  (up to 20)
  27   No default
  28   Auto-Post  Date or Da te Receive d Date (st art & end  range for  either sel ection)
  29   No default
  30   ERAs to be  displayed  (Posted/C ompleted R eceipts, M issing Rec eipts, Bot h)
  31   Default “M issing Rec eipts”
  32   Payers
  33   Default “A ll”
  34  
  35  
  36   Sort possi bilities ( with no de fault) wil l only be  asked if t he user se lects to v iew “both”  for ERAs  to be disp layed.  Th e sort pos sibilities  will incl ude: 
  37   <Auto Post > or <ERA  Received>  Date
  38   Missing Re ceipts (If  selected  as a sort  criteria,  those EEOB  lines wit h Missing  Receipts w ill be dis played fir st on the  list.)
  39  
  40   Missing Re ceipts – T o determin e missing  receipts u se NEW STA TUS FIELD  (#344.74,  .05) in th e RCDPE AU TO-POST AU DIT file.   Look at t he most re cent date  using the  ERA cross- reference  ^RCY(344.7 2,”E”).  T hose that  don’t have  a NEW STA TUS FIELD  = “COMPLET E” is to b e consider ed as an E RA with mi ssing rece ipt(s).
  41  
  42   The report  shall con tain the f ollowing d ata: 
  43   Payer- The  insurance  company f or the ERA . This fie ld is a ma ximum of 3 5 characte rs. This i s the PAYM ENT FROM f ield in th e ELECTRON IC REMITTA NCE ADVICE  file (fil e 344.4, f ield .06).
  44   Date Recei ved- The f ile date/t ime for th e ERA. Thi s field is  12 charac ters. This  is FILE D ATE/TIME f ield in th e ELECTRON IC REMITTA NCE ADVICE  file (fil e 344.4, f ield .07).  Note, onl y the date  will be d isplayed,  not the fi le time.
  45          Dat e Posted-  The Auto-P ost Date f or the EEO B lines of  the ERA.  This field  is 12 cha racters.   This is th e AUTO-POS T DATE fie ld in the  ERA DETAIL  sub-file  of the ELE CTRONIC RE MITTANCE A DVICE file  (file 344 .41, field  9).
  46          Rec eipt- The  receipt nu mber (or “ missing”)  for the EE OB lines o f the ERA.   This fie ld is a ma ximum of 1 2 characte rs.  This  is the REC EIPT in th e ERA DETA IL sub-fil e of the E LECTRONIC  REMITTANCE  ADVICE fi le (file 3 44.41, fie ld .25).
  47          Use r- The use r who mark ed the ERA  for auto- post.  Onl y display  initials s o this fie ld will be  2 charact ers when d isplayed o n the repo rt.  This  uses the E RA# field  in the ELE CTRONIC RE MITTANCE A DVICE file  (file 344 .4, field  .01) to ge t to the U SER field  in the RCD PE AUTO-PO ST AUDIT F ILE (file  344.72, fi eld .02). 
  48          Amo unt- The a mount of t he individ ual receip ts for the  EEOB line s of the E RA.  This  field is a  maximum o f 12 chara cters.  Th is is the  AMOUNT PAI D field in  the ERA D ETAIL sub- file of th e ELECTRON IC REMITTA NCE ADVICE  file (fil e 344.41,  field .03) .
  49          FMS  Doc- The  FMS docume nt number  of the EEO B lines of  the ERA.   This uses  the RECEI PT field i n the ERA  DETAIL sub -file of t he ELECTRO NIC REMITT ANCE ADVIC E file (fi le 344.41,  field .25 ) to get t o the FMS  DOCUMENT N UMBER fiel d in the A R BATCH PA YMENT FILE  (file 344 , field 20 0). This f ield is 20  character s long.
  50   Trace #- T he trace n umber of t he EEOB li nes of the  ERA.  Thi s field is  a maximum  of 50 cha racters. T his is the  TRACE NUM BER field  of the ELE CTRONIC RE MITTANCE A DVICE file  (file 344 .4, field  .02)
  51   ERA Total-  The total  amount pa id for the  ERA.  Thi s field is  a maximum  of 12 cha racters. T his is the  TOTAL AMO UNT PAID f ield of th e ELECTRON IC REMITTA NCE ADVICE  file (fil e 344.4, f ield .05)
  52          Rec eipt Total - The tota l of amoun t of recei pts auto-p osted for  the EEOB l ines of th e              ERA.   This field  is a maxi mum of 12  characters .  This is  the sum o f the AMOU NT POSTED  fields in  the ERA DE TAIL sub-f ile of the  ELECTRONI C REMITTAN CE ADVICE  file (file  344.41, f ield .06).
  53  
  54   The report  will page  break on  payer.
  55   For how th e report s hould look  refer to  the functi onal desig n document .
  56   The report  should ha ve an “***  End of Re port ***”  message di splayed.
  57  
  58     Resoluti on – Added  Changed O bjects
  59  
  60   Options
  61   Activities
  62   Option Nam e
  63   RCDPE AUTO -POST RECE IPT REPORT
  64   Enhancemen t Category
  65    New
  66    Modify
  67    Delete
  68    No Change
  69   Associated  Menu Opti ons that w ill invoke  this refe rence
  70   RCDPE EDI  LOCKBOX RE PORTS MENU
  71   RCDP AGENT  CASHIER M ENU
  72   Data Passi ng
  73    Input
  74    Output
  75    Both
  76    Global Re ference
  77    Local Ref erence
  78   Menu Text  Descriptio n
  79   Auto-Poste d Receipt  Report
  80   Option Typ e
  81    Edit
  82    Print
  83    Menu
  84    Inquire
  85  
  86    Action
  87    Run Routi ne
  88    Other
  89  
  90   Associated  Routine
  91   EN^RCDPELA R
  92   Option Def inition
  93  
  94  
  95   Options
  96   Activities
  97   Option Nam e
  98   RCDPE EDI  LOCKBOX RE PORTS MENU
  99   Enhancemen t Category
  100    New
  101    Modify
  102    Delete
  103    No Change
  104   Associated  Menu Opti ons that w ill invoke  this refe rence
  105   RCDPE EDI  LOCKBOX AC T REPORT          SYN ONYM: DA
  106   RCDPE EFT  AGING REPO RT                          SYNO NYM: EFT
  107   RCDPE ERA  AGING REPO RT                         SYNON YM: ERA
  108   RCDPE VIEW /PRINT ERA                                  SYNONYM: V P
  109   RCDPE ACTI VE WITH EE OB REPORT     SYNONYM : AB
  110   RCDPE REMO VED ERA AU DIT                      SYNONYM : REMR
  111   RCDPE ERA  W/PAPER EO B REPORT            S YNONYM: PO SR
  112   RCDPE EFT  AUDIT REPO RT                            SY NONYM: DUP R
  113   RCDPE EEOB  MOVE/COPY /RMOVE RPT     SYNONY M: MCR
  114   RCDPE AUTO -POST REPO RT                       SYNONYM : AP
  115   RCDPE AUTO -DECREASE  REPORT           SYNO NYM: AD
  116   RCDPE PAYE R EXCLUSIO N NAME TIN      SYNON YM: PX
  117   RCDPE CARC /RARC TABL E REPORT          SYN ONYM: TB
  118   RCDPE CARC /RARC QUIC K SEARCH          SYN ONYM: QS
  119   RCDPE PROV IDER LVL A DJ REPORT          SY NONYM: PLB
  120   RCDPE EFT  TRANSACTIO N AUD REP         SYN ONYM: ETA
  121   RCDPE CARC  CODE PAYE R REPORT          SYN ONYM: CR
  122   RCDPE ERA  STATUS CHN G AUD REP         SYN ONYM: ESC
  123   RCDPE UNAP PLIED EFT  DEP REPORT        SYN ONYM: UN
  124   RCDPE AUTO -POST RECE IPT REPORT        SYN ONYM: APR
  125   Data Passi ng
  126    Input
  127    Output
  128    Both
  129    Global Re ference
  130    Local Ref erence
  131   Menu Text  Descriptio n
  132   Auto-Poste d Receipt  Report
  133   Option Typ e
  134    Edit
  135    Print
  136    Menu
  137    Inquire
  138  
  139    Action
  140    Run Routi ne
  141    Other
  142  
  143   Associated  Routine
  144  
  145   Option Def inition
  146  
  147  
  148   Changes:  
  149   Added opti on RCDPE A UTO-POST R ECEIPT REP ORT
  150   Added ‘DIS PLAY ORDER ’ to exist ing Menu I tem: RCDPE  ACTIVE WI TH EEOB RE PORT
  151   Added ‘DIS PLAY ORDER ’ to exist ing Menu I tem: RCDPE  AUTO-POST  REPORT
  152   Added ‘DIS PLAY ORDER ’ to exist ing Menu I tem: RCDPE  AUTO-DECR EASE REPOR T
  153  
  154  
  155  
  156  
  157  
  158   Routines
  159   Activities
  160   Routine Na me
  161   RCDPEM9
  162   Enhancemen t Category
  163    New
  164    Modify
  165    Delete
  166    No Change
  167   RTM
  168  
  169   Related Op tions
  170  
  171   Routines
  172   Activities
  173   Data Dicti onary (DD)  Reference s
  174  
  175   Related Pr otocols
  176  
  177   Related In tegration  Control Re gistration s (ICRs)
  178  
  179   Data Passi ng
  180    Input
  181    Output Re ference
  182    Both
  183    Global Re ference
  184    Local
  185   Input Attr ibute Name  and Defin ition
  186   Name:
  187   Definition :
  188   Output Att ribute Nam e and Defi nition
  189   Name:
  190   Definition :
  191   Related Ro utines
  192   Routines “ Called By”
  193   Routines “ Called”   
  194  
  195   RCDPELAR
  196   RCDPEM
  197  
  198  
  199  
  200   Current Lo gic
  201   ;GETPAY(FI LE) ; Let  user selec t payer fo r filter ;  ; Returne d RTNFLG v alue ; ; P RCA*4.5*28 4 - Added  pieces 2 &  3 to prov ide backgr ound jobs  informatio n to re-ca lculate pa yer list.  ; ; Piece  1: -1 = no ne selecte d ; 1 = ra nge of pay ers ; 2 =  all payers  selected  ; 3 = spec ific payer s ; Piece  2: From Ra nge (When  a from/thr u range is  selected  by user) ;  Piece 3:  Thru Range  (When a f rom/thru r ange is se lected by  user) ; ;  Payers sel ected are  returned i n ^TMP("RC SELPAY",$J  ; N RCPAY ,RCINC,CNT ,RTNFLG,I, RCANS,INDX ,X,RCANS2, DIR,Y,DTOU T,DUOUT,RC INSF,RCINS T,RNG1,RNG 2 ; S RTNF LG=0,INDX= 1,RNG1="", RNG2="" ;  ;Clear lis t of selec ted payers  K ^TMP("R CSELPAY",$ J) ; ;Sele ct option  required ( All, Selec ted or Ran ge) S DIR( 0)="SA^A:A LL;S:SPECI FIC;R:RANG E",DIR("A" )="RUN REP ORT FOR (A )LL, (S)PE CIFIC, OR  (R)ANGE OF  INSURANCE  COMPANIES ?: ",DIR(" B")="ALL"  W ! D ^DIR  K DIR ;Ab ort on ^ e xit or tim eout I $D( DTOUT)!$D( DUOUT) S R TNFLG=-1 Q  RTNFLG ;  ;ALL payer s I Y="A"  D .; Build  list of A LL station s .S CNT=0 ,RCPAY="", RTNFLG=2 . F  S RCPAY =$O(^RCY(F ILE,"C",RC PAY)) Q:RC PAY=""  D  ..S CNT=CN T+1,^TMP(" RCSELPAY", $J,CNT)=RC PAY ; ;Sel ected Paye rs I Y="S"  D .D GLIS T(FILE),GE TPAYS(CNT)  ; ;Range  of Payers  I Y="R" D  .D GLIST(F ILE),GETPA YR ; ;Clea r list of  all payers  K:RTNFLG' =2 ^TMP("R CPAYER",$J ) ;If abor ting also  clear any  selected p ayers K:RT NFLG=-1 ^T MP("RCSELP AY",$J) ;  ;Return va lue ; PRCA *4.5*284 -  Update re turn value  to includ e from/thr u range. S ee above f or documen tation Q R TNFLG_"^"_ RNG1_"^"_R NG2 ;
  202  
  203    ;GETPAYS( CNT) ;sele ct payer f or filter,  specific  ; N PNAME  ; K ^TMP(" RCDPEM9",$ J) ; F  Q: RTNFLG'=0  D .N DIR,X ,Y,DTOUT,D UOUT,DIRUT ,DIROUT .S  DIR("A")= "SELECT IN SURANCE CO MPANY" .S  DIR(0)="FO ^1:30" .S  DIR("?")=" ENTER THE  NAME OF TH E PAYER OR  '??' TO L IST PAYERS " .S DIR(" ??")="^D L IST^RCDPEM 9(CNT)" .D  ^DIR K DI R .;User p ressed ENT ER .I Y="" ,'$D(DTOUT ) S RTNFLG =$S($D(^TM P("RCSELPA Y")):3,1:- 1) Q .;Fir st check f or exits . I $D(DUOUT )!$D(DTOUT )!$D(DIRUT )!$D(DIROU T) S RTNFL G=-1 Q .;C heck for h elp .S (RC ANS,RCANS2 )="" .S RC ANS=Y .; N ow check f or exotic  user input  .I '(RCAN S?.N) S RC ANS2=$O(^T MP("RCPAYE R",$J,"B", RCANS,RCAN S2)) D:'RC ANS2 PART  Q:'$G(RCAN S2) .S:$G( RCANS2) RC ANS=RCANS2  I RCANS=" " W " ??"  Q .I RCANS ?.N&((+RCA NS<1)!(+RC ANS>CNT))  W " ??" Q  .I RCANS'? .N W " ??"  Q .I $D(^ TMP("RCDPE M9",$J,RCA NS)) W " ? ? PAYER AL READY SELE CTED" Q .S  ^TMP("RCD PEM9",$J,R CANS)="" . S PNAME=$G (^TMP("RCP AYER",$J,R CANS)) .W  " "_PNAME  .S ^TMP("R CSELPAY",$ J,INDX)=$G (^TMP("RCP AYER",$J,R CANS)) .S  INDX=INDX+ 1 ; K ^TMP ("RCDPEM9" ,$J) Q ;
  204  
  205    ;GETPAYR  ;select pa yer for fi lter, rang e ; called  from ^RCD PEAR1 N DI R,DTOUT,DU OUT,DIRUT, DIROUT,IND X,X,Y,RCIN SF,RCINST, NUM S DIR( "?")="ENTE R THE NAME  OF THE PA YER OR '?? ' TO LIST  PAYERS" S  DIR("??")= "^D LIST^R CDPEM9(CNT )" S DIR(0 )="FA^1:30 ^K:X'?1.U. E X",DIR(" A")="START  WITH INSU RANCE COMP ANY NAME:  ",DIR("B") =$E($O(^TM P("RCPAYER ",$J,"B"," ")),1,30)  D ^DIR K D IR I $D(DT OUT)!$D(DU OUT)!$D(DI RUT)!$D(DI ROUT)!(Y=" ") S RTNFL G=-1 Q S R CINSF=Y S  DIR("?")=" ENTER THE  NAME OF TH E PAYER OR  '??' TO L IST PAYERS " S DIR("? ?")="^D LI ST^RCDPEM9 (CNT)" S D IR(0)="FA^ 1:30^K:X'? 1.U.E X",D IR("A")="G O TO INSUR ANCE COMPA NY NAME: " ,DIR("B")= $E($O(^TMP ("RCPAYER" ,$J,"B","" ),-1),1,30 ) F  W ! D  ^DIR Q:$S ($D(DTOUT) !$D(DUOUT) :1,1:RCINS F']Y) W !, "'GO TO' N AME MUST C OME AFTER  'START WIT H' NAME" K  DIR I $D( DTOUT)!$D( DUOUT)!$D( DIRUT)!$D( DIROUT)!(Y ="") S RTN FLG=-1 Q S  RCINST=Y_ "Z"  ;entr y of "ABC"  will pick  up "ABC I NSURANCE"  if "Z" is  appended ; If the fir st name is  an exact  match, bac k up to th e previous  entry I $ D(^TMP("RC PAYER",$J, "B",RCINSF )) S RCINS F=$O(^TMP( "RCPAYER", $J,"B",RCI NSF),-1) ;  PRCA*4.5* 284 - Save  from/thru  user resp onses in R NG1 & RNG2  to rebuil d after re port is qu eued. Will  be return ed to the  calling pr ogram. S R NG1=RCINSF ,RNG2=RCIN ST S INDX= 1 F  S RCI NSF=$O(^TM P("RCPAYER ",$J,"B",R CINSF)) Q: RCINSF=""   Q:RCINSF] RCINST  D  . S NUM=$O (^TMP("RCP AYER",$J," B",RCINSF, "")) . S ^ TMP("RCSEL PAY",$J,IN DX)=$G(^TM P("RCPAYER ",$J,NUM))  . S INDX= INDX+1 ;Se t return v alue I IND X=1 S RTNF LG=-1 Q  ;  no entrie s in selec ted range  S RTNFLG=1  Q
  206  
  207   Modified L ogic
  208   ;
  209   GETPAY(FIL E,MIXED,BL ANKLN) ; L et user se lect payer  for filte r ; Input:  FILE - Fi le to retr ieve Payer s from (ei ther 344.4  OR 344.31 ) ; MIXED  - 1 to dis play promp ts in mixe d case ;          Opt ional, def aults to 0  ; BLANKLN  - 0 skip  initial bl ank line ;          O ptional, d efaults to  1 ; ; Ret urned RTNF LG value ;  ; PRCA*4. 5*284 - Ad ded pieces  2 & 3 to  provide ba ckground j obs inform ation to r e-calculat e payer li st. ; ; Pi ece 1: -1  = none sel ected ; 1  = range of  payers ;  2 = all pa yers selec ted ; 3 =  specific p ayers ; Pi ece 2: Fro m Range (W hen a from /thru rang e is selec ted by use r) ; Piece  3: Thru R ange (When  a from/th ru range i s selected  by user)  ; ; Payers  selected  are return ed in ^TMP ("RCSELPAY ",$J ; N R CPAY,RCINC ,CNT,RTNFL G,I,RCANS, INDX,X,RCA NS2,DIR,Y, DTOUT,DUOU T,RCINSF
  210    N RCINST, RNG1,RNG2  S:'$D(MIXE D) MIXED=0  S:'$D(BLA NKLN) BLAN KLN=1 ; S  RTNFLG=0,I NDX=1,RNG1 ="",RNG2=" " ; ; Clea r list of  selected p ayers K ^T MP("RCSELP AY",$J) ;  ; Select o ption requ ired (All,  Selected  or Range)  S DIR(0)=" SA^A:ALL;S :SPECIFIC; R:RANGE" S  DIR("A")= "RUN REPOR T FOR (A)L L, (S)PECI FIC, OR (R )ANGE OF I NSURANCE C OMPANIES?:  " S DIR(" B")="ALL"  S DIR("?", 1)="Enter  'ALL' to s elect all  Insurance  Companies. " S DIR("? ",2)="Ente r 'RANGE'  to select  an Insuran ce Company  range." S  DIR("?")= "Enter 'SP ECIFIC' to  select sp ecific Ins urance Com panies." I  MIXED D .  N XX . S  XX="Run Re port for ( A)LL, (S)P ECIFIC, or  (R)ANGE o f Insuranc e Companie s?: " . S  DIR(0)="SA ^A:ALL;S:S PECIFIC;R: RANGE" . S  DIR("A")= XX,DIR("B" )="ALL" W: BLANKLN !  D ^DIR K D IR ; ; Abo rt on ^ ex it or time out I $D(D TOUT)!$D(D UOUT) S RT NFLG=-1 Q  RTNFLG ; ;  ALL payer s I Y="A"  D .; Build  list of A LL station s .S CNT=0 ,RCPAY="", RTNFLG=2 . F  S RCPAY =$O(^RCY(F ILE,"C",RC PAY)) Q:RC PAY=""  D  ..S CNT=CN T+1,^TMP(" RCSELPAY", $J,CNT)=RC PAY ; ; Se lected Pay ers I Y="S " D .D GLI ST(FILE),G ETPAYS(CNT ,MIXED) ;  ; Range of  Payers I  Y="R" D .  D GLIST(FI LE),GETPAY R(MIXED,BL ANKLN) ; ;  Clear lis t of all p ayers K:RT NFLG'=2 ^T MP("RCPAYE R",$J) ; I f aborting  also clea r any sele cted payer s K:RTNFLG =-1 ^TMP(" RCSELPAY", $J) ; ;Ret urn value  ; PRCA*4.5 *284 - Upd ate return  value to  include fr om/thru ra nge. See a bove for d ocumentati on Q RTNFL G_"^"_RNG1 _"^"_RNG2  ;
  211  
  212    ;GETPAYS( CNT,MIXED)  ;select p ayer for f ilter, spe cific ; In put: CNT -  Number of  Payers  ;  MIXED - 1  to displa y prompts  in mixed c ase ; Opti onal, defa ults to 0
  213    ; S:'$D(M IXED) MIXE D=0 ; N PN AME ; K ^T MP("RCDPEM 9",$J) ; F   Q:RTNFLG '=0 D . N  DIR,X,Y,DT OUT,DUOUT, DIRUT,DIRO UT . S DIR ("A")="SEL ECT INSURA NCE COMPAN Y" . S:MIX ED DIR("A" )="Select  Insurance  Company" .  S DIR(0)= "FO^1:30"  . S DIR("? ")="ENTER  THE NAME O F THE PAYE R OR '??'  TO LIST PA YERS" . S: MIXED DIR( "?")="Ente r the name  of the pa yer or '?? ' to list  payers" .  S DIR("??" )="^D LIST ^RCDPEM9(C NT)" . D ^ DIR K DIR  .;User pre ssed ENTER  .I Y="",' $D(DTOUT)  S RTNFLG=$ S($D(^TMP( "RCSELPAY" )):3,1:-1)  Q .;First  check for  exits .I  $D(DUOUT)! $D(DTOUT)! $D(DIRUT)! $D(DIROUT)  S RTNFLG= -1 Q .;Che ck for hel p .S (RCAN S,RCANS2)= "" .S RCAN S=Y .; Now  check for  exotic us er input . I '(RCANS? .N) S RCAN S2=$O(^TMP ("RCPAYER" ,$J,"B",RC ANS,RCANS2 )) D:'RCAN S2 PART Q: '$G(RCANS2 ) .S:$G(RC ANS2) RCAN S=RCANS2 I  RCANS=""  W " ??" Q  .I RCANS?. N&((+RCANS <1)!(+RCAN S>CNT)) W  " ??" Q .I  RCANS'?.N  W " ??" Q  .I $D(^TM P("RCDPEM9 ",$J,RCANS )) W " ??  PAYER ALRE ADY SELECT ED" Q .S ^ TMP("RCDPE M9",$J,RCA NS)="" .S  PNAME=$G(^ TMP("RCPAY ER",$J,RCA NS)) .W "  "_PNAME .S  ^TMP("RCS ELPAY",$J, INDX)=$G(^ TMP("RCPAY ER",$J,RCA NS)) .S IN DX=INDX+1  ; K ^TMP(" RCDPEM9",$ J) Q ;
  214  
  215   GETPAYR(MI XED,BLANKL N) ; Selec t payer fo r filter,  range ; ca lled from  ^RCDPEAR1  ; Input: M IXED - 1 t o display  prompts in  mixed cas e ; Option al, defaul ts to 0 ;  BLANKLN -  0 skip ini tial blank  line ; Op tional, de faults to  1
  216    ; S:'$D(M IXED) MIXE D=0 S:'$D( BLANKLN) B LANKLN=1
  217    ;
  218    N DIR,DTO UT,DUOUT,D IRUT,DIROU T,INDX,X,Y ,RCINSF,RC INST,NUM S  DIR("?")= "ENTER THE  NAME OF T HE PAYER O R '??' TO  LIST PAYER S" S DIR(" ??")="^D L IST^RCDPEM 9(CNT)" S  DIR(0)="FA ^1:30^K:X' ?1.U.E X"  S DIR("A") ="START WI TH INSURAN CE COMPANY  NAME: " S  DIR("B")= $E($O(^TMP ("RCPAYER" ,$J,"B","" )),1,30) I  MIXED D .  S DIR("?" )="Enter t he name of  the payer  or '??' t o list pay ers" . S D IR("A")="S tart with  Insurance  Company na me: " D ^D IR K DIR I  $D(DTOUT) !$D(DUOUT) !$D(DIRUT) !$D(DIROUT )!(Y="") S  RTNFLG=-1  Q S RCINS F=Y S DIR( "?")="ENTE R THE NAME  OF THE PA YER OR '?? ' TO LIST  PAYERS" S  DIR("??")= "^D LIST^R CDPEM9(CNT )" S DIR(0 )="FA^1:30 ^K:X'?1.U. E X" S DIR ("A")="GO  TO INSURAN CE COMPANY  NAME: " I  MIXED D .  S DIR("?" )="Enter t he name of  the payer  '??' to l ist payers " . S DIR( "A")="Go T o Insuranc e Company  name: " S  DIR("B")=$ E($O(^TMP( "RCPAYER", $J,"B","") ,-1),1,30)  F  W:BLAN KLN ! D ^D IR Q:$S($D (DTOUT)!$D (DUOUT):1, 1:RCINSF'] Y) D . W:' MIXED !,"' GO TO' NAM E MUST COM E AFTER 'S TART WITH'  NAME"
  219    . W:MIXED  !,"'GO TO ' name mus t come aft er 'START  WITH' name " K DIR I  $D(DTOUT)! $D(DUOUT)! $D(DIRUT)! $D(DIROUT) !(Y="") S  RTNFLG=-1  Q S RCINST =Y_"Z"  ;e ntry of "A BC" will p ick up "AB C INSURANC E" if "Z"  is appende d ;If the  first name  is an exa ct match,  back up to  the previ ous entry  I $D(^TMP( "RCPAYER", $J,"B",RCI NSF)) S RC INSF=$O(^T MP("RCPAYE R",$J,"B", RCINSF),-1 ) ; PRCA*4 .5*284 - S ave from/t hru user r esponses i n RNG1 & R NG2 to reb uild after  report is  queued. W ill be ret urned to t he calling  program.  S RNG1=RCI NSF,RNG2=R CINST S IN DX=1 F  S  RCINSF=$O( ^TMP("RCPA YER",$J,"B ",RCINSF))  Q:RCINSF= ""  Q:RCIN SF]RCINST   D . S NUM =$O(^TMP(" RCPAYER",$ J,"B",RCIN SF,"")) .  S ^TMP("RC SELPAY",$J ,INDX)=$G( ^TMP("RCPA YER",$J,NU M)) . S IN DX=INDX+1  ;Set retur n value I  INDX=1 S R TNFLG=-1 Q   ; no ent ries in se lected ran ge S RTNFL G=1 Q
  220  
  221  
  222  
  223   Routines
  224   Activities
  225   Routine Na me
  226   RCDPELAR
  227   Enhancemen t Category
  228    New
  229    Modify
  230    Delete
  231    No Change
  232   RTM
  233  
  234   Related Op tions
  235   RCDPE AUTO -POST RECE IPT REPORT
  236   Routines
  237   Activities
  238   Data Dicti onary (DD)  Reference s
  239  
  240   Related Pr otocols
  241  
  242   Related In tegration  Control Re gistration s (ICRs)
  243   Use DIVISI ON^VAUTOMA  via Contr olled IA 6 64
  244  
  245   Data Passi ng
  246    Input
  247    Output Re ference
  248    Both
  249    Global Re ference
  250    Local
  251   Input Attr ibute Name  and Defin ition
  252   Name:
  253   Definition :
  254   Output Att ribute Nam e and Defi nition
  255   Name:
  256   Definition :
  257  
  258  
  259   Related Ro utines
  260   Routines “ Called By”
  261   Routines “ Called”   
  262  
  263  
  264   $$GETPAY^R CDPEM9
  265   $$ASKLM^RC DPEARL
  266   INFO^RCDPE M6
  267   $$HDRLN2^R CDPELA1
  268   $$HDRLN3^R CDPELA1
  269   $$ERAHDR2^ RCDPELA1
  270   LMRPT^RCDP EARL
  271   DIVISION^V AUTOMA
  272   RPTOUT^RCD PELA1
  273   $$CHKDIV^R CDPEDAR
  274  
  275   Current Lo gic
  276   N/A
  277  
  278   Modified L ogic
  279   RCDPELAR ; EDE/FA - L IST ALL AU TO-POSTED  RECEIPTS R EPORT ;Nov  17, 2016  ;;4.5;Acco unts Recei vable;**31 8**;Mar 20 , 1995;Bui ld 121 ;Pe r VA Direc tive 6402,  this rout ine should  not be mo dified. ;E N ; Main e ntry point  N INPUT,R CVAUTD,XX, YY K ^TMP( $J,"RCDPE_ LAR"),^TMP ("RCDPE_LA R",$J) K ^ TMP("RCSEL PAY",$J),^ TMP($J,"SE LPAYER") ;  S INPUT=$ $STADIV(.R CVAUTD) ;  Division f ilter Q:'I NPUT                                           ; '^' o r timeout  S $P(INPUT ,"^",2)=$$ APORERA()  ; Filter b y Auto-Pos t Date or  ERA Date R eceived Q: '$P(INPUT, "^",2) ; ' ^' or time out S $P(I NPUT,"^",3 )=$$DTRNG( 0) ; Start  Date|End  date Q:'$P (INPUT,"^" ,3) ; '^'  or timeout  S $P(INPU T,"^",4)=$ $SELERA()  ; Select t ype of ERA S to be di splayed Q: '$P(INPUT, "^",4) ; ' ^' or time out S XX=+ $$GETPAY^R CDPEM9(344 .4,1,0) ;  Insurance  Company fi lter S XX= $S(XX=-1:- 1,XX=2:1,1 :2) S $P(I NPUT,"^",5 )=XX                              ; Insuran ce Company  filter Q: $P(INPUT," ^",5)<0 ;  '^' or tim eout S XX= $P(INPUT," ^",2),YY=$ P(INPUT,"^ ",4) S $P( INPUT,"^", 6)=$$RPTSO RT(XX,YY)  ; Select S econdary s ort Q:'$P( INPUT,"^", 6) ; '^' o r timeout  S $P(INPUT ,"^",7)=$$ ASKLM^RCDP EARL ; Ask  to Displa y in Listm an Templat e Q:$P(INP UT,"^",7)< 0 ; '^' or  timeout I  $P(INPUT, "^",7)=1 D   Q                         ; Co mpile data  and call  listman to  display .  D LMOUT(I NPUT,.RCVA UTD,.IO) S  $P(INPUT, "^",8)=$$E XCEL() ; A sk to outp ut to Exce l Q:$P(INP UT,"^",8)= -1 ; '^' o r timeout  D:$P(INPUT ,"^",8)=1  INFO^RCDPE M6 ; Displ ay capture  informati on for Exc el S $P(IN PUT,"^",9) =$$DEVICE( $P(INPUT," ^",8),.IO)  ; Ask out put device  Q:'$P(INP UT,"^",9)  ; ; Option  to queue  I $D(IO("Q ")) D  Q .  N JOB S J OB=$J . N  ZTDESC,ZTR TN,ZTSAVE, ZTSK . S Z TRTN="REPO RT^RCDPELA R(INPUT,.R CVAUTD,.IO ,JOB)" . S  ZTDESC="L IST ALL AU TO-POSTED  RECEIPTS R EPORT" . M  RCPYRSEL= ^TMP("RCSE LPAY",$J)  . S ZTSAVE ("RC*")="" ,ZTSAVE("V AUTD")="", ZTSAVE("IO *")="" . S  ZTSAVE("I NPUT")="", ZTSAVE("JO B")="" . D  ^%ZTLOAD  . W !!,$S( $D(ZTSK):" Task numbe r "_ZTSK_"  was queue d.",1:"Una ble to que ue this ta sk.") . K  ZTSK,IO("Q ") . D HOM E^%ZIS ; D  REPORT(IN PUT,.RCVAU TD,.IO) ;  Compile an d Display  Report dat a Q ;LMOUT (INPUT,RCV AUTD,IO) ;  Output re port to Li stman ; In put: INPUT  - See REP ORT for a  complete d escription  ; RCVAUTD  - Array o f selected  Divisions  ; Only pa ssed if A1 =2 ; Outpu t: ^TMP("R CDPE_LAR", $J,CTR)=Li ne - Array  of displa y lines (n o headers)  ; for out put to Lis tman ; Onl y set when  A7-1 N HD R S $P(INP UT,"^",9)= 0 ; Initia l listman  line count er D REPOR T(INPUT,.R CVAUTD,.IO ) ; Get th e lines to  be displa yed S HDR( "TITLE")=" AUTO-POSTE D RECEIPT  REPORT" S  HDR(1)=$$H DRLN2^RCDP ELA1(INPUT ) S HDR(2) =$$HDRLN3^ RCDPELA1(I NPUT) S HD R(3)="" S  HDR(4)=""  S HDR(5)=" PAYER" S H DR(6)=" DA TE DATE" S  HDR(7)=$$ ERAHDR2^RC DPELA1() D  LMRPT^RCD PEARL(.HDR ,$NA(^TMP( "RCDPE_LAR ",$J))) ;  Generate L istMan dis play ; D ^ %ZISC ; Cl ose the de vice K ^TM P("RCDPE_L AR",$J),^T MP($J,"RCD PE_LAR") K  ^TMP("RCS ELPAY",$J) ,^TMP($J," SELPAYER")  Q ;STADIV (RCVAUTD)  ; Division /Station F ilter ; In put: None  ; Output:  RCVAUTD -  Array of s elected di visions, i f 1 is ret urned ; Re turns: 0 -  User up-a rrowed or  timed out  ; 1 - All  divisions  selected ;  2 - Selec ted Divisi ons N DIR, DIROUT,DIR UT,DTOUT,D UOUT,VAUTD ,X,Y D DIV ISION^VAUT OMA ; IA # 664 allows  this Q:Y< 0 0 ; User  up-arrowe d or timed  out Q:VAU TD=1 1 ; A ll divisio ns selecte d M RCVAUT D=VAUTD                               ; Sav e selected  divisions  (if any)  Q 2 ;APORE RA() ; Ask  the user  if they wa nt to filt er by Auto -Post Date  or ERA Da te ; recei ved ; Inpu t: None ;  Returns: 0  - User up -arrowed o r timed ou t ; 1 - Fi lter by Au to-Post da te range ;  2 - Filte r by ERA D ate Receiv ed N DIR,D IROUT,DIRU T,DTOUT,DU OUT,X,Y S  DIR("A")=" (A)uto-Pos t Date or  (E)RA Date  Received?  (A/E): "  S DIR(0)=" SA^A:Auto- Post Date; E:ERA Date  Received"  S DIR("?" ,1)="Enter  'A' to fi lter by an  Auto-Post  Date Rang e." S DIR( "?")="Ente r 'E' to f ilter by a n ERA Date  Received  Date Range ." S DIR(" B")="A" D  ^DIR I $D( DTOUT)!$D( DUOUT)!(Y= "") Q 0 Q: Y="A" 1 Q  2 ;DTRNG(W HICH) ; Al lows the u ser to sel ect the Au to-Post OR  ERA Recei ved ; date  range to  be used ;  Input: WHI CH - 0 - A uto-Post D ate Range  ; 1 - ERA  Date Recei ved Date R ange ; Ret urns: 0 -  User up-ar rowed or t imed out,  1 otherwis e ; A1^A2  - Where: ;  A1 - Aut- Post Start  Date ; A2  - Auto-Po st End Dat e N DIR,DI ROUT,DIRUT ,DTOUT,DUO UT,RANGE,S TART,X,XX, Y S DIR(0) ="DAO^:"_D T_":APE" S  DIR("A")= "Start Dat e: " S XX= "Enter the  earliest  "_$S(WHICH =0:"Auto-P ost date", 1:"ERA Dat e Received ") S XX=XX _" for rec eipts to i nclude on  the report " S DIR("? ")=XX D ^D IR Q:$D(DT OUT)!$D(DU OUT)!(Y="" ) 0 S STAR T=YENDDT ;  Prompt fo r end date  K DIR S D IR("B")=Y( 0) S DIR(0 )="DAO^"_S TART_":"_D T_":APE" S  DIR("A")= "End Date:  " S XX="E nter the l atest "_$S (WHICH=0:" Auto-Post  date",1:"E RA Date Re ceived") S  XX=XX_" f or receipt s to inclu de on the  report" S  DIR("?")=X X D ^DIR Q :$D(DTOUT) !$D(DUOUT) !(Y="") 0  I Y<START  D  G ENDDT  . S XX=$$ FMTE^XLFDT (START,"2Z D") ;****  . W !,*7," Enter an E nd date th at is not  less than  "_XX S RAN GE=START_" |"_Y Q RAN GE ;SELERA () ; Ask t he user wh ich types  of ERA the  want to s ee on the  report ; I nput: None  ; Returns : 0 - User  up-arrowe d or timed  out ; 1 -  Posted/Co mpleted Re ceipts ; 2  - Only ER As with Mi ssing Rece ipts ; 3 -  Both Post ed/Complet ed and Mis sing Recei pts N DIR, DIROUT,DIR UT,DTOUT,D UOUT,X,Y S  DIR("A")= "Select ER As to be D isplayed:  " S DIR(0) ="SA^1:Pos ted/Comple ted Receip ts;2:Missi ng Receipt s;3:Both"  S DIR("B") ="Both" S  DIR("?",1) ="Enter 1  to only di splay Post ed Receipt s." S DIR( "?",2)="En ter 2 to o nly displa y ERAs wit h missing  receipts."  S DIR("?" )="Enter 3  to displa y all rece ipts." D ^ DIR I $D(D TOUT)!$D(D UOUT)!(Y=" ") Q 0 Q Y  ;RPTSORT( WHICH,ERAS EL) ; Ask  the user h ow they wa nt to sort  the data  ; Input: W HICH - 1-  Filtering  by Auto-Po st Date ;  2 - Filter ing by ERA  Date Rece ived  ; ER ASEL - ERA  Filter  ;  1 - Poste d/Complete d Receipts  ; 2 - Onl y ERAs wit h Missing  Receipts ;  3 - Both  Posted/Com pleted and  Missing R eceipts ;  Returns: 0  - User up -arrowed o r timed ou t ; 1 - Au to-Post Da te sort ;  2 - Missin g Receipts  N DIR,DIR OUT,DIRUT, DTOUT,DUOU T,X,XX,Y ;  ; If the  user is on ly showing  Posted/Co mpleted Re ceipts OR   ; Missing  Receipts  then the o nly possib le sort va lue is by  date I ERA SEL'=3 Q 1  S DIR("A" )="Sort by  (D)ate or  (M)issing  Receipts:  " S DIR(0 )="SA^D:Da te;M:Missi ng Receipt s" S DIR(" B")="D" S  XX=$S(WHIC H=1:"Auto- Post date. ",1:"ERA D ate Receiv ed.") S DI R("?",1)=" Enter 'D'  to sort by  "_XX S DI R("?")="En ter 'M' to  display M issing Rec eipts firs t." D ^DIR  I $D(DTOU T)!$D(DUOU T)!(Y="")  Q 0 S XX=$ S(Y="D":1, Y="P":2,1: 3) Q XX ;E XCEL() ; A sk the use r if they  want to ex port to Ex cel ; Inpu t: None ;  Returns: - 1 - User u p-arrowed  or timed o ut ; 0 - O utput to p aper ; 1 -  Output to  Excel N D IR,DIROUT, DIRUT,DTOU T,DUOUT,X, Y S DIR(0) ="Y" S DIR ("A")="Exp ort the re port to Mi crosoft Ex cel" S DIR ("B")="NO"  S DIR("?" )="Enter ' YES' to ou tput to Ex cel. Other wise enter  'NO'" D ^ DIR I $G(D UOUT) Q -1  Q Y ;DEVI CE(EXCEL,I O) ; Selec t the outp ut device  ; Input: E XCEL - 1 -  Ouput to  Excel, 0 o therwise ;  Output: % ZIS - Sele cted devic e ; IO - A rray of se lected out put info ;  Returns:  0 - No dev ice select ed, 1 othe rwise N PO P,RCPYRSEL ,%ZIS S %Z IS="QM" D  ^%ZIS Q:PO P 0 Q:EXCE L 1 ; Outp ut to Exce l, no queu eing ; Q 1  ;REPORT(I NPUT,RCVAU TD,IO,JOB)  ; Compile  and run t he report  ; Expects  ZTQUEUED t o be defin ed already  if queued  ; Input:  INPUT - A1 ^A2^A3^... ^An Where:  ; A1 - 1  - All divi sions sele cted ; 2 -  Selected  divisions  ; A2 - 1 -  Filter by  Auto-Post  date rang e ; 2 - Fi lter by ER A Date Rec eived date  range ; A 3 - B1|B2  - Where: ;  B1 - ERA  Date Recei ved Start  Date if A2 =2 ; Auto- Post Start  Date of A 2=1 ; B2 -  ERA Date  Received E nd Date if  A2=2 ; Au to-Post En d Date of  A2=1 ; A4  - 1 - Post ed/Complet ed Receipt s ; 2 - On ly ERAs wi th Missing  Receipts  ; 3 - Both  Posted/Co mpleted an d Missing  Receipts ;  A5 - 1 -  All insura nce compan ies select ed ; 2 - S elected in surance co mpanies ch osen ; A6  - 1 - Auto -Post Date /ERA Date  Received S ort ; 2 -  Payer sort  ; 3 - Mis sing Recei pts ; A7 -  0 - Do no t display  in a listm an templat e ; 1 - Di splay in a  listman t emplate ;  A8 - 0 - O utput to p aper ; 1 -  Output to  Excel ; A 9 - Line c ounter for  Listman o utput  ; R CVAUTD - A rray of se lected Div isions ; O nly passed  if A1=2 ;  IO - Inte rface devi ce ; JOB -  $J (optio nal, only  passed in  when repor t is queue d) ; ^TMP( "RCSELPAY" ,$J)- Glob al Array o f selected  insurance  companies  ; Output:  ^TMP("RCD PE_LAR",$J ,CTR)=Line  - Array o f display  lines (no  headers) ;  for outpu t to Listm an ; Only  set when A 7-1 N CURD T,DIVFLT,D TEND,DTSTA RT,ERAFILT ,WHICH,XX, SORT,STOP  K ^TMP("RC DPE_LAR",$ J),^TMP($J ,"RCDPE_LA R") I '$G( JOB) S JOB ="" U IO D  PAYERS(JO B) ; Rearr ange payer  global fo r easier u se S DIVFL T=$P(INPUT ,"^",1) ;  Division f ilter S WH ICH=$P(INP UT,"^",2)  ; 1 - Auto -Post date , 2 - ERA  Date Recei ved S SORT =$P(INPUT, "^",6) ; T ype of sec ondary sor t S DTEND= $P($P(INPU T,"^",3)," |",2)_".99 99"  ; End  of Date R ange S DTS TART=$P($P (INPUT,"^" ,3),"|",1)  ; End of  Date Range  S ERAFILT =$P(INPUT, "^",4) ; E RA Filter  ; ; First  filter and  sort the  report S C URDT=DTSTA RT-1 F  D   Q:'CURDT   Q:CURDT>( DTEND) . S :WHICH=1 C URDT=$O(^R CY(344.4," F",CURDT))  . S:WHICH =2 CURDT=$ O(^RCY(344 .4,"AFD",C URDT)) . Q :'CURDT .  Q:CURDT>(D TEND) . I  WHICH=2 D  RPTE(DIVFL T,CURDT,SO RT,ERAFILT ,.RCVAUTD)  Q . D RPT A(DIVFLT,C URDT,SORT, ERAFILT,.R CVAUTD) ;  D RPTOUT^R CDPELA1(IN PUT) ; Out put the re port ; ; Q uit if Lis tman - cle an up of ^ TMP & devi ce is hand led in LMO UT^RCDPELA R I $P(INP UT,"^",7)= 1 Q ; ; Cl ose device  I '$D(ZTQ UEUED) D ^ %ZISC I $D (ZTQUEUED)  S ZTREQ=" @" K ^TMP( "RCDPE_LAR ",$J),^TMP ($J,"RCDPE _LAR") K ^ TMP("RCSEL PAY",$J),^ TMP($J,"SE LPAYER") K  ZTQUEUED  Q ;PAYERS( JOB) ; Rea rrange pay er global  for easier  use ; Inp ut: ^TMP(" RCSELPAY", $J,nn)=Pay er Name -  Global Arr ay of sele cted ; ins urance com panies ; O utput ^TMP ($J,"SELPA YER",Payer  Name)=""  - Global A rray of se lected ; i nsurance r earranged  for easier  checks I  JOB="" S J OB=$J N PA YER,XX K ^ TMP($J,"SE LPAYER") S  XX="" F   D  Q:XX=""  . S XX=$O (^TMP("RCS ELPAY",JOB ,XX)) . Q: XX="" . S  PAYER=$$UP ^XLFSTR(^T MP("RCSELP AY",JOB,XX )) . S ^TM P($J,"SELP AYER",PAYE R)="" K ^T MP("RCSELP AY",JOB) Q  ;RPTE(DIV FLT,CURDT, SORT,ERAFI LT,VAUTD)  ; Use the  ERA Date R eceived in dex and fi lter out ;  divisions , payers t hat weren' t selected  ; Input:  DIVFLT - 1  - All Div isions sel ected, 2 o therwise ;  CURDT - D ate being  processed  ; SORT - 1  - Auto-Po st Date So rt ; 2 - M issing Rec eipts ; ER AFILT - 1  - Posted/C ompleted R eceipts ;  2 - Only E RAs with M issing Rec eipts ; 3  - Both Pos ted/Comple ted and Mi ssing Rece ipts ; VAU TD - Array  of select ed divisio ns ; ^TMP( "RCSELPAY" ,$J) - Glo bal Array  of selecte d insuranc e companie s ; Output : ^TMP($J, A1,"SEL",A 2,A3,A4,A5 )="" - if  record pas sed filter s Where: ;  A1 - "RCD PE_LAR" ;  A2 - Upper cased Paye r Name (pr imary sort ) ; A3 - S econdary S ort Value  ; A4 - Int ernal IEN  for file 3 44.4 ; A5  - Internal  IEN for s ub file 34 4.41 N COM PLETE,IEN3 444,IEN344 41,IENS,PA YER,RECEIP T,SVAL,XX  S IEN3444= 0 F  D  Q: 'IEN3444 .  S IEN3444 =$O(^RCY(3 44.4,"AFD" ,CURDT,IEN 3444)) . Q :'IEN3444  . S PAYER= $$GET1^DIQ (344.4,IEN 3444,.06," I") ; Paym ent From f ield . S P AYER=$$UP^ XLFSTR(PAY ER) . Q:'$ D(^TMP($J, "SELPAYER" ,PAYER)) ;  Not a sel ected paye r . I DIVF LT'=1 Q:'$ $CHKDIV^RC DPEDAR(IEN 3444,1,.VA UTD) ; Not  a selecte d Division  . S XX=$$ GET1^DIQ(3 44.4,IEN34 44,4.01,"I ") ; Auto- Post date  on ERA . Q :'XX                                                     ; skip i f not auto -posted ER A . S COMP LETE=$$COM PLETE(IEN3 444) ; Che ck for mis sing recei pts . I ER AFILT=1,'C OMPLETE Q                                 ;  Missing R eceipt . I  ERAFILT=2 ,COMPLETE  Q                                  ; Not a  Missing Re ceipt . ;  . ; Just s howing mis sing recei pts and th is ERA doe sn't have  any . I ER AFILT=2,CO MPLETE Q .  S IEN3444 1=0 . F  D   Q:'IEN34 441 . . S  IEN34441=$ O(^RCY(344 .4,IEN3444 ,1,IEN3444 1)) . . Q: 'IEN34441  . . S IENS =IEN34441_ ","_IEN344 4_"," . .  S SVAL=$S( SORT=1:CUR DT,1:COMPL ETE) ; Get  the sort  value . .  S ^TMP($J, "RCDPE_LAR ","SEL",PA YER,SVAL,I EN3444,IEN 34441)=""  Q ;RPTA(DI VFLT,CURDT ,SORT,ERAF ILT,VAUTD)  ; Use the  Auto-Post  Date inde x and filt er out ; d ivisions,  payers tha t weren't  selected ;  Input: DI VFLT - 1 -  All Divis ions selec ted, 2 oth erwise ; C URDT - Dat e being pr ocessed ;  SORT - 1 -  Auto-Post  Date Sort  ; 2 - Mis sing Recei pts ; ERAF ILT - 1 -  Posted/Com pleted Rec eipts ; 2  - Only ERA s with Mis sing Recei pts ; 3 -  Both Poste d/Complete d and Miss ing Receip ts ; VAUTD  - Array o f selected  divisions  ; ^TMP("R CSELPAY",$ J) - Globa l Array of  selected  insurance  companies  ; ^TMP($J, "RCDPE_LAR ","ERA") -  see outpu t for defi nition ; O utput: ^TM P($J,A1,"S EL",A2,A3, A4,A5)=""  - if recor d passed f ilters Whe re: ; A1 -  "RCDPE_LA R" ; A2 -  Uppercased  Payer Nam e (primary  sort) ; A 3 - Second ary Sort V alue ; A4  - Internal  IEN for f ile 344.4  ; A5 - Int ernal IEN  for sub fi le 344.41  ; ^TMP($J, A1,"ERA",A 2)="" - Li st of ERAs  that were  already p ulled Wher e: ; A1 -  "RCDPE_LAR " ; A2 - I EN of #344 .4 (ERA #)  ; N COMPL ETE,IEN344 4,IEN3441, PAYER,SVAL  S IEN3444 =0 F  D  Q :'IEN3444  . S IEN344 4=$O(^RCY( 344.4,"F", CURDT,IEN3 444)) . Q: 'IEN3444 .  I DIVFLT' =1 Q:'$$CH KDIV^RCDPE DAR(IEN344 4,1,.VAUTD ) ; Not a  selected D ivision .  S COMPLETE =$$COMPLET E(IEN3444)  . I ERAFI LT=1,'COMP LETE Q                                ; Mis sing Recei pt . I ERA FILT=2,COM PLETE Q                                 ; N ot a Missi ng Receipt  . S PAYER =$$GET1^DI Q(344.4,IE N3444,.06, "I") ; Pay ment From  field . S  PAYER=$$UP ^XLFSTR(PA YER) . Q:' $D(^TMP($J ,"SELPAYER ",PAYER))  ; Not a se lected pay er . Q:$D( ^TMP($J,"R CDPE_LAR", "ERA",IEN3 444)) ; Al ready pull ed this ER A . ; . S  ^TMP($J,"R CDPE_LAR", "ERA",IEN3 444)="" .  S IEN34441 =0 . F  D   Q:'IEN344 41 . . S I EN34441=$O (^RCY(344. 4,IEN3444, 1,IEN34441 )) . . Q:' IEN34441 .  . S SVAL= $S(SORT=1: CURDT,1:CO MPLETE) ;  Get the so rt value .  . S ^TMP( $J,"RCDPE_ LAR","SEL" ,PAYER,SVA L,IEN3444, IEN34441)= "" Q ;COMP LETE(IEN34 44) ; Chec ks an ERA  for missin g receipts  ; Input:  IEN3444 -  ERA to be  checked ;  Returns: 0  if at lea st one det ail line o f the ERA  has a miss ing receip t ; 1 othe rwise N XX  S XX=$$GE T1^DIQ(344 .4,IEN3444 ,4.02,"I")  ; Auto-Po st Status  field I XX =2 Q 1 ; C omplete ER A Q 0 ;ASK STOP() ; A sk to cont inue ; Inp ut: IOST -  Device Ty pe  ; Retu rns: 1 - U ser wants  to quit, 0  otherwise  N DIR,DIR OUT,DIRUT, DTOUT,DUOU T Q:$E(IOS T,1,2)'["C -" 0 ; Not  a termina l S DIR(0) ="E" W ! D  ^DIR I ($ D(DIRUT))! ($D(DUOUT) ) Q 1 Q 0  ;
  280  
  281  
  282  
  283   Routines
  284   Activities
  285   Routine Na me
  286   RCDPELA1
  287   Enhancemen t Category
  288    New
  289    Modify
  290    Delete
  291    No Change
  292   RTM
  293  
  294   Related Op tions
  295   RCDPE AUTO -POST RECE IPT REPORT
  296   Routines
  297   Activities
  298   Data Dicti onary (DD)  Reference s
  299  
  300   Related Pr otocols
  301  
  302   Related In tegration  Control Re gistration s (ICRs)
  303  
  304   Data Passi ng
  305    Input
  306    Output Re ference
  307    Both
  308    Global Re ference
  309    Local
  310   Input Attr ibute Name  and Defin ition
  311   Name:
  312   Definition :
  313   Output Att ribute Nam e and Defi nition
  314   Name:
  315   Definition :
  316  
  317  
  318   Related Ro utines
  319   Routines “ Called By”
  320   Routines “ Called”   
  321  
  322   LMOUT^RCDP ELAR
  323   REPORT^RCD PELAR
  324  
  325   $$ASKSTOP^ RCDPELAR
  326   $$ENDORPRT ^RCDPEARL
  327   $$MISSREC^ RCDPELAR
  328  
  329  
  330   Current Lo gic
  331   N/A
  332  
  333   Modified L ogic
  334   RCDPELA1 ; EDE/FA - L IST ALL AU TO-POSTED  RECEIPTS R EPORT ;Nov  17, 2016  ;;4.5;Acco unts Recei vable;**31 8**;Mar 20 , 1995;Bui ld 121 ;Pe r VA Direc tive 6402,  this rout ine should  not be mo dified. ;  Q   ; no d irect entr y ;RPTOUT( INPUT) ; O utput the  report to  paper/scre en, listma n or excel  ; Input:  INPUT - Se e REPORT f or a compl ete descri ption ; ^T MP($J,A1," SEL",A2,A3 ,A4,A5)=""  - if reco rd passed  filters Wh ere: ; A1  - "RCDPE_L AR" ; A2 -  Uppercase d Payer Na me (primar y sort) ;  A3 - Secon dary Sort  Value ; A4  - Interna l IEN for  file 344.4  ; A5 - In ternal IEN  for file  344.41 ; O utput: ^TM P("RCDPE_L AR",$J,CTR )=Line - A rray of di splay line s (no head ers) ; for  output to  Listman ;  Only set  when A7-1  ; ; ^TMP($ J,A1,"ZERO ",A3,A4)=" " - List o f EEOBs wi th zero ba lance Wher e: ; A1 -  "RCDPE_LAR " ; A3 - I EN of #344 .4 (ERA #)  ; A4 - IE N of #344. 41 (origin al sequenc e #) ; N A 1,DATA,EXC EL,FIRST,I EN3444,LNC NT,LSTMAN  N ONEERA,O UTTYP,PAGE ,PAYER,STO P,SVAL S ( LNCNT,PAGE )=0 ; Init ialize Lin e/Page cou nters S $P (INPUT,"^" ,9)=0 ; Li ne Counter  for Listm an output  S EXCEL=$P (INPUT,"^" ,8) S LSTM AN=$P(INPU T,"^",7) S  DATA=0 S  OUTYPE=$S( EXCEL:2,LS TMAN:1,1:0 ) I OUTYPE =2 D                                  ; Exc el Ouput .  S XX="Pay er^ERA^Dat e Received ^Date Post ed^Receipt ^Trace #"  . S XX=XX_ "^Receipt  Total^ERA  Total^Miss ing Receip ts^User^Am ount^FMS D oc #" . W  !,XX . ; S  A1="RCDPE _LAR",PAYE R="",STOP= 0 S FIRST= $O(^TMP($J ,A1,"SEL", "")) ; Fir st payer o n the repo rt F  D  Q :PAYER=""   Q:STOP .  S PAYER=$O (^TMP($J,A 1,"SEL",PA YER)) . Q: PAYER="" .  S DATA=1  ; found da ta . ; . I  OUTYPE=1  D                                ; Listman  Output . .  S XX=$P(I NPUT,"^",9 )+1 . . S  $P(INPUT," ^",9)=XX .  . S ^TMP( A1,$J,XX)= PAYER . ;  . I OUTYPE =0 D  Q:ST OP                       ; Paper /Screen ou tput . . S :PAGE>1!(P AYER'=FIRS T) STOP=$$ ASKSTOP^RC DPELAR() .  . Q:STOP  . . S LNCN T=0 . . D  HEADER(INP UT,.LNCNT, .PAGE) . .  D:'EXCEL  ERAHDR(PAY ER,.LNCNT, PAGE) . S  SVAL="" .  F  D  Q:SV AL=""  Q:S TOP . . S  SVAL=$O(^T MP($J,A1," SEL",PAYER ,SVAL)) .  . Q:SVAL=" " . . S IE N3444="" .  . F  D  Q :IEN3444=" "  Q:STOP  . . . S IE N3444=$O(^ TMP($J,A1, "SEL",PAYE R,SVAL,IEN 3444)) . .  . Q:IEN34 44="" . .  . D ZEROBA L(IEN3444)  ; determi ne which I EN34441 li nes are ze ro balance  . . . K O NEERA . .  . S XX=$$G ET1^DIQ(34 4.4,IEN344 4,.05,"I")  ; Total A mount Paid  . . . S X X=$J(XX,12 ,2) . . .  S ONEERA=" 0^"_XX_"^0 ^0"                 ;  Initial E RA values  . . . S IE N34441=""  . . . F  D   Q:IEN344 41=""  Q:S TOP . . .  . S IEN344 41=$O(^TMP ($J,A1,"SE L",PAYER,S VAL,IEN344 4,IEN34441 )) . . . .  Q:IEN3444 1="" . . .  . ; . . .  . Q:$D(^T MP($J,A1," ZERO",IEN3 444,IEN344 41)) ; eli minates re versals .  . . . ; .  . . . ; Ge t all the  detail lin es needed  to output  one ERA re cord . . .  . D ONEDL N(OUTYPE,I EN3444,IEN 34441,.ONE ERA) . . .  D ADDERAH (OUTYPE,.O NEERA,IEN3 444) ; Add  the ERA H eader line s . . . ;  . . . ; Ou tput all t he lines f or one ERA  . . . S S TOP=$$OUTE RA(.INPUT, OUTYPE,PAY ER,.ONEERA ,.LNCNT,.P AGE) I 'DA TA,'EXCEL, 'LSTMAN D  . D HEADER (INPUT,.LN CNT,.PAGE)  . D ERAHD R(PAYER,.L NCNT,PAGE)  I 'EXCEL  D . S XX=$ $ENDORPRT^ RCDPEARL .  I OUTYPE= 1 D  Q . .  S YY=$P(I NPUT,"^",9 )+1 . . S  $P(INPUT," ^",9)=YY .  . S ^TMP( A1,$J,YY)= XX . W !,X X . I 'STO P S STOP=$ $ASKSTOP^R CDPELAR()  . Q:STOP Q  ;ZEROBAL( IEN3444) ;  Is it a z ero value  EEOB ; Tho se EEOB wi th reversa ls will ha ve a zero  value. Thi s builds ;  an array  of them. ;  Input: IE N3444 - In ternal IEN  for file  344.4 ; Ou tput: ; ^T MP($J,A1," ZERO",A3,A 4)="" - Li st of EEOB s with zer o balance  Where: ; A 1 - "RCDPE _LAR" ; A3  - IEN of  #344.4 (ER A #) ; A4  - IEN of # 344.41 (or iginal seq uence #) ;  N A1,A2,A MTPOST,IEN S,ORIGSEQ, RCSEQ,RCDA 1,XX K ^TM P($J,"RCDP E_LAR","ZE RO",IEN344 4) ; S A1= "RCDPE_LAR ",A2="ZERO " S RCSEQ= 0 F  S RCS EQ=$O(^RCY (344.49,IE N3444,1,"B ",RCSEQ))  Q:'RCSEQ   D . Q:RCSE Q#1'=0  .  S RCDA1=+$ O(^RCY(344 .49,IEN344 4,1,"B",RC SEQ,0)) .  Q:'RCDA1 .  S IENS=RC DA1_","_IE N3444_","  . S AMTPOS T=$$GET1^D IQ(344.491 ,IENS,.03, "I") ; Amo unt to pos t on recei pt . I AMT POST>0 Q                                  ;  Not zero  value line  . S ORIGS EQ=$$GET1^ DIQ(344.49 1,IENS,.09 ,"I") ; li st of orig inal seq # s with zer o balance  . S XX=0 .  F XX=1:1  Q:$P(ORIGS EQ,",",XX) =""  S ^TM P($J,A1,A2 ,IEN3444,( $P(ORIGSEQ ,",",XX))) ="" Q ;ONE DLN(OUTYPE ,IEN3444,I EN34441,ON EERA) ; Ga ther all o f the ERA  Detail lin es to disp lay ; one  ERA record  ; Input:  OUTYPE - O  - Output  to Screen  or paper ;  1 - Outpu t to Listm an ; 2 - O utput to E xcel ; IEN 3444 - Int ernal IEN  for file 3 44.4 ; IEN 34441 - In ternal IEN  for sub f ile 344.41  of the ER A detail ;  line bein g processe d ; ONEERA  - A1^A2^A 3^A4 Where : ; A1 - C urrent Num ber of lin es in the  ERA displa y ; A2 - E RA Total f or the ERA  (formatte d) ; A3 -  Current Re ceipt Tota l for the  ERA (forma tted) ; A4  - 1 if ER A contains  at least  one detail  record  ;  with a mi ssing rece ipt. ; 0 o therwise ;  ONEERA(LN )=A4- Wher e ; LN - L ine number  for ERA D isplay ; A 4 - Actual  display l ine ; Oupu t: ONEERA  - A1^A2^A3 ^A4 Where:  ; A1 - Up dated Numb er of line s in the E RA display  ; A2 - ER A Total fo r the ERA  (formatted ) ; A3 - U pdated Rec eipt Total  for the E RA (format ted) ; A4  - 1 if ERA  contains  at least o ne detail  record  ;  with a mis sing recei pt. ; 0 ot herwise ;  ONEERA(LN) =A4- Where  ; LN - Li ne number  for ERA Di splay ; A4  - Actual  display li ne N AMT,D TPOST,DTRE C,LCNT,IEN S,LN,PAYER ,RECEIPT,T RDOC,USER, XX,YY S IE NS=IEN3444 1_","_IEN3 444_"," S  LCNT=$P(ON EERA,"^",1 )+1 S $P(O NEERA,"^", 1)=LCNT                      ; E RA Line co unter ; ;  Build deta il line fo r ERA Deta il record  being proc ess S XX=$ $GET1^DIQ( 344.4,IEN3 444,.07,"I ") ; ERA D ate Receiv ed S DTREC =$$FMTE^XL FDT(XX,"2D Z") S XX=$ $GET1^DIQ( 344.41,IEN S,9,"I") ;  Auto-Post  Date S DT POST=$$FMT E^XLFDT(XX ,"2DZ") S  XX=$$GET1^ DIQ(344.41 ,IENS,.25, "I") ; Rec eipt Point er S RECEI PT=$$GET1^ DIQ(344,XX ,.01,"I")  ; Receipt  Number S T RDOC=$$GET 1^DIQ(344, XX,200,"I" ) ; FMS Do cument # I  RECEIPT=" " D . S $P (ONEERA,"^ ",4)=1 . S  RECEIPT=" * Missing  *" S XX=$O (^RCY(344. 72,"E",IEN 3444,""))  ; IEN of t he Auto-Po st Audit F ile entry  S USER=$$G ET1^DIQ(34 4.72,XX,.0 2,"I") ; U ser IEN wh o marked f or Auto-Po st S USER= $$GET1^DIQ (200,USER, 1,"I") ; I nitials of  User who  marked for  Auto-Post  S AMT=$$G ET1^DIQ(34 4.41,IENS, .03,"I") ;  Amount Pa id I RECEI PT'="* Mis sing *" D  . S YY=$P( ONEERA,"^" ,3) ; Curr ent Receip t Total .  S $P(ONEER A,"^",3)=A MT+YY                  ; Updated  Receipt T otal S AMT =$J(AMT,12 ,2) ; Form atted Paid  I OUTYPE= 2 D  Q                               ; Outp ut to Exce l . S LN=$ $GET1^DIQ( 344.4,IEN3 444,.06,"I ") ; Payme nt From .  S LN=LN_"^ "_IEN3444_ "^"_DTREC_ "^"_DTPOST _"^"_RECEI PT . S $P( LN,"^",10) =USER . S  $P(LN,"^", 11)=AMT .  S $P(LN,"^ ",12)=TRDO C . S ONEE RA(LCNT)=L N ; S LN="  " S LN=$$ SETSTR^VAL M1(DTREC,L N,9,10) S  LN=$$SETST R^VALM1(DT POST,LN,19 ,10) S LN= $$SETSTR^V ALM1(RECEI PT,LN,30,$ L(RECEIPT) ) S LN=$$S ETSTR^VALM 1(USER,LN, 43,$L(USER )) S LN=$$ SETSTR^VAL M1(AMT,LN, 50,$L(AMT) ) S LN=$$S ETSTR^VALM 1(TRDOC,LN ,65,$L(TRD OC)) S ONE ERA(LCNT)= LN Q ;ADDE RAH(OUTYPE ,ONEERA,IE N3444) ; A dd the hea der lines  to ERA out put array  ; Input: O UTYPE - O  - Output t o Screen o r paper ;  1 - Output  to Listma n ; 2 - Ou tput to Ex cel ; ONEE RA - A1^A2 ^A3^A4 Whe re: ; A1 -  Number of  lines in  the ERA di splay ; A2  - Total R eceipt amo unt for th e ERA (for matted) ;  A3 - Total  Amount pa id for the  ERA (form atted) ; A 4 - 1 if E RA contain s at least  one detai l record   ; with a m issing rec eipt. ; 0  otherwise  ; ONEERA(L N)=A4- Whe re ; LN -  Line numbe r for ERA  Display ;  A4 - Actua l display  line ; IEN 3444 - Int ernal IEN  for file 3 44.4 ; Oup ut: ONEERA  - Receipt  Total For matted, ER A Lines 1- 4 added N  LN,MISSING R,TOTERA,T OTREC,TRAC E,XX S XX= $P(ONEERA, "^",3) ; F inal Recei pt Total S  TOTREC=$J (XX,12,2)  ; Formatte d total S  TOTERA=$P( ONEERA,"^" ,2) ; Form atted ERA  Total S XX =$$COMPLET E^RCDPELAR (IEN3444)  S MISSINGR =$S(XX=0:" * Missing  Receipts * ",1:"") S  TRACE=$$GE T1^DIQ(344 .4,IEN3444 ,.02,"I")  ; Trace Nu mber I OUT YPE=2 D  Q                               ;  Excel outp ut . S XX= "" . F  D   Q:XX="" .  . S XX=$O (ONEERA(XX )) . . Q:X X="" . . S  $P(ONEERA (XX),"^",6 )=TRACE             ;  Formatted  Receipt T otal . . S  $P(ONEERA (XX),"^",7 )=TOTREC            ;  Formatted  Receipt T otal . . S  $P(ONEERA (XX),"^",8 )=$P(ONEER A,"^",2) ;  Formatted  ERA Total  . . S $P( ONEERA(XX) ,"^",9)=MI SSINGR ; ;  1st Main  ERA displa y line S L N="ERA: "  S LN=$$SET STR^VALM1( IEN3444,LN ,6,$L(IEN3 444)) S LN =$$SETSTR^ VALM1("ERA  Total: ", LN,20,11)  S LN=$$SET STR^VALM1( TOTERA,LN, 32,$L(TOTE RA)) S LN= $$SETSTR^V ALM1(MISSI NGR,LN,53, $L(MISSING R)) S XX=$ P(ONEERA," ^",1)+1 S  $P(ONEERA, "^",1)=XX                          ; Update  Line coun ter S ONEE RA(.1)=LN  ; ; 2nd Ma in ERA dis play line  S LN=" Rec eipt Total :" S LN=$$ SETSTR^VAL M1(TOTREC, LN,32,$L(T OTREC)) S  XX=$P(ONEE RA,"^",1)+ 1 S $P(ONE ERA,"^",1) =XX                         ; Up date Line  counter S  ONEERA(.2) =LN ; ; 3r d Main ERA  display l ine S LN="  Trace #:"  S XX=$$GE T1^DIQ(344 .4,IEN3444 ,.02,"I")  ; Trace Nu mber S LN= $$SETSTR^V ALM1(XX,LN ,32,$L(XX) ) S XX=$P( ONEERA,"^" ,1)+1 S $P (ONEERA,"^ ",1)=XX                        ;  Update Li ne counter  S ONEERA( .3)=LN Q ; OUTERA(INP UT,OUTYPE, PAYER,ONEE RA,LNCNT,P AGE) ; Out put the di splay line s for one  ERA ; Inpu t: INPUT -  See REPOR T for a co mplete des cription ;  OUTYPE -  O - Output  to Screen  or paper  ; 1 - Outp ut to List man ; 2 -  Output to  Excel ; PA YER - Paye r Name ; O NEERA - Ar ray of lin es to disp lay for on e ERA ; LN CNT - Curr ent Line C ount ; PAG E - Curren t Page Cou nt ; Outpu t: LNCNT -  Updated L ine Count  ; PAGE - U pdated Pag e Count ;  A9 - Part  of Input a bove ; Upd ated Line  counter fo r Listman  Output ; ^ TMP("RCDPE _LAR",$J,C TR)=Line -  Array of  display li nes (no he aders) ; f or output  to Listman  ; Only se t when A7- 1 ; Return s: 1 if us er quit, 0  otherwise  N LN,STOP ,XX S STOP =0 S XX=LN CNT-4+$P(O NEERA,"^", 1) ; LNCNT  + # of li nes to dis play I 'OU TYPE,(XX>( IOSL-3)) D   Q:STOP 1  . S STOP= $$ASKSTOP^ RCDPELAR()  . Q:STOP  . S LNCNT= 0 . D HEAD ER(INPUT,. LNCNT,.PAG E) . D ERA HDR(PAYER, .LNCNT,.PA GE) S LN=" " F  D  Q: LN=""  Q:S TOP . S LN =$O(ONEERA (LN)) . Q: LN="" . S  LNCNT=LNCN T+1 . I OU TYPE=1 D   Q . . S XX =$P(INPUT, "^",9)+1 .  . S $P(IN PUT,"^",9) =XX . . S  ^TMP("RCDP E_LAR",$J, XX)=ONEERA (LN) . W ! ,ONEERA(LN ) S LNCNT= LNCNT+1 W: OUTYPE=0 !  I OUTYPE= 1 D . S XX =$P(INPUT, "^",9)+1 .  S $P(INPU T,"^",9)=X X . S ^TMP ("RCDPE_LA R",$J,XX)= " " Q STOP  ;HEADER(I NPUT,LNCNT ,PAGE) ; D isplay a P age Header  ; Input:  INPUT - Se e REPORT f or a compl ete descri ption ; LN CNT - Curr ent Line C ount ; PAG E - Curren t Page Cou nt ; Outpu t: LNCNT -  Updated L ine Count  ; PAGE - U pdated Pag e Count N  XX,YY,ZZ S  YY="AUTO- POSTED REC EIPT REPOR T",PAGE=PA GE+1 S XX= $$NOW^XLFD T(),XX=$$F MTE^XLFDT( XX) S XX=$ $SETSTR^VA LM1(XX,YY, 40,21) S Y Y="Page: " _$J(PAGE,3 ) S XX=$$S ETSTR^VALM 1(YY,XX,72 ,$L(YY)) S  LNCNT=LNC NT+1 W @IO F,XX ; S L NCNT=LNCNT +1 S XX=$$ HDRLN2(INP UT) W !,XX  ; S LNCNT =LNCNT+1 S  XX=$$HDRL N3(INPUT)  W !,XX ; S  LNCNT=LNC NT+1 W ! ;  Blank lin e Q ;HDRLN 2(INPUT) ;  Build the  2nd heade r line ; I nput: INPU T - See RE PORT for a  complete  descriptio n ; Return s: Text fo r 2nd head er line N  XX,YY,ZZ S  XX=" FILT ERS: "_$S( $P(INPUT," ^",1)=1:"A ll",1:"Sel ected")_"  Divs;" S X X=XX_$S($P (INPUT,"^" ,5)=1:" Al l",1:" Sel ected")_"  Payers;" S  XX=XX_$S( $P(INPUT," ^",2)=1:"  Auto-Post  Date",1:"  ERA Dt Rec eived") S  YY=$P($P(I NPUT,"^",3 ),"|",1),Y Y=$$FMTE^X LFDT(YY,"2 Z") S ZZ=$ P($P(INPUT ,"^",3),"| ",2),ZZ=$$ FMTE^XLFDT (ZZ,"2Z")  S XX=XX_"  "_YY_" to  "_ZZ Q XX  ;HDRLN3(IN PUT) ; Bui ld the 2nd  header li ne ; Input : INPUT -  A1^A2^A3^. ..^An Wher e: ; A1 -  1 - All di visions se lected ; 2  - Selecte d division s ; A2 - 1  - Filter  by Auto-Po st date ra nge ; 2 -  Filter by  ERA Date R eceived da te range ;  A3 - B1|B 2 - Where:  ; B1 - ER A Date Rec eived Star t Date if  A2=2 ; Aut o-Post Sta rt Date of  A2=1 ; B2  - ERA Dat e Received  End Date  if A2=2 ;  Auto-Post  End Date o f A2=1 ; A 4 - 1 - Po sted/Compl eted Recei pts ; 2 -  Only ERAs  with Missi ng Receipt s ; 3 - Bo th Posted/ Completed  and Missin g Receipts  ; A5 - 1  - All insu rance comp anies sele cted ; 2 -  Selected  insurance  companies  chosen ; A 6 - 1 - Au to-Post Da te/ERA Dat e Received  Sort ; 2  - Payer so rt ; 3 - M issing Rec eipts ; A7  - 0 - Do  not displa y in a lis tman templ ate ; 1 -  Display in  a listman  template  ; A8 - 0 -  Output to  paper ; 1  - Output  to Excel ;  A9 - Line  counter f or Listman  output  ;  Returns:  Text for 2 nd header  line N XX, YY,ZZ S YY =$P(INPUT, "^",4) S:Y Y=1 ZZ="Po sted/Compl eted Recei pts"       ; Receipt  filter S:Y Y=2 ZZ="Mi ssing Rece ipts Only"  S:YY=3 ZZ ="All Rece ipts" S XX =" ERA: "_ ZZ S XX=$$ SETSTR^VAL M1("SORT:  ",XX,40,6)  S YY=$P(I NPUT,"^",6 ) ; Select ed Sort I  YY=1,$P(IN PUT,"^",2) =1 S ZZ="A uto-Post D ate" I YY= 1,$P(INPUT ,"^",2)=2  S ZZ="ERA  Date Recei ved" I YY= 2 S ZZ="Pa yer" I YY= 3 S ZZ="Mi ssing Rece ipts" S XX =$$SETSTR^ VALM1(ZZ,X X,46,$L(ZZ )) Q XX ;E RAHDR(PAYE R,LNCNT,PA GE) ; Disp lay ERA He ader Lines  ; Input:  PAYER - Pa yer Name ;  LNCNT - C urrent Lin e Count ;  PAGE - Cur rent Page  Count ; Ou tput: LNCN T - Update d Line Cou nt ; PAGE  - Updated  Page Count  N XX,YY,Z Z S LNCNT= LNCNT+1 S  XX=" DATE  DATE" W !, XX ; S LNC NT=LNCNT+1  S XX=$$ER AHDR2() W  !,XX ; S L NCNT=LNCNT +1 S XX=$J ("",80),XX =$TR(XX,"  ","-") W ! ,XX ; S LN CNT=LNCNT+ 1 W !,"Pay er: ",PAYE R Q ;ERAHD R2() ; Bui ld the 2nd  ERA heade r line ; I nput: None  ; Returns : Text for  2nd ERA h eader line  N XX S XX =" " ;RECE IVED POSTE D RECEIPT"  S XX=$$SE TSTR^VALM1 ("RECEIVED ",XX,9,8)  S XX=$$SET STR^VALM1( "POSTED",X X,19,6) S  XX=$$SETST R^VALM1("R ECEIPT",XX ,30,7) S X X=$$SETSTR ^VALM1("US ER",XX,43, 4) S XX=$$ SETSTR^VAL M1(" AMOUN T",XX,50,1 2) S XX=$$ SETSTR^VAL M1("FMS DO C",XX,65,7 ) Q XX ;
  335  
  336