Produced by Araxis Merge on 9/15/2018 10:47:53 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 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_integration\mhv-integration-phr\mhv-integration-phrmgr-main\src\main\java\gov\va\med\mhv\integration\phr\service | ComplexProcessingPolicy.java | Thu Aug 23 21:20:40 2018 UTC |
| 2 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_integration\mhv-integration-phr\mhv-integration-phrmgr-main\src\main\java\gov\va\med\mhv\integration\phr\service | ComplexProcessingPolicy.java | Sat Sep 15 21:40:50 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 182 |
| 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 | * | |
| 3 | */ | |
| 4 | package go v.va.med.m hv.integra tion.phr.s ervice; | |
| 5 | ||
| 6 | import gov .va.med.mh v.integrat ion.phr.tr ansfer.Fac ilityExtra ctStatus; | |
| 7 | ||
| 8 | import jav a.util.Dat e; | |
| 9 | import jav a.util.Lis t; | |
| 10 | ||
| 11 | /** | |
| 12 | * @author DNS | |
| 13 | * | |
| 14 | */ | |
| 15 | public cla ss Complex Processing Policy ext ends Abstr actProcess ingPolicy { | |
| 16 | ||
| 17 | pr ivate enum Expressio nType { | |
| 18 | ||
| 19 | AND( false), | |
| 20 | OR(t rue); | |
| 21 | ||
| 22 | priv ate boolea n initValu e; | |
| 23 | ||
| 24 | Expr essionType (boolean i nitValue){ | |
| 25 | this.i nitValue = initValue ; | |
| 26 | } | |
| 27 | ||
| 28 | }; | |
| 29 | ||
| 30 | pr ivate Expr essionType expressio nType; | |
| 31 | ||
| 32 | pr ivate List <Processin gPolicy> p olicies; | |
| 33 | ||
| 34 | @O verride | |
| 35 | pu blic void setEnabled (boolean v alue) { | |
| 36 | this .enabled = value; | |
| 37 | } | |
| 38 | ||
| 39 | pu blic void setExpress ionType(St ring expre ssionType) { | |
| 40 | this .expressio nType = Ex pressionTy pe.valueOf (expressio nType); | |
| 41 | } | |
| 42 | ||
| 43 | pu blic void setPolicie s(List<Pro cessingPol icy> polic ies) { | |
| 44 | this .policies = policies ; | |
| 45 | } | |
| 46 | ||
| 47 | @O verride | |
| 48 | pu blic boole an isAllow ed(Facilit yExtractSt atus es) { | |
| 49 | ||
| 50 | bool ean retVal = this.ex pressionTy pe.initVal ue; | |
| 51 | ||
| 52 | for( Processing Policy pp : policies ) | |
| 53 | { | |
| 54 | switch (this.expr essionType ) | |
| 55 | { | |
| 56 | case A ND: | |
| 57 | retVal & = pp.isAll owed(es); | |
| 58 | case O R: | |
| 59 | defaul t: | |
| 60 | retVal | = pp.isAll owed(es); | |
| 61 | } | |
| 62 | } | |
| 63 | retu rn retVal; | |
| 64 | } | |
| 65 | ||
| 66 | @O verride | |
| 67 | pu blic boole an isAllow ed(Date la stProcesse d) { | |
| 68 | thro w new Unsu pportedOpe rationExce ption("Com plex Proce ssing Poli cies don't allow pol icy checks based on date last processed alone."); | |
| 69 | } | |
| 70 | ||
| 71 | @O verride | |
| 72 | pu blic Date getProject edDate(Dat e lastProc essed) { | |
| 73 | Date nextAvail ableProces singDate = null; | |
| 74 | ||
| 75 | for( Processing Policy pp : policies ) | |
| 76 | { | |
| 77 | try { | |
| 78 | nextAvai lableProce ssingDate = pp.getPr ojectedDat e(lastProc essed); | |
| 79 | if(nextA vailablePr ocessingDa te != null ) | |
| 80 | { | |
| 81 | break; | |
| 82 | } | |
| 83 | } catc h (Unsuppo rtedOperat ionExcepti on uoe) | |
| 84 | { | |
| 85 | // eat t his except ion. it's expected f or some pr ocessing p olicies. | |
| 86 | } | |
| 87 | } | |
| 88 | ||
| 89 | retu rn nextAva ilableProc essingDate ; | |
| 90 | } | |
| 91 | ||
| 92 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.