Produced by Araxis Merge on 4/27/2018 2:59:11 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | v2.0_Sprint_15_Build_5.zip\v2.0_Sprint_15_Build_5\Unredacted\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\service\impl | UpdateRfaiServiceImpl.java | Tue Apr 24 14:50:45 2018 UTC |
| 2 | v2.0_Sprint_15_Build_5..zip\v2.0_Sprint_15_Build_5\Unredacted\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\service\impl | UpdateRfaiServiceImpl.java | Thu Apr 26 16:10:23 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 170 |
| 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.med.a rs.service .impl; | |
| 2 | ||
| 3 | import jav a.text.Dat eFormat; | |
| 4 | import jav a.text.Par seExceptio n; | |
| 5 | import jav a.text.Sim pleDateFor mat; | |
| 6 | import jav a.util.Dat e; | |
| 7 | ||
| 8 | import org .apache.lo g4j.LogMan ager; | |
| 9 | import org .apache.lo g4j.Logger ; | |
| 10 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
| 11 | import org .springfra mework.ste reotype.Se rvice; | |
| 12 | ||
| 13 | import gov .va.med.ar s.dao.ars. ClaimSubmi ssionNoteR epository; | |
| 14 | import gov .va.med.ar s.dao.ars. ClaimSubmi ssionRepos itory; | |
| 15 | import gov .va.med.ar s.exceptio ns.EntityN otFoundExc eption; | |
| 16 | import gov .va.med.ar s.model.re quest.Upda teRfaiRequ est; | |
| 17 | import gov .va.med.ar s.service. IUpdateRfa iService; | |
| 18 | import gov .va.med.do main.ars.C laimSubmis sion; | |
| 19 | import gov .va.med.do main.ars.C laimSubmis sionNote; | |
| 20 | ||
| 21 | /** | |
| 22 | * @author PI I
|
|
| 23 | * | |
| 24 | */ | |
| 25 | @Service | |
| 26 | public cla ss UpdateR faiService Impl imple ments IUpd ateRfaiSer vice { | |
| 27 | ||
| 28 | pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Upda teRfaiServ iceImpl.cl ass); | |
| 29 | ||
| 30 | Da teFormat d ateFormat = new Simp leDateForm at("MM/dd/ yyyy"); | |
| 31 | ||
| 32 | @A utowired | |
| 33 | Cl aimSubmiss ionReposit ory rfaiRe po; | |
| 34 | ||
| 35 | @A utowired | |
| 36 | Cl aimSubmiss ionNoteRep ository cl aimSubmiss ionNoteRep o; | |
| 37 | ||
| 38 | pu blic boole an submitS impleUpdat e(UpdateRf aiRequest updateRfai Request) t hrows Pars eException , EntityNo tFoundExce ption { | |
| 39 | ||
| 40 | Stri ng oldStat us = null; | |
| 41 | ||
| 42 | Clai mSubmissio nNote subm ittedNote = null; | |
| 43 | ||
| 44 | try { | |
| 45 | ||
| 46 | Date o perationTi me = new D ate(System .currentTi meMillis() ); | |
| 47 | ||
| 48 | ClaimS ubmission claimSubmi ssionBeing Updated = rfaiRepo.f indOne(upd ateRfaiReq uest.getSu bmissionId ()); | |
| 49 | if (cl aimSubmiss ionBeingUp dated == n ull) { | |
| 50 | throw ne w EntityNo tFoundExce ption(Stri ng.valueOf (updateRfa iRequest.g etSubmissi onId())); | |
| 51 | } | |
| 52 | ||
| 53 | oldSta tus = clai mSubmissio nBeingUpda ted.getSub missionSta tus(); | |
| 54 | ||
| 55 | claimS ubmissionB eingUpdate d.setDtp20 3responsed uedate(dat eFormat.pa rse(update RfaiReques t.getRespo nseDate()) ); | |
| 56 | claimS ubmissionB eingUpdate d.setSubmi ssionStatu s(updateRf aiRequest. getSubmiss ionStatus( )); | |
| 57 | claimS ubmissionB eingUpdate d.setDatem odified(op erationTim e); | |
| 58 | ||
| 59 | rfaiRe po.save(cl aimSubmiss ionBeingUp dated); | |
| 60 | ||
| 61 | ClaimS ubmissionN ote newCla imSubmissi onNote = n ew ClaimSu bmissionNo te(); | |
| 62 | ||
| 63 | newCla imSubmissi onNote.set ClaimSubmi ssion(clai mSubmissio nBeingUpda ted); | |
| 64 | newCla imSubmissi onNote.set ClaimSubmi ssionNoteT xt(updateR faiRequest .getSubmis sionNote() ); | |
| 65 | newCla imSubmissi onNote.set ClaimsSubm issionOldS tatus(oldS tatus); | |
| 66 | newCla imSubmissi onNote.set ClaimsSubm issionNewS tatus(clai mSubmissio nBeingUpda ted.getSub missionSta tus()); | |
| 67 | newCla imSubmissi onNote.set Datecreate d(operatio nTime); | |
| 68 | ||
| 69 | submit tedNote = claimSubmi ssionNoteR epo.save(n ewClaimSub missionNot e); | |
| 70 | ||
| 71 | } ca tch (Parse Exception e) { | |
| 72 | logger .info(Stri ng.format( "Couldn't parse date %s into M M/dd/yyyy format", | |
| 73 | updateRfai Request.ge tResponseD ate())); | |
| 74 | logger .warn(e.ge tMessage() , e); | |
| 75 | throw e; | |
| 76 | } ca tch (Entit yNotFoundE xception e ) { | |
| 77 | logger .info(Stri ng.format( "Error att empting to lookup cl aim with C LAIM_SUBMI SSION.SUBM ISSIONID o f %s", | |
| 78 | updateRfai Request.ge tSubmissio nId())); | |
| 79 | logger .warn(e.ge tMessage() , e); | |
| 80 | throw e; | |
| 81 | } | |
| 82 | ||
| 83 | retu rn submitt edNote != null && su bmittedNot e.getClaim Submission NoteId() ! = null; | |
| 84 | } | |
| 85 | ||
| 86 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.