Produced by Araxis Merge on 6/9/2017 3:50:58 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Fri Jun 9 19:50:58 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-server\src\main\java\gov\va\nvap\server\service\pdq\filter | FacilityNumberFilter.java | Fri Apr 21 20:03:28 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 90 |
| 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.nvap. server.ser vice.pdq.f ilter; | |||||
| 2 | ||||||
| 3 | import gov .va.nvap.c ommon.filt er.Filter; | |||||
| 4 | import gov .va.nvap.c ommon.filt er.FilterE xception; | |||||
| 5 | import gov .va.nvap.c ommon.vali dation.Nul lChecker; | |||||
| 6 | /* | |||||
| 7 | import go v.va.nvap. svc.consen tmgmt.PIPI nterface; | |||||
| 8 | ||||||
| 9 | import gov .va.nvap.s vc.consent mgmt.stub. data.Facil ity; | |||||
| 10 | */ | |||||
| 11 | import gov .va.nvap.s vc.facilit y.data.Fac ility; | |||||
| 12 | import gov .va.nvap.s vc.facilit y.intf.Fac ilityServi ce; | |||||
| 13 | ||||||
| 14 | import jav a.util.Arr ayList; | |||||
| 15 | import jav a.util.Col lection; | |||||
| 16 | import jav a.util.Has hMap; | |||||
| 17 | import jav a.util.Lis t; | |||||
| 18 | import jav a.util.Map ; | |||||
| 19 | ||||||
| 20 | import org .springfra mework.bea ns.factory .Initializ ingBean; | |||||
| 21 | import org .springfra mework.bea ns.factory .annotatio n.Required ; | |||||
| 22 | ||||||
| 23 | /** | |||||
| 24 | * Filter by VA faci lity. | |||||
| 25 | * | |||||
| 26 | * @author Asha Amri traj | |||||
| 27 | */ | |||||
| 28 | public cla ss Facilit yNumberFil ter implem ents | |||||
| 29 | Filt er<Map<Str ing, Strin g>, Map<St ring, Stri ng>>, Init ializingBe an { | |||||
| 30 | /* * | |||||
| 31 | * Get the l ist of all owed facil ities from the PIP a nd store t hem. | |||||
| 32 | * / | |||||
| 33 | Li st<String> allowedFa cilities; | |||||
| 34 | /* * | |||||
| 35 | * Reference to PIP. | |||||
| 36 | * / | |||||
| 37 | // PIPInterfa ce pip; | |||||
| 38 | Fa cilityServ ice facSer vice; | |||||
| 39 | ||||||
| 40 | @O verride | |||||
| 41 | pu blic void afterPrope rtiesSet() throws Ex ception { | |||||
| 42 | fina l Collecti on<Facilit y> facilit ies = this .facServic e | |||||
| 43 | .getAllo wedVistAFa cilities() ; | |||||
| 44 | this .allowedFa cilities = new Array List<Strin g>(); | |||||
| 45 | if ( NullChecke r.isNotEmp ty(facilit ies)) { | |||||
| 46 | for (f inal Facil ity facili ty : facil ities) { | |||||
| 47 | this.all owedFacili ties.add(f acility.ge tFacilityS tation()); | |||||
| 48 | } | |||||
| 49 | } | |||||
| 50 | } | |||||
| 51 | ||||||
| 52 | @O verride | |||||
| 53 | pu blic Map<S tring, Str ing> filte r(final Ma p<String, String> re sponses) | |||||
| 54 | throws FilterExc eption { | |||||
| 55 | if ( NullChecke r.isEmpty( responses) | |||||
| 56 | || (Null Checker.is NotEmpty(r esponses) && (respon ses.size() == 1))) { | |||||
| 57 | return responses ; | |||||
| 58 | } | |||||
| 59 | ||||||
| 60 | // I f it is on e of the a llowed fac ilities, r eturn that MPI corre lation | |||||
| 61 | // r esponse. | |||||
| 62 | // U se that re sponse to populate p atient dem ographics. | |||||
| 63 | fina l Map<Stri ng, String > allowedM ap = new H ashMap<Str ing, Strin g>(); | |||||
| 64 | for (final Str ing respon seKey : re sponses.ke ySet()) { | |||||
| 65 | for (f inal Strin g allowedF acility : this.allow edFaciliti es) { | |||||
| 66 | if (allo wedFacilit y.equals(r esponseKey )) { | |||||
| 67 | allowedMap .put(respo nseKey, re sponses.ge t(response Key)); | |||||
| 68 | } | |||||
| 69 | } | |||||
| 70 | } | |||||
| 71 | ||||||
| 72 | if ( allowedMap .isEmpty() ) { | |||||
| 73 | return responses ; | |||||
| 74 | } el se { | |||||
| 75 | return allowedMa p; | |||||
| 76 | } | |||||
| 77 | ||||||
| 78 | } | |||||
| 79 | ||||||
| 80 | @R equired | |||||
| 81 | pu blic void setFacServ ice(final FacilitySe rvice faci lityServic e) { | |||||
| 82 | this .facServic e = facili tyService; | |||||
| 83 | } | |||||
| 84 | /* | |||||
| 85 | @R equired | |||||
| 86 | pu blic void setPip(fin al PIPInte rface pipI nterface) { | |||||
| 87 | this .pip = pip Interface; | |||||
| 88 | } | |||||
| 89 | */ | |||||
| 90 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.