Produced by Araxis Merge on 4/5/2017 4:21:47 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 | C:\working_scrub\Unredacted\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\AdapterLIB\src\main\java\gov\va\med\nhin\adapter\datamanager\filters | MedsDataFilter.java | Fri Feb 10 15:41:44 2017 UTC |
| 2 | eHX-CIF.zip\eHX-CIF\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\AdapterLIB\src\main\java\gov\va\med\nhin\adapter\datamanager\filters | MedsDataFilter.java | Mon Apr 3 14:25:27 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 128 |
| 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 | /* | |
| 2 | * To chan ge this li cense head er, choose License H eaders in Project Pr operties. | |
| 3 | * To chan ge this te mplate fil e, choose Tools | Te mplates | |
| 4 | * and ope n the temp late in th e editor. | |
| 5 | */ | |
| 6 | package go v.va.med.n hin.adapte r.datamana ger.filter s; | |
| 7 | ||
| 8 | import jav a.lang.ref lect.*; | |
| 9 | import jav a.util.*; | |
| 10 | ||
| 11 | import org .apache.co mmons.bean utils.*; | |
| 12 | ||
| 13 | import gov .va.med.nh in.adapter .datamanag er.*; | |
| 14 | import gov .va.med.nh in.adapter .utils.*; | |
| 15 | ||
| 16 | /** | |
| 17 | * | |
| 18 | * @author DN S VAZQUD | |
| 19 | */ | |
| 20 | public cla ss MedsDat aFilter im plements D ataFilter | |
| 21 | { | |
| 22 | @Overr ide | |
| 23 | public boolean t est(Object result, L ist result s, Referen ce filter, DataQuery dataQuery ) | |
| 24 | { | |
| 25 | bo olean ret = false; | |
| 26 | ||
| 27 | tr y { | |
| 28 | String v aType = (S tring) Pro pertyUtils .getProper ty(result, "vaType") ; | |
| 29 | String v aStatus = (String) P ropertyUti ls.getProp erty(resul t, "vaStat us"); | |
| 30 | Date dis penseTime = (Date) P ropertyUti ls.getProp erty(resul t, "dispen seTime"); | |
| 31 | Date fif teenMonths Ago = getF ifteenMont hsAgo(); | |
| 32 | String f ormatCode = (String) dataQuery .getParame ter("forma tCode"); | |
| 33 | ||
| 34 | if (Null Checker.is NotNullOrE mpty(forma tCode) && formatCode .equals("u rn:hl7-org :sdwg:ccda -structure dBody:1.1" )) { | |
| 35 | if ( NullChecke r.isNotNul lOrEmpty(v aType)) { | |
| 36 | if (vaType .equalsIgn oreCase("O ")) { | |
| 37 | ret = dispenseTi me != null && dispen seTime.get Time() >= fifteenMon thsAgo.get Time(); | |
| 38 | } | |
| 39 | else if (v aType.equa lsIgnoreCa se("N")) { | |
| 40 | ret = NullChecke r.isNotNul lOrEmpty(v aStatus) & & !vaStatu s.equalsIg noreCase(" DISCONTINU ED"); | |
| 41 | } | |
| 42 | } | |
| 43 | } | |
| 44 | else { | |
| 45 | ret = dispense Time != nu ll && disp enseTime.g etTime() > = fifteenM onthsAgo.g etTime() | |
| 46 | && Nul lChecker.i sNotNullOr Empty(vaTy pe) | |
| 47 | && (va Type.equal sIgnoreCas e("O") || vaType.equ alsIgnoreC ase("N")) | |
| 48 | && Nul lChecker.i sNotNullOr Empty(vaSt atus) && v aStatus.eq ualsIgnore Case("ACTI VE"); | |
| 49 | } | |
| 50 | } | |
| 51 | ca tch (Illeg alAccessEx ception | Invocation TargetExce ption | No SuchMethod Exception e) { | |
| 52 | throw ne w DataMana gerExcepti on("Error getting pr operty fro m result." , e); | |
| 53 | } | |
| 54 | ||
| 55 | re turn ret; | |
| 56 | } | |
| 57 | ||
| 58 | privat e Date get FifteenMon thsAgo() | |
| 59 | { | |
| 60 | Ca lendar cal = Gregori anCalendar .getInstan ce(); | |
| 61 | ca l.setTime( new Date() ); | |
| 62 | ca l.add(Cale ndar.MONTH , -15); | |
| 63 | re turn cal.g etTime(); | |
| 64 | } | |
| 65 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.