3. EPMO Open Source Coordination Office Redaction File Detail Report

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

3.1 Files compared

# Location File Last Modified
1 PSE Patch PRCA_45_307 CIF submission.zip PSE SDD Phase 01 Incr 01 v1 10.docx Wed Jan 4 15:50:24 2017 UTC
2 PSE Patch PRCA_45_307 CIF submission.zip PSE SDD Phase 01 Incr 01 v1 10.docx Thu Feb 2 15:54:26 2017 UTC

3.2 Comparison summary

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

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

3.4 Active regular expressions

No regular expressions were active.

3.5 Comparison detail

  1   Patient St atement En hancements
  2   System Des ign Docume nt
  3  
  4   Patient St atement En hancements  (PSE)
  5   Discrepanc ies (Incre ment 1, Ph ase 1)
  6  
  7  
  8  
  9   December 2 016
  10   Version 1. 13
  11  
  12   Department  of Vetera ns Affairs
  13  
  14  
  15   Revision H istory
  16   Date
  17   Version
  18   Descriptio n
  19   Author
  20   8/26/2015
  21   1.0
  22   Initial dr aft
  23   Lloyd MacA skill
  24   9/30/2015
  25   1.01
  26   Draft revi sion
  27   Lloyd MacA skill
  28   10/21/2015
  29   1.02
  30   Added Inco mplete sta tus flag
  31   Dennis Bri cker
  32   10/27/2015
  33   1.03
  34   Added NA t o all blan k sections
  35   Shawnee Bl air
  36   12/3/2015
  37   1.04
  38   Elaboratio n of routi ne functio ns
  39   Lloyd MacA skill
  40   12/17/2015
  41   1.05
  42   Draft Revi sion
  43   Lloyd MacA skill
  44   1/5/2016
  45   1.06
  46   Updated se ction – 3. 3.31
  47   Sachin Sha rma
  48   3/4/2016
  49   1.07
  50   Updated se ction 1, a nd added S ecurity Ke y to 6.3.2 .2.8 
  51   Lloyd MacA skill / Be th Easton
  52   4/13/2016
  53   1.08
  54   Updated ro utines
  55   Dennis Bri cker
  56   05/27/2016
  57   1.09
  58   Updated In troduction
  59   Shawnee Bl air
  60   09/06/2016
  61   1.10
  62   Added Chan ge Station  Date info
  63   Mark Enfin ger
  64   10/20/2016
  65   1.11
  66   Update rou tine info  to match v 15 coding  solution.
  67   Matt Dill
  68   12/14/16
  69   1.12
  70   Update rou tine info  to match v 17 coding  solution.
  71   Matt Dill
  72   12/19/16
  73   1.13
  74   Update rou tine info  to match v 18 coding  solution.
  75   Matt Dill
  76  
  77   Artifact R ationale
  78   The System  Design Do cument (SD D) is a du al-use doc ument that  provides  the concep tual desig n as well  as the as- built desi gn. This d ocument wi ll be upda ted as the  product i s built, t o reflect  the as-bui lt product
  79  
  80  
  81   When to Co mplete Eac h Section  of the SDD
  82   Section
  83   Completed  On or Befo re PMAS Ph ase
  84   Rationale
  85   1 – Introd uction
  86   MS 0 Revie w; updated  thereafte r
  87   Conceptual  design sh ould infor m evaluati on of inve stments
  88   2 - Backgr ound
  89   MS 0 Revie w; updated  thereafte r
  90   Conceptual  design sh ould infor m evaluati on of inve stments
  91   3 – Concep tual Desig n
  92   MS 0 Revie w; updated  thereafte r
  93   Conceptual  design sh ould infor m evaluati on of inve stments
  94   4 – System  Architect ure
  95   MS 0 Revie w; updated  thereafte r
  96   Conceptual  design sh ould infor m evaluati on of inve stments
  97   5 – Data D esign
  98   MS 1 Revie w; updated  thereafte r
  99   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  100   6 – Detail ed Design
  101   MS 1 Revie w; updated  thereafte r
  102   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  103   7 – Extern al System  Interface  Design
  104   MS 1 Revie w; updated  thereafte r
  105   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  106   8 – Human  Machine In terfaces
  107   MS 1 Revie w; updated  thereafte r
  108   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  109   Attachment s
  110   MS 1 Revie w; updated  thereafte r
  111   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  112  
  113   A product’ s system d esign shou ld be defi ned concep tually pri or to the  allocation  of person nel and re sources th at occur a t project  initiation . This giv es the ent erprise an  opportuni ty to eval uate IT in vestments  before pro ject teams  are stood  up and fu nding is a llocated.  Sections 1 - 4 which  discuss th e high lev el design  should be  completed  prior to M S 0. All s ections sh ould be co mpleted an d updated  before MS  1. Project s will nee d to addre ss all SDD  approval  constraint s prior to  the MS 2  review. In  addition,  the SDD s hould refl ect the as -built pro duct going  into the  MS 2 revie w.
  114  
  115   Instructio ns
  116   Activity
  117   New Capabi lity (1)
  118   Feature En hancement  (2)
  119   Field Depl oyment (A)
  120   No
  121   Yes
  122   Cloud/Web  Deployment  (B)
  123   No
  124   No
  125   Mobile App lication ( C)
  126   No
  127   No
  128  
  129   Table of C ontents
  130   1.Introduc tion11
  131   1.1.Scope1 1
  132   1.2.User P rofiles12
  133   2.Backgrou nd12
  134   2.1.Overvi ew of the  System12
  135   2.2.Overvi ew of the  Business P rocess12
  136   2.3.Overvi ew of the  Significan t Requirem ent12
  137   3.Conceptu al Design1 3
  138   3.1.Concep tual Appli cation Des ign13
  139   3.1.1.Appl ication Co ntext13
  140   3.1.2.High -Level App lication D esign16
  141   3.1.3.Appl ication Lo cations17
  142   3.2.Concep tual Data  Design17
  143   3.2.1.Proj ect Concep tual Data  Model17
  144   3.2.2.Data base Infor mation17
  145   3.2.3.User  Interface  Data Mapp ing18
  146   3.2.3.1.Ap plication  Screen Int erface18
  147   3.2.3.2.Ap plication  Report Int erface20
  148   3.2.3.3.Un mapped Dat a Element2 0
  149   3.3.Concep tual Infra structure  Design20
  150   3.3.1.Syst em Critica lity and H igh Availa bility20
  151   3.3.2.Spec ial Techno logy21
  152   3.3.3.Tech nology Loc ations21
  153   3.3.4.Conc eptual Inf rastructur e Diagram2 2
  154   3.3.4.1.Lo cation of  Environmen ts and Ext ernal Inte rfaces22
  155   3.3.4.2.Co nceptual P roduction  String Dia gram22
  156   4.System A rchitectur e22
  157   4.1.Hardwa re Archite cture22
  158   4.2.Softwa re Archite cture22
  159   4.3.Networ k Architec ture22
  160   4.4.Servic e Oriented  Architect ure / ESS2 2
  161   4.5.Enterp rise Archi tecture22
  162   5.Data Des ign22
  163   5.1.DBMS F iles23
  164   5.2.Non-DB MS Files23
  165   5.3.Data V iew23
  166   6.Detailed  Design23
  167   6.1.Hardwa re Detaile d Design23
  168   6.2.Softwa re Detaile d Design23
  169   6.2.1.Conc eptual Des ign23
  170   6.2.1.1.Pr oduct Pers pective24
  171   6.2.1.1.1. User Inter faces24
  172   6.2.1.1.2. Hardware I nterfaces2 5
  173   6.2.1.1.3. Software I nterfaces2 5
  174   6.2.1.1.4. Communicat ions Inter faces25
  175   6.2.1.1.5. Memory Con straints25
  176   6.2.1.1.6. Special Op erations25
  177   6.2.1.2.Pr oduct Feat ures25
  178   6.2.1.3.Us er Charact eristics25
  179   6.2.1.4.De pendencies  and Const raints25
  180   6.2.2.Spec ific Requi rements25
  181   6.2.2.1.Da tabase Rep ository25
  182   6.2.2.2.Sy stem Featu res26
  183   6.2.2.3.De sign Eleme nt Tables2 9
  184   6.2.2.3.1. Routines ( Entry Poin ts)29
  185   6.2.2.3.2. Templates8 8
  186   6.2.2.3.3. Bulletins8 8
  187   6.2.2.3.4. Data Entri es Affecte d by the D esign89
  188   6.2.2.3.5. Unique Rec ord(s)89
  189   6.2.2.3.6. File or Gl obal Size  Changes89
  190   6.2.2.3.7. Mail Group s90
  191   6.2.2.3.8. Security K eys91
  192   6.2.2.3.9. Options92
  193   6.2.2.3.10 .Protocols 96
  194   6.2.2.3.11 .Remote Pr ocedure Ca ll (RPC)96
  195   6.2.2.3.12 .Constants  Defined i n Interfac e97
  196   6.2.2.3.13 .Variables  Defined i n Interfac e97
  197   6.2.2.3.14 .Types Def ined in In terface97
  198   6.2.2.3.15 .GUI97
  199   6.2.2.3.16 .GUI Class es97
  200   6.2.2.3.17 .Current F orm97
  201   6.2.2.3.18 .Modified  Form97
  202   6.2.2.3.19 .Component s on Form9 8
  203   6.2.2.3.20 .Events98
  204   6.2.2.3.21 .Methods98
  205   6.2.2.3.22 .Special R eferences9 8
  206   6.2.2.3.23 .Class Eve nts98
  207   6.2.2.3.24 .Class Met hods98
  208   6.2.2.3.25 .Class Pro perties98
  209   6.2.2.3.26 .Uses Clau se99
  210   6.2.2.3.27 .Forms99
  211   6.2.2.3.28 .Functions 99
  212   6.2.2.3.29 .Dialog100
  213   6.2.2.3.30 .Help Fram e100
  214   6.2.2.3.31 .HL7 Appli cation Par ameter101
  215   6.2.2.3.32 .HL7 Logic al Link101
  216   6.2.2.3.33 .COTS Inte rface102
  217   6.3.Networ k Detailed  Design102
  218   6.4.Securi ty and Pri vacy102
  219   6.4.1.Secu rity102
  220   6.4.2.Priv acy102
  221   6.5.Servic e Oriented  Architect ure / ESS  Detailed D esign102
  222   6.5.1.Serv ice Descri ption for  <Consumed  Service Na me>103
  223   6.5.2.Serv ice Design  for <Prov ided Servi ce Name>10 3
  224   6.5.2.1.In troduction 103
  225   6.5.2.1.1. Purpose an d Scope of  Service10 3
  226   6.5.2.1.2. Links to O ther Docum ents103
  227   6.5.2.2.Se rvice Deta ils103
  228   6.5.2.2.1. Service Id entificati on103
  229   6.5.2.2.2. Service Ve rsions104
  230   6.5.2.2.3. Summary of  Design an d Platform  Details10 4
  231   6.5.2.2.3. 1.SOA Patt ern(s) Imp lemented10 4
  232   6.5.2.2.3. 2.COTS Pla tform vend or names a nd version s for host ing platfo rm104
  233   6.5.2.3.De pendencies 104
  234   6.5.2.4.Se rvice Desi gn Details 104
  235   6.5.2.4.1. Interface  Technical  Specs104
  236   6.5.2.4.1. 1.Service  Invocation  Type104
  237   6.5.2.4.1. 2.Service  Interface  Type104
  238   6.5.2.4.1. 3.Service  Name104
  239   6.5.2.4.1. 4.Interfac e104
  240   6.5.2.4.1. 5.End Poin ts104
  241   6.5.2.4.1. 6.Operatio ns or Meth ods105
  242   6.5.2.4.1. 7.Message  Schemas105
  243   6.5.2.4.2. Informatio n Model105
  244   6.5.2.4.2. 1.Class Di agram and  Descriptio n of Entit ies Involv ed105
  245   6.5.2.4.2. 2.Mappings  from ELDM  to Standa rds Based  Schemas105
  246   6.5.2.4.3. Behavior M odel (AKA  Use Case R ealization )105
  247   6.5.2.4.3. 1.Use Case s (Use Cas e Model)10 5
  248   6.5.2.4.3. 2.Interact ion Diagra ms105
  249   6.5.2.5.Ga p Analysis 105
  250   6.5.2.5.1. Variances  from Enter prise Targ et Archite cture106
  251   6.5.2.5.2. Variances  from SLDs1 06
  252   6.5.2.5.3. Variances  from Stand ards and P olicies106
  253   6.5.2.5.4. Justificat ion for Ex ceptions a nd Mitigat ion106
  254   7.External  System In terface De sign106
  255   7.1.Interf ace Archit ecture106
  256   7.2.Interf ace Detail ed Design1 06
  257   8.Human-Ma chine Inte rface106
  258   8.1.Interf ace Design  Rules106
  259   8.2.Inputs 106
  260   8.3.Output s106
  261   8.4.Naviga tion Hiera rchy107
  262   8.4.1.Scre en [x.1] N /A107
  263   8.4.2.Scre en [x.2] N /A107
  264   8.4.3.Scre en [x.3] N /A107
  265   9.Attachme nt A – App roval Sign atures108
  266   A.Addition al Informa tion109
  267   A.1.Identi fication o f Technolo gy and Sta ndards109
  268   A.2.Constr aining Pol icies, Dir ectives an d Procedur es109
  269   A.3.Requir ements Tra ceability  Matrix109
  270   A.4.Packag ing and In stallation 109
  271   A.5.Design  Metrics10 9
  272  
  273  
  274   List of Ta bles
  275   Table 1: B usiness Ru les12
  276   Table 2: A pplication  Context D escription 15
  277   Table 3: O bjects in  the High L evel Appli cation Des ign16
  278   Table 4: A pplication  Locations 17
  279   Table 5: A pplication  Users17
  280   Table 6: D atabase In ventory17
  281   Table 7: D escription 20
  282   Table 8:   Special Te chnology R equirement s21
  283   Table 9: T echnology  Location D etails21
  284   Table 10:  Database I nventory25
  285   Table 11:  Functional  Specifica tions26
  286   Table 12:  Routine :  PRCACPS30
  287   Table 13:  Routine :  PRCACPSA41
  288   Table 14:  Routines:  PRCAACR45
  289   Table 15:  Routines:  PRCAACR151
  290   Table 16:  Routines:  PRCA307P57
  291   Table 17:  Routines:  PRCASER159
  292   Table 18:  Routines:  RCCPCBJ64
  293   Table 19:  Routines:  RCDPBTLM68
  294   Table 20:  Routines:  RCWROFF79
  295   Table 21:  Templates8 8
  296   Table 22:  Bulletins8 8
  297   Table 23:  Data Entri es Affecte d by the D esign89
  298   Table 24:  Unique Rec ord ID89
  299   Table 25:  File or Gl obal Size  Changes90
  300   Table 26:  Mail Group s90
  301   Table 27:  Security K eys91
  302   Table 28:  Option PRC A ACCOUNT  MANAGEMENT 92
  303   Table 29:  Option PRC A AUTOCRCT  PGM93
  304   Table 30:  Option PRC A AUTOCRCT  PGM QUEUE D94
  305   Table 31:  Option PRC A AUTOCRCT  RPT95
  306   Table 32:  Protocols9 6
  307   Table 33:  RPCs96
  308   Table 34:  Constants  Defined in  Interface 97
  309   Table 35:   Variables  Defined i n Interfac e97
  310   Table 36:  Types Defi ned in Int erface97
  311   Table 37:  GUI97
  312   Table 38:  GUI Classe s97
  313   Table 39:  Components  on Form98
  314   Table 40:  Events98
  315   Table 41:  Methods98
  316   Table 42 :  Special R eferences9 8
  317   Table 43:  Class Even ts98
  318   Table 44:  Class Meth ods98
  319   Table 45:  Class Prop erties98
  320   Table 46:  Forms99
  321   Table 47:  Forms99
  322   Table 48:  Dialog100
  323   Table 49:  Help Frame 100
  324   Table 50 :  HL7 Appli cation Par ameter101
  325   Table 51:  HL7 Logica l Link101
  326   Table 52:  COTS Inter face102
  327   Table 53:  Service At tribute an d Value103
  328   Table 54 :  Service V ersions104
  329   Table 55:  Operations  or Method s105
  330   Table 56 :  Gap Analy sis105
  331  
  332   List of Fi gures
  333   Figure 31:  Existing  Deficiency  Resolutio n Flow14
  334   Figure 32:  AS-IS PSE  Diagram 1 15
  335   Figure 33  :   Auto-C orrect Pat ient Discr epancy Rep ort19
  336   Figure 61  :   Auto-C orrect Pro cess Flow2 3
  337  
  338  
  339  
  340   Introducti on
  341   The remedi ation of t he Veteran s Health I nformation  Systems T echnology  Architectu re (VistA)  Accounts  Receivable  (AR) proc ess is req uired to p rovide a c onsolidate d and easi ly readabl e patient  statement  from multi ple treatm ent facili ties durin g a monthl y cycle. E nhancement s to the A R system w ill increa se Veteran  satisfact ion by mit igating co ncerns rai sed by Vet erans Serv ice Organi zations (V SO) and in dividual V eterans, w ho have pr ovided fee dback to t he Departm ent of Vet erans Affa irs (VA) r egarding p oor custom er service  and poor  business p ractices.  Future dev elopment a ctivities  are depend ent on Pha se 1 and P hase 2 enh ancements,  as these  enhancemen ts will de ploy best  practices  in financi al and bus iness proc esses, and  align wit h the VA i nitiative  to build V eterans Re cord Manag ement (VRM ) capabili ty to enab le conveni ent, and s eamless in teractions .
  342   The PSE pr oject incl udes 3 dev elopment p hases acro ss 5 incre ments. Pha se 1 will  remediate  existing p ayment cyc le deficie ncies and  include an  auto-corr ection job . Phase 1  will be co ded and in itial SQA  testing wi ll be perf ormed in I ncrement 1 . Phase 1  final Soft ware Quali ty Assuran ce (SQA),  User Funct ionality T esting (UF T), Initia l Operabil ity Capabi lity (IOC) , and depl oyment wil l be in In crement 3.
  343   Phase 2 in cludes the  creation  of the con solidated  billing st atement. P hase 2 wil l be coded  and initi al SQA tes ting will  be perform ed in Incr ement 2. P hase 2 fin al SQA, UF T, IOC, an d deployme nt will be  in Increm ent 3.
  344   Phase 3 in cludes mak ing the bi lling stat ements ava ilable on- line throu gh the My  HealtheVet  (MHV) por tal and fo r the gene ration of  the Annual  Patient P ayment Sum mary (APPS ) statemen t. Phase 3  will be c oded and i nitial SQA  testing w ill be per formed in  Increment  4. Phase 3  final SQA , UFT, IOC , and depl oyment wil l be in In crement 5.
  345   The tables  in this s ection ide ntify the  full scope  of the PS E project  by Increme nt. 
  346   Scope
  347   The Vetera ns Health  Administra tion (VHA)  Chief Bus iness Offi ce (CBO) i s requesti ng remedia tion of de ficiencies  in the Vi stA AR pac kage which  cause pat ient state ments to n ot print a nd resolut ion to the  root caus e of 3 spe cific issu es. Items  considered  in scope  for Phase  I are list ed below:
  348   Developmen t and inst allation o f an autom ated proce ss for the  detection  and track ing of dis crepancies  that prev ent a pati ent statem ent from p rocessing.
  349  
  350   Remediatio n of the r oot cause  for the fo llowing di screpancie s that pre vent a pat ient state ment from  processing :
  351   Transactio n amount m issing 
  352   Duplicate  transactio n
  353   Incomplete  status
  354   For 17 spe cific Stat ion ID’s t he SITE ST ATEMENT DA Y field in  the AR PA RAMETER fi le will be  updated.
  355   User Profi les
  356   The user b ase consis ts of Depa rtment of  Veterans A ffairs (VA ) employee s and cont ractors wh o routinel y use the  VistA AR p ackage, as  well as e mployees o f the Cons olidated P atient Acc ounting Ce nters (CPA C). Users  also inclu de call ce nter worke rs who han dle inquir ies about  patient st atements,  as well as  Agent Cas hiers who  accept pay ments on t hese state ments.
  357   Background
  358   Overview o f the Syst em
  359   The core o f the syst em to be m odified is  the Accou nts Receiv able (AR)  module of  VistA. AR  interacts  with other  financial  systems a nd user or ganization s in the D epartment  of Veteran s Affairs,  but the c hanges req uired for  Phase 1 of  the Patie nt Stateme nt Enhance ments proj ect will b e located  in VistA A R.
  360   Overview o f the Busi ness Proce ss
  361   Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1) of the  Patient S tatement E nhancement  project i s to provi de the cap ability to  resolve o ut of bala nce discre pancies th at now pre vent patie nt stateme nts from p rinting. T his capabi lity will  be automat ed to the  extent pos sible and  will minim ize the ne ed for man ual interv ention to  provide ba lance corr ections. O ut of bala nce discre pancies th at have be en correct ed by the  system wil l be docum ented in a n Auto-Cor rection Re port that  will be cr eated as p art of thi s project.  This repo rt will al low an aud it trail t o be maint ained for  these auto mated bala nce correc tions.
  362   These chan ges have b een descri bed in mor e detail i n the Requ irements S pecificati on Documen t for Pati ent Statem ent Enhanc ements Pha se 1, curr ently avai lable in V ersion 1.2 .
  363   The curren t Requirem ents Speci fication D ocument fo r the Pati ent Statem ent Enhanc ements Pro ject is PS E Phase 1_ RSD_Draft  and can be  accessed  on the VA  SharePoint  site for  the PSE pr oject at t he link be low.
  364   http:// DNS /pm/hape/H APEPortfol ioPMO/Pati entStateme ntEnhancem ent/defaul t.aspx
  365   Overview o f the Sign ificant Re quirement
  366   Table 1: B usiness Ru les
  367   Business R ules (Auto -Correctio n Job)
  368   Background  Job - Aut o-correcti on will fu nction as  a tasked j ob.
  369                    Opti on - The j ob can be  run on-dem and. 
  370                  Post-I nit - The  initial jo b run will  occur imm ediately a fter patch  installat ion.
  371  
  372   Auto-Corre ction - Op tion
  373   Execute fu nctionalit y “on-dema nd”
  374   The new PR CA STATEME NT AUTO-CO RRECTION s ecurity ke y will be  provided t o limit ac cess to th e auto-cor rection op tion.
  375  
  376   Auto-Corre ction - Ba ckground J ob
  377   Will be pa rameter-ba sed (set u p in the A R site par ameters fi le)
  378  
  379   Scheduling  (When sho uld the jo b run?)
  380   Initial di scussion –  Once a we ek…on the  weekend…at  night
  381   Decision b y consensu s – TBD du ring site  testing ba sed on how  long the  job runs
  382   Post Init  – Immediat e auto-cor rection wa nted after  the patch  installat ion
  383   Layout - A uto-Correc tion Repor t
  384   Changes to  the Auto  correction  report re quested by  the workg roup:
  385   Displays o nly the la st 4 digit s of the S ocial Secu rity Numbe r (SSN)
  386   Sort by SS N was not  needed
  387   Provide a  date range  to run th e report
  388  
  389  
  390   User can r un the rep ort from a n option
  391   User can e nter a dat e range wh ich is for  the date  of auto-co rrection
  392   The report  will disp lay only t he last 4  digits on  the SSN
  393   The Statem ent Discre pancy List ing will p rovide wha t was NOT  auto-corre cted (exis ting repor t)
  394  
  395  
  396   Conceptual  Design
  397   Conceptual  Applicati on Design
  398   Currently  bad transa ctions are  identifie d and reme diated via  a manual  process. P atient Sta tement Enh ancements  (PSE) Disc repancies  (Increment  1, Phase  1) will cr eate an au tomated pr ocess for  identify a nd remedia ted bills  that are o ut of bala nce and in cludes add itional re porting ca pabilities  to identi fy the rem aining out  of balanc e bills an d transact ions that  have been  corrected.
  399   Applicatio n Context
  400   For Phase  1, the exi sting defi ciency res olution fl ow has bee n defined:
  401  
  402  
  403   Figure 31:  Existing  Deficiency  Resolutio n Flow
  404   Further di scussion h as defined  the chang es propose d for Phas e 1, inclu ding the a uto-correc tion job a nd the rep ort that s ummarizes  the auto-c orrection  afterwards . These ch anges are  described  under Sect ion 2.3 ab ove.
  405   The diagra m that fol lows shows  the syste ms and org anizations  that gene rate patie nt stateme nts for ve terans and  process t heir payme nts. For P hase 1 of  Patient St atement En hancements , the only  entities  directly i nvolved in  statement  preparati on, produc tion and d elivery ar e the stat ion or med ical cente r that pre pares the  statement  record, an d the Cons olidated C o-payment  Processing  Center (C CPC) to wh ich statem ent record s that are  in balanc e are sent  for print ing and ma iling.
  406  
  407  
  408  
  409   Figure 32:  AS-IS PSE  Diagram 1
  410   Table 2: A pplication  Context D escription
  411   ID
  412   Name
  413   Descriptio n
  414   Interface  Name
  415   Interface  System
  416   VistA A/R
  417   VistA Stat ion
  418   Sends pati ent statem ent record  informati on to be p rinted and  mailed.
  419   Statement
  420   MailMan
  421   CCPC
  422   Consolidat ed Co-paym ent Proces sing Cente r
  423   Prints and  mails pat ient state ments to v eterans.
  424  
  425  
  426   Interfaces  External  to OI&T
  427   ID
  428   Name
  429   Related Ob ject
  430   Input Mess ages
  431   Output Mes sages
  432   External P arty
  433  
  434  
  435  
  436  
  437  
  438  
  439   Interfaces  Internal  to OI&T
  440   ID
  441   Name
  442   Related Ob ject
  443   Input Mess ages
  444   Output Mes sages
  445   External P arty
  446  
  447  
  448  
  449  
  450  
  451  
  452   Externally  Shared Da ta Stores
  453   ID
  454   Name
  455   Data Store d
  456   Owner
  457   Access
  458  
  459  
  460  
  461  
  462  
  463   High-Level  Applicati on Design
  464   For Patien t Statemen t Enhancem ents (PSE)  Discrepan cies (Incr ement 1, P hase 1), a  good star ting point  is the ex isting Acc ounts Rece ivable men u option,  Statement  Discrepanc y Listing,  which is  entered in  the OPTIO N File (#1 9) as PRCA  DISC LIST . This opt ion compar es bill ba lances wit h transact ion balanc es and fla gs account s for whic h the two  do not mat ch.
  465   Since this  is an est ablished o ption, its  logic sho uld be stu died to de termine if  it can be  used to m eet some o f the requ irements o f PSE Phas e 1. Auto  correction s that are  performed  by Phase  1 should r esult in t he out-of- balance fl ag being c leared whe n checked  by the rou tines invo ked by thi s option.
  466   This optio n should a lso be stu died to de termine if  its perfo rmance cou ld be enha nced by re stricting  the range  of account s checked,  by date,  account st atus, or s ome other  parameter,  keeping i n mind the  requireme nts for PS E Phase 1.
  467   Objects /  Components  to be Bui lt or Modi fied
  468   Table 3: O bjects in  the High L evel Appli cation Des ign
  469   ID
  470   Name 
  471   Descriptio n
  472   Service or  Legacy Co de
  473   External I nterface N ame
  474   External I nterface I D
  475   Internal I nterface N ame
  476   Internal I nterface I D
  477   SDP Sectio ns 1&2
  478  
  479   Auto Corre ct Account  Balance D iscrepancy
  480   Tasked job  to correc t statemen t discrepa ncies if p ossible
  481  
  482  
  483  
  484  
  485  
  486  
  487  
  488   Auto-Corre ct Patient  Discrepan cy Report
  489   Details of  statement  record an d how it w as correct ed (or not )
  490  
  491  
  492  
  493  
  494  
  495  
  496   Internal D ata Stores
  497   ID
  498   Name
  499   Data Store d
  500   Steward
  501   Access
  502  
  503  
  504  
  505  
  506  
  507   Applicatio n Location s
  508   Table 4: A pplication  Locations
  509   Applicatio n Componen t
  510   Descriptio n
  511   Location a t Which Co mponent is  Run
  512   Type
  513   Auto Corre ction Job
  514   Tasked job
  515   VA Station , CPAC
  516   Local and  regional
  517   Auto Corre ction Repo rt
  518   Report
  519   VA Station , CPAC
  520   Local and  regional
  521   Table 5: A pplication  Users
  522   Applicatio n Componen t
  523   Location
  524   User
  525   Auto Corre ction Job
  526   VA Station , CPAC
  527   Facility R evenue Tec hnician
  528   Auto Corre ction Repo rt
  529   VA Station , CPAC
  530   Facility R evenue Tec hnician
  531   Conceptual  Data Desi gn
  532   Project Co nceptual D ata Model
  533   Not applic able for P atient Sta tement Enh ancements  (PSE) Disc repancies  (Increment  1, Phase  1).
  534   Database I nformation
  535   Table 6: D atabase In ventory
  536   Database N ame
  537   Descriptio n
  538   Type
  539   Steward
  540   VistA
  541   Accounts R eceivable
  542   Modify
  543   VA Station , CPAC
  544   User Inter face Data  Mapping
  545   Applicatio n Screen I nterface
  546   The applic ation has  no GUI. Al l VistA sc reens are  ‘roll and  scroll’; h owever, th is section  outlines  the main m odificatio ns to the  Auto-Corre ct Patient  Discrepan cy Report.  The three  auto-corr ection typ es provide d for this  report ar e the inco mplete tra nsactions  (“I”), dup licate tra nsactions  (“D”), and  null tran sactions ( “N”). Thes e correcti on types p rovided fo r a specif ic transac tion entry  will be r ecorded in  the new A UTO-CORREC TION TYPE  OF ERROR ( #96) field  that is b eing added  to correc ted entrie s in the A R TRANSACT ION File ( #433).
  547   Figure 33  :   Auto-C orrect Pat ient Discr epancy Rep ort
  548  
  549   1 - SORTED  BY BILL N O.
  550  
  551   PAGE 1  BI LLS THAT H AVE BEEN A UTO-CORREC TED (SORTE D BY BILL  #)    OCT  20, 2016
  552   ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------
  553  
  554   BILL NO.     DEBTOR                SSN   TR ANS NUM  A UTO-C DATE    AUTO-C  REASON
  555   ---------- -  ------- ---------- -  ----  - --------   ---------- --  ------ --------
  556   442-K000FQ    ACSCURE N,TSTZALO  C  1627     4525262   APR 28,201 5   DUPLIC ATE TRAN
  557   442-K111AA    ACSAER, TSTANT CHE E  0411  1 23456789   APR 28,201 5   NULL T RANSACTI
  558   442-K111BB    ACSAER, TSTANT CHE E  0411  9 87654321   APR 28,201 5   NOT FI XABLE
  559   442-K111DD D  ACSEK,T STCEL CHEU G  0092     8793333   MAY  5,201 5   INCOMP LETE FLA
  560  
  561   2 -SORTED  BY DEBTOR
  562  
  563   PAGE 1  BI LLS THAT H AVE BEEN A UTO-CORREC TED (SORTE D BY DEBTO R)    OCT  20, 2016
  564   ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------
  565  
  566   DEBTOR                BILL NO.     SSN   TR ANS NUM  A UTO-C DATE    AUTO-C  REASON
  567   ---------- --------   ---------- -  ----  - --------   ---------- --  ------ --------AC SAER,TSTAN T CHEE  44 2-K111AA    0411  123 456789  AP R 28,2015    NULL TRA NSACTI
  568   ACSAER,TST ANT CHEE   442-K111BB    0411  9 87654321   APR 28,201 5   NOT FI XABLE
  569   ACSCUREN,T STZALO C   442-K000FQ    1627     4525262   APR 28,201 5   DUPLIC ATE TRAN
  570   ACSEK,TSTC EL CHEUG   442-K111DD D  0092     8793333   MAY  5,201 5   INCOMP LETE FLA
  571  
  572  
  573   3 - SORTED  BY AUTO-C ORRECT DAT E
  574  
  575   PAGE 1  BI LLS THAT H AVE BEEN A UTO-CORREC TED (SORTE D BY AUTO- C DT) OCT  20, 2016
  576   ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------
  577  
  578   AUTO-C DAT E   DEBTOR                BILL N O.    SSN    TRANS NU M  AUTO-C  REASON
  579   ---------- --  ------ ---------- --  ------ -----  --- -  ------- --  ------ --------
  580   APR 28,201 5   ACSAER ,TSTANT CH EE  442-K1 11AA   041 1  1234567 89  NULL T RANSACTI
  581   APR 28,201 5   ACSAER ,TSTANT CH EE  442-K1 11BB   041 1  9876543 21  NOT FI XABLE
  582   APR 28,201 5   ACSCUR EN,TSTZALO  C  442-K0 00FQ   162 7    45252 62  DUPLIC ATE TRAN
  583   MAY  5,201 5   ACSEK, TSTCEL CHE UG  442-K1 11DDD  009 2    87933 33  INCOMP LETE FLA
  584  
  585  
  586   4 -SORTED  BY TRANSAC TION NUMBE R
  587  
  588   PAGE 1  BI LLS THAT H AVE BEEN A UTO-CORREC TED (SORTE D BY TRANS  NUM) OCT  20, 2016
  589   ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------
  590  
  591   TRANS NUM   DEBTOR                BILL NO.     SSN   A UTO-C DATE    AUTO-C  REASON
  592   ---------   --------- ---------   --------- --  ----   ---------- --  ------ --------     
  593     4525262   ACSCUREN, TSTZALO C   442-K000F Q   1627   APR 28,201 5   DUPLIC ATE TRAN
  594     8793333   ACSEK,TST CEL CHEUG   442-K111D DD  0092   MAY  5,201 5   INCOMP LETE FLA
  595   123456789   ACSAER,TS TANT CHEE   442-K111A A   0411   APR 28,201 5   NULL T RANSACTI
  596   987654321   ACSAER,TS TANT CHEE   442-K111B B   0411   APR 28,201 5   NOT FI XABLE
  597  
  598   Applicatio n Report I nterface
  599   Table 7: D escription
  600   Report Col umn
  601   Data Sourc
  602   BILL NO. ( #.01)
  603   ACCOUNTS R ECEIVABLE  File (#430 )
  604   DEBTOR (#. 01)
  605   AR DEBTOR  File (#340 )
  606   SSN (#110)
  607   AR DEBTOR  File (#340 )
  608   TRANS NUM  (#.01)
  609   AR TRANSAC TION File  (#433)
  610   AUTO-C DAT E (#94)
  611   AR TRANSAC TION File  (#433)
  612   AUTO-CORCT  REASON (# 96)
  613   AR TRANSAC TION File  (#433)
  614   Unmapped D ata Elemen t
  615   There is n o unmapped  data.
  616   Conceptual  Infrastru cture Desi gn
  617   The Consol idated Pat ient State ment Discr epancy Aut o-Correcti on Program  has a con ceptual in frastructu re similar  to the St atement Di screpancy  Listing. P atient acc ounts are  examined f or mismatc hes betwee n patient  accounts a nd transac tion amoun ts. Attemp ts are mad e to corre ct transac tions for  a limited  number of  known cond itions whi ch create  account im balances.
  618   System Cri ticality a nd High Av ailability  
  619   Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1) addres ses defect  fixes and  enhanceme nts for an  existing  VistA appl ication (V istA/AR) a nd do not  introduce   or change  VistA arc hitecture/ Hardware/s ystem perf ormance/LA N impact/S ecurity an d do not i ntroduce a ny new ser vice/appli cation dep endencies  for VistA  or the cor responding  AR packag e(s).
  620   Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1) is a h igh level  VistA AR p atch that  has multip le system  dependenci es, each o f which sh ould have  its own re covery pla n. Followi ng release , the PSE  Phase 1 pa tch, PRCA* 4.5*307, m ay be obta ined by fi le transfe r from rem ote sites  that are l isted in i ts install ation inst ructions.  Following  the mandat ed install ation date  for the p atch, it w ill be inc luded in f uture Vist A releases  and be av ailable wh enever Vis tA is upda ted or res tored. Sin ce the pat ch will co rrect only  transacti ons that h ave occurr ed since t he last pa tient stat ement date , a curren t AR TRANS ACTION Fil e (#433) s hould also  be availa ble to pro cess. 
  621   Special Te chnology
  622   Table 8:   Special Te chnology R equirement s
  623   Special Te chnology
  624   Descriptio n
  625   Notional L ocation
  626   TRM Status
  627  
  628  
  629  
  630  
  631   Technology  Locations
  632   Table 9: T echnology  Location D etails
  633   Technology  Component
  634   Production  1
  635   Location
  636   Usage
  637   Workstatio ns
  638  
  639  
  640   Special Ha rdware
  641  
  642  
  643   Interface  Processors
  644  
  645  
  646   Legacy Mai nframe
  647  
  648  
  649   Legacy App lication S erver
  650  
  651  
  652   Legacy Dat abases
  653   VAMC VistA
  654   VAMC, CPAC
  655   Other
  656  
  657  
  658  
  659   Technology  Component
  660   Production  2
  661   Location
  662   Usage
  663  
  664  
  665  
  666  
  667   Technology  Component
  668   Certificat ion
  669   Location
  670   Usage
  671  
  672  
  673  
  674  
  675   Technology  Component
  676   Education
  677   Location
  678   Usage
  679  
  680  
  681  
  682  
  683   Technology  Component
  684   Test
  685   Location
  686   Usage
  687  
  688  
  689  
  690  
  691   Technology  Component
  692   Developmen t
  693   Location
  694   Usage
  695  
  696  
  697  
  698   Conceptual  Infrastru cture Diag ram
  699   Location o f Environm ents and E xternal In terfaces
  700   Conceptual  Productio n String D iagram
  701   System Arc hitecture
  702   Hardware A rchitectur e
  703   Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1) will b e embedded  within th e Accounts  Receivabl e package  of VistA a nd will th erefore ru n on whate ver hardwa re is curr ently supp orting Vis tA.
  704   Software A rchitectur e
  705   The softwa re Patient  Statement  Enhanceme nts (PSE)  Discrepanc ies (Incre ment 1, Ph ase 1) wil l be issue d in the f orm of a p atch to th e Accounts  Receivabl e package  of VistA a nd will op erate with in the Vis tA AR envi ronment.
  706   Network Ar chitecture
  707    Patient S tatement E nhancement s (PSE) Di screpancie s (Increme nt 1, Phas e 1) will  operate wi thin the e xisting ne twork arch itecture t hat suppor ts VistA i nstallatio ns for the  VA.
  708   Service Or iented Arc hitecture  / ESS
  709   Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1) is int ended to a utomatical ly correct  statement  balance d iscrepanci es that pr event pati ent statem ents from  printing.  This will  facilitate  the succe ssful comp letion of  the tasks  for which  the statem ent proces sing syste ms were de signed.
  710   Enterprise  Architect ure
  711   Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1) shares  the attri butes of t he VistA A ccounts Re ceivable p ackages in to which i t will be  incorporat ed.
  712    Data Desi gn
  713   Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1) will w ork within  the exist ing file s tructure o f VistA AR . Specific ally, fiel ds will be  updated a s necessar y within t he AR TRAN SACTION Fi le (#433)  in order t o correct  balance di screpancie s and allo w those st atements t o be print ed.
  714   One such f ield is th e INCOMPLE TE TRANSAC TION FLAG  (#10). If  duplicate  transactio ns are fou nd on the  patient st atement, t his flag w ill be set  for the n ewer of th e two tran sactions i n order to  inactivat e it.
  715   A second s uch field  is the TRA NS. AMOUNT  (#15). If  this fiel d is found  to be emp ty or to c ontain an  incorrect  value for  which an e xplanation  can be de termined,  a correcte d transact ion amount  will be e ntered to  bring the  patient st atement ba ck into ba lance.
  716   DBMS Files  
  717   N/A
  718   Non-DBMS F iles 
  719   N/A
  720   Data View 
  721   N/A
  722   Detailed D esign
  723   The update s being im plemented  in Patient  Statement  Enhanceme nts (PSE)  Discrepanc ies (Incre ment 1, Ph ase 1) mer ely correc t minor de fects in t he existin g Accounts  Receivabl e system t o prevent  future tra nscations  from havin g one of t hree exist ing issues  and to id entify and  automatic ally corre ct the exi sting tran sactions w ith these  issues. As  such, the  overall c hanges to  existing h ardware an d software  and extre mely minor .
  724   Hardware D etailed De sign
  725   N/A
  726   Software D etailed De sign 
  727   N/A – only  minor fix es to exis ting routi nes and th ree new ro utines to  fix and re port exist ing errors .
  728   Conceptual  Design
  729   The follow ing figure  outlines  the concep tual desig n for the  auto-corre ct process .
  730   Figure 61  :   Auto-C orrect Pro cess Flow
  731  
  732  
  733   Product Pe rspective
  734   N/A
  735   User Inter faces
  736   The intend ed users o f the Cons olidated P atient Sta tement sof tware are  the AR sta ff located  at the VA MCs and CP ACs, who a re respons ible for m anaging th e Patient  Statement  generation .
  737   Hardware I nterfaces
  738   This secti on is not  applicable  to Patien t Statemen t Enhancem ents (PSE)  Discrepan cies (Incr ement 1, P hase 1).
  739   Software I nterfaces
  740   The Consol idated Pat ient State ment funct ionality w ill use th e VA Mailm an for dat a transfer .
  741   Communicat ions Inter faces
  742   Memory Con straints
  743   No limits  on memory  or partiti on size wi ll exist f or the Con solidated  Patient St atement.
  744   Special Op erations
  745   No special  operation s are requ ired by th e user or  for extern al devices  or COTS s ystems.
  746   Product Fe atures
  747   The Patien t Statemen t auto-cor rection fu nctionalit y will be  provided b y VistA AR  patch PRC A*4.5*307.   The post -install p ortion of  the patch  will updat e the SITE  STATEMENT  DAY field  (#.11) fo r 17 speci fic Statio n ID’s in  the AR PAR AMETER fil e (#342).  Refer to S ection 6.2 .2.2 for m ore detail  on the pr oduct feat ures.
  748   User Chara cteristics
  749   The intend ed users o f the Cons olidated P atient Sta tement sof tware are  the AR sta ff located  at the VA MCs and CP ACs, who a re respons ible for m anaging th e Patient  Statement  generation .
  750   Dependenci es and Con straints
  751   Not all of  the proce ssing cond itions whi ch result  in a missi ng transac tion amoun ts, “incom plete” tra nsaction s tatuses or  duplicate  transacti ons have b een identi fied.
  752   Technical  Subject Ma tter Exper t (SME) sh ortage, du e to the c omplexity  of the exi sting soft ware, and  the partic ipation of  experienc ed VistA A R applicat ion develo pers is es sential to  the succe ssful desi gn and dev elopment o f the syst em.
  753   The develo pment team  continues  to work c losely wit h the busi ness to de termine sc enarios th at cause d uplicate t ransaction s and miss ing transa ctions amo unts.
  754   Specific R equirement s
  755   Database R epository
  756   The follow ing table  identifies  all datab ases that  will be mo dified as  part of th is project .
  757   Table 10:  Database I nventory
  758   Database N ame
  759   Descriptio n
  760   Type
  761   Steward
  762   AR Transac tion file  #433
  763   Holds the  Accounts R eceivable  transactio ns.
  764   Modify
  765   Accounts R eceivable  package
  766   System Fea tures
  767   This sub-s ection out lines the  functional  specifica tions for  the Consol idated Pat ient State ment.
  768   Table 11:  Functional  Specifica tions
  769   ACJ001
  770   The AR app lication s hall execu te Auto-Co rrection f unctionali ty that de tects and  remediates  the follo wing 3 typ es of disc repancies:
  771   Transactio n amount m issing 
  772   Duplicate  transactio
  773   Incomplete  status
  774   ACJ002
  775   The Auto-C orrection  functional ity shall  be a taske d job that  runs in t he backgro und of the  Accounts  Receivable  applicati on. The jo b will be  initially  scheduled  to run eve ry Wednesd ay at 1:00  AM local  time, befo re the CCP C job runs . The sche duling may  change ba sed on how  long the  job runs d uring site  testing
  776   ACJ003
  777   The AR app lication s hall inclu de an opti on to exec ute the Au to-Correct ion job, s o that it  can be run  on demand . There sh all be a u ser prompt  indicatin g "Request ed Time To  Run: NOW/ " so the u ser can ru n the job  immediatel y (NOW) or  queue the  job to ru n at a fut ure date a nd time.
  778   ACJ004
  779   The AR app lication s hall provi de a secur ity key to  run the A uto-Correc tion job b y an optio n. The new  security  key name w ill be PRC A AUTOCRCT  PGM. 
  780   ACJ005
  781   The Auto-C orrection  job shall  run after  patch inst allation,  so that au to-correct ion of dis crepancies  begins im mediately.
  782   ACJ006
  783   The Auto-C orrection  job shall  execute Bu siness Rul es for Bal ancing Acc ounts to d etermine i f an accou nt is in b alance. 
  784  
  785   ACJ007
  786   If a missi ng dollar  amount in  the TRANS  AMOUNT fie ld (#15) o f the AR T ransaction  file (#43 3) causes  a patient’ s account  to be out- of-balance , then the  Auto Corr ection Job  shall cor rect the o ut-of-bala nce by ent ering the  amount in  the TRANS  AMOUNT fie ld (#15)
  787  
  788   Note: This  requireme nt may be  modified a s work on  the auto-c orrection  continues.
  789  
  790   ACJ008
  791  
  792   If a dupli cate trans action in  the AR Tra nsaction f ile (#433)  causes a  patient’s  account to  be out-of -balance,  then the A uto Correc tion Job s hall corre ct the out -of-balanc e by setti ng the INC OMPLETE ST ATUS FLAG  field (#10 ) to a val ue of 1.
  793  
  794   Note: If a  transacti on in AR f ile (#433)  contains  data that  is identic al to that  of a prev ious trans action exc ept for th e transact ion number  then the  transactio n is a dup licate.
  795  
  796   Note: This  requireme nt may be  modified a s work on  the auto-c orrection  continues
  797  
  798   ACJ009
  799  
  800   If one or  more trans actions in  the AR Tr ansaction  file (#433 ) has the  INCOMPLETE  STATUS FL AG set to  1, and cau ses a pati ent’s acco unt to be  out-of-bal ance, then  the Auto  Correction  Job shall  correct t he out-of- balance by  removing  the value  of 1 in th e INCOMPLE TE STATUS  FLAG field  (#10)
  801  
  802   If the sys tem cannot  determine  the trans actions fo r removing  the flag,  the accou nt will be  referred  for manual  processin g.  The Pa tient Stat ement will  remain ou t of balan ce after t he Auto-Co rrection a nd will be  listed on  the CCPC  Statement  Errors rep ort when i t is run.
  803  
  804   Note: This  requireme nt may be  modified a s work on  the auto-c orrection  continues
  805   ACJ010
  806   The Auto-C orrection  job shall  execute bu siness rul es based o n Manual S teps To Re solve Any  Discrepanc y (see RSD ) to remed iate the f ollowing 3  types of  discrepanc ies:
  807   Transactio n amount m issing 
  808   Duplicate  transactio
  809   Incomplete  status
  810   ACJ011
  811   The Auto-C orrection  job shall  send a mes sage to th e Mailman  Mail Group  PRCACPS w hen the jo b has comp leted.
  812   ACR001
  813   The AR app lication s hall creat e an Auto- Correction  report th at tracks  the follow ing 3 type s of balan ce discrep ancies:
  814   Transactio n amount m issing 
  815   Duplicate  transactio
  816   Incomplete  status
  817   ACR002
  818   The Auto-C orrection  Report sha ll list th e discrepa ncy detail s that wer e remediat ed by the  Auto-corre ction job  and displa y a reason  for auto- correction
  819   ACR003
  820   The Auto-C orrection  Report sha ll list th e discrepa ncy detail s that cou ld not be  remediated  by the Au to-Correct ion job an d display  “Other Err or” as the  reason wh y the disc repancy co uld not be  resolved  through th is process .
  821   ACR004
  822   The Auto-C orrection  report sha ll display  only the  last 4 dig its of the  Social Se curity Num ber (SSN).
  823   ACR005
  824   The AR app lication s hall promp t the user  to enter  a FROM and  TO date f or the Aut o-Correcti on Report.
  825   ACR006
  826   The Auto-C orrection  Report sha ll provide  a default  FROM date  value of  “T-7”.
  827   ACR007
  828   The Auto-C orrection  Report sha ll provide  a default  TO date v alue of “T ”.
  829   ACR008
  830   The AR app lication s hall promp t the user  to sort t he Auto-Co rrection R eport by t he followi ng paramet ers:
  831   Bill numbe r
  832   Debtor nam e
  833   Transactio n number
  834   Auto-Corre ction Date
  835   ACR009
  836   The Auto-C orrection  report sha ll display  the follo wing infor mation wit h correspo nding head ers:
  837   BILL NO.
  838   DEBTOR
  839   SSN
  840   TRANS NUM 
  841   AUTO-CORCT  DATE
  842   AUTO-CORCT  REASON
  843   ACR010
  844   The Auto-C orrection  report mai n header s hall read 
  845   “BILLS THA T HAVE BEE N AUTO-COR RECTED” 
  846   ACR011
  847   The Auto-C orrection  report wil l have the  following  menu path :
  848  
  849   Clerk’s AR  Menu
  850        Accou nt Managem ent
  851        Auto- Correct Pa tient Disc repancy Re port
  852   ACR012
  853   The Auto-C orrection  Report sha ll pause a nd display  a “Contin ue” prompt  at the en d of the r eport if t he report  needs to s pan to ano ther page  on the use r VistA sc reen. 
  854   US003
  855   As a VistA  user, I w ant my Vis tA site to  build and  transmit  patient bi lling stat ement file s that are  sent to A ITC prior  to the 26t h of each  month so t hat when c onsolidate d patient  statement  functional ity is imp lemented t here is a  window at  the end of  the prior  month whe n all stat ement data  has been  processed  for billin g. 
  856   STATION #    STATION  NAME       DATE
  857   ---------- ---------- ---------- ----
  858      438       SIOUX FA LLS,SD      21
  859      501       ALBUQUER QUE,NM      21
  860      504       AMARILLO ,TX         21
  861      542       COATESVI LLE,PA      21
  862      562       ERIE,PA              21
  863      568       FORT MEA DE,SD       21
  864      649       PRESCOTT ,AZ         21
  865      656       ST. CLOU D,MN        21
  866      688       WASHINGT ON,DC       21
  867      756       EL PASO, TX          21
  868      565       FAYETTEV ILLE,NC     22
  869      621       MOUNTAIN  HOME,TN    22
  870      658       SALEM,VA             22
  871      664       SAN DIEG O,CA        22
  872      671       SAN ANTO NIO,TX      22
  873      689       WEST HAV EN,CT       22
  874      740       TX VALLE Y CSTL,TX   22
  875  
  876   Design Ele ment Table s
  877  
  878   Routines ( Entry Poin ts)
  879   The new PR CACPS and  PRCACPSA r outines wi ll correct  patient s tatement b alances (c urrent and  the new c onsolidate d Patient  Statements ) where po ssible.  T he new rou tines PRCA ACR and PR CAACR1 gen erate the  auto-corre ction summ ary report  described  by the PS E specific ations. Th e date ran ge being e xamined is  determine d through  the use of  two previ ously esta blished AP Is:
  880   The LST^PR CAGU API r eturns the  last stat ement date  before th e statemen t being se nt. PBAL^P RCAGU retu rns the pr evious bal ance and t he date of  the last  transactio n.
  881   For each p atient sta tement (ex isting pat ient state ments and  the new co nsolidated  patient s tatements- CPS), the  bill balan ce and tra nsaction b alances ar e calculat ed and com pared, usi ng previou sly develo ped method s for chec king for b alance dis crepancies . If the n ew stateme nt is foun d to be ou t of balan ce, furthe r analysis  is perfor med to det ermine the  cause of  the discre pancy. Rec ords will  not be rev iewed for  debtors wi th unknown  mailing a ddresses o r local In tegration  Control Nu mbers (ICN s). These  ICNs (#991 .01) are s tored in t he PATIENT  File (#2) .
  882   The fields  of intere st within  the transa ction reco rd are:
  883   INCOMPLETE  TRANSACTI ON FLAG (# 10)
  884   TRANSACTIO N DATE (#1 1)
  885   TRANS. AMO UNT (#15)
  886   Transactio n records  that are s elected fo r correcti on are log ged into a  temporary  file that  is used t o generate  the auto- correction  report. E ntries for  the Patie nt Stateme nts Auto-C orrection  Report wil l be filed  under the  PRCAGTPS  label. The y will the n be filed  in an ord ered array  by:
  887   Number of  the job th at is crea ting the r eport ($J)
  888   AR DEBTOR  File (#340 ) Internal  Entry Num ber (IEN)
  889   Bill Numbe r – IEN fo r ACCOUNTS  RECEIVABL E File (#4 30)
  890   Transactio n Number –  From the  AR TRANSAC TION file  (#433) ent ry for thi s bill #.
  891   After chan ges have b een made t o a transa ction entr y to corre ct a state ment discr epancy, th e followin g fields w ill be add ed to the  transactio n record t o document  the chang es:
  892   AUTO-CORRE CTION DATE  (#94)
  893   AUTO-CORRE CTION TRAN S. AMOUNT  (#95)
  894   AUTO-CORRE CTION TYPE  OF ERROR  (#96)
  895   Table 12:  Routine :  PRCACPS
  896   Routines
  897   Activities
  898   Routine Na me
  899   PRCACPS
  900   Enhancemen t Category
  901    New
  902    Modify
  903    Delete
  904    No Change
  905   RTM
  906   ACJ001-ACJ 013
  907   Related Op tions
  908   Patient St atement Au to-Correct ion Progra m
  909  
  910   Related Ro utines
  911   Routines “ Called By”
  912   Routines “ Called”   
  913  
  914  
  915   $$LST^RCFN 01
  916   $$CRC32^XL FCRC
  917   EN1^DIP
  918   ^DIR
  919   $$FMTE^XLF DT
  920   $$UPPER^VA LM1
  921   %ZTLOAD
  922   %ZIS
  923  
  924   Routines
  925   Activities
  926   Data Dicti onary (DD)  Reference s
  927   ACCOUNTS R ECEIVABLE  File (#430 )
  928   AR TRANSAC TION File  (#433)
  929   AR DEBTOR  File (#340 )
  930   Related Pr otocols
  931   N/A
  932   Related In tegration  Control Re gistration s (ICRs)
  933   N/A
  934   Data Passi ng
  935    Input
  936    Output Re ference
  937    Both
  938    Global Re ference
  939    Local
  940   Input Attr ibute Name  and Defin ition
  941   Name: N/A
  942   Definition :
  943   Output Att ribute Nam e and Defi nition
  944   Name: N/A
  945   Definition :
  946  
  947   Current Lo gic
  948   NA
  949  
  950   Modified L ogic (Chan ges are in  bold)
  951     PRCACPS  ;ALBANY/BD B-PATIENT  STATEMENTS  AUTO-CORR ECTION ;09 /21/15 3:3 4 PM
  952    ;;4.5;Acc ounts Rece ivable;**3 07**;Mar 2 0, 1995;Bu ild 72
  953    ;;Per VA  Directive  6402, this  routine s hould not  be modifie d.
  954    ;
  955    Q
  956    ;
  957   BEGIN ; En try point  for manual  run
  958    ; Determi ne if Auto  Correct p rocess is  currently  running
  959    N DIR,PRC ASTRT,QUIT ,X,X1,X2,Y
  960    S PRCASTR T=$G(^XTMP ("PRCACPS" ,0)),QUIT= 0
  961    ; Notify  user if Au to Correct  process i s currentl y running
  962    I PRCASTR T'="" D  Q :QUIT
  963    .S Y=$P(P RCASTRT,U, 2)
  964    .D DD^%DT
  965    .S PRCAST RT=Y
  966    .W !!,"Th e Patient  Statement  Auto-Corre ction Prog ram was pr eviously s tarted on"
  967    .W !,PRCA STRT," and  has not y et success fully comp leted."
  968    .W !!,"Th e job can  take up to  1 hour to  complete  when sched uled to ru n outside"
  969    .W !,"of  normal bus iness hour s and long er if run  during nor mal busine ss hours"
  970    .W !,"whe n the load  on the sy stem is gr eater."
  971    .W !!
  972    .W !,"If  it has bee n more tha n an hour  since the  Patient St atement Au to-Correct ion"
  973    .W !,"Pro gram was s tarted and  the confi rmation e- mail with  subject: C PS"
  974    .W !,"AUT O-CORRECTI ON COMPLET E has not  been sent  to the PRC ACPS mail  group, you  can"
  975    .W !,"run  the Patie nt Stateme nt Auto-Co rrection P rogram aga in."
  976    .W !
  977    .S DIR("A ")="Do you  want to r un the Pat ient State ment Auto- Correction  Program a gain"
  978    .S DIR(0) ="Y",DIR(" B")="NO"
  979    .D ^DIR
  980    .W !
  981    .; Quit i f ^, ^^, T imeout or  No
  982    .I $D(DTO UT)!($D(DU OUT))!($D( DIROUT))!( Y=0) S QUI T=1
  983    .K DTOUT, DUOUT,DIRO UT
  984    .Q
  985    ;
  986    N ZTDTH,Z TIO,ZTDESC ,ZTRTN,ZTS K
  987    W !,"Queu e the pati ent statem ent discre pancies au to-correct ion progra m to run:"
  988    S ZTDESC= "Auto-Corr ect Patien t Statemen t Discrepa ncies"
  989    S ZTRTN=" START^PRCA CPS",ZTIO= ""
  990    D ^%ZTLOA D
  991    Q
  992    ;
  993   START ; En try point  for Schedu led backgr ound job
  994    N DEBTOR, DEBTOR0,DE BTOR1,PRCA STRT,REFRE V,X,Y
  995    S PRCASTR T=$G(^XTMP ("PRCACPS" ,0))
  996    ; If a pr evious job  still run ning send  e-mail war ning to PR CACPS mail  group
  997    I PRCASTR T'="" D
  998    .S Y=$P(P RCASTRT,U, 2)
  999    .; Conver t date to  external f ormat
  1000    .D DD^%DT
  1001    .S PRCAST RT=Y
  1002    .; Send m ail to PRC ACPS mail  group noti ng previou s run didn 't complet e
  1003    .D PRCAMA IL(PRCASTR T)
  1004    .Q
  1005    ; Get cur rent date/ time
  1006    D NOW^%DT C
  1007    S (PRCAST RT,X1)=%,X 2=8
  1008    D C^%DTC
  1009    S ^XTMP(" PRCACPS",0 )=X_U_PRCA STRT_U_"Pa tient Stat ement Auto -Correctio n Program"
  1010    ; Loop th rough C x- ref in 430 . This fie ld points  to the Deb tor File,  which in t urn is a
  1011    ; variabl e pointer  to other f iles.
  1012    S DEBTOR= 0
  1013    F  S DEBT OR=$O(^PRC A(430,"C", DEBTOR)) Q :DEBTOR'?1 N.N  D
  1014    .; Perfor m the same  in/out of  balance c heck at th e CHECK PA TIENT ACCO UNT BALANC E option
  1015    .; Quit t o next deb tor if acc ount is in  balance
  1016    .I '$$EN^ PRCAMRKC(D EBTOR) Q
  1017    .S BALDIF F=0
  1018    .S DEBTOR 0=$G(^RCD( 340,DEBTOR ,0)),DEBTO R1=$G(^(1) )
  1019    .; QUIT i f it doesn 't point t o the PATI ENT (^DPT)  file
  1020    .Q:$P(DEB TOR0,"^")' ["DPT("
  1021    .Q:$P(DEB TOR1,"^",9 )=1  ; qui t if debto r address  marked unk nown
  1022    .; Skip t his Debtor  is they a t least 1  Bill in #4 30 with a  status of  REFUND REV IEW (#44)
  1023    .Q:$$REFR EV(DEBTOR)  
  1024    .; Get pr evious bal ance and d ate of las t transact ion from t he AR EVEN T file (#3 41)
  1025    .D ENTER( DEBTOR)
  1026    .; Perfor m checks/u pdates bas ed on File  #430
  1027    .D START1
  1028    .; QUIT i f in balan ce
  1029    .;Q:BALDI FF=0
  1030    .I BALDIF F=0 K BALD IFF,^TMP(" PRCAGTPS", $J),^TMP(" PRCABILL", $J) Q
  1031    .; Review  Data in ^ TMP and up date #433  as needed
  1032    .D START2
  1033    .K BALDIF F,^TMP("PR CAGTPS",$J ),^TMP("PR CABILL",$J )
  1034    ; Send ma ilman mess age to the  PRCACPS m ail group  at end of  processing
  1035    D USRMSG
  1036    Q
  1037    ;
  1038   REFREV(DEB TOR) ;
  1039    ; Check i f any Bill  for this  Debtor has  a status  of REFUND  REVIEW (#4 4)
  1040    N BN,QUIT
  1041    S BN="",Q UIT=0
  1042    F  S BN=$ O(^PRCA(43 0,"C",DEBT OR,BN)) Q: 'BN  D  Q: QUIT
  1043    .; Check  CURRENT ST ATUS (#8)  for status  of REFUND  REVIEW (# 44)
  1044    .I $P($G( ^PRCA(430, BN,0)),U,8 )=44 S QUI T=1 Q
  1045    Q QUIT
  1046    ;
  1047   ENTER(DEBT OR) ;
  1048    S (PBAL,B BAL,TBAL)= 0 K ^TMP(" PRCAGTPS", $J)
  1049    ; Get las t type of  event for  debtor by  calling $$ LST^RCFN01 . Referenc es files # 340 and #3 41.1
  1050    S DAT=$$L ST^RCFN01( DEBTOR,2)  I DAT<1 S  DAT=0
  1051    ; PBAL^PR CAGU gets  previous b alance and  date of l ast transa ction from  the AR EV ENT file ( #341)
  1052    I DAT S D AT=9999999 .999999-DA T D PBAL^P RCAGU(DEBT OR,.DAT,.P BAL)
  1053    D EN(DEBT OR,DAT)
  1054    K BBAL,TB AL,DAT
  1055    Q
  1056    ;
  1057   EN(DEBTOR, BEG,END,TT Y) ;
  1058    NEW Y
  1059    ; If Begi nning date  is not de fined, set  it to 0 t o start at  beginning
  1060    ; If End  date is no t defined,  set it to  today's d ate
  1061    S:$G(BEG) ="" BEG=0  I $G(END)= "" D NOW^% DTC S END= % K %
  1062    S TTY=$G( TTY) I TTY ="" D F430
  1063    D F433
  1064   Q Q
  1065   F430 ; Che cks for AC COUNTS REC EIVABLE fi le (#430)  for bills  with (#3)  ORIGINAL A MOUNT has  a value,
  1066    ; set thi s into the  ^TMP glob al with _" ^0"
  1067    NEW DAT,B N
  1068    S DAT=BEG  F  S DAT= $O(^PRCA(4 30,"ATD",D EBTOR,DAT) ) Q:('DAT) !(DAT>END)   S BN=0 F   S BN=$O( ^PRCA(430, "ATD",DEBT OR,DAT,BN) ) Q:'BN  D
  1069    .; Add th e original  amount if  it is wit hin date r ange based  on the da te of the  last state ment
  1070    .I $P(^PR CA(430,BN, 0),U,3) S  ^TMP("PRCA GTPS",$J,D EBTOR,BN,0 )=$P(^PRCA (430,BN,0) ,"^",3)_"^ 0"
  1071    Q
  1072   F433 ;
  1073    NEW DAT,T N
  1074    ; Loop th rough the  Dates and  Bills
  1075    F DAT=BEG :0 S DAT=$ O(^PRCA(43 3,"ATD",DE BTOR,DAT))  Q:('DAT)! (DAT>END)   F TN=0:0  S TN=$O(^P RCA(433,"A TD",DEBTOR ,DAT,TN))  Q:'TN  D
  1076    .S TCMPLT ="",TMBSNC ="",TRDMRD ="",COMM=0
  1077    .S TN0=$G (^PRCA(433 ,TN,0)) Q: TN0=""
  1078    .S TN1=$G (^PRCA(433 ,TN,1))
  1079    .S TN3=$G (^PRCA(433 ,TN,3))
  1080    .I $P(TN1 ,U,2)="" Q   ;MISSING  TRANS TYP E
  1081    .I $P(TN0 ,U,10)=1 S  TCMPLT=1
  1082    .I $P(TN1 ,U,2)=45 S  COMM=1 G  F433A
  1083    .I $G(TTY )'="" Q:TT Y'=$P(TN1, U,2)
  1084    .; Quit i f Transact ion Type i s blank or  one of th e followin g:
  1085    .; 3:REFE R TO RC, 4 :REFER TO  DOJ, 5:REE STABLISH T O RC/DOJ,  6:RETURNED  BY RC/DOJ
  1086    .; 7:CASH  COLLECTIO N BY RC/DO J, 24:MARS HAL/COURT  COST, 25:R EPAYMENT P LAN, 30:DE BIT VOUCHE R (SF 5515 )
  1087    .I TTY="" ,",3,4,5,6 ,7,24,25,3 0,"[(","_$ P(TN1,U,2) _",") Q
  1088    .; QUIT i f BILL NUM BER (#.03) = blank OR  TRANSACTI ON STATUS  (#4) '= CO MPLETE
  1089    .I ($P(TN 0,U,2)="") !($P(TN0,U ,4)'=2) Q
  1090    .; IF PRC AHIST="THI ST" AND TR ANSACTION  TYPE (#12)  = COMMENT  (#45) cal l F433A to  Set the d ata into ^ TMP("PRCAG TPS",$J,DE BTOR
  1091    .I $G(PRC AHIST)="TH IST",$P(TN 1,U,2)=45  G F433A
  1092    .; IF TRA NSACTION T YPE (#12)  '= to 46   UNSUSPENDE D AND TRAN SACTION TY PE (#12)'=  to 47  CH ARGE SUSPE NDED
  1093    .I $P(TN1 ,"^",2)'=4 6,$P(TN1," ^",2)'=47  D  I TN1=" " Q
  1094    ..N RCTRA NDA,RCSTOP ,TRANTYPE
  1095    ..S RCSTO P=0
  1096    ..; Loop  BACKWARDS  through th e BILL NUM BER "C" x- ref
  1097    ..S RCTRA NDA=TN
  1098    ..F  S RC TRANDA=$O( ^PRCA(433, "C",+$P(TN 0,"^",2),R CTRANDA),- 1) Q:'RCTR ANDA  D  I  RCSTOP Q
  1099    ...; QUIT  if TRANSA CTION STAT US (#4) '=  COMPLETE
  1100    ...I $P($ G(^PRCA(43 3,RCTRANDA ,0)),"^",4 )'=2 Q
  1101    ...; Load  Transacti on Type
  1102    ...S TRAN TYPE=$P($G (^PRCA(433 ,RCTRANDA, 1)),"^",2)
  1103    ...; IF T RANSACTION  TYPE (#12 ) = 46 UNS USPENDED s et stop &  Quit
  1104    ...I TRAN TYPE=46 S  RCSTOP=1 Q
  1105    ...; IF T RANSACTION  TYPE (#12 ) = 47 CHA RGE SUSPEN DED set st op & Quit
  1106    ...I TRAN TYPE=47 S  RCSTOP=1,T N1="" Q
  1107   F433A .
  1108    .; The da ta in the  ^TMP is as  follows:
  1109    .; Data =
  1110    .; 1. TRA NS. AMOUNT  (#15)              $ P(TN1,U,5)
  1111    .; 2. TRA NSACTION T YPE (#12)           $ P(TN1,U,2)
  1112    .; 3. PRI N.COLLECTE D (#31)             $ P(TN3,U,1)
  1113    .; 4. INT EREST COLL ECTED (#32 )        $ P(TN3,U,2)
  1114    .; 5. ADM IN.COLLECT ED (#33)            $ P(TN3,U,3)
  1115    .; 6. MAR SHAL FEE C OLLECTED ( #34)     $ P(TN3,U,4)
  1116    .; 7. COU RT COST CO LLECTED (# 35)      $ P(TN3,U,5)
  1117    .; 8. TOT AL OF #3 -  #7                 $ P(TN3,U,1) +$P(TN3,U, 2)+$P(TN3, U,3)+$P(TN 3,U,4)+$P( TN3,U,5)
  1118    .; 9. TCM PLT                            ( #10) INCOM PLETE TRAN SACTION FL AG
  1119    .;10. TRD MRD - Does n't appear  to be use d
  1120    .;11. TMB SNC - Does n't appear  to be use d
  1121    .;12. Dup licate fla g for use  in START2  1=duplicat e, 0=not a  duplicate . Set in B ILLQUIT^PR CACPSA
  1122    .;
  1123    .N PRCATE MP
  1124    .S PRCATE MP=$P(TN1, U,5)_U_$P( TN1,U,2)_U _$P(TN3,U, 1)_U_$P(TN 3,U,2)_U_$ P(TN3,U,3) _U_$P(TN3, U,4)_U_$P( TN3,U,5)
  1125    .S PRCATE MP=PRCATEM P_U_($P(TN 3,U,1)+$P( TN3,U,2)+$ P(TN3,U,3) +$P(TN3,U, 4)+$P(TN3, U,5))
  1126    .S PRCATE MP=PRCATEM P_U_TCMPLT
  1127    .S PRCATE MP=PRCATEM P_U_TRDMRD
  1128    .S PRCATE MP=PRCATEM P_U_TMBSNC
  1129    .S ^TMP(" PRCAGTPS", $J,DEBTOR, $P(TN0,U,2 ),TN)=PRCA TEMP
  1130    .K TN0,TN 1,TN3,TCMP LT,TRDMRD, TMBSNC,COM M
  1131    K PRCAHIS T
  1132    Q
  1133    ;
  1134   START1 ;
  1135    ;
  1136    S BILL=""
  1137    S CBALTOT =0 ; Will  be the tot al of all  CURRENT BA LANCE fiel d (#11) fo r the bill
  1138    ; ACCOUNT S RECEIVAB LE (#430)  The C cros s-referenc e allows u ser look-u p of bills  belonging  to a spec ific debto r.
  1139    ; Loop th rough bill s
  1140    ; ^TMP("P RCABILL",$ J,DEBTOR,B ILL)= Sum  of CURRENT  BALANCE f ield (#11)  for the B ill
  1141    ;                                    ^Sum  of TRANS.  AMOUNT (#1 5) for all  transacti ons for th e Bill
  1142    ;                                    ^Stop  Flag if t he Bill ha s more tha n one erro
  1143    K ^TMP("P RCABILL",$ J)
  1144    F  S BILL =$O(^PRCA( 430,"C",DE BTOR,BILL) ) Q:BILL'? 1N.N  D
  1145    .; BILLTO T is the C URRENT BAL ANCE field  (#11) for  each Bill  for the D ebtor
  1146    .N BILLTO T
  1147    .S BN0=$G (^PRCA(430 ,BILL,0))
  1148    .; QUIT:  CURRENT ST ATUS (#8)  '= ACTIVE
  1149    .; I $P(B N0,U,8)'=1 6 Q  based  on call o n 11/28/16  process a ll bill wi th a statu s other th an Refund  Review
  1150    .; Skip a ll Debtors  with 1 or  more Bill s with a s tatus of R EFEUND REV IEW (#44).   This che ck is done  in
  1151    .; REFREV  above.
  1152    .; Sum up  CURRENT B ALANCE (#1 1) for eac h ACTIVE B ill
  1153    .; Set in  CBALTOT f or BALDIFF  and in PR CABILL for  BILLDIFF  in Start2
  1154    .; S CBAL TOT=CBALTO T+$$GET1^D IQ(430,BIL L,11)
  1155    .S BILLTO T=$$GET1^D IQ(430,BIL L,11) ; Ge t CURRENT  BALANCE (# 11) which  is compute d: #71+#72 +#73+#74+# 75
  1156    .S ^TMP(" PRCABILL", $J,DEBTOR, BILL)=+BIL LTOT
  1157    .S CBALTO T=CBALTOT+ BILLTOT
  1158    N BILL,I, TN,TRANSTO T,TNVAL,TT YPE,TNTOT
  1159    S TN="",( BILL,TRANS TOT,TTYPE, TNVAL)=0
  1160    ; Loop th rough Bill s
  1161    F  S BILL =$O(^TMP(" PRCAGTPS", $J,DEBTOR, BILL)) Q:B ILL=""  D
  1162    .; Call B ILLQUIT to  determine  if this b ill has mu ltiple iss ues
  1163    .I $$BILL QUIT^PRCAC PSA(DEBTOR ,BILL) Q
  1164    .; Initia lize TNTOT  for Trans action Tot al for thi s bill
  1165    .I $G(TNT OT(BILL))= "" S TNTOT (BILL)=0
  1166    .; Loop t hrough Tra nsactions
  1167    .S TN=""  F  S TN=$O (^TMP("PRC AGTPS",$J, DEBTOR,BIL L,TN)) Q:T N=""  D
  1168    ..; IF Tr ansaction  # = 0 Add  TRANS. AMO UNT (#15)  to the Tra nsaction T otal
  1169    ..I TN=0  S TRANSTOT =TRANSTOT+ ^TMP("PRCA GTPS",$J,D EBTOR,BILL ,TN) Q
  1170    ..; S TNV AL = (#15)  TRANS. AM OUNT from  #433
  1171    ..S TNVAL =+^TMP("PR CAGTPS",$J ,DEBTOR,BI LL,TN)
  1172    ..; S TTY PE = (#12)  TRANSACTI ON TYPE fr om #433
  1173    ..S TTYPE =+$P(^TMP( "PRCAGTPS" ,$J,DEBTOR ,BILL,TN), U,2)
  1174    ..; IF IN COMPLETE T RANSACTION  FLAG is s et, set Tr ansaction  amount = 0
  1175    ..S TCMPL T=+$P(^TMP ("PRCAGTPS ",$J,DEBTO R,BILL,TN) ,U,9)
  1176    ..I TCMPL T S TNVAL= 0
  1177    ..S TMBSN C=$P(^TMP( "PRCAGTPS" ,$J,DEBTOR ,BILL,TN), U,11)
  1178    ..I TMBSN C S TNVAL= 0
  1179    ..; Set T NVAL =0 if  one of th e followin g Transact ion Types:
  1180    ..; 3:REF ER TO RC,  4:REFER TO  DOJ, 5:RE ESTABLISH  TO RC/DOJ,  6:RETURNE D BY RC/DO J
  1181    ..; 25:RE PAYMENT PL AN, 32:RET URNED FOR  AMENDMENT,  33:AMENDE D BILL
  1182    ..I (TTYP E=3)!(TTYP E=4)!(TTYP E=5)!(TTYP E=6)!(TTYP E=32)!(TTY PE=25)!(TT YPE=33) S  TNVAL=0
  1183    ..; Set T NVAL to ne gative val ue if one  of the Tra nsaction T ypes:
  1184    ..; 2:PAY MENT (IN P ART), 8:TE RM.BY FIS. OFFICER, 9 :TERM.BY C OMPROMISE,  10:WAIVED  IN FULL
  1185    ..; 11:WA IVED IN PA RT, 14:EXE MPT INT/AD M. COST, 2 9:TERM.BY  RC/DOJ, 34 :PAYMENT ( IN FULL)
  1186    ..; 35:DE CREASE ADJ USTMENT, 4 1:REFUNDED , 47:CHARG E SUSPENDE D
  1187    ..I TTYPE =2!(TTYPE= 8)!(TTYPE= 9)!(TTYPE= 10)!(TTYPE =11)!(TTYP E=14)!(TTY PE=29)!(TT YPE=34)!(T TYPE=35)!( TTYPE=41)! (TTYPE=47)  S TNVAL=- TNVAL
  1188    ..; Updat e Transact ion Total
  1189    ..S TRANS TOT=TRANST OT+TNVAL
  1190    ..; Updat e Transact ion Total  for this B ill
  1191    ..S TNTOT (BILL)=TNT OT(BILL)+T NVAL
  1192    .; Update  PRCABILL  with Trans action Tot al for thi s Bill
  1193    .S $P(^TM P("PRCABIL L",$J,DEBT OR,BILL),U ,2)=TNTOT( BILL)
  1194    ; Set Bal ance Diffe rence = Su m up CURRE NT BALANCE  (#8) for  each ACTIV E Bill - T ransaction  Total - P BAL from A R EVENT fi le (#341)
  1195    S BALDIFF =CBALTOT-T RANSTOT-PB AL
  1196    K CBALTOT ,TRANSTOT, PBAL,TCMPL T,BILL,BN0
  1197    Q
  1198    ;
  1199   START2 ;
  1200    N I,ATNLA ST,BILL,BI LLCNT,BILL CNTR,BILLN UM,FIXED,T N,TN9,TRAN STOT,TNVAL ,TTYPE,TCP LT,STOP,TR ANCRNT,TRA NPREV,TNLA ST
  1201    S (BILL,B ILLCNTR,FI XED)=0,ATN LAST=""
  1202    ; ATNLAST  = The las t number f or the acc ount
  1203    ; FIXED =  Account l evel flag  noting if  anything w as fixed f or this ac count
  1204    ; PRCAFIX (X) = Hold s the tota l of the n umber of t ransaction s for a bi ll that ma tch to che ck criteri a X
  1205    ; Determi ne the num ber of bil l for this  account
  1206    S (BILLCN T,BILLCNTR )=0,BILLNU M=""
  1207    ; Determi ne the num ber of bil ls for thi s account
  1208    F  S BILL NUM=$O(^TM P("PRCAGTP S",$J,DEBT OR,BILLNUM )) S BILLC NT=BILLCNT +1 Q:'BILL NUM
  1209    ; Loop th rough Bill s
  1210    F  S BILL =$O(^TMP(" PRCAGTPS", $J,DEBTOR, BILL)) Q:B ILL=""  D
  1211    .S BILLCN TR=BILLCNT R+1
  1212    .; QUIT i f STOP fla g is set f or this Bi ll
  1213    .I $P($G( ^TMP("PRCA BILL",$J,D EBTOR,BILL )),U,3)=1  Q
  1214    .; New an d set Bill  Balance D ifference
  1215    .N BILLDI FF
  1216    .; If the  Original  Bill Amoun t is not n ull use th is formula
  1217    .I +$G(^T MP("PRCAGT PS",$J,DEB TOR,BILL,0 )) D
  1218    ..S BILLD IFF=$P($G( ^TMP("PRCA GTPS",$J,D EBTOR,BILL ,0)),U,1)- ($P($G(^TM P("PRCABIL L",$J,DEBT OR,BILL)), U,1)+$P($G (^TMP("PRC ABILL",$J, DEBTOR,BIL L)),U,2))
  1219    .; If the  Original  Amount is  null use t his formul
  1220    .I '+$G(^ TMP("PRCAG TPS",$J,DE BTOR,BILL, 0)) D
  1221    ..S BILLD IFF=$P($G( ^TMP("PRCA BILL",$J,D EBTOR,BILL )),U,1)-$P ($G(^TMP(" PRCABILL", $J,DEBTOR, BILL)),U,2 )
  1222    .; Quit i f Bill Bal ance Diffe rence is z ero
  1223    .I 'BILLD IFF Q
  1224    .; PRCAFI X(X) = Hol ds the tot al of the  number of  transactio ns for a b ill that m atch to ch eck criter ia X
  1225    .; PRCATT TF = Total  Transacti on Types t o Fix
  1226    .N PRCATT TF,PRCAFIX
  1227    .S (PRCAT TTF,TRANST OT,TTYPE,T NVAL)=0
  1228    .S (TN,TN LAST)=""
  1229    .; Initia lize type  of fix cou nts
  1230    .F I=1:1: 4 S PRCAFI X(I)=""
  1231    .;
  1232    .F  S TN= $O(^TMP("P RCAGTPS",$ J,DEBTOR,B ILL,TN)) Q :TN=""  D
  1233    ..; Save  first tran saction nu mber
  1234    ..S (ATNL AST,TNLAST )=TN
  1235    ..; IF Tr ansaction  number = 0  update Tr ansaction  Total with  (#15) TRA NS. AMOUNT  from #433
  1236    ..I TN=0  S TRANSTOT =TRANSTOT+ ^TMP("PRCA GTPS",$J,D EBTOR,BILL ,TN) Q
  1237    ..; Set T NVAL = (#1 5) TRANS.  AMOUNT fro m #433
  1238    ..S TNVAL =$P(^TMP(" PRCAGTPS", $J,DEBTOR, BILL,TN),U ,1)
  1239    ..; Set T TYPE = (#1 2) TRANSAC TION TYPE  from #433
  1240    ..S TTYPE =+$P(^TMP( "PRCAGTPS" ,$J,DEBTOR ,BILL,TN), U,2)
  1241    ..; Set T CPLT = (#1 0) INCOMPL ETE TRANSA CTION FLAG
  1242    ..S TCPLT =+$P($G(^P RCA(433,TN ,0)),U,10)
  1243    ..; I thi nk this wi ll always  be blank
  1244    ..S TRDMR D=$P(^TMP( "PRCAGTPS" ,$J,DEBTOR ,BILL,TN), U,10)
  1245    ..; I thi nk this wi ll always  be blank
  1246    ..S TMBSN C=$P(^TMP( "PRCAGTPS" ,$J,DEBTOR ,BILL,TN), U,11)
  1247    ..; Quit  it this tr ansaction  was previo usly used  to correct  an out of  balance s cenario
  1248    ..S TN9=$ G(^PRCA(43 3,TN,9))
  1249    ..Q:$P(TN 9,U,4)'=""
  1250    ..;
  1251    ..; *** T he Null tr ansaction  check will  be implem ented in P RCA*4.5*31 3 ***
  1252    ..; Check  #1 - Tran saction wi th missing  $ amount  & Transact ion Type ' = Comment  (#45)
  1253    ..;I TNVA L="",(TTYP E'=45) D   Q
  1254    ..;.S PRC AFIX(1)=$G (PRCAFIX(1 ))+1,IENCR RT=TN
  1255    ..;.S PRC AFIX(1,TN) =""
  1256    ..;
  1257    ..; Check  #2 - Tran saction ma rked as In complete w ith +$ amo unt matchi ng off by  amount
  1258    ..I TNVAL =BILLDIFF  I TCPLT D   Q
  1259    ...Q:(TTY PE=45)
  1260    ...I TRDM RD Q
  1261    ...S PRCA FIX(2)=$G( PRCAFIX(2) )+1,IENCRR T=TN
  1262    ...S PRCA FIX(2,TN)= ""
  1263    ..;
  1264    ..; Check  #3 - Tran saction ma rked as In complete w ith -$ amo unt matchi ng off by  amount`
  1265    ..I -TNVA L=BILLDIFF  I TCPLT D   Q
  1266    ...Q:(TTY PE=45)
  1267    ...S PRCA FIX(3)=$G( PRCAFIX(3) )+1,IENCRR T=TN
  1268    ...S PRCA FIX(3,TN)= ""
  1269    ..;
  1270    ..; Check  #4 - Dupl icate Tran saction
  1271    ..I TTYPE '=45,($P(^ TMP("PRCAG TPS",$J,DE BTOR,BILL, TN),U,12)= 1) D
  1272    ...S PRCA FIX(4)=$G( PRCAFIX(4) )+1,IENCRR T=TN
  1273    ...S PRCA FIX(4,TN)= ""
  1274    .;
  1275    .; Quit i f there we re no tran sactions f or this bi ll
  1276    .I $G(IEN CRRT)=""!( $G(TNLAST) ="") Q
  1277    .; If we  are on the  last Bill  and there  were no t ransaction s for the  entire acc ount Quit
  1278    .I BILLCN TR=BILLCNT ,ATNLAST=" " Q
  1279    .;
  1280    .F I=1:1: 4 D
  1281    ..S PRCAT TTF=PRCATT TF+PRCAFIX (I)
  1282    .; if you  get to he re the bil l was out  of balance  and if it  shows not hing to fi x, set las t transact ion
  1283    .; for th is Bill to  NOT FIXAB LE
  1284    . I PRCAT TTF=0 D UP DTLTR^PRCA CPSA(TNLAS T) S FIXED =1 Q
  1285    .; Update  this bill
  1286    .D FIXBIL L(.FIXED)
  1287    Q:FIXED
  1288    ; The acc ount was o ut of bala nce but no thing was  found on a ny bill th at could b e fixed.
  1289    ; Mark th e last tra nsaction f or the las t bill for  this acco unt as not  fixable.
  1290    I 'FIXED, ($G(ATNLAS T))>0 D UP DTLTR^PRCA CPSA(ATNLA ST)
  1291    Q
  1292    ;
  1293   FIXBILL(FI XED) ;Upda te a singl e bill usi ng PRCAFIX  array
  1294    ; Make up date deter mination b ased on ch ecks 1 - 4 .
  1295    ; Sum up  check tota ls
  1296    ;F I=1:1: 4 D
  1297    ;.S PRCAT TTF=PRCATT TF+PRCAFIX (I)
  1298    ; Get cur rent date/ time
  1299    N PRCADAT E
  1300    D NOW^%DT C
  1301    S PRCADAT E=X
  1302    ; Otherwi se there i s only 1 b ad transac tion so up date as ne eded
  1303    ; Lock Re cord
  1304    L +^PRCA( 433,IENCRR T,9):DILOC KTM
  1305    ; If lock  not obtai ned, updat e number o f transact ions that  couldn't b e fixed
  1306    Q:'$T
  1307    ; Set FDA  array for  the neces sary field s based on  the type  of fix ide ntified
  1308    N PRCAFDA
  1309    ; *** The  Null tran saction ch eck will b e implemen ted in PRC A*4.5*313  ***
  1310    ; Check # 1 - Transa ction with  missing $  amount
  1311    ;I PRCAFI X(1) D
  1312    ;.S PRCAF DA(433,IEN CRRT_",",1 5)=$S(BILL DIFF>0:BIL LDIFF,1:-B ILLDIFF)
  1313    ;.S PRCAF DA(433,IEN CRRT_",",9 4)=PRCADAT E
  1314    ;.S PRCAF DA(433,IEN CRRT_",",9 5)=$S(BILL DIFF>0:BIL LDIFF,1:-B ILLDIFF)
  1315    ;.S PRCAF DA(433,IEN CRRT_",",9 6)="N" ; N ULL TRANSA CTION AMOU NT
  1316    ; Check # 2 - Transa ction mark ed as Inco mplete wit h +$ amoun t matching  off by am ount
  1317    ; Check # 3 - Transa ction mark ed as Inco mplete wit h -$ amoun t matching  off by am ount
  1318    I PRCAFIX (2)!(PRCAF IX(3)) D
  1319    .S PRCAFD A(433,IENC RRT_",",10 )=""
  1320    .S PRCAFD A(433,IENC RRT_",",94 )=PRCADATE
  1321    .S PRCAFD A(433,IENC RRT_",",96 )="I" ; IN COMPLETE F LAG ERROR
  1322    ; Check # 4 - Duplic ate Transa ction
  1323    I PRCAFIX (4) D
  1324    .; Null o ut audit f ields on o riginal tr ansaction
  1325    .S PRCAFD A(433,IENC RRT-1_",", 94)=""
  1326    .S PRCAFD A(433,IENC RRT-1_",", 95)=""
  1327    .S PRCAFD A(433,IENC RRT-1_",", 96)=""
  1328    .L +^PRCA (433,IENCR RT-1,9):DI LOCKTM
  1329    .Q:'$T
  1330    .D FILE^D IE(,"PRCAF DA")
  1331    .L -^PRCA (433,IENCR RT-1,9)
  1332    .; Set th e fields f or the dup licate tra nsaction
  1333    .S PRCAFD A(433,IENC RRT_",",10 )=1 ; INCO MPLETE TRA NSACTION
  1334    .S PRCAFD A(433,IENC RRT_",",94 )=PRCADATE
  1335    .S PRCAFD A(433,IENC RRT_",",95 )=$S(BILLD IFF>0:BILL DIFF,1:-BI LLDIFF)
  1336    .S PRCAFD A(433,IENC RRT_",",96 )="D" ; DU PLICATE TR ANSACTION
  1337    ; Update  Transactio n
  1338    D FILE^DI E(,"PRCAFD A")
  1339    S FIXED=1
  1340    ; Unlock  file
  1341    L -^PRCA( 433,IENCRR T,9)
  1342    K TMBSNC, IENCRRT
  1343    Q
  1344    ;
  1345   DIQOUTCS(D IQOUT) ;Re turn check sum for a  processed  DIQOUT arr ay.
  1346    N CS,DATA ,FIELD,FNU M,IENS,IND ,SFN,STRIN G,TARGET,T EXT,WP
  1347    S FNUM=$O (DIQOUT("" ))
  1348    S (CS,FNU M)=0
  1349    F  S FNUM =$O(DIQOUT (FNUM)) Q: FNUM=""  D
  1350    .S IENS=" "
  1351    .F  S IEN S=$O(DIQOU T(FNUM,IEN S)) Q:IENS =""  D
  1352    ..S FIELD =0
  1353    ..F  S FI ELD=$O(DIQ OUT(FNUM,I ENS,FIELD) ) Q:FIELD= ""  D
  1354    ...S DATA =DIQOUT(FN UM,IENS,FI ELD)
  1355    ...S TEXT =FNUM_$L(I ENS,",")_F IELD_DATA
  1356    ...S CS=$ $CRC32^XLF CRC(TEXT,C S)
  1357    Q CS
  1358    ;
  1359   USRMSG ;se nds mailma n message  to the PRC ACPS mail  group
  1360    N XMY,XMD UZ,XMSUB,X MTEXT,X
  1361    S XMDUZ=" AR PACKAGE "
  1362    S XMY("G. PRCACPS")= ""
  1363    S XMSUB=" CPS AUTO-C ORRECTION  COMPLETE " _$E(DT,4,5 )_"/"_$E(D T,6,7)_"/" _$E(DT,2,3 )
  1364    S X(1)="C onsolidate d Patient  Statement  Auto-Corre ction"
  1365    S X(2)="P rogram com pleted on  "_$$FMTE^X LFDT($$NOW ^XLFDT()," 5P")
  1366    S XMTEXT= "X("
  1367    D ^XMD
  1368    ; Remove  ^XTMP node
  1369    K ^XTMP(" PRCACPS",0 )
  1370    Q
  1371    ;
  1372   PRCAMAIL(P RCASTRT) ;
  1373    ; Send e- mail notif ication to  the PRCAC PS mail gr oup if the  Auto-Corr ect was ma nually run
  1374    ; when it  showed to  be curren tly runnin g or possi ble errore d out on a  previous  attempt.
  1375    ;
  1376    ; PRCASTA RT = Exter nal format  of date/t ime (i.e.  OCT 12, 20 16@09:39:5 8) that th e
  1377    ; Auto-Co rrect prog ram was la st started .
  1378    N XMY,XMD UZ,XMSUB,X MTEXT,X
  1379    S XMDUZ=" AR PACKAGE "
  1380    S XMY("G. PRCACPS")= ""
  1381    S XMSUB=" CPS AUTO-C ORRECTION  FAILURE "_ $E(DT,4,5) _"/"_$E(DT ,6,7)_"/"_ $E(DT,2,3)
  1382    S X(1)="T he Patient  Statement  Auto-Corr ection Pro gram was s tarted on: "
  1383    S X(2)=PR CASTRT_" a nd may not  have comp leted norm ally."
  1384    S X(3)=""
  1385    S X(4)="P lease have  OI&T chec k the erro r trap for  any error s related  to routine "
  1386    S X(5)="P RCACPS on  this date. "
  1387    S XMTEXT= "X("
  1388    D ^XMD
  1389    Q
  1390   Table 13:  Routine :  PRCACPSA
  1391   Routines
  1392   Activities
  1393   Routine Na me
  1394   PRCACPSA
  1395   Enhancemen t Category
  1396    New
  1397    Modify
  1398    Delete
  1399    No Change
  1400   RTM
  1401   ACJ001-ACJ 013
  1402   Related Op tions
  1403   Patient St atement Au to-Correct ion Progra m
  1404  
  1405   Related Ro utines
  1406   Routines “ Called By”
  1407   Routines “ Called”   
  1408  
  1409   PRCACPS
  1410      NOW^%DT C             
  1411      FILE^DI E             
  1412      GETS^DI Q             
  1413      $$DIQOU TCS^PRCACP S  
  1414  
  1415   Routines
  1416   Activities
  1417   Data Dicti onary (DD)  Reference s
  1418   ACCOUNTS R ECEIVABLE  File (#430 )
  1419   AR TRANSAC TION File  (#433)
  1420   AR DEBTOR  File (#340 )
  1421   Related Pr otocols
  1422   N/A
  1423   Related In tegration  Control Re gistration s (ICRs)
  1424   N/A
  1425   Data Passi ng
  1426    Input
  1427    Output Re ference
  1428    Both
  1429    Global Re ference
  1430    Local
  1431   Input Attr ibute Name  and Defin ition
  1432   Name: N/A
  1433   Definition :
  1434   Output Att ribute Nam e and Defi nition
  1435   Name: N/A
  1436   Definition :
  1437  
  1438   Current Lo gic
  1439   NA
  1440  
  1441   Modified L ogic (Chan ges are in  bold)
  1442   PRCACPSA ; ALBANY/MGD -PATIENT S TATEMENTS  AUTO-CORRE CTION ;09/ 21/15 3:34  PM
  1443    ;;4.5;Acc ounts Rece ivable;**3 07**;Mar 2 0, 1995;Bu ild 72
  1444    ;;Per VA  Directive  6402, this  routine s hould not  be modifie d.
  1445    ;
  1446    Q
  1447    ;
  1448   BILLQUIT(D EBTOR,BILL ) ;
  1449    ; check n ews and in itializati ons
  1450    N FILENUM ,IENCRRT,I ENPREV,PRC ABFIX,PRCA BST,PRCAFD A,PRCACUR, PRCACUR1,P RCAPRV,PRC APRV1,TN,T NLAST,TRNS CRRT,TRNSP REV,X
  1451    S TNLAST= ""
  1452    S PRCABFI X=0
  1453    S TN=0
  1454    F  S TN=$ O(^TMP("PR CAGTPS",$J ,DEBTOR,BI LL,TN)) Q: 'TN  D
  1455    .; Load 0  and 1 nod es
  1456    .S PRCACU R=$G(^PRCA (433,TN,0) )
  1457    .S PRCACU R1=$G(^PRC A(433,TN,1 ))
  1458    .; Quit i f this Tra nsaction i s a COMMEN T
  1459    .I $P(PRC ACUR1,U,2) =45 Q
  1460    .; Quit i f this tra nsaction w as updated  earlier a s part of  an previou s fix
  1461    .I $P($G( ^PRCA(433, TN,9)),U,4 ) Q
  1462    .S TNLAST =TN
  1463    .; Check  if Transac tion is ma rked as IN COMPLETE
  1464    .I $P(PRC ACUR,U,10) =1 S PRCAB FIX=PRCABF IX+1,PRCAB FIX("I")=$ G(PRCABFIX ("I"))+1
  1465    .; *** Th e Null tra nsaction c heck will  be impleme nted in PR CA*4.5*313  ***
  1466    .; Check  if zero do llar amoun t
  1467    .;I $P(PR CACUR1,U,5 )="" S PRC ABFIX=PRCA BFIX+1,PRC ABFIX("N") =$G(PRCABF IX("N"))+1
  1468    .S PRCAPR V=$G(^PRCA (433,TN-1, 0))
  1469    .S PRCAPR V1=$G(^PRC A(433,TN-1 ,1))
  1470    .; Perfor m quick hi gh level d uplicate c heck
  1471    .I $P(PRC ACUR,U,2)' =$P(PRCAPR V,U,2) Q   ; QUIT if  (#.03) BIL L NUMBER d on't match
  1472    .I $P(PRC ACUR,U,9)' =$P(PRCAPR V,U,9) Q   ; QUIT if  (#42) PROC ESSED BY d on't match
  1473    .I $P(PRC ACUR1,U,1) '=$P(PRCAP RV1,U,1) Q   ; QUIT i f (#11) TR ANSACTION  DATE don't  match
  1474    .I $P(PRC ACUR1,U,5) '=$P(PRCAP RV1,U,5) Q   ; QUIT i f (#15) TR ANS. AMOUN T don't ma tch
  1475    .; Perfor m detailed  duplicate  check
  1476    .S IENPRE V=TN-1,IEN CRRT=TN,FI LENUM=433
  1477    .K TRNSPR EV S FILEN UM=433 D G ETS^DIQ(FI LENUM,IENP REV,"**"," N","TRNSPR EV","MSG")
  1478    .K TRNSCR RT S FILEN UM=433 D G ETS^DIQ(FI LENUM,IENC RRT,"**"," N","TRNSCR RT","MSG")
  1479    .S TRNSCR RT(433,TN_ ",",.01)=T RNSPREV(43 3,(TN-1)_" ,",.01)
  1480    .I $D(TRN SPREV(433, (TN-1)_"," ,41)) S TR NSCRRT(433 ,TN_",",41 )=$G(TRNSP REV(433,(T N-1)_",",4 1))
  1481    .I $$DIQO UTCS^PRCAC PS(.TRNSPR EV)'=$$DIQ OUTCS^PRCA CPS(.TRNSC RRT) Q
  1482    .; Set du plicate fl ag which w ill be use d in START 2
  1483    .S $P(^TM P("PRCAGTP S",$J,DEBT OR,BILL,TN ),U,12)=1
  1484    .; we hav e a duplic ate so upd ate counte r
  1485    .S PRCABF IX=PRCABFI X+1,PRCABF IX("D")=$G (PRCABFIX( "D"))+1
  1486    ; Get Bil l Status f or checks
  1487    S PRCABST =$P($G(^PR CA(430,BIL L,0)),U,8)
  1488    ;
  1489    ; 3rd pie ce of ^TMP ("PRCABILL ",$J,DEBTO R,BILL) is  stop/go f lag for th is bill.
  1490    ; Set bel ow and uti lized in S TART2^PRCA CPS
  1491    ;
  1492    ; Check f or Duplica te needs t o include  Bill Statu s of ACTIV E (#16), O PEN (#42)  or CANCELL ATION (#39 )
  1493    ; If ther e was only  1 problem  and that  problem wa s a Duplic ate and th e Bill Sta tus is ACT IVE or OPE N
  1494    ; or CANC ELLATION Q uit and le t it get s et in CHEC K2
  1495    I PRCABFI X=1,$G(PRC ABFIX("D") )=1,(PRCAB ST=16!(PRC ABST=42)!( PRCABST=39 )) S $P(^T MP("PRCABI LL",$J,DEB TOR,BILL), U,3)=0 Q 0
  1496    ; If a si ngle probl em on a Bi ll in a st atus other  than Acti ve or Open  mark last  transacti on as NOT  FIXABLE
  1497    I PRCABFI X=1,PRCABS T'=16&(PRC ABST'=42)  D UPDTLTR( TNLAST)
  1498    ; If a si ngle probl em on a Bi ll in a st atus of Ac tive or Op en will be  further c hecked in  START2
  1499    I PRCABFI X=1,(PRCAB ST=16!(PRC ABST=42))  S PRCABFIX =0
  1500    ; If mult iple probl ems set au dit fields  for last  transactio n for the  Bill
  1501    I PRCABFI X>1 D UPDT LTR(TNLAST ) S PRCABF IX=1
  1502    ; Update  Bill level  stop flag
  1503    S $P(^TMP ("PRCABILL ",$J,DEBTO R,BILL),U, 3)=PRCABFI X
  1504    Q PRCABFI X
  1505    ;
  1506   UPDTLTR(TN LAST) ;
  1507    ; Set aud it fields  for last t ransaction  (TNLAST)  for a bill
  1508    N PRCABIL L,PRCADATE ,PRCADTR
  1509    D NOW^%DT C
  1510    S PRCADAT E=X
  1511    I TNLAST= "" Q
  1512    ; Quit is  this Tran saction wa s previous ly used to  fix anoth er issue
  1513    I $P($G(^ PRCA(433,T NLAST,9)), U,4) Q
  1514    ; Identif y Bill for  this Tran saction
  1515    S PRCABIL L=$P(^PRCA (433,TNLAS T,0),U,2)
  1516    ; Use Bil l to ident ify Debtor
  1517    S PRCADTR =$P(^PRCA( 430,PRCABI LL,0),U,9)
  1518    ; Quit if  the stop  flag for t his bill w as previou sly set in  $$BILLQUI T^PRCACPSA
  1519    I $P(^TMP ("PRCABILL ",$J,PRCAD TR,PRCABIL L),U,3) Q
  1520    ; Set up  Audit Fiel d Array
  1521    S PRCAFDA (433,TNLAS T_",",94)= PRCADATE
  1522    S PRCAFDA (433,TNLAS T_",",96)= "X" ; NOT  FIXABLE
  1523    S PRCAFDA (433,TNLAS T_",",97)= 1
  1524    L +^PRCA( 433,TNLAST ,9):DILOCK TM
  1525    ; QUIT if  lock not  obtainable
  1526    Q:'$T
  1527    ; Update  record
  1528    D FILE^DI E(,"PRCAFD A")
  1529    ; Unlock  file
  1530    L -^PRCA( 433,TNLAST ,9)
  1531    Q
  1532  
  1533  
  1534   Table 14:  Routines:  PRCAACR
  1535   Routines
  1536   Activities
  1537   Routine Na me
  1538   PRCAACR
  1539   Enhancemen t Category
  1540    New
  1541    Modify
  1542    Delete
  1543    No Change
  1544   RTM
  1545   ACR001 – A CR012
  1546   Related Op tions
  1547   Auto-Corre ct Patient  Discrepan cy Report
  1548  
  1549   Related Ro utines
  1550   Routines “ Called By”
  1551   Routines “ Called”   
  1552  
  1553  
  1554   DD^%DT
  1555   ^%ZIS
  1556   ^%ZISC
  1557   ^%ZTLOAD
  1558   $$GET1^DIQ
  1559   ^DIR
  1560   PRT^PRCAAC R1
  1561   PRCAMAIL^P RCACPS
  1562   $$UPPER^VA LM1
  1563   $$FMTE^XLF DT
  1564  
  1565   Routines
  1566   Activities
  1567   Data Dicti onary (DD)  Reference s
  1568   N/A
  1569   Related Pr otocols
  1570   N/A
  1571   Related In tegration  Control Re gistration s (ICRs)
  1572   N/A
  1573   Data Passi ng
  1574    Input
  1575    Output Re ference
  1576    Both
  1577    Global Re ference
  1578    Local
  1579   Input Attr ibute Name  and Defin ition
  1580   Name: N/A
  1581   Definition :
  1582   Output Att ribute Nam e and Defi nition
  1583   Name: N/A
  1584   Definition :
  1585  
  1586   Current Lo gic
  1587   N/A
  1588  
  1589   Modified L ogic (Chan ges are in  bold)
  1590   PRCAACR ;A LBANY/BDB- PATIENT ST ATEMENTS A UTO-CORREC TION REPOR T ;09/21/1 5 3:34 PM  ;;4.5;Acco unts Recei vable;**30 7**;Mar 20 , 1995;Bui ld 55 ;;Pe r VA Direc tive 6402,  this rout ine should  not be mo dified. ;  Q ;PSACRT  ; report,  prints sor ted indivi dual trans actions th at have be en auto-co rrected N  DIC,PAGE,B Y,DHD,FILE NUM,FLDS,F R,L,TO,PRC ABDT,PRCAE DT,PRCASOR T W !PSDAT E ; ; Dete rmine if A uto Correc t process  is current ly running  N PRCASTR T,QUIT,X,X 1,X2,Y S P RCASTRT=$G (^XTMP("PR CACPS",0)) ,QUIT="" ;  QUIT if A uto Correc t process  is current ly running  I PRCASTR T'="" D  Q :QUIT .S Y =$P(PRCAST RT,U,2) .D  DD^%DT .S  PRCASTRT= Y .W !!,"T he Patient  Statement  Auto-Corr ection Pro gram is cu rrently ru nning." .W  !,"It was  started a t ",PRCAST RT," and c an take up  to 1 hour  to comple te." .W !! ,"If you c hoose to c ontinue wi th this re port, it m ay not ref lect all o f the" .W  !,"changes  from this  latest ru n of the P atient Sta tement Aut o-Correcti on Program ." .W ! .S  DIR(0)="Y ",DIR("A") ="Do you w ant to con tinue",DIR ("B")="NO"  .D ^DIR . W ! .; Qui t if ^, ^^ , Timeout  or No .I $ D(DTOUT)!( $D(DUOUT)) !($D(DIROU T))!(Y=0)  S QUIT=1 . ; Send Mai lMan messa ge to PRCA CPS mail g roup if Ye s .I Y=1 D  PRCAMAIL^ PRCACPS(PR CASTRT) .K  DTOUT,DUO UT,DIROUT  ; N DIROUT ,DIS,DTOUT ,DUOUT S D IR("A")="D ate Range:  FROM: ",D IR("B")="T -7" S DIR( "?")="The  default da te is T-7.  Future da tes may no t be enter ed." S DIR (0)="DO" D  ^DIR S:Y' ="" PRCABD T=Y I $D(D IRUT)&'Y K  DIRUT Q I  PRCABDT>D T G PSDATE  W "(",Y(0 ),")" K DI R,X,Y S DI R(0)="DO"  S DIR("A") ="Date Ran ge: TO: ", DIR("B")=" T" S DIR(" ?")="The d efault dat e is T, bu t any date  may be en tered." D  ^DIR S:Y=" " Y=DT I $ D(DIRUT)&' Y K DIRUT  Q W "(",Y( 0),")" S P RCAEDT=Y I  PRCABDT>P RCAEDT G P SDATE K DI R S DIR(0) ="S^1:Bill  Number;2: Debtor Nam e;3:Auto-C orrect Dat e;4:Transa ction Numb er",DIR("A ")="Sort b y" D ^DIR  K DIR S PR CASORT=Y Q :$D(DTOUT) !($D(DUOUT ))!($D(DIR OUT)) ; ;  Prompt for  device W  ! N ZTRTN, ZTDESC,ZTS AVE S %ZIS ="Q" D ^%Z IS Q:POP I  $D(IO("Q" )) D  Q .I  $G(IOST)[ "P-MES" S  ZTRTN="PRT ^PRCAACR1"  .I $G(IOS T)'["P-MES " S ZTRTN= "PRT^PRCAA CR" .S ZTS AVE("PRCAB DT")="",ZT SAVE("PRCA EDT")="",Z TSAVE("PRC ASORT")=""  .D ^%ZTLO AD .D ^%ZI SC .K IO(" Q"),POP ;  ;Print Rep ort if not  QUEUEDPRT  ; ; If no t queued a nd output  sent to P- MES I $G(I OST)["P-ME S" D PRT^P RCAACR1 Q  ;If not qu eued and o utput not  sent to P- MES U IO K  ^TMP("PRC AACR",$J)  S PAGE=0 S  DASH="",$ P(DASH,"-" ,79)="" S  DIS(0)="I  $D(^PRCA(4 33,""TACD" ",PRCATSRT ,D0))",L=0  N PRCATSR T,PRCATN,P RCAACD,PRC AACR,PRCAB N,PRCADATA ,PRCADTR,P RCASSN S P RCATSRT=PR CABDT-.000 01 ; Loop  through th e specifie d date ran ge F  S PR CATSRT=$O( ^PRCA(433, "TACD",PRC ATSRT)) Q: PRCATSRT=" "!(PRCATSR T>PRCAEDT)  D .S PRCA TN="" .; L oop throug h the tran sactions f or the cur rent date  .F  S PRCA TN=$O(^PRC A(433,"TAC D",PRCATSR T,PRCATN))  Q:'PRCATN   D ..; Lo ad associa ted data f ields for  report ..S  PRCABN=$P (^PRCA(433 ,PRCATN,0) ,U,2) ..S  PRCADTR=$$ GET1^DIQ(4 30,PRCABN_ ",",9) ; ( #9) DEBTOR  ..S PRCAS SN=$G(^PRC A(430,PRCA BN,0)) ; L oad 0 Node  ..S PRCAS SN=$P(PRCA SSN,U,9) ;  get IEN o f Debtor . .S PRCABN= $$GET1^DIQ (433,PRCAT N_",",.03)  ; (#.03)  BILL NUMBE R ..S PRCA SSN=$$GET1 ^DIQ(340,P RCASSN_"," ,110) ; SS N ..S PRCA ACD=$$GET1 ^DIQ(433,P RCATN_",", 94) ;(#94)  AUTO-CORR ECTION DAT E ..S PRCA ACR=$$GET1 ^DIQ(433,P RCATN_",", 96) ;(#96)  AUTO-CORR ECTION TYP E OF ERROR  ..; ..; S tore in ^T MP sorted  by Bill Nu mber, Debt or and Tra nsaction #  ..I PRCAS ORT=1 D  Q  ...S ^TMP ("PRCAACR" ,$J,PRCABN ,PRCADTR,P RCATN)=PRC ABN_U_PRCA DTR_U_PRCA SSN_U_PRCA TN_U_PRCAA CD_U_PRCAA CR ..; ..;  Store in  ^TMP sorte d by Debto r, Bill Nu mber and T ransaction  # ..I PRC ASORT=2 D   Q ...S ^T MP("PRCAAC R",$J,PRCA DTR,PRCABN ,PRCATN)=P RCADTR_U_P RCABN_U_PR CASSN_U_PR CATN_U_PRC AACD_U_PRC AACR ..; . .; Store i n ^TMP sor ted by Aut o-Correct  Date, Debt or, Bill N umber and  Transactio n # ..I PR CASORT=3 D   Q ...S ^ TMP("PRCAA CR",$J,PRC AACD,PRCAD TR,PRCABN, PRCATN)=PR CAACD_U_PR CADTR_U_PR CABN_U_PRC ASSN_U_PRC ATN_U_PRCA ACR ..; St ore in ^TM P sorted b y Bill Num ber, Debto r and Tran saction #  ..; ..; St ore in ^TM P sorted b y Transact ion, Debto r and #Bil l Number . .I PRCASOR T=4 D  Q . ..S ^TMP(" PRCAACR",$ J,PRCATN,P RCADTR,PRC ABN)=PRCAT N_U_PRCADT R_U_PRCABN _U_PRCASSN _U_PRCAACD _U_PRCAACR  ..; Store  in ^TMP s orted by B ill Number , Debtor a nd Transac tion # ; ;  Display A uto-Correc t data sor ted by Bil l Number N  QUIT ; QU IT before  end of rep ort S QUIT ="" I PRCA SORT=1 D . ; Display  Bill Numbe r header . D PSACRTP1  .S PRCABN ="" .F  S  PRCABN=$O( ^TMP("PRCA ACR",$J,PR CABN)) Q:' PRCABN  D   Q:QUIT .. S PRCADTR= "" ..F  S  PRCADTR=$O (^TMP("PRC AACR",$J,P RCABN,PRCA DTR)) Q:PR CADTR=""   D  Q:QUIT  ...S PRCAT N="" ...F   S PRCATN= $O(^TMP("P RCAACR",$J ,PRCABN,PR CADTR,PRCA TN)) Q:'PR CATN  D  Q :QUIT .... S PRCADATA =^TMP("PRC AACR",$J,P RCABN,PRCA DTR,PRCATN ) ....W !, $J(PRCABN, 11),?13,$E (PRCADTR,1 ,18),?33,$ E($P(PRCAD ATA,U,3),6 ,9),?39,$J (PRCATN,9) ,?50,$P(PR CADATA,U,5 ),?64,$E($ P(PRCADATA ,U,6),1,14 ) ....I $Y >(IOSL-2)  D .....I $ E(IOST,1,2 )="C-" D   Q:QUIT ... ...D PRTC  ......I $D (DIRUT)!($ D(DTOUT))  S QUIT=1 . ....D PSAC RTP1 ; ; D isplay Aut o-Correct  data sorte d Debtor I  PRCASORT= 2 D .; Dis play Debto r header . D PSACRTP2  .S PRCADT R="" .F  S  PRCADTR=$ O(^TMP("PR CAACR",$J, PRCADTR))  Q:PRCADTR= ""  D  Q:Q UIT ..S PR CABN="" .. F  S PRCAB N=$O(^TMP( "PRCAACR", $J,PRCADTR ,PRCABN))  Q:'PRCABN   D  Q:QUIT  ...S PRCA TN="" ...F   S PRCATN =$O(^TMP(" PRCAACR",$ J,PRCADTR, PRCABN,PRC ATN)) Q:'P RCATN  D   Q:QUIT ... .S PRCADAT A=^TMP("PR CAACR",$J, PRCADTR,PR CABN,PRCAT N) ....W ! ,$E(PRCADT R,1,18),?2 0,$J(PRCAB N,11),?33, $E($P(PRCA DATA,U,3), 6,9),?39,$ J(PRCATN,9 ),?50,$P(P RCADATA,U, 5),?64,$E( $P(PRCADAT A,U,6),1,1 4) ....I $ Y>(IOSL-2)  D .....I  $E(IOST,1, 2)="C-" D   Q:QUIT .. ....D PRTC  ......I $ D(DIRUT)!( $D(DTOUT))  S QUIT=1  .....D PSA CRTP2 ; ;  Display Au to-Correct  data sort ed AUTO-C  DATE I PRC ASORT=3 D  .; Display  AUTO-C DA TE header  .D PSACRTP 3 .S PRCAA CD="" .F   S PRCAACD= $O(^TMP("P RCAACR",$J ,PRCAACD))  Q:PRCAACD =""  D  Q: QUIT ..S P RCADTR=""  ..F  S PRC ADTR=$O(^T MP("PRCAAC R",$J,PRCA ACD,PRCADT R)) Q:PRCA DTR=""  D   Q:QUIT .. .S PRCABN= "" ...F  S  PRCABN=$O (^TMP("PRC AACR",$J,P RCAACD,PRC ADTR,PRCAB N)) Q:'PRC ABN  D  Q: QUIT ....S  PRCATN=""  ....F  S  PRCATN=$O( ^TMP("PRCA ACR",$J,PR CAACD,PRCA DTR,PRCABN ,PRCATN))  Q:'PRCATN   D  Q:QUIT  .....S PR CADATA=^TM P("PRCAACR ",$J,PRCAA CD,PRCADTR ,PRCABN,PR CATN) .... .W !,PRCAA CD,?14,$E( PRCADTR,1, 18),?34,$J (PRCABN,11 ),?47,$E($ P(PRCADATA ,U,4),6,9) ,?53,$J(PR CATN,9),?6 4,$E($P(PR CADATA,U,6 ),1,14) .. ...I $Y>(I OSL-2) D . .....I $E( IOST,1,2)= "C-" D  Q: QUIT ..... ..D PRTC . ......I $D (DIRUT)!($ D(DTOUT))  S QUIT=1 . .....D PSA CRTP3 ; ;  Display Au to-Correct  data sort ed Transac tion Numbe r I PRCASO RT=4 D .;  Display AU TO-C DATE  header .D  PSACRTP4 . S PRCATN=" " .F  S PR CATN=$O(^T MP("PRCAAC R",$J,PRCA TN)) Q:'PR CATN  D  Q :QUIT ..S  PRCADTR=""  ..F  S PR CADTR=$O(^ TMP("PRCAA CR",$J,PRC ATN,PRCADT R)) Q:PRCA DTR=""  D   Q:QUIT .. .S PRCABN= "" ...F  S  PRCABN=$O (^TMP("PRC AACR",$J,P RCATN,PRCA DTR,PRCABN )) Q:'PRCA BN  D  Q:Q UIT ....S  PRCADATA=^ TMP("PRCAA CR",$J,PRC ATN,PRCADT R,PRCABN)  ....W !,$J (PRCATN,9) ,?11,$E(PR CADTR,1,18 ),?31,$J(P RCABN,11), ?44,$E($P( PRCADATA,U ,4),6,9),? 50,$P(PRCA DATA,U,5), ?64,$E($P( PRCADATA,U ,6),1,14)  ....I $Y>( IOSL-2) D  .....I $E( IOST,1,2)= "C-" D  Q: QUIT ..... .D PRTC .. ....I $D(D IRUT)!($D( DTOUT)) S  QUIT=1 ... ..D PSACRT P4 D ^%ZIS C I $E(IOS T,1,2)="C- ",'$D(DUOU T),('$D(DT OUT)) W !  S DIR(0)=" E" D ^DIR  K X,Y,DASH ,D0 Q ;PRT C ; Press  Return To  Continue S  DIR(0)="E " D ^DIR Q  ;PSACRTP1  ; header  for patien t statemen t auto-cor rection re port 1 W @ IOF S PAGE =PAGE+1 W  "PAGE "_PA GE,?8,"BIL LS THAT HA VE BEEN AU TO-CORRECT ED (SORTED  BY BILL # )",?66,$$U PPER^VALM1 ($$FMTE^XL FDT(DT)) W  !,DASH,!  W !,"BILL  NO.",?13," DEBTOR",?3 3,"SSN",?3 9,"TRANS N UM",?50,"A UTO-C DATE ",?64,"AUT O-C REASON " W !,"--- --------", ?13,"----- ---------- ---",?33," ----",?39, "--------- ",?50,"--- ---------" ,?64,"---- ---------- " Q ;PSACR TP2 ; head er for pat ient state ment auto- correction  report 2  W @IOF S P AGE=PAGE+1  W "PAGE " _PAGE,?8," BILLS THAT  HAVE BEEN  AUTO-CORR ECTED (SOR TED BY DEB TOR)",?66, $$UPPER^VA LM1($$FMTE ^XLFDT(DT) ) W !,DASH ,! W !,"DE BTOR",?20, "BILL NO." ,?33,"SSN" ,?39,"TRAN S NUM",?50 ,"AUTO-C D ATE",?64," AUTO-C REA SON" W !," ---------- --------", ?20,"----- ------",?3 3,"----",? 39,"------ ---",?50," ---------- --",?64,"- ---------- ---" Q ;PS ACRTP3 ; h eader for  patient st atement au to-correct ion report  3 W @IOF  S PAGE=PAG E+1 W "PAG E "_PAGE,? 8,"BILLS T HAT HAVE B EEN AUTO-C ORRECTED ( SORTED BY  AUTO-C DT) ",?66,$$UP PER^VALM1( $$FMTE^XLF DT(DT)) W  !,DASH,! W  !,"AUTO-C  DATE",?14 ,"DEBTOR", ?34,"BILL  NO.",?47," SSN",?53," TRANS NUM" ,?64,"AUTO -C REASON"  W !,"---- --------", ?14,"----- ---------- ---",?34," ---------- -",?47,"-- --",?53,"- --------", ?64,"----- ---------"  Q ;PSACRT P4 ; heade r for pati ent statem ent auto-c orrection  report 4 W  @IOF S PA GE=PAGE+1  W "PAGE "_ PAGE,?8,"B ILLS THAT  HAVE BEEN  AUTO-CORRE CTED (SORT ED BY TRAN S NUM)",?6 6,$$UPPER^ VALM1($$FM TE^XLFDT(D T)) W !,DA SH,! W !," TRANS NUM" ,?11,"DEBT OR",?31,"B ILL NO.",? 44,"SSN",? 50,"AUTO-C  DATE",?64 ,"AUTO-C R EASON" W ! ,"-------- -",?11,"-- ---------- ------",?3 1,"------- ----",?44, "----",?50 ,"-------- ----",?64, "--------- -----" Q ; EXIT ; Q
  1591  
  1592   Table 15:  Routines:  PRCAACR1
  1593   Routines
  1594   Activities
  1595   Routine Na me
  1596   PRCAACR1
  1597   Enhancemen t Category
  1598    New
  1599    Modify
  1600    Delete
  1601    No Change
  1602   RTM
  1603   ACR001 – A CR012
  1604   Related Op tions
  1605   NA
  1606  
  1607   Related Ro utines
  1608   Routines “ Called By”
  1609   Routines “ Called”   
  1610  
  1611   PRCAACR
  1612   HOME^%ZIS
  1613   $$GET1^DIQ
  1614   $$UPPER^VA LM1
  1615   $$FMTE^XLF DT
  1616   SENDMSG^XM XAPI
  1617  
  1618   Routines
  1619   Activities
  1620   Data Dicti onary (DD)  Reference s
  1621   N/A
  1622   Related Pr otocols
  1623   N/A
  1624   Related In tegration  Control Re gistration s (ICRs)
  1625   N/A
  1626   Data Passi ng
  1627    Input
  1628    Output Re ference
  1629    Both
  1630    Global Re ference
  1631    Local
  1632   Input Attr ibute Name  and Defin ition
  1633   Name: N/A
  1634   Definition :
  1635   Output Att ribute Nam e and Defi nition
  1636   Name: N/A
  1637   Definition :
  1638  
  1639   Current Lo gic
  1640   N/A
  1641  
  1642   Modified L ogic (Chan ges are in  bold)
  1643   PRCAACR1 ; ALBANY/BDB -PATIENT S TATEMENTS  AUTO-CORRE CTION REPO RT ;09/21/ 15 3:34 PM  ;;4.5;Acc ounts Rece ivable;**3 07**;Mar 2 0, 1995;Bu ild 55 ;;P er VA Dire ctive 6402 , this rou tine shoul d not be m odified. ;  Q ;Print  Report whe n Queued t o P-MESPRT  ; U IO ;  build arra y of trans action aut o-correcte d K ^TMP(" PRCAACR1", $J) N DASH ,PAGE S PA GE=0 S DAS H="",$P(DA SH,"-",79) ="" N PRCA TSRT,PRCAT N,PRCAACD, PRCAACR,PR CABN,PRCAD ATA,PRCADT R,PRCASSN, PRCAIEN S  PRCATSRT=P RCABDT-.00 001,PRCAIE N=0 ; Prin t Header I  PRCASORT= 1 D PSACRT P1 I PRCAS ORT=2 D PS ACRTP2 I P RCASORT=3  D PSACRTP3  I PRCASOR T=4 D PSAC RTP4 ; Loo p through  the specif ied date r ange F  S  PRCATSRT=$ O(^PRCA(43 3,"TACD",P RCATSRT))  Q:PRCATSRT =""!(PRCAT SRT>PRCAED T) D .S PR CATN="" .;  Loop thro ugh the tr ansactions  for the c urrent dat e .F  S PR CATN=$O(^P RCA(433,"T ACD",PRCAT SRT,PRCATN )) Q:'PRCA TN  D ..;  Load assoc iated data  fields fo r report . .S PRCABN= $P(^PRCA(4 33,PRCATN, 0),U,2) .. S PRCADTR= $$GET1^DIQ (430,PRCAB N_",",9) ;  (#9) DEBT OR ..S PRC ASSN=$G(^P RCA(430,PR CABN,0)) ;  Load 0 No de ..S PRC ASSN=$P(PR CASSN,U,9)  ; get IEN  of Debtor  ..S PRCAB N=$$GET1^D IQ(433,PRC ATN_",",.0 3) ; (#.03 ) BILL NUM BER ..S PR CASSN=$$GE T1^DIQ(340 ,PRCASSN_" ,",110) ;  SSN ..S PR CASSN=$E(P RCASSN,6,9 ) ..S PRCA ACD=$$GET1 ^DIQ(433,P RCATN_",", 94) ;(#94)  AUTO-CORR ECTION DAT E ..S PRCA ACR=$$GET1 ^DIQ(433,P RCATN_",", 96) ;(#96)  AUTO-CORR ECTION TYP E OF ERROR  ..S PRCAA CR=$E(PRCA ACR,1,14)  ..; ..; St ore in ^TM P sorted b y Bill Num ber, Debto r and Tran saction #  ..I PRCASO RT=1 D  Q  ...S PRCAI EN=PRCAIEN +1 ...; Ad d Bill Num ber ...S P RCADATA=$J (PRCABN,11 ),$E(PRCAD ATA,13)="  " ...; Add  18 chars  of Debtor' s name ... S PRCADATA =PRCADATA_ $E(PRCADTR ,1,18),$E( PRCADATA,3 3)=" " ... ; Add SSN  ...S PRCAD ATA=PRCADA TA_PRCASSN ,$E(PRCADA TA,39)=" "  ...; Add  Transactio n Number . ..S PRCADA TA=PRCADAT A_$J(PRCAT N,9),$E(PR CADATA,50) =" " ...;  Add Auto-C orrect Dat e ...S PRC ADATA=PRCA DATA_PRCAA CD,$E(PRCA DATA,64)="  " ...; Ad d Auto-Cor rect Reaso n ...S PRC ADATA=PRCA DATA_PRCAA CR ...S ^T MP("PRCAAC R1",$J,PRC AIEN)=PRCA DATA ...Q  ..; ..; St ore in ^TM P sorted b y Debtor,  Bill Numbe r and Tran saction #  ..I PRCASO RT=2 D  Q  ...S PRCAI EN=PRCAIEN +1 ...; Ad d 18 chars  of Debtor 's name .. .S PRCADAT A=$E(PRCAD TR,1,18),$ E(PRCADATA ,20)=" " . ..; Add Bi ll Number  ...S PRCAD ATA=PRCADA TA_$J(PRCA BN,11),$E( PRCADATA,3 3)=" " ... ; Add SSN  ...S PRCAD ATA=PRCADA TA_PRCASSN ,$E(PRCADA TA,39)=" "  ...; Add  Transactio n Number . ..S PRCADA TA=PRCADAT A_$J(PRCAT N,9),$E(PR CADATA,50) =" " ...;  Add Auto-C orrect Dat e ...S PRC ADATA=PRCA DATA_PRCAA CD,$E(PRCA DATA,64)="  " ...; Ad d Auto-Cor rect Reaso n ...S PRC ADATA=PRCA DATA_PRCAA CR ...S ^T MP("PRCAAC R1",$J,PRC AIEN)=PRCA DATA ...Q  ..; ..; St ore in ^TM P sorted b y Auto-Cor rect Date,  Debtor, B ill Number  and Trans action # . .I PRCASOR T=3 D  Q . ..S PRCAIE N=PRCAIEN+ 1 ...; Add  Auto-Corr ect Date . ..S PRCADA TA=PRCAACD ,$E(PRCADA TA,14)=" "  ...; Add  18 chars o f Debtor's  name ...S  PRCADATA= PRCADATA_$ E(PRCADTR, 1,18),$E(P RCADATA,34 )=" " ...;  Add Bill  Number ... S PRCADATA =PRCADATA_ $J(PRCABN, 11),$E(PRC ADATA,47)= " " ...; A dd SSN ... S PRCADATA =PRCADATA_ PRCASSN,$E (PRCADATA, 53)=" " .. .; Add Tra nsaction N umber ...S  PRCADATA= PRCADATA_$ J(PRCATN,9 ),$E(PRCAD ATA,64)="  " ...; Add  Auto-Corr ect Reason  ...S PRCA DATA=PRCAD ATA_PRCAAC R ...S ^TM P("PRCAACR 1",$J,PRCA IEN)=PRCAD ATA ...Q   ..; ..; St ore in ^TM P sorted b y Transact ion, Debto r and #Bil l Number . .I PRCASOR T=4 D  Q . ..S PRCAIE N=PRCAIEN+ 1 ...; Add  Transacti on Number  ...S PRCAD ATA=$J(PRC ATN,9),$E( PRCADATA,1 1)=" " ... ; Add 18 c hars of De btor's nam e ...S PRC ADATA=PRCA DATA_$E(PR CADTR,1,18 ),$E(PRCAD ATA,31)="  " ...; Add  Bill Numb er ...S PR CADATA=PRC ADATA_$J(P RCABN,11), $E(PRCADAT A,44)=" "  ...; Add S SN ...S PR CADATA=PRC ADATA_PRCA SSN,$E(PRC ADATA,50)= " " ...; A dd Auto-Co rrect Date  ...S PRCA DATA=PRCAD ATA_PRCAAC D,$E(PRCAD ATA,64)="  " ...; Add  Auto-Corr ect Reason  ...S PRCA DATA=PRCAD ATA_PRCAAC R ...S ^TM P("PRCAACR 1",$J,PRCA IEN)=PRCAD ATA ...Q ;  ; Send Ma ilMan mess age with N o Forward  N XMTO,XMS UBJ,XMBODY ,XMINSTR,X MDUZ S XMT O(DUZ)=""  S XMSUBJ=" BILLS THAT  HAVE BEEN  AUTO-CORR ECTED" S X MBODY="^TM P(""PRCAAC R1"",$J)"  S XMINSTR( "FLAGS")=" X" S XMDUZ =DUZ D SEN DMSG^XMXAP I(XMDUZ,XM SUBJ,XMBOD Y,.XMTO,.X MINSTR) D  HOME^%ZIS  K IO("Q"), POP K ^TMP ("PRCAACR1 ",$J) K PR CABDT,PRCA EDT,PRCASO RT Q ;PSAC RTP1 ; hea der for pa tient stat ement auto -correctio n report 1  S PAGE=PA GE+1 S PRC AIEN=PRCAI EN+1 S ^TM P("PRCAACR 1",$J,PRCA IEN)="" S  PRCADATA=" PAGE "_PAG E,$E(PRCAD ATA,8)=""  S PRCADATA =PRCADATA_ "BILLS THA T HAVE BEE N AUTO-COR RECTED (SO RTED BY BI LL #)" S $ E(PRCADATA ,66)="",PR CADATA=PRC ADATA_$$UP PER^VALM1( $$FMTE^XLF DT(DT)) S  PRCAIEN=PR CAIEN+1 S  ^TMP("PRCA ACR1",$J,P RCAIEN)=PR CADATA S P RCAIEN=PRC AIEN+1 S ^ TMP("PRCAA CR1",$J,PR CAIEN)=DAS H S PRCAIE N=PRCAIEN+ 1 S ^TMP(" PRCAACR1", $J,PRCAIEN )="" S PRC ADATA="BIL L NO. DEBT OR SSN TRA NS NUM AUT O-C DATE A UTO-C REAS ON" S PRCA IEN=PRCAIE N+1 S ^TMP ("PRCAACR1 ",$J,PRCAI EN)=PRCADA TA S PRCAD ATA="----- ------ --- ---------- ----- ----  ---------  --------- --- ------ --------"  S PRCAIEN= PRCAIEN+1  S ^TMP("PR CAACR1",$J ,PRCAIEN)= PRCADATA Q  ;PSACRTP2  ; header  for patien t statemen t auto-cor rection re port 2 S P AGE=PAGE+1  S PRCAIEN =PRCAIEN+1  S ^TMP("P RCAACR1",$ J,PRCAIEN) ="" S PRCA DATA="PAGE  "_PAGE,$E (PRCADATA, 8)="" S PR CADATA=PRC ADATA_"BIL LS THAT HA VE BEEN AU TO-CORRECT ED (SORTED  BY DEBTOR )" S $E(PR CADATA,66) ="",PRCADA TA=PRCADAT A_$$UPPER^ VALM1($$FM TE^XLFDT(D T)) S PRCA IEN=PRCAIE N+1 S ^TMP ("PRCAACR1 ",$J,PRCAI EN)=PRCADA TA S PRCAI EN=PRCAIEN +1 S ^TMP( "PRCAACR1" ,$J,PRCAIE N)=DASH S  PRCAIEN=PR CAIEN+1 S  ^TMP("PRCA ACR1",$J,P RCAIEN)=""  S PRCADAT A="DEBTOR  BILL NO. S SN TRANS N UM AUTO-C  DATE AUTO- C REASON"  S PRCAIEN= PRCAIEN+1  S ^TMP("PR CAACR1",$J ,PRCAIEN)= PRCADATA S  PRCADATA= "--------- ---------  ---------- - ---- --- ------ --- ---------  ---------- ----" S PR CAIEN=PRCA IEN+1 S ^T MP("PRCAAC R1",$J,PRC AIEN)=PRCA DATA Q ;PS ACRTP3 ; h eader for  patient st atement au to-correct ion report  3 W @IOF  S PAGE=PAG E+1 S PRCA IEN=PRCAIE N+1 S ^TMP ("PRCAACR1 ",$J,PRCAI EN)="" S P RCADATA="P AGE "_PAGE ,$E(PRCADA TA,8)="" S  PRCADATA= PRCADATA_" BILLS THAT  HAVE BEEN  AUTO-CORR ECTED (SOR TED BY AUT O-C DT)" S  $E(PRCADA TA,66)="", PRCADATA=P RCADATA_$$ UPPER^VALM 1($$FMTE^X LFDT(DT))  S PRCAIEN= PRCAIEN+1  S ^TMP("PR CAACR1",$J ,PRCAIEN)= PRCADATA S  PRCAIEN=P RCAIEN+1 S  ^TMP("PRC AACR1",$J, PRCAIEN)=D ASH S PRCA IEN=PRCAIE N+1 S ^TMP ("PRCAACR1 ",$J,PRCAI EN)="" S P RCADATA="A UTO-C DATE  DEBTOR BI LL NO. SSN  TRANS NUM  AUTO-C RE ASON" S PR CAIEN=PRCA IEN+1 S ^T MP("PRCAAC R1",$J,PRC AIEN)=PRCA DATA S PRC ADATA="--- ---------  ---------- -------- - ----------  ---- ---- ----- ---- ---------- " S PRCAIE N=PRCAIEN+ 1 S ^TMP(" PRCAACR1", $J,PRCAIEN )=PRCADATA  Q ;PSACRT P4 ; heade r for pati ent statem ent auto-c orrection  report 4 W  @IOF S PA GE=PAGE+1  S PRCAIEN= PRCAIEN+1  S ^TMP("PR CAACR1",$J ,PRCAIEN)= "" S PRCAD ATA="PAGE  "_PAGE,$E( PRCADATA,8 )="" S PRC ADATA=PRCA DATA_"BILL S THAT HAV E BEEN AUT O-CORRECTE D (SORTED  BY TRANS N UM)" S $E( PRCADATA,6 6)="",PRCA DATA=PRCAD ATA_$$UPPE R^VALM1($$ FMTE^XLFDT (DT)) S PR CAIEN=PRCA IEN+1 S ^T MP("PRCAAC R1",$J,PRC AIEN)=PRCA DATA S PRC AIEN=PRCAI EN+1 S ^TM P("PRCAACR 1",$J,PRCA IEN)=DASH  S PRCAIEN= PRCAIEN+1  S ^TMP("PR CAACR1",$J ,PRCAIEN)= "" S PRCAD ATA="TRANS  NUM DEBTO R BILL NO.  SSN AUTO- C DATE AUT O-C REASON " S PRCAIE N=PRCAIEN+ 1 S ^TMP(" PRCAACR1", $J,PRCAIEN )=PRCADATA  S PRCADAT A="------- -- ------- ---------- - -------- --- ---- - ---------- - -------- ------" S  PRCAIEN=PR CAIEN+1 S  ^TMP("PRCA ACR1",$J,P RCAIEN)=PR CADATA Q ; EXIT ; Q
  1644  
  1645   Table 16:  Routines:  PRCA307P
  1646   Routines
  1647   Activities
  1648   Routine Na me
  1649   PRCA307P
  1650   Enhancemen t Category
  1651    New
  1652    Modify
  1653    Delete
  1654    No Change
  1655   RTM
  1656   ACJ005
  1657   Related Op tions
  1658   N/A
  1659  
  1660   Related Ro utines
  1661   Routines “ Called By”
  1662   Routines “ Called”   
  1663  
  1664   N/A
  1665   ^%ZTLOAD
  1666   $$SITE^RCM SITE
  1667   BMES^XPDUT L
  1668   MES^XPDUTL
  1669  
  1670   Routines
  1671   Activities
  1672   Data Dicti onary (DD)  Reference s
  1673   N/A
  1674   Related Pr otocols
  1675   N/A
  1676   Related In tegration  Control Re gistration s (ICRs)
  1677   N/A
  1678   Data Passi ng
  1679    Input
  1680    Output Re ference
  1681    Both
  1682    Global Re ference
  1683    Local
  1684   Input Attr ibute Name  and Defin ition
  1685   Name: N/A
  1686   Definition :
  1687   Output Att ribute Nam e and Defi nition
  1688   Name: N/A
  1689   Definition :
  1690  
  1691   Current Lo gic
  1692   N/A
  1693  
  1694   Modified L ogic (Chan ges are in  bold)
  1695   PRCA307P ; ALB/BDB -  PATCH PRCA *4.5*307 P OST-INSTAL L ROUTINE  ; 11/2/15  4:15pm ;;4 .5;Account s Receivab le;**307** ;Mar 20, 1 995;Build  55 ;;Per V A Directiv e 6402, th is routine  should no t be modif ied. ; Thi s routine  will updat e a specif ic list of  Station I D's ; and  queues the  Patient S tatement A uto-Correc tion Progr am ; QEN ; Entry poin t for PRCA *4.5*307 p ost-instal l N SDAY,S ITE,T S SI TE=$$SITE^ RCMSITE I  SITE=0 D . D MES^XPDU TL(" ") .D  BMES^XPDU TL(">>> WA RNING! STA TION ID NO T FOUND!")  .D MES^XP DUTL(">>>  THE PATIEN T STATEMEN T TRANSMIS SION DATE  WILL NOT B E UPDATED" ) .D MES^X PDUTL(" ")  I SITE'=0 ,$T(@SITE)  D .D MES^ XPDUTL(" " ) .D BMES^ XPDUTL(">> > STATION  ID "_SITE_ " MATCH FO UND!") .D  MES^XPDUTL (">>> THE  PATIENT ST ATEMENT TR ANSMISSION  DATE WILL  BE UPDATE D") .D MES ^XPDUTL("  ") .;set p atient sta tement day  to site s tatement d ay .S T=$T (@SITE),SD AY=+$P(T," ;;",2) .S  $P(^RC(342 ,1,0),"^", 11)=SDAY . S DEB=0 F   S DEB=$O( ^RCD(340," AB","DPT(" ,DEB)) Q:' DEB  I $D( ^RCD(340,+ DEB,0)) D  ..S STDT=$ P($G(^RCD( 340,+DEB,0 )),"^",3)  Q:'STDT .. S SSTDT=$P ($G(^RC(34 2,1,0)),"^ ",11) ..Q: (SSTDT=STD T) ..K ^RC D(340,"AC" ,STDT,+DEB ) ..S $P(^ RCD(340,+D EB,0),"^", 3)=SSTDT . .S ^RCD(34 0,"AC",SST DT,DEB)=""  K SDAY,SI TE,DEB,STD T,SSTDT,T  ; N ZTDTH, ZTIO,ZTDES C,ZTRTN,ZT SK S ZTDES C="Auto-Co rrect Pati ent Statem ent Discre pancies" S  ZTRTN="ST ART^PRCACP S",ZTDTH=$ H,ZTIO=""  D ^%ZTLOAD  I $G(ZTSK ) D  Q .D  BMES^XPDUT L(">>>POST -INSTALL C ONSOLIDATE D PATIENT  STATEMENT  AUTO-CORRE CTION") .D  MES^XPDUT L(">>>PROG RAM HAS BE EN QUEUED  IN TASK "_ ZTSK) I '$ G(ZTSK) D   Q .D BMES ^XPDUTL("> >>ERROR: P OST-INSTAL L CONSOLID ATED PATIE NT STATEME NT AUTO-CO RRECTION")  .D MES^XP DUTL(">>>P ROGRAM COU LD NOT BE  QUEUED") ;  ;Stations  that will  have mont hly statem ent build  date chang ed438 ;;21 ^SIOUX FAL LS,SD501 ; ;21^ALBUQU ERQUE,NM50 4 ;;21^AMA RILLO,TX54 2 ;;21^COA TESVILLE,P A562 ;;21^ ERIE,PA568  ;;21^FORT  MEADE,SD6 49 ;;21^PR ESCOTT,AZ6 56 ;;21^ST . CLOUD,MN 688 ;;21^W ASHINGTON, DC756 ;;21 ^EL PASO,T X565 ;;22^ FAYETTEVIL LE,NC621 ; ;22^MOUNTA IN HOME,TN 658 ;;22^S ALEM,VA664  ;;22^SAN  DIEGO,CA67 1 ;;22^SAN  ANTONIO,T X689 ;;22^ WEST HAVEN ,CT740 ;;2 2^TEXAS VA LLEY COAST AL,TX
  1696   Table 17:  Routines:  PRCASER1
  1697   Routines
  1698   Activities
  1699   Routine Na me
  1700   PRCASER1
  1701   Enhancemen t Category
  1702    New
  1703    Modify
  1704    Delete
  1705    No Change
  1706   RTM
  1707   US005
  1708   Related Op tions
  1709   PRCAX CO-P AY EXEMPTI ON REPORT
  1710  
  1711   Related Ro utines
  1712   Routines “ Called By”
  1713   Routines “ Called”   
  1714  
  1715   PRCAX, RCK ATP, RCKAT PD
  1716   XMD, PRCAS ER1, FY^RC FN01, $$NA M^RCFN01,  $$SSN^RCFN 01, $$FY^R CFN01, 
  1717  
  1718   Routines
  1719   Activities
  1720   Data Dicti onary (DD)  Reference s
  1721   ACCOUNTS R ECEIVABLE  File (#430 )
  1722   AR TRANSAC TION File  (#433)
  1723   ACCOUNTS R ECEIVABLE  TRANS.TYPE (#430.3)
  1724   NEW PERSON (#200)
  1725   Related Pr otocols
  1726   N/A
  1727   Related In tegration  Control Re gistration s (ICRs)
  1728   N/A
  1729   Data Passi ng
  1730    Input
  1731    Output Re ference
  1732    Both
  1733    Global Re ference
  1734    Local
  1735   Input Attr ibute Name  and Defin ition
  1736   Name: N/A
  1737   Definition :
  1738   Output Att ribute Nam e and Defi nition
  1739   Name: N/A
  1740   Definition :
  1741   Current Lo gic
  1742   PRCASER1 ; WASH-ISC@A LTOONA,PA/ RGY-Accept  transacti on from bi lling engi ne ;9/8/93
  1743     2:21 PM
  1744   V        ; ;4.5;Accou nts Receiv able;**48, 104,165,23 3**;Mar 20 , 1995;Bui ld 4
  1745            ; ;Per VHA D irective 1 0-93-142,  this routi ne should  not be mod ified.
  1746            N EW AMT,AMT 1,PRCAERR, PRCABN,PRC ADJ,X1,XMD UZ,XMSUB,X MTEXT,XMY, DEBT
  1747            I  '$D(X) S  PRCAERR="- 1^PRCA020"  G Q
  1748            I  $O(^PRCA( 430.3,"AC" ,+X,0))'?1 N.N,$P($G( ^PRCA(430. 3,+X,0))," ^",3)'=21 
  1749   S PRCAERR= "-1^PRCA02 1" G Q
  1750            I  +X'=21,$P ($G(^PRCA( 430.3,+X,0 )),"^",3)' =21 S PRCA ERR="-1^PR CA022" G Q
  1751            I  $P(X,"^", 2)'?.N.1". ".2N S PRC AERR="-1^P RCA023" G  Q
  1752            I  $P(X,"^", 2)'>0 S PR CAERR="-1^ PRCA017" G  Q
  1753            I  $P(X,"^", 3)="" S PR CAERR="-1^ PRCA006" G  Q
  1754            S  PRCABN=$O (^PRCA(430 ,"B",$P(X, "^",3),0))  I $G(^PRC A(430,+PRC ABN,0))=""
  1755    S PRCAERR ="-1^PRCA0 07" G Q
  1756            I  '$D(^VA(2 00,+$P(X," ^",4),0))  S PRCAERR= "-1^PRCA01 3" G Q
  1757            I  $P(X,"^", 5)'?7N S P RCAERR="-1 ^PRCA024"  G Q
  1758            S  (AMT1,AMT )=$P(X,"^" ,2)
  1759            D  DEC(PRCAB N,.AMT,$P( X,"^",4),$ P(X,U,6),$ P(X,U,5))
  1760            S  XMDUZ="AR  Package", XMTEXT="X1 (",DEBT=$P ($G(^PRCA( 430,PRCABN ,0)),"^",9
  1761   ),DEBT=$E( $$NAM^RCFN 01(DEBT),1 )_" ("_$E( $$SSN^RCFN 01(DEBT),6 ,9)_")"
  1762            I  AMT'=AMT1  S X1(1)=" A decrease  adjustmen t for bill /Pt name ( SSN) #"_$P
  1763   (X,"^",3)_ "/"_DEBT_"  has been" ,XMSUB="Au tomatic Ad j: "_$P(X, "^",3)
  1764            I  AMT=AMT1  S X1(1)="* *** NOTICE : A decrea se adjustm ent for bi ll/Pt name
  1765    (SSN) #"_ $P(X,U,3)_ "/"_DEBT,X MSUB="Manu al Adj: "_ $P(X,U,3), X1(3)=" "
  1766            S  Y=DT X ^D D("DD") S  X1(2)=$S(A MT'=AMT1:" automatica lly",1:"ne eds to be 
  1767   manually") _" applied  in the am ount of $" _$J($S(AMT 1=AMT:AMT1 ,1:AMT1-AM T),0,2)_" 
  1768   on "_Y_"."
  1769            I  AMT,AMT'= AMT1 S X1( 3)="Please  review bi ll for pro per applic ation of t
  1770   he unappli ed amount  of $"_$J(A MT,0,2)_". "
  1771            S  X1(4)=" " ,X1(5)="Da ta sent fr om Service "
  1772            S  X1(6)="         Amou nt: $"_$J( AMT1,0,2)
  1773            S  Y=$P(X,U, 5) X ^DD(" DD") S X1( 7)="           Date:  "_Y
  1774            S  X1(8)="         Reas on: "_$S($ P(X,"^",6) ]"":$P(X," ^",6),1:"N /A")
  1775            S  X1(9)=" A djustment  by: "_$P($ G(^VA(200, +$P(X,"^", 4),0)),"^" )
  1776            S  AMT=0 F X =1:1:5 S A MT=AMT+$P( $G(^PRCA(4 30,PRCABN, 7)),U,X)
  1777            S  AMT1=AMT- +$G(^PRCA( 430,PRCABN ,7))
  1778            S  X=$P(^PRC A(430.3,+$ P($G(^PRCA (430,PRCAB N,0)),U,8) ,0),U,1)
  1779            S  X1(10)="  ",X1(12)="  ",X1(13)= "Bill stat us is "_$S (XMSUB["Au to":"now "
  1780   ,1:"")_X_"  with a ba lance of $ "_$J(AMT,0 ,2)_".",X1 (14)=" "
  1781            I  AMT1>0 S  X1(15)=" * WARNING*   There is o utstanding  administr ative char
  1782   ges of $"_ $J(AMT1,0, 2)_".",X1( 16)="             An  adjustment  of admini strative c
  1783   harges MAY  need to b e done."
  1784            S  XMY("G.PR CA ADJUSTM ENT TRANS" )=""
  1785            D  ^XMD
  1786   Q        S  Y=$S($D(P RCAERR):PR CAERR,1:0)  Q
  1787   TEST     ;
  1788            S  X="21^22^ 503-AA0007 ^5^2921206 ^RX RETURN ED IN MAIL " D ^PRCAS ER1 W !,Y,
  1789   !
  1790            Q
  1791   DEC(PRCABN ,AMT,APR,R EA,BDT,PRC AEN) ;Auto  decrease  from servi ce Bill#,T ran amt,pe
  1792   rson,reaso n,Tran dat e
  1793            N EW BAL,DA, DIC,DIE,DR ,ERR,PRCA, PRCAA2,PRC AMT,PRCASV ,X,Y
  1794            S  PRCAEN="" ,BAL=+$G(^ PRCA(430,P RCABN,7))  I 'BAL Q
  1795            I  $P(^PRCA( 430,PRCABN ,0),U,8)'= $O(^PRCA(4 30.3,"AC", 102,"")),$ P(^PRCA(43
  1796   0,PRCABN,0 ),U,8)'=$O (^PRCA(430 .3,"AC",11 2,"")) Q
  1797            I  $P(^PRCA( 430,PRCABN ,0),U,2)=$ O(^PRCA(43 0.2,"AC",3 3,0)) Q
  1798            S  BAL=$S(AM T>BAL:BAL, 1:AMT)
  1799            S  PRCA("ADJ ")=$O(^PRC A(430.3,"A C",21,0)), PRCASV("FY ")=$$FY^RC FN01(DT)_U
  1800   _BAL,PRCAS V("APR")=A PR,PRCASV( "BDT")=$S( $G(BDT)>0: BDT,1:DT)
  1801            D  SETTR^PRC AUTL,PATTR ^PRCAUTL S  DIE="^PRC A(433,",DR ="[PRCA FY  ADJ2 BATC
  1802   H]",DA=PRC AEN D ^DIE  S PRCAA2= $P(^PRCA(4 33,PRCAEN, 4,0),U,3)  D UPFY^PRC ADJ,TRANUP
  1803   ^PRCAUTL
  1804            I  ("^30^31^ ")[("^"_$P ($G(^PRCA( 430,PRCABN ,0)),"^",2 )_"^") D E N^PRCAFBDM
  1805   (PRCABN,BA L,PRCA("AD J"),$G(PRC ADJ("BDT") ),PRCAEN,. ERR)
  1806            D  UPPRIN^PR CADJ
  1807            I  "AutoAUTO "'[$E(REA, 1,4) S REA ="Auto Dec .: "_REA
  1808            S  DA=PRCAEN ,DIE="^PRC A(433,",DR ="41///"_R EA D ^DIE
  1809            S  AMT=AMT-+ $P($G(^PRC A(433,PRCA EN,1)),U,5 )
  1810            Q
  1811  
  1812   Modified L ogic (Chan ges are in  bold)
  1813   PRCASER1 ; WASH-ISC@A LTOONA,PA/ RGY-Accept  transacti on from bi lling engi ne ;9/8/93  2:21 PMV  ;;4.5;Acco unts Recei vable;**48 ,104,165,2 33,307**;M ar 20, 199 5;Build 55  ;;Per VA  Directive  6402, this  routine s hould not  be modifie d. NEW AMT ,AMT1,PRCA ERR,PRCABN ,PRCADJ,X1 ,XMDUZ,XMS UB,XMTEXT, XMY,DEBT I  '$D(X) S  PRCAERR="- 1^PRCA020"  G Q I $O( ^PRCA(430. 3,"AC",+X, 0))'?1N.N, $P($G(^PRC A(430.3,+X ,0)),"^",3 )'=21 S PR CAERR="-1^ PRCA021" G  Q I +X'=2 1,$P($G(^P RCA(430.3, +X,0)),"^" ,3)'=21 S  PRCAERR="- 1^PRCA022"  G Q I $P( X,"^",2)'? .N.1".".2N  S PRCAERR ="-1^PRCA0 23" G Q I  $P(X,"^",2 )'>0 S PRC AERR="-1^P RCA017" G  Q I $P(X," ^",3)="" S  PRCAERR=" -1^PRCA006 " G Q S PR CABN=$O(^P RCA(430,"B ",$P(X,"^" ,3),0)) I  $G(^PRCA(4 30,+PRCABN ,0))="" S  PRCAERR="- 1^PRCA007"  G Q I '$D (^VA(200,+ $P(X,"^",4 ),0)) S PR CAERR="-1^ PRCA013" G  Q I $P(X, "^",5)'?7N  S PRCAERR ="-1^PRCA0 24" G Q S  (AMT1,AMT) =$P(X,"^", 2) D DEC(P RCABN,.AMT ,$P(X,"^", 4),$P(X,U, 6),$P(X,U, 5)) S XMDU Z="AR Pack age",XMTEX T="X1(",DE BT=$P($G(^ PRCA(430,P RCABN,0)), "^",9),DEB T=$E($$NAM ^RCFN01(DE BT),1)_" ( "_$E($$SSN ^RCFN01(DE BT),6,9)_" )" I AMT'= AMT1 S X1( 1)="A decr ease adjus tment for  bill/Pt na me (SSN) # "_$P(X,"^" ,3)_"/"_DE BT_" has b een",XMSUB ="Automati c Adj: "_$ P(X,"^",3)  I AMT=AMT 1 S X1(1)= "**** NOTI CE: A decr ease adjus tment for  bill/Pt na me (SSN) # "_$P(X,U,3 )_"/"_DEBT ,XMSUB="Ma nual Adj:  "_$P(X,U,3 ),X1(3)="  " S Y=DT X  ^DD("DD")  S X1(2)=$ S(AMT'=AMT 1:"automat ically",1: "needs to  be manuall y")_" appl ied in the  amount of  $"_$J($S( AMT1=AMT:A MT1,1:AMT1 -AMT),0,2) _" on "_Y_ "." I AMT, AMT'=AMT1  S X1(3)="P lease revi ew bill fo r proper a pplication  of the un applied am ount of $" _$J(AMT,0, 2)_"." S X 1(4)=" ",X 1(5)="Data  sent from  Service"  S X1(6)="  Amount: $" _$J(AMT1,0 ,2) S Y=$P (X,U,5) X  ^DD("DD")  S X1(7)="  Date: "_Y  S X1(8)="  Reason: "_ $S($P(X,"^ ",6)]"":$P (X,"^",6), 1:"N/A") S  X1(9)=" A djustment  by: "_$P($ G(^VA(200, +$P(X,"^", 4),0)),"^" ) S AMT=0  F X=1:1:5  S AMT=AMT+ $P($G(^PRC A(430,PRCA BN,7)),U,X ) S AMT1=A MT-+$G(^PR CA(430,PRC ABN,7)) S  X=$P(^PRCA (430.3,+$P ($G(^PRCA( 430,PRCABN ,0)),U,8), 0),U,1) S  X1(10)=" " ,X1(12)="  ",X1(13)=" Bill statu s is "_$S( XMSUB["Aut o":"now ", 1:"")_X_"  with a bal ance of $" _$J(AMT,0, 2)_".",X1( 14)=" " I  AMT1>0 S X 1(15)=" *W ARNING* Th ere is out standing a dministrat ive charge s of $"_$J (AMT1,0,2) _".",X1(16 )=" An adj ustment of  administr ative char ges MAY ne ed to be d one." S XM Y("G.PRCA  ADJUSTMENT  TRANS")=" " D ^XMDQ  S Y=$S($D( PRCAERR):P RCAERR,1:0 ) QTEST  ;  S X="21^2 2^503-AA00 07^5^29212 06^RX RETU RNED IN MA IL" D ^PRC ASER1 W !, Y,! QDEC(P RCABN,AMT, APR,REA,BD T,PRCAEN)  ;Auto decr ease from  service Bi ll#,Tran a mt,person, reason,Tra n date NEW  BAL,DA,DI C,DIE,DR,E RR,PRCA,PR CAA2,PRCAM T,PRCASV,X ,Y,PRCADUP  ; PRCA*4. 5*307 - Ne w PRCADUP  then initi alize next  line S PR CADUP=0 ;  PRCA*4.5*3 07 - If re ason is TI ER RATE ch eck for du plicate I  REA["TIER  RATE" D DU PCHK S PRC AEN="",BAL =+$G(^PRCA (430,PRCAB N,7)) I 'B AL Q I $P( ^PRCA(430, PRCABN,0), U,8)'=$O(^ PRCA(430.3 ,"AC",102, "")),$P(^P RCA(430,PR CABN,0),U, 8)'=$O(^PR CA(430.3," AC",112,"" )) Q I $P( ^PRCA(430, PRCABN,0), U,2)=$O(^P RCA(430.2, "AC",33,0) ) Q S BAL= $S(AMT>BAL :BAL,1:AMT ) S PRCA(" ADJ")=$O(^ PRCA(430.3 ,"AC",21,0 )),PRCASV( "FY")=$$FY ^RCFN01(DT )_U_BAL,PR CASV("APR" )=APR,PRCA SV("BDT")= $S($G(BDT) >0:BDT,1:D T) D SETTR ^PRCAUTL,P ATTR^PRCAU TL S DIE=" ^PRCA(433, ",DR="[PRC A FY ADJ2  BATCH]",DA =PRCAEN D  ^DIE S PRC AA2=$P(^PR CA(433,PRC AEN,4,0),U ,3) D UPFY ^PRCADJ,TR ANUP^PRCAU TL I ("^30 ^31^")[("^ "_$P($G(^P RCA(430,PR CABN,0))," ^",2)_"^")  D EN^PRCA FBDM(PRCAB N,BAL,PRCA ("ADJ"),$G (PRCADJ("B DT")),PRCA EN,.ERR) D  UPPRIN^PR CADJ I "Au toAUTO"'[$ E(REA,1,4)  S REA="Au to Dec.: " _REA S DA= PRCAEN,DIE ="^PRCA(43 3,",DR="41 ///"_REA D  ^DIE ; PR CA*4.5*307  - Mark In complete T ransaction  if duplic ate, block ing from P atient Sta tement  I  PRCADUP S  DR="10//// 1" D ^DIE  S AMT=AMT- +$P($G(^PR CA(433,PRC AEN,1)),U, 5) Q ;DUPC HK ;PRCA*4 .5*307 - C heck for d uplicate ( lower/high er) set PR CADUP if t rue N PRCA TX,PRCAII, PRCATRN S  PRCATX=$P( ^PRCA(433, 0),U,3) F  PRCAII=PRC ATX-20:1:P RCATX D  Q :PRCADUP .  S PRCATRN =$G(^PRCA( 433,PRCAII ,1)) I $P( PRCATRN,U, 5)'=AMT Q  . I $P($G( ^PRCA(433, PRCAII,0)) ,U,2)'=PRC ABN Q . I  $P($G(^PRC A(433,PRCA II,0)),U,9 )'=APR Q .  I $P(PRCA TRN,U)'=BD T Q . S PR CADUP=PRCA II Q
  1814  
  1815   Table 18:  Routines:  RCCPCBJ
  1816   Routines
  1817   Activities
  1818   Routine Na me
  1819   RCCPCBJ
  1820   Enhancemen t Category
  1821    New
  1822    Modify
  1823    Delete
  1824    No Change
  1825   RTM
  1826   ACJ002
  1827   Related Op tions
  1828  
  1829  
  1830   Related Ro utines
  1831   Routines “ Called By”
  1832   Routines “ Called”   
  1833  
  1834  
  1835   ^%DTC
  1836   C^%DTC
  1837   ^%ZTLOAD
  1838   ^DIE
  1839   $$EN^PRCAR FU
  1840   FIRSTPTY^R CBECHGS
  1841   $$STD^RCCP CFN
  1842   $$STDY^RCC PCFN
  1843   EN^RCCPCML
  1844   ^RCCPCPS
  1845   TRANCHK^RC CPCSV1
  1846   ^RCEXINAD
  1847   $$DOW^XLFD T
  1848  
  1849   Routines
  1850   Activities
  1851   Data Dicti onary (DD)  Reference s
  1852  
  1853   Related Pr otocols
  1854  
  1855   Related In tegration  Control Re gistration s (ICRs)
  1856  
  1857   Data Passi ng
  1858    Input
  1859    Output Re ference
  1860    Both
  1861    Global Re ference
  1862    Local
  1863   Input Attr ibute Name  and Defin ition
  1864   Name:
  1865   Definition :
  1866   Output Att ribute Nam e and Defi nition
  1867   Name:
  1868   Definition :
  1869  
  1870   Current Lo gic
  1871   DEVISC1A1: PATVEE>ZL  RCCPCBJ ZP
  1872   RCCPCBJ  ; WASH-ISC@A LTOONA,PA/ NYB-Backgr ound Drive r for CCPC  ;1/7/97   9:42 AM
  1873            ; ;4.5;Accou nts Receiv able;**34, 76,130,153 ,166,195,2 17,237**;M ar 20, 199 5
  1874            ; ;Per VHA D irective 1 0-93-142,  this routi ne should  not be mod ified.
  1875   EN       ; Starts the  backgroun d job for  CCPC 5 day s before s tatement d ay
  1876            N  X,X1,X2,X 3,ZTRTN,ZT IO,ZTDTH,Z TSK,ZTDESC
  1877            D  ACK
  1878            S  X1=$$STD^ RCCPCFN,X2 =-2 D C^%D TC
  1879            ; 10-process  end time/ 18-ccpc fi le built
  1880            I  X=DT D  Q
  1881            .  S X3=$O(^ RCPS(349.2 ,0)) Q:'X3
  1882            .  Q:'$P($P( $G(^RCPS(3 49.2,X3,0) ),"^",10), ".")
  1883            .  Q:'$P($G( ^RCPS(349. 2,X3,0))," ^",18)
  1884            .  D EN^RCCP CML
  1885            ; quit if da te created  is yester day's date
  1886            S  X1=$$STD^ RCCPCFN,X2 =-1 D C^%D TC
  1887            I  X=DT D  Q
  1888            .  S X3=+$O( ^RCT(349,0 ))
  1889            .  S X3=$P($ P($G(^RCT( 349,X3,0)) ,"^",11)," .")
  1890            .  S X1=DT,X 2=-1 D C^% DTC
  1891            .  I X=X3 Q
  1892            .  D EN^RCCP CML
  1893            ;
  1894            S  X1=$$STD^ RCCPCFN,X2 =-3 D C^%D TC
  1895            I  X'=DT Q
  1896            I  DT'<$P($G (^RC(342,1 ,30)),"^", 1)&(DT'>$P ($G(^RC(34 2,1,30))," ^",2)) D ^ RCEXINAD
  1897            S  ZTIO="",Z TRTN="OPEN ^RCCPCBJ", ZTDESC="CC PC PATIENT  STATEMENT "
  1898            S  ZTDTH=$H  D ^%ZTLOAD
  1899            Q
  1900   OPEN     ; Update Ope n status b ills to Ac tive or Ca ncellation  status
  1901            N  DAY,BN,DE BTOR,DA,DI E,DR,P,AMT
  1902            N  ZTSAVE,ZT RTN,ZTDESC ,ZTASK,%ZI S,ZTDTH
  1903            S  DATE=$$ST D^RCCPCFN, DAY=+$$STD Y^RCCPCFN, DEBTOR=0 F   S DEBTOR =$O(^RCD(3 40,"AC",DA Y,DEBTOR))  Q:'DEBTOR   D
  1904                .S BN=0  F  S BN=$O (^PRCA(430 ,"AS",DEBT OR,$O(^PRC A(430.3,"A C",112,0)) ,BN)) Q:'B N  D
  1905                   ..S A MT=0 F P=1 :1:5 S AMT =$P($G(^PR CA(430,+BN ,7)),"^",P )+AMT
  1906                   ..I $ P($G(^PRCA (430,+BN,0 )),"^",2)= $O(^PRCA(4 30.2,"AC", 33,0)),AMT  Q
  1907                   ..S D IE="^PRCA( 430,",DA=+ BN,DR="8// //^S X="_$ S(AMT:$O(^ PRCA(430.3 ,"AC",102, 0)),1:$O(^ PRCA(430.3 ,"AC",111, 0))) D ^DI ER
  1908                   ..Q
  1909                .Q
  1910            ;
  1911            ;   update p atient acc ounts with  interest  and admin
  1912            N  RCLASDAT
  1913            S  RCLASDAT= DATE
  1914            I  DT>301010 1 D FIRSTP TY^RCBECHG S
  1915            D  ^RCCPCPS
  1916            D  REFUND
  1917            Q
  1918            ;
  1919            ;
  1920   REFUND   ; Update Ope n status P REPAYMENT  bills to R EFUND REVI EW
  1921            S  DEBTOR=0, DAY=+$$STD Y^RCCPCFN
  1922            F   S DEBTOR =$O(^RCD(3 40,"AC",DA Y,DEBTOR))  Q:'DEBTOR   D
  1923                .S BN=0  F  S BN=$O (^PRCA(430 ,"AS",DEBT OR,$O(^PRC A(430.3,"A C",112,0)) ,BN)) Q:'B N  D
  1924                   ..I $ P($G(^PRCA (430,+BN,0 )),"^",2)= $O(^PRCA(4 30.2,"AC", 33,0)) S X =$$EN^PRCA RFU(+BN)
  1925                   ..Q
  1926                .Q
  1927            Q
  1928            ;
  1929   ACK      ; CHECK FOR  ACKNOWLEDG EMENTS
  1930            N  DEB,MSG,N O,RCX,X,X1 ,X2
  1931            S  X1=$$STD^ RCCPCFN,X2 =DT D ^%DT C I X>3 D
  1932            . D TRANCHK^ RCCPCSV1
  1933            Q
  1934  
  1935   Modified L ogic (Chan ges are in  bold)
  1936   RCCPCBJ ;W ASH-ISC@AL TOONA,PA/N YB-Backgro und Driver  for CCPC  ;1/7/97 9: 42 AM ;;4. 5;Accounts  Receivabl e;**34,76, 130,153,16 6,195,217, 237,307**; Mar 20, 19 95;Build 5 5 ;;Per VH A Directiv e 10-93-14 2, this ro utine shou ld not be  modified.E N ;Starts  the backgr ound job f or CCPC 5  days befor e statemen t day N X, X1,X2,X3,Z TRTN,ZTIO, ZTDTH,ZTSK ,ZTDESC D  ACK I $$DO W^XLFDT(DT ,1)=3 D  ; run the cb s auto-cor rection pr ogram on w ednesdays  .N ZTDESC, ZTASK,ZTDT H,ZTIO,ZTR TN .S ZTIO ="",ZTRTN= "START^PRC ACPS" .S Z TDESC="PAT IENT STATE MENTS AUTO -CORRECTIO N PROGRAM" ,ZTDTH=$H  .D ^%ZTLOA D ; S X1=$ $STD^RCCPC FN,X2=-2 D  C^%DTC ;1 0-process  end time/1 8-ccpc fil e built I  X=DT D  Q  . S X3=$O( ^RCPS(349. 2,0)) Q:'X 3 . Q:'$P( $P($G(^RCP S(349.2,X3 ,0)),"^",1 0),".") .  Q:'$P($G(^ RCPS(349.2 ,X3,0)),"^ ",18) . D  EN^RCCPCML  ;quit if  date creat ed is yest erday's da te S X1=$$ STD^RCCPCF N,X2=-1 D  C^%DTC I X =DT D  Q .  S X3=+$O( ^RCT(349,0 )) . S X3= $P($P($G(^ RCT(349,X3 ,0)),"^",1 1),".") .  S X1=DT,X2 =-1 D C^%D TC . I X=X 3 Q . D EN ^RCCPCML ;  S X1=$$ST D^RCCPCFN, X2=-3 D C^ %DTC I X'= DT Q I DT' <$P($G(^RC (342,1,30) ),"^",1)&( DT'>$P($G( ^RC(342,1, 30)),"^",2 )) D ^RCEX INAD S ZTI O="",ZTRTN ="OPEN^RCC PCBJ",ZTDE SC="CCPC P ATIENT STA TEMENT" S  ZTDTH=$H D  ^%ZTLOAD  QOPEN ;Upd ate Open s tatus bill s to Activ e or Cance llation st atus N DAT E,DAY,BN,D EBTOR,DA,D IE,DR,P,AM T N ZTSAVE ,ZTRTN,ZTD ESC,ZTASK, %ZIS,ZTDTH  S DATE=$$ STD^RCCPCF N,DAY=+$$S TDY^RCCPCF N,DEBTOR=0  F  S DEBT OR=$O(^RCD (340,"AC", DAY,DEBTOR )) Q:'DEBT OR  D    . S BN=0 F   S BN=$O(^P RCA(430,"A S",DEBTOR, $O(^PRCA(4 30.3,"AC", 112,0)),BN )) Q:'BN   D       .. S AMT=0 F  P=1:1:5 S  AMT=$P($G( ^PRCA(430, +BN,7)),"^ ",P)+AMT        ..I $ P($G(^PRCA (430,+BN,0 )),"^",2)= $O(^PRCA(4 30.2,"AC", 33,0)),AMT  Q       . .S DIE="^P RCA(430,", DA=+BN,DR= "8////^S X ="_$S(AMT: $O(^PRCA(4 30.3,"AC", 102,0)),1: $O(^PRCA(4 30.3,"AC", 111,0))) D  ^DIE K DA ,DIE,DR        ..Q     .Q ; ; up date patie nt account s with int erest and  admin N RC LASDAT S R CLASDAT=DA TE I DT>30 10101 D FI RSTPTY^RCB ECHGS D ^R CCPCPS D R EFUND Q ;  ;REFUND ;U pdate Open  status PR EPAYMENT b ills to RE FUND REVIE W S DEBTOR =0,DAY=+$$ STDY^RCCPC FN F  S DE BTOR=$O(^R CD(340,"AC ",DAY,DEBT OR)) Q:'DE BTOR  D     .S BN=0 F   S BN=$O( ^PRCA(430, "AS",DEBTO R,$O(^PRCA (430.3,"AC ",112,0)), BN)) Q:'BN   D        ..I $P($G( ^PRCA(430, +BN,0)),"^ ",2)=$O(^P RCA(430.2, "AC",33,0) ) S X=$$EN ^PRCARFU(+ BN)        ..Q    .Q  Q ;ACK ;CH ECK FOR AC KNOWLEDGEM ENTS N DEB ,MSG,NO,RC X,X,X1,X2  S X1=$$STD ^RCCPCFN,X 2=DT D ^%D TC I X>3 D  .D TRANCH K^RCCPCSV1  Q
  1937  
  1938   Table 19:  Routines:  RCDPBTLM
  1939   Routines
  1940   Activities
  1941   Routine Na me
  1942   RCDPBTLM
  1943   Enhancemen t Category
  1944    New
  1945    Modify
  1946    Delete
  1947    No Change
  1948   RTM
  1949   ??? - noth ing
  1950   Related Op tions
  1951   Decrease A djustment,  Increase  Adjustment
  1952  
  1953   Related Ro utines
  1954   Routines “ Called By”
  1955   Routines “ Called”   
  1956  
  1957   RCBEADJ
  1958   ^DIC
  1959   ^DIR
  1960   $$REC^IBRF N
  1961   $$COMP3^PR CAAPR
  1962   $$IBEEOBCK ^PRCAAPR1
  1963   SET^RCDPAP LI
  1964   $$ACCNTHDR ^RCDPAPLM
  1965   DIQ430^RCD PBPLM
  1966   $$TRANBAL^ RCRJRCOT
  1967   EN^VALM
  1968  
  1969   Routines
  1970   Activities
  1971   Data Dicti onary (DD)  Reference s
  1972   N/A
  1973   Related Pr otocols
  1974   N/A
  1975   Related In tegration  Control Re gistration s (ICRs)
  1976   N/A
  1977   Data Passi ng
  1978    Input
  1979    Output Re ference
  1980    Both
  1981    Global Re ference
  1982    Local
  1983   Input Attr ibute Name  and Defin ition
  1984   Name: N/A
  1985   Definition :
  1986   Output Att ribute Nam e and Defi nition
  1987   Name: N/A
  1988   Definition :
  1989  
  1990   Current Lo gic
  1991   RCDPBTLM ; WISC/RFJ -  bill tran sactions L ist Manage r top rout ine ;1 Jun  99
  1992            ; ;4.5;Accou nts Receiv able;**114 ,148,153,1 68,169,198 ,247,271,2 76**;Mar 2 0, 1995;Bu ild 87
  1993            ; ;Per VHA D irective 2 004-038, t his routin e should n ot be modi fied.
  1994            ;
  1995            ;  Reference  to $$REC^ IBRFN supp orted by D BIA 2031
  1996            ;
  1997            ;   called f rom menu o ption (19)
  1998            ;
  1999            N  RCBILLDA, RCDPFXIT
  2000            ;
  2001            F   D  Q:'RC BILLDA
  2002            .   W !! S R CBILLDA=$$ SELBILL
  2003            .   I RCBILL DA<1 S RCB ILLDA=0 Q
  2004            .   D EN^VAL M("RCDP TR ANSACTIONS  LIST")
  2005            .   ;  fast  exit
  2006            .   I $G(RCD PFXIT) S R CBILLDA=0
  2007            Q
  2008            ;
  2009            ;
  2010   INIT     ;   initiali zation for  list mana ger list
  2011            ;   requires  rcbillda
  2012            N  ADMIN,DAT E,RCLINE,R CLIST,RCTO TAL,RCTRAN ,RCTRANDA
  2013            K  ^TMP("RCD PBTLM",$J) ,^TMP("VAL M VIDEO",$ J)
  2014            ;
  2015            ;   fast exi t
  2016            I  $G(RCDPFX IT) S VALM QUIT=1 Q
  2017            ;
  2018            ;   set the  List Manag er line nu mber
  2019            S  RCLINE=0
  2020            ;   set the  List Manag er transac tion numbe r
  2021            S  RCTRAN=0
  2022            ;
  2023            ;   get tran sactions a nd balance  for bill
  2024            S  RCTOTAL=$ $GETTRANS( RCBILLDA)
  2025            ;
  2026            S  DATE="" F   S DATE=$ O(RCLIST(D ATE)) Q:'D ATE  D
  2027            .   S RCTRAN DA="" F  S  RCTRANDA= $O(RCLIST( DATE,RCTRA NDA)) Q:RC TRANDA=""   D
  2028            .   .  S RCL INE=RCLINE +1
  2029            .   .  ;
  2030            .   .  ;  cr eate an in dex array  for transa ction look up in list
  2031            .   .  I RCT RANDA D
  2032            .   .  .  S  RCTRAN=RCT RAN+1
  2033            .   .  .  S  ^TMP("RCDP BTLM",$J," IDX",RCTRA N,RCTRAN)= RCTRANDA
  2034            .   .  .  D  SET^RCDPAP LI(RCTRAN, RCLINE,1,8 0,0,IORVON ,IORVOFF)
  2035            .   .  ;
  2036            .   .  D SET ^RCDPAPLI( $S(RCTRAND A:RCTRANDA ,1:" "),RC LINE,4,80)
  2037            .   .  D SET ^RCDPAPLI( $E(DATE,4, 5)_"/"_$E( DATE,6,7)_ "/"_$E(DAT E,2,3),RCL INE,13,21)
  2038            .   .  D SET ^RCDPAPLI( $TR($P(RCL IST(DATE,R CTRANDA)," ^"),"ABCDE FGHIJKLMNO PQRSTUVWXY Z","abcdef ghijklmnop qrstuvwxyz "),RCLINE)
  2039            .   .  D SET ^RCDPAPLI( $J($P(RCLI ST(DATE,RC TRANDA),"^ ",2),9,2), RCLINE,53, 62)
  2040            .   .  D SET ^RCDPAPLI( $J($P(RCLI ST(DATE,RC TRANDA),"^ ",3),9,2), RCLINE,62, 71)
  2041            .   .  ;  ad d marshal  fee and co urt cost t o create a dmin dolla rs
  2042            .   .  S ADM IN=$P(RCLI ST(DATE,RC TRANDA),"^ ",4)+$P(RC LIST(DATE, RCTRANDA), "^",5)+$P( RCLIST(DAT E,RCTRANDA ),"^",6)
  2043            .   .  D SET ^RCDPAPLI( $J(ADMIN,9 ,2),RCLINE ,71,80)
  2044            ;
  2045            ;   show tot als
  2046            S  RCLINE=RC LINE+1
  2047            D  SET^RCDPA PLI("                                                         --- ------ --- ----- ---- ----",RCLI NE,1,80)
  2048            S  RCLINE=RC LINE+1
  2049            D  SET^RCDPA PLI("   TO TAL BALANC E FOR BILL ",RCLINE,1 ,80)
  2050            D  SET^RCDPA PLI($J($P( RCTOTAL,"^ ",1),9,2), RCLINE,53, 62)
  2051            D  SET^RCDPA PLI($J($P( RCTOTAL,"^ ",2),9,2), RCLINE,62, 71)
  2052            D  SET^RCDPA PLI($J($P( RCTOTAL,"^ ",3)+$P(RC TOTAL,"^", 4)+$P(RCTO TAL,"^",5) ,9,2),RCLI NE,71,80)
  2053            ;
  2054            ;   compare  totals to  what is st ored in th e file
  2055            N  RCDATA7,R CFOUT
  2056            S  RCDATA7=$ G(^PRCA(43 0,RCBILLDA ,7))
  2057            ;   for a wr ite-off bi ll, the ba lance shou ld equal a ll zeros,  for
  2058            ;   these bi lls, node  7 is the w rite-off a mount, so  for the ou t of
  2059            ;   balance  check to w ork, node  7 needs to  be adjust ed to all  zeros
  2060            I  $P(^PRCA( 430,RCBILL DA,0),"^", 8)=23 S RC DATA7="0^0 ^0^0^0"
  2061            I  +$P(RCDAT A7,"^",1)' =+$P(RCTOT AL,"^",1)  S RCFOUT=1
  2062            I  +$P(RCDAT A7,"^",2)' =+$P(RCTOT AL,"^",2)  S RCFOUT=1
  2063            I  ($P(RCDAT A7,"^",3)+ $P(RCDATA7 ,"^",4)+$P (RCDATA7," ^",5))'=+$ P(RCTOTAL, "^",3) S R CFOUT=1
  2064            I  $G(RCFOUT ) D
  2065            .   S RCLINE =RCLINE+1
  2066            .   D SET^RC DPAPLI(" " ,RCLINE,1, 80)
  2067            .   S RCLINE =RCLINE+1
  2068            .   D SET^RC DPAPLI("   STORED BAL ANCE FOR B ILL (** IN CORRECT ** )",RCLINE, 1,80)
  2069            .   D SET^RC DPAPLI($J( $P(RCDATA7 ,"^",1),9, 2),RCLINE, 53,62)
  2070            .   D SET^RC DPAPLI($J( $P(RCDATA7 ,"^",2),9, 2),RCLINE, 62,71)
  2071            .   D SET^RC DPAPLI($J( $P(RCDATA7 ,"^",3)+$P (RCDATA7," ^",4)+$P(R CDATA7,"^" ,5),9,2),R CLINE,71,8 0)
  2072            ;
  2073            ;   set valm cnt to num ber of lin es in the  list
  2074            S  VALMCNT=R CLINE
  2075            D  HDR
  2076            Q
  2077            ;
  2078            ;
  2079   HDR      ;   header c ode for li st manager  display
  2080            ;   requires  rcbillda
  2081            N  %,DATA,RC DEBTDA,RCD PDATA
  2082            ;
  2083            D  DIQ430^RC DPBPLM(RCB ILLDA,".01 ;8;")
  2084            ;
  2085            S  RCDEBTDA= $P(^PRCA(4 30,RCBILLD A,0),"^",9 )
  2086            S  DATA=$$AC CNTHDR^RCD PAPLM(RCDE BTDA)
  2087            ;
  2088            S  %="",$P(% ," ",80)=" "
  2089            ;  PRCA*4.5* 276 - get  EEOB indic ator for 1 st/3rd par ty payment  and attac h to bill  when appli cable
  2090            S  PRCOUT=$$ COMP3^PRCA APR(RCBILL DA)
  2091            I  PRCOUT'=" %" S PRCOU T=$$IBEEOB CK^PRCAAPR 1(RCBILLDA )
  2092            S  VALMHDR(1 )=$E("Bill  #: "_$G(P RCOUT)_$G( RCDPDATA(4 30,RCBILLD A,.01,"E") )_%,1,25)_ "Account:  "_$P(DATA, "^")_$P(DA TA,"^",2)
  2093            S  VALMHDR(2 )=$E("Stat us: "_$G(R CDPDATA(43 0,RCBILLDA ,8,"E"))_% ,1,25)_$E( "   Addr:  "_$P(DATA, "^",4)_",  "_$P(DATA, "^",7)_",  ")
  2094            ;  PRCA*4.5* 276 - show  caption f or user
  2095            S  VALMSG="| % EEOB | E nter ?? fo r more act ions |" ;  PRCA*4.5*2 76
  2096            Q
  2097            S  VALMHDR(3 )="  "_IOR VON_$E("Bi ll Balance : "_$J($P( RCTOTAL,"^ ")+$P(RCTO TAL,"^",2) +$P(RCTOTA L,"^",3)+$ P(RCTOTAL, "^",4)+$P( R)
  2098            Q
  2099            ;
  2100            ;
  2101   EXIT     ;   exit lis t manager  option and  clean up
  2102            K  ^TMP("RCD PBTLM",$J) ,^TMP("RCD PBTLMX",$J )
  2103            Q
  2104            ;
  2105            ;
  2106   SELBILL()  ;  select  a bill
  2107            ;   returns  -1 for tim eout or ^,  0 for no  selection,  or ien of  bill
  2108            N  %,%Y,C,DI C,DTOUT,DU OUT,RCBEFL UP,X,Y
  2109            N  DPTNOFZY, DPTNOFZK S  (DPTNOFZY ,DPTNOFZK) =1
  2110            N  RCY,DIR,D IRUT
  2111            ;  allow use r to get t he record  using bill # or ECME#
  2112            S  DIR("A")= "Select (B )ILL or (E )CME#: "
  2113            S  DIR(0)="S A^B:BILL N UMBER;E:EC ME#"
  2114            S  DIR("B")= "B"
  2115            D  ^DIR K DI R I $D(DIR UT) Q 0
  2116            S  RCY=Y
  2117            I  RCY="E" Q  $$SELECME
  2118            S  DIC="^PRC A(430,",DI C(0)="QEAM ",DIC("A") ="Select B ILL: "
  2119            S  DIC("W")= "D DICW^RC BEUBI1"
  2120            ;   special  lookup on  input
  2121            S  RCBEFLUP= 1
  2122            D  ^DIC
  2123            I  Y<0,'$G(D UOUT),'$G( DTOUT) S Y =0
  2124            Q  +Y
  2125            ;
  2126            ;
  2127   GETTRANS(B ILLDA) ;   original a mount goes  first for  bill
  2128            ;   returns  list of tr ansactions  in
  2129            ;   rclist(d ate,tranda )=trantype  ^ princip le ^ inter est ^ admi n
  2130            ;   returns  principle  balance ^  interest b alance ^ a dmin balan ce
  2131            ;         ^  marshall f ee balance  ^ court c ost balanc e
  2132            N  %,ADMBAL, AMTDISP,CC BAL,DATA1, DATE,INTBA L,MFBAL,PR INBAL,RCDP DATA,TRAND A,VALUE
  2133            ;
  2134            D  DIQ430^RC DPBPLM(BIL LDA,"3;60; ")
  2135            ;
  2136            K  RCLIST
  2137            S  (ADMBAL,C CBAL,INTBA L,MFBAL,PR INBAL)=0
  2138            S  PRINBAL=R CDPDATA(43 0,BILLDA,3 ,"I")
  2139            ;   loop tra nsaction a nd add to  list
  2140            S  TRANDA=0  F  S TRAND A=$O(^PRCA (433,"C",B ILLDA,TRAN DA)) Q:'TR ANDA  D
  2141            .   S DATA1= $G(^PRCA(4 33,TRANDA, 1))
  2142            .   S DATE=$ P(DATA1,"^ ",9) I 'DA TE Q
  2143            .   S VALUE= $$TRANVALU (TRANDA) I  VALUE=""  Q
  2144            .   S RCLIST ($P(DATE," ."),TRANDA )=$P($G(^P RCA(430.3, +$P(DATA1, "^",2),0)) ,"^")_VALU E
  2145            .   ;
  2146            .   ;  calcu late bill' s balance
  2147            .   S PRINBA L=PRINBAL+ $P(VALUE," ^",2)
  2148            .   S INTBAL =INTBAL+$P (VALUE,"^" ,3)
  2149            .   S ADMBAL =ADMBAL+$P (VALUE,"^" ,4)
  2150            .   S MFBAL= MFBAL+$P(V ALUE,"^",5 )
  2151            .   S CCBAL= CCBAL+$P(V ALUE,"^",6 )
  2152            ;
  2153            S  DATE=$G(R CDPDATA(43 0,BILLDA,6 0,"I"))
  2154            ;   check to  make sure  activatio n date is  not greate r than fir st transac tion
  2155            S  %=$O(RCLI ST(0)) I D ATE>% S DA TE=%
  2156            S  RCLIST(+$ P(DATE,"." ),0)="orig inal amoun t^"_RCDPDA TA(430,BIL LDA,3,"I")
  2157            ;
  2158            Q  PRINBAL_" ^"_INTBAL_ "^"_ADMBAL _"^"_MFBAL _"^"_CCBAL
  2159            ;
  2160            ;
  2161   TRANVALU(T RANDA) ;   return the  transacti on value a s displaye d (with +  or - sign)
  2162            N  TYPE,VALU E
  2163            S  VALUE=$$T RANBAL^RCR JRCOT(TRAN DA)
  2164            ;   no dolla rs on tran saction
  2165            I  '$P(VALUE ,"^"),'$P( VALUE,"^", 2),'$P(VAL UE,"^",3), '$P(VALUE, "^",4),'$P (VALUE,"^" ,5) Q ""
  2166            ;   check ty pe for pay ments, etc , make val ues (-) to  subtract
  2167            S  TYPE=$P($ G(^PRCA(43 3,TRANDA,1 )),"^",2)
  2168            I  TYPE=2!(T YPE=8)!(TY PE=9)!(TYP E=10)!(TYP E=11)!(TYP E=14)!(TYP E=29)!(TYP E=34)!(TYP E=35)!(TYP E=41) D
  2169            .   S $P(VAL UE,"^",1)= -$P(VALUE, "^",1)
  2170            .   S $P(VAL UE,"^",2)= -$P(VALUE, "^",2)
  2171            .   S $P(VAL UE,"^",3)= -$P(VALUE, "^",3)
  2172            .   S $P(VAL UE,"^",4)= -$P(VALUE, "^",4)
  2173            .   S $P(VAL UE,"^",5)= -$P(VALUE, "^",5)
  2174            ;
  2175            ;   the foll owing tran saction ty pes should  not chang e the bill s balance
  2176            ;   return t he amount  displayed  in the des cription a nd 0 for v alue
  2177            ;     refer  to RC 3, r efer to DO J 4, reest ablish 5,  returned 6  and 32
  2178            ;     repaym ent plan 2 5, amended  33, suspe nded 47, u nsuspended  46
  2179            K  AMTDISP
  2180            I  TYPE=3!(T YPE=4)!(TY PE=5)!(TYP E=6)!(TYPE =25)!(TYPE =32)!(TYPE =33)!(TYPE =46)!(TYPE =47) D
  2181            .   S AMTDIS P=" ($"_$J ($P(VALUE, "^")+$P(VA LUE,"^",2) +$P(VALUE, "^",3)+$P( VALUE,"^", 4)+$P(VALU E,"^",5),0 ,2)_")"
  2182            .   S VALUE= ""
  2183            Q  $G(AMTDIS P)_"^"_VAL UE
  2184            ;
  2185   SELECME()  ;
  2186            ;  function  takes the  user input  of the EC ME # to re turn a val id ien of  file 430
  2187            ;  if an inv alid ECME  is evaluat ed then th e process  keeps aski ng the use r for ECME  #
  2188            ;  until a v alid ECME#  is entere d or until  the user  enters a " ^" or null  value
  2189            ;  output -  returns th e IEN of t he record  entry in t he ACCOUNT  RECEIVABL E file (#4 30) or "?? "
  2190            N  RCECME,RC BILL,DIR,D IRUT,Y
  2191            S  DIR(0)="F O^1:12^I X '?1.12N W  !!,""Canno t contain  alpha char acters"" K  X"
  2192            S  DIR("A")= "Select EC ME#"
  2193   RET      D  ^DIR I $D (DIRUT) Q  0
  2194            S  RCECME=$S (+Y>0:Y,1: 0)
  2195            S  RCBILL=$$ REC^IBRFN( RCECME)     ; IA 2031
  2196            I  RCBILL<0  W !!,"??"  G RET
  2197            E   W !!,$P( $G(^PRCA(4 30,+RCBILL ,0)),"^"), " "
  2198            Q  RCBILL
  2199            ; RCDPBTLM
  2200  
  2201   Modified L ogic (Chan ges are in  bold)
  2202   RCDPBTLM ; WISC/RFJ -  bill tran sactions L ist Manage r top rout ine ;1 Jun  99
  2203    ;;4.5;Acc ounts Rece ivable;**1 14,148,153 ,168,169,1 98,247,271 ,276,307** ;Mar 20, 1 995;Build  71
  2204    ;;Per VHA  Directive  2004-038,  this rout ine should  not be mo dified.
  2205    ;
  2206    ; Referen ce to $$RE C^IBRFN su pported by  DBIA 2031
  2207    ;
  2208    ;  called  from menu  option (1 9)
  2209    ;
  2210    N RCBILLD A,RCDPFXIT
  2211    ;
  2212    F  D  Q:' RCBILLDA
  2213    .   W !!  S RCBILLDA =$$SELBILL
  2214    .   I RCB ILLDA<1 S  RCBILLDA=0  Q
  2215    .   D EN^ VALM("RCDP  TRANSACTI ONS LIST")
  2216    .   ;  fa st exit
  2217    .   I $G( RCDPFXIT)  S RCBILLDA =0
  2218    Q
  2219    ;
  2220    ;
  2221   INIT ;  in itializati on for lis t manager  list
  2222    ;  requir es rcbilld a
  2223    N ADMIN,D ATE,RCLINE ,RCLIST,RC TOTAL,RCTR AN,RCTRAND A
  2224    K ^TMP("R CDPBTLM",$ J),^TMP("V ALM VIDEO" ,$J)
  2225    ;
  2226    ;  fast e xit
  2227    I $G(RCDP FXIT) S VA LMQUIT=1 Q
  2228    ;
  2229    ;  set th e List Man ager line  number
  2230    S RCLINE= 0
  2231    ;  set th e List Man ager trans action num ber
  2232    S RCTRAN= 0
  2233    ;
  2234    ;  get tr ansactions  and balan ce for bil l
  2235    S RCTOTAL =$$GETTRAN S(RCBILLDA )
  2236    ;
  2237    S DATE=""  F  S DATE =$O(RCLIST (DATE)) Q: 'DATE  D
  2238    .   S RCT RANDA="" F   S RCTRAN DA=$O(RCLI ST(DATE,RC TRANDA)) Q :RCTRANDA= ""  D
  2239    .   .   S  RCLINE=RC LINE+1
  2240    .   .   ;
  2241    .   .   ;   create a n index ar ray for tr ansaction  lookup in  list
  2242    .   .   I  RCTRANDA  D
  2243    .   .   .    S RCTRA N=RCTRAN+1
  2244    .   .   .    S ^TMP( "RCDPBTLM" ,$J,"IDX", RCTRAN,RCT RAN)=RCTRA NDA
  2245    .   .   .    D SET^R CDPAPLI(RC TRAN,RCLIN E,1,80,0,I ORVON,IORV OFF)
  2246    .   .   ;
  2247    .   .   D  SET^RCDPA PLI($S(RCT RANDA:RCTR ANDA,1:" " ),RCLINE,4 ,80)
  2248    .   .   D  SET^RCDPA PLI($E(DAT E,4,5)_"/" _$E(DATE,6 ,7)_"/"_$E (DATE,2,3) ,RCLINE,13 ,21)
  2249    .   .   D  SET^RCDPA PLI($TR($P (RCLIST(DA TE,RCTRAND A),"^"),"A BCDEFGHIJK LMNOPQRSTU VWXYZ","ab cdefghijkl mnopqrstuv wxyz"),RCL INE,25,50)
  2250    .   .   D  SET^RCDPA PLI($J($P( RCLIST(DAT E,RCTRANDA ),"^",2),9 ,2),RCLINE ,53,62)
  2251    .   .   D  SET^RCDPA PLI($J($P( RCLIST(DAT E,RCTRANDA ),"^",3),9 ,2),RCLINE ,62,71)
  2252    .   .   ;   add mars hal fee an d court co st to crea te admin d ollars
  2253    .   .   S  ADMIN=$P( RCLIST(DAT E,RCTRANDA ),"^",4)+$ P(RCLIST(D ATE,RCTRAN DA),"^",5) +$P(RCLIST (DATE,RCTR ANDA),"^", 6)
  2254    .   .   D  SET^RCDPA PLI($J(ADM IN,9,2),RC LINE,71,80 )
  2255    ;
  2256    ;  show t otals
  2257    S RCLINE= RCLINE+1
  2258    D SET^RCD PAPLI("                                                         - -------- - ------- -- ------",RC LINE,1,80)
  2259    S RCLINE= RCLINE+1
  2260    D SET^RCD PAPLI("    TOTAL BALA NCE FOR BI LL",RCLINE ,1,80)
  2261    D SET^RCD PAPLI($J($ P(RCTOTAL, "^",1),9,2 ),RCLINE,5 3,62)
  2262    D SET^RCD PAPLI($J($ P(RCTOTAL, "^",2),9,2 ),RCLINE,6 2,71)
  2263    D SET^RCD PAPLI($J($ P(RCTOTAL, "^",3)+$P( RCTOTAL,"^ ",4)+$P(RC TOTAL,"^", 5),9,2),RC LINE,71,80 )
  2264    ;
  2265    ;  compar e totals t o what is  stored in  the file
  2266    N RCDATA7 ,RCFOUT
  2267    S RCDATA7 =$G(^PRCA( 430,RCBILL DA,7))
  2268    ;  for a  write-off  bill, the  balance sh ould equal  all zeros , for
  2269    ;  these  bills, nod e 7 is the  write-off  amount, s o for the  out of
  2270    ;  balanc e check to  work, nod e 7 needs  to be adju sted to al l zeros
  2271    I $P(^PRC A(430,RCBI LLDA,0),"^ ",8)=23 S  RCDATA7="0 ^0^0^0^0"
  2272    I +$P(RCD ATA7,"^",1 )'=+$P(RCT OTAL,"^",1 ) S RCFOUT =1
  2273    I +$P(RCD ATA7,"^",2 )'=+$P(RCT OTAL,"^",2 ) S RCFOUT =1
  2274    I ($P(RCD ATA7,"^",3 )+$P(RCDAT A7,"^",4)+ $P(RCDATA7 ,"^",5))'= +$P(RCTOTA L,"^",3) S  RCFOUT=1
  2275    I $G(RCFO UT) D
  2276    .   S RCL INE=RCLINE +1
  2277    .   D SET ^RCDPAPLI( " ",RCLINE ,1,80)
  2278    .   S RCL INE=RCLINE +1
  2279    .   D SET ^RCDPAPLI( "  STORED  BALANCE FO R BILL (**  INCORRECT  **)",RCLI NE,1,80)
  2280    .   D SET ^RCDPAPLI( $J($P(RCDA TA7,"^",1) ,9,2),RCLI NE,53,62)
  2281    .   D SET ^RCDPAPLI( $J($P(RCDA TA7,"^",2) ,9,2),RCLI NE,62,71)
  2282    .   D SET ^RCDPAPLI( $J($P(RCDA TA7,"^",3) +$P(RCDATA 7,"^",4)+$ P(RCDATA7, "^",5),9,2 ),RCLINE,7 1,80)
  2283    ;
  2284    ;  set va lmcnt to n umber of l ines in th e list
  2285    S VALMCNT =RCLINE
  2286    D HDR
  2287    Q
  2288    ;
  2289    ;
  2290   HDR ;  hea der code f or list ma nager disp lay
  2291    ;  requir es rcbilld a
  2292    N %,DATA, RCDEBTDA,R CDPDATA
  2293    ;
  2294    D DIQ430^ RCDPBPLM(R CBILLDA,". 01;8;")
  2295    ;
  2296    S RCDEBTD A=$P(^PRCA (430,RCBIL LDA,0),"^" ,9)
  2297    S DATA=$$ ACCNTHDR^R CDPAPLM(RC DEBTDA)
  2298    ;
  2299    S %="",$P (%," ",80) =""
  2300    ; PRCA*4. 5*276 - ge t EEOB ind icator for  1st/3rd p arty payme nt and att ach to bil l when app licable
  2301    S PRCOUT= $$COMP3^PR CAAPR(RCBI LLDA)
  2302    I PRCOUT' ="%" S PRC OUT=$$IBEE OBCK^PRCAA PR1(RCBILL DA)
  2303    S VALMHDR (1)=$E("Bi ll #: "_$G (PRCOUT)_$ G(RCDPDATA (430,RCBIL LDA,.01,"E "))_%,1,25 )_"Account : "_$P(DAT A,"^")_$P( DATA,"^",2 )
  2304    S VALMHDR (2)=$E("St atus: "_$G (RCDPDATA( 430,RCBILL DA,8,"E")) _%,1,25)_$ E("   Addr : "_$P(DAT A,"^",4)_" , "_$P(DAT A,"^",7)_" , "_$P(DAT A,"^",8)_"   "_$P(DAT A,"^",9)_% ,1,55)
  2305    ; PRCA*4. 5*276 - sh ow caption  for user
  2306    S VALMSG= "|% EEOB |  Enter ??  for more a ctions |"  ; PRCA*4.5 *276
  2307    Q
  2308    S VALMHDR (3)="  "_I ORVON_$E(" Bill Balan ce: "_$J($ P(RCTOTAL, "^")+$P(RC TOTAL,"^", 2)+$P(RCTO TAL,"^",3) +$P(RCTOTA L,"^",4)+$ P(RCTOTAL, "^",5),0,2 )_%,1,23)_ IORVOFF_"   Phone: "_ $P(DATA,"^ ",10)
  2309    Q
  2310    ;
  2311    ;
  2312   EXIT ;  ex it list ma nager opti on and cle an up
  2313    K ^TMP("R CDPBTLM",$ J),^TMP("R CDPBTLMX", $J)
  2314    Q
  2315    ;
  2316    ;
  2317   SELBILL()  ;  select  a bill
  2318    ;  return s -1 for t imeout or  ^, 0 for n o selectio n, or ien  of bill
  2319    N %,%Y,C, DIC,DTOUT, DUOUT,RCBE FLUP,X,Y
  2320    N DPTNOFZ Y,DPTNOFZK  S (DPTNOF ZY,DPTNOFZ K)=1
  2321    N RCY,DIR ,DIRUT
  2322    ; allow u ser to get  the recor d using bi ll# or ECM E#
  2323    S DIR("A" )="Select  (B)ILL or  (E)CME#: "
  2324    S DIR(0)= "SA^B:BILL  NUMBER;E: ECME#"
  2325    S DIR("B" )="B"
  2326    D ^DIR K  DIR I $D(D IRUT) Q 0
  2327    S RCY=Y
  2328    I RCY="E"  Q $$SELEC ME
  2329    S DIC="^P RCA(430,", DIC(0)="QE AM",DIC("A ")="Select  BILL: "
  2330    S DIC("W" )="D DICW^ RCBEUBI1"
  2331    ;  specia l lookup o n input
  2332    S RCBEFLU P=1
  2333    D ^DIC
  2334    I Y<0,'$G (DUOUT),'$ G(DTOUT) S  Y=0
  2335    Q +Y
  2336    ;
  2337    ;
  2338   GETTRANS(B ILLDA) ;   original a mount goes  first for  bill
  2339    ;  return s list of  transactio ns in
  2340    ;  rclist (date,tran da)=tranty pe ^ princ iple ^ int erest ^ ad min
  2341    ;  return s principl e balance  ^ interest  balance ^  admin bal ance
  2342    ;         ^ marshall  fee balan ce ^ court  cost bala nce
  2343    N %,ADMBA L,AMTDISP, CCBAL,DATA 0,DATA1,DA TA9,DATE,I NTBAL,MFBA L,PRINBAL, RCDPDATA,T RANDA,VALU E
  2344    ;
  2345    D DIQ430^ RCDPBPLM(B ILLDA,"3;6 0;")
  2346    ;
  2347    K RCLIST
  2348    S (ADMBAL ,CCBAL,INT BAL,MFBAL, PRINBAL)=0
  2349    S PRINBAL =RCDPDATA( 430,BILLDA ,3,"I")
  2350    ;  loop t ransaction  and add t o list
  2351    S TRANDA= 0 F  S TRA NDA=$O(^PR CA(433,"C" ,BILLDA,TR ANDA)) Q:' TRANDA  D
  2352    . S DATA1 =$G(^PRCA( 433,TRANDA ,1))
  2353    . S DATE= $P(DATA1," ^",9) I 'D ATE Q
  2354    . ; Don't  include t ransaction s that hav e the INCO MPLETE TRA NSACTION F LAG (#10)  set to YES  and
  2355    . ; this  transactio n was prev iously use d by the a uto-correc t program  to correct  an earlie r issue. P RCA*4.5*30 7
  2356    . S DATA0 =$G(^PRCA( 433,TRANDA ,0))
  2357    . S DATA9 =$G(^PRCA( 433,TRANDA ,9))
  2358    . ; Check  for Incom plete and  previously  fixed by  auto-corre ct
  2359    . I $P(DA TA0,U,10), ($P(DATA9, U,4)) S VA LUE="" Q
  2360    . S VALUE =$$TRANVAL U(TRANDA)  I VALUE=""  Q
  2361    . S RCLIS T($P(DATE, "."),TRAND A)=$P($G(^ PRCA(430.3 ,+$P(DATA1 ,"^",2),0) ),"^")_VAL UE
  2362    . ;
  2363    . ;  calc ulate bill 's balance
  2364    . S PRINB AL=PRINBAL +$P(VALUE, "^",2)
  2365    . S INTBA L=INTBAL+$ P(VALUE,"^ ",3)
  2366    . S ADMBA L=ADMBAL+$ P(VALUE,"^ ",4)
  2367    . S MFBAL =MFBAL+$P( VALUE,"^", 5)
  2368    . S CCBAL =CCBAL+$P( VALUE,"^", 6)
  2369    ;
  2370    S DATE=$G (RCDPDATA( 430,BILLDA ,60,"I"))
  2371    ;  check  to make su re activat ion date i s not grea ter than f irst trans action
  2372    S %=$O(RC LIST(0)) I  DATE>% S  DATE=%
  2373    S RCLIST( +$P(DATE," ."),0)="or iginal amo unt^"_RCDP DATA(430,B ILLDA,3,"I ")
  2374    ;
  2375    Q PRINBAL _"^"_INTBA L_"^"_ADMB AL_"^"_MFB AL_"^"_CCB AL
  2376    ;
  2377    ;
  2378   TRANVALU(T RANDA) ;   return the  transacti on value a s displaye d (with +  or - sign)
  2379    N TYPE,VA LUE
  2380    S VALUE=$ $TRANBAL^R CRJRCOT(TR ANDA)
  2381    ;  no dol lars on tr ansaction
  2382    I '$P(VAL UE,"^"),'$ P(VALUE,"^ ",2),'$P(V ALUE,"^",3 ),'$P(VALU E,"^",4),' $P(VALUE," ^",5) Q ""
  2383    ;  check  type for p ayments, e tc, make v alues (-)  to subtrac t
  2384    S TYPE=$P ($G(^PRCA( 433,TRANDA ,1)),"^",2 )
  2385    I TYPE=2! (TYPE=8)!( TYPE=9)!(T YPE=10)!(T YPE=11)!(T YPE=14)!(T YPE=29)!(T YPE=34)!(T YPE=35)!(T YPE=41) D
  2386    .   S $P( VALUE,"^", 1)=-$P(VAL UE,"^",1)
  2387    .   S $P( VALUE,"^", 2)=-$P(VAL UE,"^",2)
  2388    .   S $P( VALUE,"^", 3)=-$P(VAL UE,"^",3)
  2389    .   S $P( VALUE,"^", 4)=-$P(VAL UE,"^",4)
  2390    .   S $P( VALUE,"^", 5)=-$P(VAL UE,"^",5)
  2391    ;
  2392    ;  the fo llowing tr ansaction  types shou ld not cha nge the bi lls balanc e
  2393    ;  return  the amoun t displaye d in the d escription  and 0 for  value
  2394    ;    refe r to RC 3,  refer to  DOJ 4, ree stablish 5 , returned  6 and 32
  2395    ;    repa yment plan  25, amend ed 33, sus pended 47,  unsuspend ed 46
  2396    K AMTDISP
  2397    I TYPE=3! (TYPE=4)!( TYPE=5)!(T YPE=6)!(TY PE=25)!(TY PE=32)!(TY PE=33)!(TY PE=46)!(TY PE=47) D
  2398    .   S AMT DISP=" ($" _$J($P(VAL UE,"^")+$P (VALUE,"^" ,2)+$P(VAL UE,"^",3)+ $P(VALUE," ^",4)+$P(V ALUE,"^",5 ),0,2)_")"
  2399    .   S VAL UE=""
  2400    Q $G(AMTD ISP)_"^"_V ALUE
  2401    ;
  2402   SELECME()  ;
  2403    ; functio n takes th e user inp ut of the  ECME # to  return a v alid ien o f file 430
  2404    ; if an i nvalid ECM E is evalu ated then  the proces s keeps as king the u ser for EC ME #
  2405    ; until a  valid ECM E# is ente red or unt il the use r enters a  "^" or nu ll value
  2406    ; output  - returns  the IEN of  the recor d entry in  the ACCOU NT RECEIVA BLE file ( #430) or " ??"
  2407    N RCECME, RCBILL,DIR ,DIRUT,Y
  2408    S DIR(0)= "FO^1:12^I  X'?1.12N  W !!,""Can not contai n alpha ch aracters""  K X"
  2409    S DIR("A" )="Select  ECME#"
  2410   RET D ^DIR  I $D(DIRU T) Q 0
  2411    S RCECME= $S(+Y>0:Y, 1:0)
  2412    S RCBILL= $$REC^IBRF N(RCECME)     ; IA 20 31
  2413    I RCBILL< 0 W !!,"?? " G RET
  2414    E  W !!,$ P($G(^PRCA (430,+RCBI LL,0)),"^" )," "
  2415    Q RCBILL
  2416    ;RCDPBTLM
  2417  
  2418   Table 20:  Routines:  RCWROFF
  2419   Routines
  2420   Activities
  2421   Routine Na me
  2422   RCWROFF
  2423   Enhancemen t Category
  2424    New
  2425    Modify
  2426    Delete
  2427    No Change
  2428   RTM
  2429   US006
  2430   Related Op tions
  2431   Compromise d by RC/DO J, Termina ted by RC/ DOJ, Waive d by RC/DO J, Suspend  an AR bil l, Comprom ise Termin ation, Fis cal Office r Terminat ed, Full W aiver, Par tial Waive r
  2432  
  2433   Related Ro utines
  2434   Routines “ Called By”
  2435   Routines “ Called”   
  2436  
  2437  
  2438   $$GETABILL ^RCBEUBIL,  SHOWBILL^ RCWROFF1,  $$ADD433^R CBEUTRA, $ $EDIT433^R CBEUTRA, S ETRCDOJ^RC BEUBIL, CH GSTAT^RCBE UBIL, PROC ESS^RCBEUT RA,
  2439   $$ACCK^PRC AACC,
  2440   $$LDATE^RC RJ, $$FPS^ RCAMFN0,
  2441   $$BUILDWR^ RCXFMSW1, 
  2442  
  2443   Routines
  2444   Activities
  2445   Data Dicti onary (DD)  Reference s
  2446   N/A
  2447   Related Pr otocols
  2448   N/A
  2449   Related In tegration  Control Re gistration s (ICRs)
  2450   N/A
  2451   Data Passi ng
  2452    Input
  2453    Output Re ference
  2454    Both
  2455    Global Re ference
  2456    Local
  2457   Input Attr ibute Name  and Defin ition
  2458   Name: N/A
  2459   Definition :
  2460   Output Att ribute Nam e and Defi nition
  2461   Name: N/A
  2462   Definition :
  2463  
  2464   Current Lo gic
  2465   RCWROFF  ; WISC/RFJ-w rite off,  terminated  ;1 Feb 20 00
  2466            ; ;4.5;Accou nts Receiv able;**168 ,204,309** ;Mar 20, 1 995;Build  3
  2467            ; ;Per VA Di rective 64 02, this r outine sho uld not be  modified.
  2468            Q
  2469            ;
  2470            ;
  2471   8        ;   terminat ed by fisc al officer  (trantype =8) (menu  option)
  2472            N  RCDRSTRG
  2473            S  RCDRSTRG= "11TERMINA TION DATE; "
  2474            S  RCDRSTRG= RCDRSTRG_" 17;"  ;ter mination r eason
  2475            D  MAIN("8^F iscal Offi cer Termin ation",RCD RSTRG)
  2476            Q
  2477            ;
  2478            ;
  2479   9        ;   terminat ed by comp romise (tr antype=9)  (menu opti on)
  2480            N  RCDRSTRG
  2481            S  RCDRSTRG= "11TERMINA TION DATE; "
  2482            S  RCDRSTRG= RCDRSTRG_" 17;"  ;ter mination r eason
  2483            D  MAIN("9^C ompromise  Terminatio n",RCDRSTR G)
  2484            Q
  2485            ;
  2486            ;
  2487   A9       ;   compromi sed by rc/ doj (use t rantype=9)  (menu opt ion)
  2488            N  RCDRSTRG
  2489            S  RCDRSTRG= "11TERMINA TION DATE; "
  2490            S  RCDRSTRG= RCDRSTRG_" 17;"  ;ter mination r eason
  2491            D  MAIN("9^C ompromise  Terminatio n by RC/DO J",RCDRSTR G)
  2492            Q
  2493            ;
  2494            ;
  2495   10       ;   waived i n full tra nsaction ( trantype=1 0) (menu o ption)
  2496            D  MAIN("10^ Waiver","1 1WAIVED DA TE;")
  2497            Q
  2498            ;
  2499            ;
  2500   A10      ;   waived b y rc/doj ( use tranty pe=10) (me nu option)
  2501            D  MAIN("10^ RC/DOJ Wai ver","11WA IVED DATE; ")
  2502            Q
  2503            ;
  2504            ;
  2505   29       ;   terminat ed by rc/d oj (tranty pe=29) (me nu option)
  2506            N  RCDRSTRG
  2507            S  RCDRSTRG= "11TERMINA TION DATE; "
  2508            S  RCDRSTRG= RCDRSTRG_" 17;"  ;ter mination r eason
  2509            D  MAIN("29^ RC/DOJ Ter mination", RCDRSTRG)
  2510            Q
  2511            ;
  2512            ;
  2513   47       ;   suspende d (trantyp e=47) (men u option)
  2514            N  RCDRSTRG
  2515            S  RCDRSTRG= "11SUSPEND ED DATE;"
  2516            S  RCDRSTRG= RCDRSTRG_" 90R;"  ;su spension t ype
  2517            S  RCDRSTRG= RCDRSTRG_" S RCX=$$SU STP^RCWROF F(X);"
  2518            S  RCDRSTRG= RCDRSTRG_" 5.02////^S  X=RCX;"   ;brief com ment
  2519            S  RCDRSTRG= RCDRSTRG_" K RCX;"
  2520            D  MAIN("47^ Suspension ",RCDRSTRG )
  2521            Q
  2522            ;
  2523   SUSTP(X) ;  suspensio n types fo r brief co mment in * 309
  2524            ;  input-cod e between  0 to 11
  2525            ;  output-te xt
  2526            N  IBX
  2527            S  IBX=$P($T (SUSTX+X), ";;",2)
  2528            Q  IBX
  2529            ;
  2530   SUSTX    ; ;NOT CO-PA Y SUSPENSI ON
  2531            ; ;INITIAL C O-PAY WAIV ER
  2532            ; ;APPEAL CO -PAY WAIVE R
  2533            ; ;ADMINISTR ATIVE SUSP ENSION
  2534            ; ;COMPROMIS E
  2535            ; ;TERMINATI ON
  2536            ; ;BANKRUPTC Y CHAP 7
  2537            ; ;BANKRUPTC Y CHAP 13
  2538            ; ;BANKRUPTC Y OTHER
  2539            ; ;PROBATE
  2540            ; ;CHOICE
  2541            ; ;DISPUTE
  2542            ;
  2543            ;
  2544   MAIN(RCTRT YPE,RCDRST RG) ;  mai n subrouti ne to proc ess a waiv er, termin ation, sus
  2545   pended tra nsaction
  2546            ;   rctrtype  = transac tion type^ descriptio n, example  10^waiver
  2547            ;   rcdrstrg  = dr stri ng used wh en calling  die
  2548            N  BALANCE,D R,RCBILLDA ,RCTRANDA, Y
  2549            F   D  Q:RCB ILLDA<1
  2550            .   K RCTRAN DA  ;do no t leave ar ound in fo r loop
  2551            .   ;  selec t a bill
  2552            .   S RCBILL DA=$$GETAB ILL^RCBEUB IL I RCBIL LDA<1 Q
  2553            .   ;  check  to see if  bill has  been refer red to rc/ doj (6;4 =  referral
  2554    date)
  2555            .   I $P(RCT RTYPE,"^", 2)["RC/DOJ ",$P($G(^P RCA(430,RC BILLDA,6)) ,"^",4)="
  2556   " W !,"THI S ACCOUNT  IS NOT REF ERRED TO R C/DOJ." Q
  2557            .   ;  lock  the bill
  2558            .   L +^PRCA (430,RCBIL LDA):5 I ' $T W !,"AN OTHER USER  IS CURREN TLY WORKI
  2559   NG WITH TH IS BILL."  Q
  2560            .   D SHOWBI LL^RCWROFF 1(RCBILLDA )
  2561            .   I '$G(^P RCA(430,RC BILLDA,7))  W !,"THIS  BILL HAS  NO PRINCIP AL BALANC
  2562   E." D UNLO CK Q
  2563            .   ;  ask t o enter tr ansaction
  2564            .   S Y=$$AS KOK($P(RCT RTYPE,"^", 2)) I Y'=1  D UNLOCK  S:Y<0 RCBI LLDA=0 Q
  2565            .   ;  add a  new trans action to  file 433
  2566            .   S RCTRAN DA=$$ADD43 3^RCBEUTRA (RCBILLDA, $P(RCTRTYP E,"^")) I  'RCTRANDA
  2567    W !,$P(RC TRANDA,"^" ,2) D UNLO CK Q
  2568            .   W !,"  T ransaction  number ", RCTRANDA,"  added ... "
  2569            .   ;
  2570            .   ;  set u p dr strin g for die  call
  2571            .   S DR=RCD RSTRG_"41; "  ;commen t
  2572            .   ;  bill  amount mov ed to tran saction am ount
  2573            .   S BALANC E=$P($G(^P RCA(430,RC BILLDA,7)) ,"^",1,5)
  2574            .   S DR=DR_ "15////"_( $P(BALANCE ,"^")+$P(B ALANCE,"^" ,2)+$P(BAL ANCE,"^",
  2575   3)+$P(BALA NCE,"^",4) +$P(BALANC E,"^",5))_ ";"
  2576            .   I $P(BAL ANCE,"^",1 ) S DR=DR_ "81////"_+ $P(BALANCE ,"^",1)_"; "   ;prin
  2577   cipal
  2578            .   I $P(BAL ANCE,"^",2 ) S DR=DR_ "82////"_+ $P(BALANCE ,"^",2)_"; "   ;inte
  2579   rest
  2580            .   I $P(BAL ANCE,"^",3 ) S DR=DR_ "83////"_+ $P(BALANCE ,"^",3)_"; "   ;admi
  2581   n
  2582            .   I $P(BAL ANCE,"^",4 ) S DR=DR_ "84////"_+ $P(BALANCE ,"^",4)_"; "   ;mars
  2583   hal fee
  2584            .   I $P(BAL ANCE,"^",5 ) S DR=DR_ "85////"_+ $P(BALANCE ,"^",5)_"; "   ;cour
  2585   t cost
  2586            .   ;
  2587            .   ;  edit  the fields
  2588            .   S Y=$$ED IT433^RCBE UTRA(RCTRA NDA,DR)
  2589            .   I 'Y W ! ,$P(Y,"^", 2) D DEL43 3^RCBEUTRA (RCTRANDA, "",0),UNLO CK Q
  2590            .   ;  set t he bill an d transact ion as RC/ DOJ
  2591            .   I $P(RCT RTYPE,"^", 2)["RC/DOJ " D SETRCD OJ^RCBEUBI L(RCBILLDA ,RCTRANDA
  2592   ,"RC")
  2593            .   ;  chang e the stat us of the  bill
  2594            .   I $P(RCT RTYPE,"^") '=47 D CHG STAT^RCBEU BIL(RCBILL DA,23)  ;w rite off
  2595            .   I $P(RCT RTYPE,"^") =47 D CHGS TAT^RCBEUB IL(RCBILLD A,40)   ;s uspended
  2596            .   ;  mark  transactio n as proce ssed
  2597            .   D PROCES S^RCBEUTRA (RCTRANDA)
  2598            .   ;
  2599            .   ;  creat e fms writ e off docu ment, if n ot accrued  and not s uspended 
  2600   (47) trans action
  2601            .   I '$$ACC K^PRCAACC( RCBILLDA), $P($G(^PRC A(433,RCTR ANDA,1))," ^",2)'=47
  2602    D FMSDOC( RCTRANDA)
  2603            .   ;
  2604            .   W !,"  *  * * * * " ,$P(RCTRTY PE,"^",2), " has been  PROCESSED ! * * * *
  2605    *"
  2606            . I '$G(REFM S)&(DT>$$L DATE^RCRJR (DT)) S Y= $E($$FPS^R CAMFN01(DT ,1),1,5)_"
  2607   01" D DD^% DT W !!,"    * * * *  Transmissi on will be  held unti l "_Y_" *  * * *"
  2608            .   D UNLOCK
  2609            Q
  2610            ;
  2611            ;
  2612   FMSDOC(RCT RANDA) ;   create fms  write off  document
  2613            N  Y
  2614            W  !!,"Creat ing FMS Wr ite-off do cument ...  "
  2615            S  Y=$$BUILD WR^RCXFMSW 1(RCTRANDA )
  2616            I  Y W $P(Y, "^",2)," c reated."
  2617            E   W "ERROR : ",$P(Y," ^",2)
  2618            Q
  2619            ;
  2620            ;
  2621   UNLOCK   ;   unlock b ill and tr ansaction
  2622            L  -^PRCA(43 0,RCBILLDA )
  2623            I  $G(RCTRAN DA) L -^PR CA(433,RCT RANDA)
  2624            Q
  2625            ;
  2626            ;
  2627   ASKOK(TRAN TYPE) ;  a sk record  transactio n
  2628            N  DIR,DIQ2, DIRUT,DTOU T,DUOUT,X, Y
  2629            S  DIR(0)="Y O",DIR("B" )="NO"
  2630            S  DIR("A")= "  Are you  sure you  want to re cord this  bill as a  "
  2631            I  $L(TRANTY PE)<20 S D IR("A")=DI R("A")_TRA NTYPE
  2632            E   S DIR("A ",1)=DIR(" A"),DIR("A ")="  "_TR ANTYPE
  2633            W  ! D ^DIR
  2634            I  $G(DTOUT) !($G(DUOUT )) S Y=-1
  2635            Q  Y
  2636  
  2637   Modified L ogic (Chan ges are in  bold)
  2638   RCWROFF ;W ISC/RFJ-wr ite off, t erminated  ;1 Feb 200 0 ;;4.5;Ac counts Rec eivable;** 168,204,30 9,307**;Ma r 20, 1995 ;Build 55  ;;Per VA D irective 6 402, this  routine sh ould not b e modified . Q ; ;8 ;  terminate d by fisca l officer  (trantype= 8) (menu o ption) N R CDRSTRG S  RCDRSTRG=" 11TERMINAT ION DATE;"  S RCDRSTR G=RCDRSTRG _"17;"  ;t ermination  reason D  MAIN("8^Fi scal Offic er Termina tion",RCDR STRG) Q ;  ;9 ; termi nated by c ompromise  (trantype= 9) (menu o ption) N R CDRSTRG S  RCDRSTRG=" 11TERMINAT ION DATE;"  S RCDRSTR G=RCDRSTRG _"17;"  ;t ermination  reason D  MAIN("9^Co mpromise T ermination ",RCDRSTRG ) Q ; ;A9  ; compromi sed by rc/ doj (use t rantype=9)  (menu opt ion) N RCD RSTRG S RC DRSTRG="11 TERMINATIO N DATE;" S  RCDRSTRG= RCDRSTRG_" 17;"  ;ter mination r eason D MA IN("9^Comp romise Ter mination b y RC/DOJ", RCDRSTRG)  Q ; ;10 ;  waived in  full trans action (tr antype=10)  (menu opt ion) D MAI N("10^Waiv er","11WAI VED DATE;" ) Q ; ;A10  ; waived  by rc/doj  (use trant ype=10) (m enu option ) D MAIN(" 10^RC/DOJ  Waiver","1 1WAIVED DA TE;") Q ;  ;29 ; term inated by  rc/doj (tr antype=29)  (menu opt ion) N RCD RSTRG S RC DRSTRG="11 TERMINATIO N DATE;" S  RCDRSTRG= RCDRSTRG_" 17;"  ;ter mination r eason D MA IN("29^RC/ DOJ Termin ation",RCD RSTRG) Q ;  ;47 ; sus pended (tr antype=47)  (menu opt ion) N RCD RSTRG S RC DRSTRG="11 SUSPENDED  DATE;" S R CDRSTRG=RC DRSTRG_"90 R;"  ;susp ension typ e S RCDRST RG=RCDRSTR G_"S RCX=$ $SUSTP^RCW ROFF(X);"  S RCDRSTRG =RCDRSTRG_ "5.02////^ S X=RCX;"   ;brief co mment S RC DRSTRG=RCD RSTRG_"K R CX;" D MAI N("47^Susp ension",RC DRSTRG) Q  ;SUSTP(X)  ; suspensi on types f or brief c omment in  *309 ; inp ut-code be tween 0 to  11 ; outp ut-text N  IBX S IBX= $P($T(SUST X+X),";;", 2) Q IBX ; SUSTX ;;NO T CO-PAY S USPENSION  ;;INITIAL  CO-PAY WAI VER ;;APPE AL CO-PAY  WAIVER ;;A DMINISTRAT IVE SUSPEN SION ;;COM PROMISE ;; TERMINATIO N ;;BANKRU PTCY CHAP  7 ;;BANKRU PTCY CHAP  13 ;;BANKR UPTCY OTHE R ;;PROBAT E ;;CHOICE  ;;DISPUTE  ; ;MAIN(R CTRTYPE,RC DRSTRG) ;  main subro utine to p rocess a w aiver, ter mination,  suspended  transactio n ; rctrty pe = trans action typ e^descript ion, examp le 10^waiv er ; rcdrs trg = dr s tring used  when call ing die N  BALANCE,DR ,RCBILLDA, RCTRANDA,Y  F  D  Q:R CBILLDA<1  . K RCTRAN DA  ;do no t leave ar ound in fo r loop . ;  select a  bill . S R CBILLDA=$$ GETABILL^R CBEUBIL I  RCBILLDA<1  Q . ; che ck to see  if bill ha s been ref erred to r c/doj (6;4  = referra l date) .  I $P(RCTRT YPE,"^",2) ["RC/DOJ", $P($G(^PRC A(430,RCBI LLDA,6))," ^",4)="" W  !,"THIS A CCOUNT IS  NOT REFERR ED TO RC/D OJ." Q . ;  lock the  bill . L + ^PRCA(430, RCBILLDA): 5 I '$T W  !,"ANOTHER  USER IS C URRENTLY W ORKING WIT H THIS BIL L." Q . D  SHOWBILL^R CWROFF1(RC BILLDA) .  I '$G(^PRC A(430,RCBI LLDA,7)) W  !,"THIS B ILL HAS NO  PRINCIPAL  BALANCE."  D UNLOCK  Q . ; ask  to enter t ransaction  . S Y=$$A SKOK($P(RC TRTYPE,"^" ,2)) I Y'= 1 D UNLOCK  S:Y<0 RCB ILLDA=0 Q  . ; add a  new transa ction to f ile 433 .  S RCTRANDA =$$ADD433^ RCBEUTRA(R CBILLDA,$P (RCTRTYPE, "^")) I 'R CTRANDA W  !,$P(RCTRA NDA,"^",2)  D UNLOCK  Q . W !,"  Transactio n number " ,RCTRANDA, " added .. ." . ; . ;  set up dr  string fo r die call  PRCA*4.5* 307 - Move  comment b elow balan ce sets .  S DR=RCDRS TRG   ;_"4 1;" ;comme nt . ; bil l amount m oved to tr ansaction  amount . S  BALANCE=$ P($G(^PRCA (430,RCBIL LDA,7)),"^ ",1,5) . S  DR=DR_"15 ////"_($P( BALANCE,"^ ")+$P(BALA NCE,"^",2) +$P(BALANC E,"^",3)+$ P(BALANCE, "^",4)+$P( BALANCE,"^ ",5))_";"  . I $P(BAL ANCE,"^",1 ) S DR=DR_ "81////"_+ $P(BALANCE ,"^",1)_"; "   ;princ ipal . I $ P(BALANCE, "^",2) S D R=DR_"82// //"_+$P(BA LANCE,"^", 2)_";"   ; interest .  I $P(BALA NCE,"^",3)  S DR=DR_" 83////"_+$ P(BALANCE, "^",3)_";"    ;admin  . I $P(BAL ANCE,"^",4 ) S DR=DR_ "84////"_+ $P(BALANCE ,"^",4)_"; "   ;marsh al fee . I  $P(BALANC E,"^",5) S  DR=DR_"85 ////"_+$P( BALANCE,"^ ",5)_";"    ;court co st . ; . ;  PRCA*4.5* 307 - Comm ent save i s moved be low balanc e sets . S  DR=DR_"41 ;" . ; edi t the fiel ds . S Y=$ $EDIT433^R CBEUTRA(RC TRANDA,DR)  . I 'Y W  !,$P(Y,"^" ,2) D DEL4 33^RCBEUTR A(RCTRANDA ,"",0),UNL OCK Q . ;  set the bi ll and tra nsaction a s RC/DOJ .  I $P(RCTR TYPE,"^",2 )["RC/DOJ"  D SETRCDO J^RCBEUBIL (RCBILLDA, RCTRANDA," RC") . ; c hange the  status of  the bill .  I $P(RCTR TYPE,"^")' =47 D CHGS TAT^RCBEUB IL(RCBILLD A,23) ;wri te off . I  $P(RCTRTY PE,"^")=47  D CHGSTAT ^RCBEUBIL( RCBILLDA,4 0) ;suspen ded . ; ma rk transac tion as pr ocessed .  D PROCESS^ RCBEUTRA(R CTRANDA) .  ; . ; cre ate fms wr ite off do cument, if  not accru ed and not  suspended  (47) tran saction .  I '$$ACCK^ PRCAACC(RC BILLDA),$P ($G(^PRCA( 433,RCTRAN DA,1)),"^" ,2)'=47 D  FMSDOC(RCT RANDA) . ;  . W !," *  * * * * " ,$P(RCTRTY PE,"^",2), " has been  PROCESSED ! * * * *  *" . I '$G (REFMS)&(D T>$$LDATE^ RCRJR(DT))  S Y=$E($$ FPS^RCAMFN 01(DT,1),1 ,5)_"01" D  DD^%DT W  !!," * * *  * Transmi ssion will  be held u ntil "_Y_"  * * * *"  . D UNLOCK  Q ; ;FMSD OC(RCTRAND A) ; creat e fms writ e off docu ment N Y W  !!,"Creat ing FMS Wr ite-off do cument ...  " S Y=$$B UILDWR^RCX FMSW1(RCTR ANDA) I Y  W $P(Y,"^" ,2)," crea ted." E  W  "ERROR: " ,$P(Y,"^", 2) Q ; ;UN LOCK ; unl ock bill a nd transac tion L -^P RCA(430,RC BILLDA) I  $G(RCTRAND A) L -^PRC A(433,RCTR ANDA) Q ;  ;ASKOK(TRA NTYPE) ; a sk record  transactio n N DIR,DI Q2,DIRUT,D TOUT,DUOUT ,X,Y S DIR (0)="YO",D IR("B")="N O" S DIR(" A")=" Are  you sure y ou want to  record th is bill as  a " I $L( TRANTYPE)< 20 S DIR(" A")=DIR("A ")_TRANTYP E E  S DIR ("A",1)=DI R("A"),DIR ("A")=" "_ TRANTYPE W  ! D ^DIR  I $G(DTOUT )!($G(DUOU T)) S Y=-1  Q Y
  2639   Templates
  2640   Table 21:  Templates
  2641   Templates
  2642   Descriptio n
  2643   Template N ame
  2644   PRCA RE-ES TABLISH WR ITE-OFF
  2645   Enhancemen t Category
  2646    New
  2647    Modify
  2648    Delete
  2649    No Change
  2650   RSD
  2651  
  2652   Template T ype
  2653    Sort
  2654    Input
  2655    Print
  2656    Other
  2657   Related Op tions
  2658   PRCAC TR R E-ESTABLIS H BILL
  2659  
  2660   Related Ro utines
  2661   Routines “ Called By”
  2662   Routines “ Called”   
  2663  
  2664   PRCAWREA
  2665  
  2666  
  2667   Routines
  2668   Descriptio n
  2669   Data Dicti onary (DD)  Reference s
  2670   N/A
  2671   Global Ref erences
  2672   N/A
  2673   Bulletins
  2674   Table 22:  Bulletins
  2675   Bulletins
  2676   Descriptio n
  2677   Bulletin N ame
  2678  
  2679   Enhancemen t Category
  2680    New
  2681    Modify
  2682    Delete
  2683    No Change
  2684   RTM
  2685  
  2686  
  2687   Related Ro utines
  2688   Routines “ Called By”
  2689   Routines “ Called”   
  2690  
  2691  
  2692  
  2693  
  2694   Routines
  2695   Descriptio n
  2696   Mail Subje ct
  2697  
  2698   Mail Group
  2699  
  2700   Parameters
  2701  
  2702   Data Dicti onary (DD)  Reference s
  2703  
  2704   Data Entri es Affecte d by the D esign
  2705   There are  3 new audi t related  fields tha t are bein g created  for Patien t Statemen t Enhancem ents (PSE)  Discrepan cies (Incr ement 1, P hase 1). T hese field s will onl y be popul ated for b ad transac tions that  have been  corrected  by the au to-correct ion proces s. The max imum numbe r of bytes  for all f our fields  will be 1 8 bytes. T he overall  affect on  the syste m will be  minute com pared to t he existin g data and  the curre nt daily w orkload of  transacti ons that w ill not ha ve these f ields set.  In additi on the oth er updates  for this  patch fix  all of the  issues th at resulte d in bad t ransaction s, so ther e shouldn’ t be any f uture bad  transactio ns.
  2706   Table 23:  Data Entri es Affecte d by the D esign
  2707   Field Name
  2708   Current Va lue
  2709   New Value
  2710   AUTO-CORRE CTION DATE  field (#9 4)
  2711   N/A
  2712   7 byte Fil eMan date  i.e. 31610 20
  2713   AUTO-CORRE CTION TRAN S. AMOUNT  field (#95 )
  2714   N/A
  2715   Dollar amo unt betwee n -999999  and 999999 , 2 decima l digits.   8 bytes m ax
  2716   AUTO-CORRE CTION TYPE  OF ERROR  field (#96 )
  2717   N/A
  2718   1 byte err or code
  2719   AUTO-CORRE CTION TICK ET FLAG (# 97)
  2720   N/A
  2721   1 byte Y/N  Flag
  2722   Unique Rec ord(s) 
  2723   Table 24:  Unique Rec ord ID
  2724   Field Name (s)
  2725   Current Va lue
  2726   New Value
  2727  
  2728  
  2729  
  2730   File or Gl obal Size  Changes
  2731   There are  3 new audi t related  fields tha t are bein g created  for Patien t Statemen t Enhancem ents (PSE)  Discrepan cies (Incr ement 1, P hase 1). T hese field s will onl y be popul ated for b ad transac tions that  have been  corrected  by the au to-correct ion proces s. The max imum numbe r of bytes  for all f our fields  will be 1 8 bytes. T he overall  affect on  the syste m will be  minute com pared to t he existin g data and  the curre nt daily w orkload of  transacti ons that w ill not ha ve these f ields set.  In additi on the oth er updates  for this  patch fix  all of the  issues th at resulte d in bad t ransaction s, so ther e shouldn’ t be any f uture bad  transactio ns.
  2732   Table 25:  File or Gl obal Size  Changes
  2733   File/Globa l Name(s)
  2734   Estimated  Increase
  2735   Estimated  Decrease
  2736   AR TRANSAC TION file  (#433)
  2737   AUTO-CORRE CTION DATE  field (#9 4)
  2738   7 byte Fil eMan date  i.e. 31610 20
  2739  
  2740   AR TRANSAC TION file  (#433)
  2741   AUTO-CORRE CTION TRAN S. AMOUNT  field (#95 )
  2742   Dollar amo unt betwee n -999999  and 999999 , 2 decima l digits.   9 bytes m ax 
  2743  
  2744   AR TRANSAC TION file  (#433)
  2745   AUTO-CORRE CTION TYPE  OF ERROR  field (#96 )
  2746   1 byte err or code
  2747  
  2748   AR TRANSAC TION file  (#433)
  2749   AUTO-CORRE CTION TICK ET FLAG (# 97)
  2750   1 byte Y/N  Flag
  2751  
  2752   Mail Group s
  2753   Table 26:  Mail Group s
  2754   Mail Group s
  2755   Activities
  2756   Mail Group  Name
  2757   PRCACPS
  2758   Enhancemen t Category
  2759    New
  2760    Modify
  2761    Delete
  2762    No Change
  2763   Related Op tions
  2764  
  2765  
  2766   Related Ro utines
  2767   Routines “ Called By”
  2768   Routines “ Called”   
  2769  
  2770   PRCACPS, P RCAACR, PR CAACR1
  2771  
  2772  
  2773   Mail Group s
  2774   Instructio ns
  2775   Data Dicti onary (DD)  Reference s
  2776   N/A
  2777   Related Pr otocols
  2778   N/A
  2779   Mail Group  Descripti on
  2780   This mail  group will  receive a  notificat ions under  the follo wing 3 cir cumstances :
  2781   The Patien t Statemen t Auto-Cor rection Pr ogram whet her run ma nually or  through a  scheduled  TaskMan jo b has run  to complet ion.
  2782   The Patien t Statemen t Auto-Cor rection Pr ogram whet her run ma nually or  through a  scheduled  TaskMan jo b determin es that th e Patient  Statement  Auto-Corre ction Prog ram is sti ll running  or that i t may have  errored o ut during  a previous  run.
  2783   The Auto-C orrect Pat ient Discr epancy Rep ort is run  and it de termines t hat the Pa tient Stat ement Auto -Correctio n program  is still r unning or  that it ma y have err ored out d uring a pr evious run  and the u ser elects  to run th e report a nyway.
  2784   Self-Enrol lment Allo wed
  2785    Yes
  2786    No
  2787   Type
  2788    Public
  2789   Private
  2790   Security K eys
  2791   Table 27:  Security K eys
  2792   Security K eys
  2793   Activities
  2794   Security K ey Name
  2795   PRCA AUTOC RCT PGM
  2796   Enhancemen t Category
  2797    New
  2798    Modify
  2799    Delete
  2800    No Change
  2801   Related Op tions
  2802   Patient St atement Au to-Correct ion Progra m
  2803  
  2804   Related Ro utines
  2805   Routines “ Called By”
  2806   Routines “ Called”   
  2807  
  2808   PRCACPS
  2809  
  2810  
  2811   Security K eys
  2812   Activities
  2813   Data Passi ng
  2814    Input
  2815    Output
  2816    Both
  2817    Global Re ference
  2818    Local Ref erence
  2819   Security K ey Descrip tion
  2820   This is a  key for th e AR optio n 'PRCA AU TOCRCT PGM '. The 'PR CA AUTOCRC T PGM' opt ion runs t he Patient  Statement  Auto-Corr ection Pro gram.
  2821   Subordinat e Keys
  2822   N/A
  2823   Mutually E xclusive K eys
  2824   N/A
  2825   Granting C ondition L ogic
  2826   The PRCACP S mail gro up coordin ator is en tered by O I&T during  the insta llation of  the patch . OI&T wil l work wit h the PRCA CPS mail g roup coord inator to  assign the  PRCA AUTO CRCT PGM s ecurity ke y to the l ocal Accou nt Receiva ble staff  who need t he ability  to run th e Patient  Statement  Auto-Corre ction Prog ram.
  2827  
  2828   Current Lo gic
  2829   N/A
  2830  
  2831   Modified L ogic (Chan ges are in  bold)
  2832   N/A
  2833  
  2834   Security K eys
  2835   Activities
  2836   Hierarchic al Precede nce
  2837   N/A
  2838   Options
  2839   The PRCA A CCOUNT MAN AGEMENT me nu option  will be up dated to i nclude two  new ITEMS : PRCA AUT OCRCT PGM  - DISPLAY  ORDER: 4 a nd ITEM: P RCA AUTOCR CT RPT - D ISPLAY ORD ER: 3
  2840   Table 28:  Option PRC A ACCOUNT  MANAGEMENT
  2841   Options
  2842   Activities
  2843   Option Nam e
  2844   PRCA ACCOU NT MANAGEM ENT
  2845   Enhancemen t Category
  2846    New
  2847    Modify
  2848    Delete
  2849    No Change
  2850   Associated  Menu Opti ons that w ill invoke  this refe rence
  2851   XUCORE
  2852      => PRCA  MANAGER M ENU
  2853         => P RCA CLERK  MENU
  2854            = > PRCA ACC OUNT MANAG EMENT
  2855   Data Passi ng
  2856    Input
  2857    Output
  2858    Both
  2859    Global Re ference
  2860    Local Ref erence
  2861   Menu Text  Descriptio n
  2862   Account Ma nagement
  2863   Option Typ e
  2864    Edit
  2865    Print
  2866    Menu
  2867    Inquire
  2868  
  2869    Action
  2870    Run Routi ne
  2871    Other
  2872  
  2873   Associated  Routine
  2874   N/A
  2875   Option Def inition
  2876   This optio n allows t he user to  enter or  log inform ation spec ific to a  debtor acc ount, such  as, addre ss informa tion and c omments.
  2877  
  2878   Current En try Action  Logic
  2879   N/A
  2880  
  2881   Modified E ntry Actio n Logic (C hanges are  in bold)
  2882   N/A
  2883  
  2884   Current Ex it Action  Logic
  2885   N/A
  2886  
  2887   Modified E xit Action  Logic (Ch anges are  in bold)
  2888   N/A
  2889  
  2890   Table 29:  Option PRC A AUTOCRCT  PGM
  2891   Options
  2892   Activities
  2893   Option Nam e
  2894   PRCA AUTOC RCT PGM
  2895   Enhancemen t Category
  2896    New
  2897    Modify
  2898    Delete
  2899    No Change
  2900   Associated  Menu Opti ons that w ill invoke  this refe rence
  2901   PRCA ACCOU NT MANAGEM ENT
  2902   Data Passi ng
  2903    Input
  2904    Output
  2905    Both
  2906    Global Re ference
  2907    Local Ref erence
  2908   Menu Text  Descriptio n
  2909   Patient St atement Au to-Correct ion Progra m
  2910   Option Typ e
  2911    Edit
  2912    Print
  2913    Menu
  2914    Inquire
  2915  
  2916    Action
  2917    Run Routi ne
  2918    Other
  2919  
  2920   Associated  Routine
  2921   BEGIN^PRCA CPS
  2922   Option Def inition
  2923   This optio n runs the  Auto-Corr ection pro gram for P atient
  2924    Statement  discrepan cies.
  2925  
  2926   Current En try Action  Logic
  2927   N/A
  2928  
  2929   Modified E ntry Actio n Logic (C hanges are  in bold)
  2930   N/A
  2931  
  2932   Current Ex it Action  Logic
  2933   N/A
  2934  
  2935   Modified E xit Action  Logic (Ch anges are  in bold)
  2936   N/A
  2937  
  2938   Table 30:  Option PRC A AUTOCRCT  PGM QUEUE D
  2939   Options
  2940   Activities
  2941   Option Nam e
  2942   PRCA AUTOC RCT PGM QU EUED
  2943   Enhancemen t Category
  2944    New
  2945    Modify
  2946    Delete
  2947    No Change
  2948   Associated  Menu Opti ons that w ill invoke  this refe rence
  2949   N/A
  2950   Data Passi ng
  2951    Input
  2952    Output
  2953    Both
  2954    Global Re ference
  2955    Local Ref erence
  2956   Menu Text  Descriptio n
  2957   Patient St atement Au to-Correct ion Progra m Queued
  2958   Option Typ e
  2959    Edit
  2960    Print
  2961    Menu
  2962    Inquire
  2963  
  2964    Action
  2965    Run Routi ne
  2966    Other
  2967  
  2968   Associated  Routine
  2969   START^PRCA CPS
  2970   Option Def inition
  2971   This optio n supports  the entry  point for  the Queue ing of the  
  2972    Auto-Corr ection pro gram for P atient Sta tement dis crepancies .
  2973  
  2974   Current En try Action  Logic
  2975   N/A
  2976  
  2977   Modified E ntry Actio n Logic (C hanges are  in bold)
  2978   N/A
  2979  
  2980   Current Ex it Action  Logic
  2981   N/A
  2982  
  2983   Modified E xit Action  Logic (Ch anges are  in bold)
  2984   N/A
  2985   Table 31:  Option PRC A AUTOCRCT  RPT
  2986   Options
  2987   Activities
  2988   Option Nam e
  2989   PRCA AUTOC RCT RPT
  2990   Enhancemen t Category
  2991    New
  2992    Modify
  2993    Delete
  2994    No Change
  2995   Associated  Menu Opti ons that w ill invoke  this refe rence
  2996   PRCA ACCOU NT MANAGEM ENT
  2997   Data Passi ng
  2998    Input
  2999    Output
  3000    Both
  3001    Global Re ference
  3002    Local Ref erence
  3003   Menu Text  Descriptio n
  3004   Auto-Corre ct Patient  Discrepan cy Report
  3005   Option Typ e
  3006    Edit
  3007    Print
  3008    Menu
  3009    Inquire
  3010  
  3011    Action
  3012    Run Routi ne
  3013    Other
  3014  
  3015   Associated  Routine
  3016   PSACRT^PRC AACR
  3017   Option Def inition
  3018   This optio n runs the  Auto-Corr ection Pat ient Discr epancy Rep ort for co rrections  made by th e Patient  Statement  Auto-Corre ction Prog ram.
  3019  
  3020   Current En try Action  Logic
  3021   N/A
  3022  
  3023   Modified E ntry Actio n Logic (C hanges are  in bold)
  3024   N/A
  3025  
  3026   Current Ex it Action  Logic
  3027   N/A
  3028  
  3029   Modified E xit Action  Logic (Ch anges are  in bold)
  3030   N/A
  3031  
  3032   Protocols
  3033   Table 32:  Protocols
  3034   Protocols
  3035   Activities
  3036   Protocol N ame
  3037   N/A
  3038   Enhancemen t Category
  3039    New    Mo dify    De lete    No  Change
  3040   Associated  Protocols
  3041  
  3042   Data Passi ng
  3043    Input     Output     Both    Gl obal Refer ence    Lo cal Refere nce
  3044   Item Text  Descriptio n
  3045  
  3046   Protocol T ype
  3047    Action     Menu    P rotocol     Menu    L imited Pro tocol    E xtended Ac tion    Di alog    Ot her
  3048   Associated  Routine
  3049  
  3050  
  3051   Current En try Action  Logic
  3052  
  3053  
  3054   Modified E ntry Actio n Logic (C hanges are  in bold)
  3055  
  3056  
  3057   Current Ex it Action  Logic
  3058  
  3059  
  3060   Modified E xit Action  Logic (Ch anges are  in bold)
  3061  
  3062   Remote Pro cedure Cal l (RPC)
  3063   Table 33:  RPCs
  3064   RPCs
  3065   Activities
  3066   Name
  3067   N/A
  3068   TAG^RTN
  3069  
  3070   Input Para meters
  3071  
  3072   Results Ar ray
  3073    Single Va lue
  3074    Array
  3075    Word Proc essing
  3076  
  3077    Global Ar ray
  3078    Global In stance
  3079  
  3080   Descriptio n
  3081  
  3082   Constants  Defined in  Interface
  3083   Table 34:  Constants  Defined in  Interface
  3084   Name
  3085   Descriptio n
  3086   N/A
  3087  
  3088   Variables  Defined in  Interface
  3089   Table 35:   Variables  Defined i n Interfac e
  3090   Name
  3091   Type
  3092   Descriptio n
  3093   N/A
  3094  
  3095  
  3096   Types Defi ned in Int erface
  3097   Table 36:  Types Defi ned in Int erface
  3098   Name
  3099   Type
  3100   Descriptio n
  3101   N/A
  3102  
  3103  
  3104   GUI
  3105   There are  no GUI int erfaces in  Patient S tatement E nhancement s (PSE) Di screpancie s (Increme nt 1, Phas e 1).
  3106   Table 37:  GUI
  3107   Unit Name
  3108   Descriptio n
  3109   N/A
  3110  
  3111   GUI Classe s
  3112   Table 38:  GUI Classe s
  3113   GUI Classe s
  3114   Instructio ns
  3115   Class Name
  3116   N/A
  3117   Derived Fr om Class 
  3118  
  3119   Purpose
  3120  
  3121   Current Fo rm 
  3122   N/A
  3123   Modified F orm
  3124   N/A
  3125   Components  on Form
  3126   Table 39:  Components  on Form
  3127   Name
  3128   Type
  3129   Descriptio n
  3130   N/A
  3131  
  3132  
  3133   Events
  3134   Table 40:  Events
  3135   Name
  3136   Type
  3137   Descriptio n
  3138   N/A
  3139  
  3140  
  3141   Methods
  3142   Table 41:  Methods
  3143   Method Nam e
  3144   Procedure/ Function
  3145   Descriptio n
  3146   N/A
  3147  
  3148  
  3149   Special Re ferences
  3150   Table 42 :  Special R eferences
  3151   Special Re ference Na me
  3152   Type
  3153   Descriptio n
  3154   N/A
  3155  
  3156  
  3157   Class Even ts
  3158   Table 43:  Class Even ts
  3159   Name
  3160   Type
  3161   Descriptio n
  3162   N/A
  3163  
  3164  
  3165   Class Meth ods
  3166   Table 44:  Class Meth ods
  3167   Name
  3168   Procedure/ Function
  3169   Descriptio n
  3170   N/A
  3171  
  3172  
  3173   Class Prop erties
  3174   Table 45:  Class Prop erties
  3175   Class Prop erties Nam e
  3176   Type
  3177   Visibility
  3178   Descriptio n
  3179   N/A
  3180  
  3181  
  3182  
  3183   Uses Claus e
  3184   N/A
  3185   Forms
  3186   Table 46:  Forms
  3187   Forms
  3188   Descriptio n
  3189   Form Name
  3190   N/A
  3191   Enhancemen t Category
  3192    New
  3193    Modify
  3194    Delete
  3195    No Change
  3196   Form Funct ionality
  3197  
  3198  
  3199   Current Fo rm Layout
  3200  
  3201  
  3202   Modified F orm Layout  (Changes  are in bol d)
  3203  
  3204   Functions
  3205   Table 47:  Forms
  3206   Function N ame
  3207   Activities
  3208   Short Desc ription
  3209   N/A
  3210   Enhancemen t Category
  3211    New
  3212    Modify
  3213    Delete
  3214    No Change
  3215   Related Op tions
  3216  
  3217  
  3218   Related Ro utines
  3219   Routines “ Called By”
  3220   Routines “ Called”   
  3221  
  3222  
  3223  
  3224  
  3225   Function N ame
  3226   Activities
  3227   Data Dicti onary (DD)  Reference s
  3228  
  3229   Related Pr otocols
  3230  
  3231   Related In tegration  Control Re gistration s (ICRs)
  3232  
  3233   Data Passi ng
  3234    Input
  3235    Output
  3236    Both
  3237    Global Re ference
  3238    Local Ref erence
  3239   Input Attr ibute Name  and Defin ition
  3240   Name:
  3241  
  3242   Definition :
  3243   Output Att ribute Nam e and Defi nition
  3244   Name:
  3245  
  3246   Definition :
  3247  
  3248   Current Lo gic
  3249  
  3250  
  3251   Modified L ogic (Chan ges are in  bold)
  3252  
  3253   Dialog
  3254   Table 48:  Dialog
  3255   Dialog
  3256   Instructio ns
  3257   Dialog Mes sage (Desc ription)
  3258   N/A
  3259   Enhancemen t Category
  3260    New
  3261    Modify
  3262    Delete
  3263    No Change
  3264   Dialog Mes sage (Desc ription) C ondition
  3265  
  3266   Current Di alog Messa ge (Descri ption)
  3267  
  3268   Modified D ialog Mess age (Descr iption) (C hanges are  in bold)
  3269  
  3270   Help Frame
  3271   Table 49:  Help Frame
  3272   Help Frame
  3273   Descriptio n
  3274   Help Frame  Text
  3275   N/A
  3276   Enhancemen t Category
  3277    New
  3278    Modify
  3279    Delete
  3280    No Change
  3281   Help Frame  Text Call ing Mechan ism
  3282  
  3283  
  3284   Current He lp Frame T ext
  3285  
  3286  
  3287   Modified H elp Frame  Text (Chan ges are in  bold)
  3288  
  3289   HL7 Applic ation Para meter
  3290   There is n o HL-7 mes saging in  Patient St atement En hancements  (PSE) Dis crepancies  (Incremen t 1, Phase  1).
  3291   Table 50 :  HL7 Appli cation Par ameter
  3292   HL7 Applic ation Para meter Name
  3293   Descriptio n: N/A
  3294  
  3295   Enhancemen t Category
  3296    New
  3297    Modify
  3298    Delete
  3299    No Change
  3300  
  3301   Applicatio n Status
  3302    Active
  3303   Inactive
  3304    Active
  3305   Inactive
  3306  
  3307  
  3308  
  3309   Enhancemen t Category
  3310   Current
  3311   Modified
  3312   Facility N ame
  3313  
  3314  
  3315   Country Co de
  3316  
  3317  
  3318   HL7 Field  Separator
  3319  
  3320  
  3321   HL7 Encodi ng Charact ers
  3322  
  3323  
  3324   Mail Group
  3325  
  3326  
  3327   HL7 Logica l Link
  3328   Table 51:  HL7 Logica l Link
  3329   HL7 Logica l Link
  3330   Descriptio n
  3331   HL7 Logica l Link Par ameter Nam e
  3332   N/A
  3333  
  3334   Enhancemen t Category
  3335    New
  3336    Modify
  3337    Delete
  3338    No Change
  3339  
  3340   Enhancemen t Category
  3341   Current
  3342   Modified
  3343   Node
  3344  
  3345  
  3346   Institutio n
  3347  
  3348  
  3349   Domain
  3350  
  3351  
  3352   Autostart
  3353  
  3354  
  3355   Queue Size
  3356  
  3357  
  3358   LLP Type
  3359  
  3360  
  3361   COTS Inter face
  3362   There are  no COTS in terfaces i n Patient  Statement  Enhancemen ts (PSE) D iscrepanci es (Increm ent 1, Pha se 1).
  3363   Table 52:  COTS Inter face
  3364   COTS Inter face
  3365   Descriptio n
  3366   Communicat ion Method
  3367   N/A
  3368   Applicatio n Interfac e
  3369  
  3370   Network De tailed Des ign 
  3371   N/A - Pati ent Statem ent Enhanc ements (PS E) Discrep ancies (In crement 1,  Phase 1)  addresses  balance di screpancy  remediatio n and will  be accomp lished wit hin the fr amework of  VistA Acc ounts Rece ivable at  the local  VA sites.  Therefore,  no signif icant impa ct on netw ork design  or resour ces is exp ected.
  3372   Security a nd Privacy
  3373   The follow ing Securi ty and Pri vacy messu res were i mplemented  in Patien t Statemen t Enhancem ents (PSE)  Discrepan cies (Incr ement 1, P hase 1).
  3374   Security
  3375   The PRCA A UTOCRCT PG M was crea ted and wi ll be assi gned to th e  appropr iate Accou nt Receiva ble person nel so tha t only aut horized us ers can ru n the Pati ent Statem ent Auto-C orrection  Program.
  3376   Privacy
  3377   The Auto-C orrect Pat ient Discr epancy Rep ort has be en coded s o that whe n the outp ut is sent  to a Mail Man messag e, that me ssage is f lagged so  that it ca n’t be for warded out side of th e secured  VA network .
  3378   Service Or iented Arc hitecture  / ESS Deta iled Desig
  3379   N/A
  3380   Service De scription  for <Consu med Servic e Name>
  3381   N/A
  3382   Service De sign for < Provided S ervice Nam e>
  3383   There are  no Severic e Designs  for Patien t Statemen t Enhancem ents (PSE)  Discrepan cies (Incr ement 1, P hase 1).
  3384   Introducti on
  3385   N/A
  3386   Purpose an d Scope of  Service
  3387   N/A
  3388   Links to O ther Docum ents 
  3389   N/A
  3390   Service De tails
  3391   N/A
  3392   Service Id entificati on
  3393   Table 53:  Service At tribute an d Value 
  3394   Service At tribute
  3395   Value
  3396   Overview
  3397   N/A
  3398   Version
  3399  
  3400   Latest Sta tus
  3401  
  3402   Service Ty pe
  3403  
  3404   Architectu re Layer
  3405  
  3406   Business D omain
  3407  
  3408   Service Do main
  3409  
  3410   Business O rganizatio n and Owne r
  3411  
  3412   Technical  Organizati on and Own er
  3413  
  3414   Developmen t Organiza tion and O wner
  3415  
  3416   Support Or ganization  and Owner
  3417  
  3418   Target Con sumer Orga nization(s ) and Owne r(s)
  3419  
  3420   Service Ve rsions
  3421   Table 54 :  Service V ersions
  3422   Version Nu mbers
  3423   Current St atus of Ve rsion 
  3424   A Brief De scription  of the cha nge implem ented in t hat versio n
  3425   N/A
  3426  
  3427  
  3428  
  3429  
  3430  
  3431  
  3432  
  3433  
  3434   Summary of  Design an d Platform  Details 
  3435   N/A
  3436   SOA Patter n(s) Imple mented
  3437   N/A
  3438   COTS Platf orm vendor  names and  versions  for hostin g platform
  3439   N/A
  3440   Dependenci es
  3441   N/A
  3442   Service De sign Detai ls
  3443   N/A
  3444   Interface  Technical  Specs
  3445   N/A
  3446   Service In vocation T ype 
  3447   N/A
  3448   Service In terface Ty pe 
  3449   N/A
  3450   Service Na me
  3451   N/A
  3452   Interface
  3453   N/A
  3454   End Points
  3455   N/A
  3456   Operations  or Method s
  3457   Table 55:  Operations  or Method s
  3458   Operation  Name
  3459   Inputs
  3460   Outputs
  3461   Transactio nal Qualit ies if rel evant (Upd ating?, At omic?, Can  participa te in tran saction?)
  3462   Pre and Po st Conditi ons
  3463   Exception  (s)
  3464   N/A
  3465  
  3466  
  3467  
  3468  
  3469  
  3470  
  3471  
  3472  
  3473  
  3474  
  3475  
  3476   Message Sc hemas
  3477   N/A
  3478   Informatio n Model
  3479   N/A
  3480   Class Diag ram and De scription  of Entitie s Involved
  3481   N/A
  3482   Mappings f rom ELDM t o Standard s Based Sc hemas
  3483   N/A
  3484   Behavior M odel (AKA  Use Case R ealization )
  3485   N/A
  3486   Use Cases  (Use Case  Model)
  3487   N/A
  3488  
  3489   Interactio n Diagrams  
  3490   N/A
  3491   Gap Analys is
  3492   Table 56 :  Gap Analy sis
  3493   Design Ele ments
  3494   Policies /  SLD eleme nts etc.↓
  3495   Design 
  3496   Element A
  3497   Design 
  3498   Element B
  3499   Design 
  3500   Element C
  3501   Comment fo r non-conf ormance
  3502   N/A
  3503  
  3504  
  3505  
  3506  
  3507  
  3508  
  3509  
  3510  
  3511  
  3512  
  3513  
  3514  
  3515  
  3516  
  3517  
  3518  
  3519  
  3520  
  3521  
  3522  
  3523  
  3524  
  3525  
  3526  
  3527   Variances  from Enter prise Targ et Archite cture 
  3528   N/A
  3529   Variances  from SLDs
  3530   N/A
  3531   Variances  from Stand ards and P olicies
  3532   N/A
  3533   Justificat ion for Ex ceptions a nd Mitigat ion
  3534   N/A
  3535   External S ystem Inte rface Desi gn
  3536   There are  no Externa l System I nterface D esign chan ges for Pa tient Stat ement Enha ncements ( PSE) Discr epancies ( Increment  1, Phase 1 ).
  3537   Interface  Architectu re 
  3538   N/A
  3539   Interface  Detailed D esign
  3540   N/A
  3541   Human-Mach ine Interf ace
  3542   There are  no Human-M achine Int erface cha nges for P atient Sta tement Enh ancements  (PSE) Disc repancies  (Increment  1, Phase  1).
  3543   Interface  Design Rul es
  3544   N/A
  3545   Inputs
  3546   N/A
  3547   Outputs
  3548   N/A
  3549   Navigation  Hierarchy
  3550   N/A
  3551   Screen [x. 1] N/A
  3552   Screen [x. 2] N/A
  3553   Screen [x. 3] N/A
  3554   Attachment  A – Appro val Signat ures
  3555   This secti on is used  to docume nt the app roval of t he System  Design Doc ument. The  review sh ould be co nducted fa ce to face  where sig natures ca n be obtai ned ‘live’  during th e review.  If unable  to conduct  a face-to -face meet ing then i t should b e held via  LiveMeeti ng and con currence c aptured du ring the m eeting. Th e Scribe s hould add  /es/name b y each pos ition cite d. Example  provided  below.
  3556   The Busine ss Sponsor  and Proje ct Manager  are requi red to sig n.
  3557  
  3558   __________ __________ __________ __________ __________ __________ __________ ________
  3559   Signed:Dat e: 
  3560   Business S ponsor
  3561  
  3562   __________ __________ __________ __________ __________ __________ __________ ________
  3563   Signed:Dat e: 
  3564   Project Ma nager
  3565  
  3566   Additional  Informati on 
  3567   Identifica tion of Te chnology a nd Standar ds
  3568   Constraini ng Policie s, Directi ves and Pr ocedures
  3569   Requiremen ts Traceab ility Matr ix
  3570   Packaging  and Instal lation
  3571   Design Met rics
  3572  
  3573  
  3574   Template R evision Hi story
  3575   Date
  3576   Version
  3577   Descriptio n
  3578   Author
  3579   June 2015
  3580   2.10
  3581   Changed He ading 1 de fault sett ing to eli minate pag e break be fore
  3582   Process Ma nagement
  3583   May 2015
  3584   2.9
  3585   Edited for  Section 5 08 conform ance and r emediated  with Commo n Look Off ice tool
  3586   Process Ma nagement
  3587   February 2 015
  3588   2.8
  3589   Incorporat es revisio ns from PM AS Reform  Lockdown;  namely rem oving requ irements f or informa tion that  can be obt ained from  other PMA S authorit ative sour ces.
  3590   Andrew Sla wter, Offi ce of Tech nology Str ategies
  3591   September  2014
  3592   2.7
  3593   Adds Enter prise Shar ed Service s terms an d requires  AERB Comp liance Cer tificate a ttachment.
  3594   Process Ma nagement
  3595   August 201 4
  3596   2.6
  3597   Signature  block upda te authori zed by AER B  CR_0189 34
  3598   Process Ma nagement
  3599   March 2014
  3600   2.5
  3601   Section 50 8 repairs  to new ver sion appro ved by AER B Chair ap proved 
  3602   Process Ma nagement
  3603   August 201 3
  3604   2.3
  3605   Replaced t he Service  Architect ure sub-se ction with  new sub-s ections fo r consumed  and provi ded servic es. Also a pplied mis cellaneous  feedback  from VA te am. 
  3606   ASD Enterp rise Share d Services  (ESS) Wor k Group
  3607   June 2013
  3608   1.3
  3609   Upgraded t o MS Offic e 2007-201 0 format 
  3610   Process Ma nagement
  3611   June 2013
  3612   1.2
  3613   Address in consistenc ies in Sec tion 3, Co nceptual D esign, Cor rect headi ngs 
  3614   Process Ma nagement
  3615   March 2013
  3616   1.1
  3617   Formatted  to documen tation sta ndards and  edited fo r Section  508 confor mance
  3618   Process Ma nagement
  3619   January 20 13
  3620   1.0
  3621   Initial Do cument
  3622   PMAS Busin ess Office
  3623  
  3624  
  3625   See TOGAF®  9.1, Part  III: ADM  Guidelines  & Techniq ues, Gap A nalysis on  TOGAF web site at ht tp://pubs. opengroup. org/archit ecture/tog af9-doc/ar ch/chap27. html