Produced by Araxis Merge on 8/14/2018 11:32:41 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | cbs-2018-06-18.zip\cbs\src\main\java\gov\va\cpss\service | VistaAccountService.java | Tue Jun 19 13:45:30 2018 UTC |
| 2 | cbs-2018-06-18.zip\cbs\src\main\java\gov\va\cpss\service | VistaAccountService.java | Tue Aug 14 13:53:41 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 236 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | package go v.va.cpss. service; | |
| 2 | ||
| 3 | import org .apache.lo g4j.Logger ; | |
| 4 | import org .springfra mework.ste reotype.Se rvice; | |
| 5 | ||
| 6 | import gov .va.cpss.d ao.CBSAcco untDAO; | |
| 7 | import gov .va.cpss.d ao.Process StatusDAO; | |
| 8 | import gov .va.cpss.d ao.VistaAc countDAO; | |
| 9 | import gov .va.cpss.m odel.Proce ssStatus; | |
| 10 | import gov .va.cpss.m odel.icn.V istaAccoun t; | |
| 11 | ||
| 12 | /** | |
| 13 | * Service class for handling activities relating to consoli dating a p atient | |
| 14 | * stateme nt. | |
| 15 | * | |
| 16 | * @author D N S | |
| 17 | */ | |
| 18 | @Service | |
| 19 | @SuppressW arnings("n ls") | |
| 20 | public cla ss VistaAc countServi ce { | |
| 21 | ||
| 22 | pr ivate stat ic final L ogger logg er = Logge r.getLogge r(VistaAcc ountServic e.class.ge tCanonical Name()); | |
| 23 | ||
| 24 | pr ivate CBSA ccountDAO cbsAccount DAO; | |
| 25 | ||
| 26 | pr ivate Vist aAccountDA O vistaAcc ountDAO; | |
| 27 | ||
| 28 | pr ivate Proc essStatusD AO process StatusDAO; | |
| 29 | ||
| 30 | pu blic CBSAc countDAO g etCbsAccou ntDAO() { | |
| 31 | retu rn this.cb sAccountDA O; | |
| 32 | } | |
| 33 | ||
| 34 | pu blic void setCbsAcco untDAO(CBS AccountDAO inCbsAcco untDAO) { | |
| 35 | this .cbsAccoun tDAO = inC bsAccountD AO; | |
| 36 | } | |
| 37 | ||
| 38 | pu blic Vista AccountDAO getVistaA ccountDAO( ) { | |
| 39 | retu rn this.vi staAccount DAO; | |
| 40 | } | |
| 41 | ||
| 42 | pu blic void setVistaAc countDAO(V istaAccoun tDAO inVis taAccountD AO) { | |
| 43 | this .vistaAcco untDAO = i nVistaAcco untDAO; | |
| 44 | } | |
| 45 | ||
| 46 | pu blic Proce ssStatusDA O getProce ssStatusDA O() { | |
| 47 | retu rn this.pr ocessStatu sDAO; | |
| 48 | } | |
| 49 | ||
| 50 | pu blic void setProcess StatusDAO( ProcessSta tusDAO inP rocessStat usDAO) { | |
| 51 | this .processSt atusDAO = inProcessS tatusDAO; | |
| 52 | } | |
| 53 | ||
| 54 | pu blic Vista Account ge tAccountRe cord(final long dfn, final Str ing statio nNum) { | |
| 55 | retu rn this.vi staAccount DAO.getVis taAccount( dfn, stati onNum); | |
| 56 | } | |
| 57 | ||
| 58 | /* * | |
| 59 | * Get the a ccount num ber associ ated with this ICN. | |
| 60 | * | |
| 61 | * @param ic n | |
| 62 | * The ICN to associa te with an account n umber. | |
| 63 | * @return T he existin g or new a ccount num ber. | |
| 64 | * / | |
| 65 | pu blic long getAccount NumberForI CN(final S tring icn) { | |
| 66 | ||
| 67 | retu rn this.cb sAccountDA O.getByICN (icn).long Value(); | |
| 68 | } | |
| 69 | ||
| 70 | pu blic Strin g getICNFo rAccountNu mber(final long cbss AcntId) { | |
| 71 | ||
| 72 | retu rn this.cb sAccountDA O.selectIC NById(cbss AcntId); | |
| 73 | } | |
| 74 | ||
| 75 | /* * | |
| 76 | * Register the accoun t for the specified vista reco rd. | |
| 77 | * | |
| 78 | * @param ps Patient | |
| 79 | * The pati ent to reg ister. | |
| 80 | * @return F lag indica ting if su ccessfully registere d or not. | |
| 81 | * / | |
| 82 | pu blic boole an registe rAccount(f inal Vista Account vi staAccount ) { | |
| 83 | ||
| 84 | bool ean succes sful = fal se; | |
| 85 | ||
| 86 | Inte ger newSta tus = this .processSt atusDAO.ge tStatusFro mEnum(Proc essStatus. Status.NEW ); | |
| 87 | ||
| 88 | if ( newStatus != null) { | |
| 89 | ||
| 90 | // Tem porary fix for the D FN Number issue | |
| 91 | // - B reaking th e 16 digit s combinat ion "DFN-N umber" of Station Nu mber (firs t 3 digits ) and DFN Number | |
| 92 | // i nto (Stati on Number and) actua l DFN Numb er | |
| 93 | // Yip ing Yao - 02/27/2018 | |
| 94 | String dfnCombin ation = St ring.value Of(vistaAc count.getD fn()); | |
| 95 | long d fn = 0L; | |
| 96 | ||
| 97 | if (df nCombinati on != null ) | |
| 98 | { | |
| 99 | if (dfnC ombination .length() == 16) | |
| 100 | { | |
| 101 | String str DFN = Stri ng.valueOf (dfnCombin ation).sub string(3); | |
| 102 | dfn = Long .valueOf(s trDFN).lon gValue(); | |
| 103 | } | |
| 104 | else | |
| 105 | { | |
| 106 | dfn = vist aAccount.g etDfn(); | |
| 107 | } | |
| 108 | ||
| 109 | successf ul = this. vistaAccou ntDAO.save ( newStatu s.intValue (), dfn, v istaAccoun t.getStati onNum(), | |
| 110 | vistaAcc ount.getIc n(), vista Account.ge tCbssAcntI d() ); | |
| 111 | } | |
| 112 | } el se { | |
| 113 | ||
| 114 | logger .error("Un able to ob tain statu s mapping for: " + P rocessStat us.Status. NEW); | |
| 115 | } | |
| 116 | ||
| 117 | retu rn success ful; | |
| 118 | } | |
| 119 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.