Produced by Araxis Merge on 6/9/2017 3:51:14 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:51:14 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\test\java\gov\va\nvap\server\test\endpoint\pip | MockPolicyInformationPoint.java | Fri Apr 21 20:15:58 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 319 |
| 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.tes t.endpoint .pip; | |||||
| 2 | ||||||
| 3 | import gov .va.nvap.p rivacy.Con sentDirect iveDetaile dExpiratio nRequest; | |||||
| 4 | import gov .va.nvap.s vc.consent mgmt.PIPIn terface; | |||||
| 5 | import gov .va.nvap.s vc.consent mgmt.Polic yConstrain ts; | |||||
| 6 | import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.dat a.Announce ment; | |||||
| 7 | import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.dat a.Announce mentOrg; | |||||
| 8 | import gov .va.nvap.s vc.consent mgmt.stub. data.Conse ntDirectiv e; | |||||
| 9 | import gov .va.nvap.s vc.consent mgmt.stub. data.Conse ntType; | |||||
| 10 | import gov .va.nvap.s vc.consent mgmt.stub. data.Detai ledConsent Directive; | |||||
| 11 | import gov .va.nvap.s vc.consent mgmt.stub. data.Expir ingConsent Configurat ion; | |||||
| 12 | import gov .va.nvap.s vc.consent mgmt.stub. data.Facil ity; | |||||
| 13 | import gov .va.nvap.s vc.consent mgmt.stub. data.Facil ityOptInCo nsent; | |||||
| 14 | import gov .va.nvap.s vc.consent mgmt.stub. data.Funct ionalRole; | |||||
| 15 | import gov .va.nvap.s vc.consent mgmt.stub. data.Locat ion; | |||||
| 16 | import gov .va.nvap.s vc.consent mgmt.stub. data.Optou tReason; | |||||
| 17 | import gov .va.nvap.s vc.consent mgmt.stub. data.Organ ization; | |||||
| 18 | import gov .va.nvap.s vc.consent mgmt.stub. data.Patie ntDocument ; | |||||
| 19 | import gov .va.nvap.s vc.consent mgmt.stub. data.Patie ntDocument Type; | |||||
| 20 | import gov .va.nvap.s vc.consent mgmt.stub. data.Purpo seOfUse; | |||||
| 21 | import jav a.util.Arr ayList; | |||||
| 22 | import jav a.util.Col lection; | |||||
| 23 | import jav a.util.Dat e; | |||||
| 24 | ||||||
| 25 | public cla ss MockPol icyInforma tionPoint implements PIPInterf ace { | |||||
| 26 | ||||||
| 27 | Collec tion<Facil ity> facil ities; | |||||
| 28 | Collec tion<Organ ization> o rganizatio ns; | |||||
| 29 | Collec tion<Organ ization> c onsumerOnl yOrganizat ions; | |||||
| 30 | Collec tion<Organ ization> n onConsumer OnlyOrgani zations; | |||||
| 31 | ||||||
| 32 | public MockPolic yInformati onPoint() { | |||||
| 33 | } | |||||
| 34 | ||||||
| 35 | @Overr ide | |||||
| 36 | public ConsentDi rective ge tActiveCon sentDirect ive( | |||||
| 37 | fi nal Collec tion<Strin g> patient Iens, Cons entType co nsentType) { | |||||
| 38 | fi nal Consen tDirective consentDi rective = new Consen tDirective (); | |||||
| 39 | co nsentDirec tive.setCo nsentDirId (999999L); | |||||
| 40 | co nsentDirec tive.setOp tinTS(new Date()); | |||||
| 41 | co nsentDirec tive.setEx pirationDa te(new Dat e()); | |||||
| 42 | co nsentDirec tive.setOp tinDate(ne w Date()); | |||||
| 43 | co nsentDirec tive.setOp tinConsent Type(conse ntType); | |||||
| 44 | fo r (final S tring ien : patientI ens) { | |||||
| 45 | consentD irective.s etPatientI en(ien); | |||||
| 46 | break; | |||||
| 47 | } | |||||
| 48 | re turn conse ntDirectiv e; | |||||
| 49 | } | |||||
| 50 | ||||||
| 51 | @Overr ide | |||||
| 52 | public Collectio n<Function alRole> ge tAllowedFu nctionalRo les() { | |||||
| 53 | // TODO Auto -generated method st ub | |||||
| 54 | re turn null; | |||||
| 55 | } | |||||
| 56 | ||||||
| 57 | @Overr ide | |||||
| 58 | public Collectio n<Organiza tion> getA llowedOrga nizations( ) { | |||||
| 59 | re turn this. organizati ons; | |||||
| 60 | } | |||||
| 61 | ||||||
| 62 | @Overr ide | |||||
| 63 | public Boolean g etIsOrgani zationTrus tedSource( String org anizationI d) { | |||||
| 64 | re turn true; | |||||
| 65 | } | |||||
| 66 | ||||||
| 67 | @Overr ide | |||||
| 68 | public Collectio n<PurposeO fUse> getA llowedPurp oseOfUse() { | |||||
| 69 | // TODO Auto -generated method st ub | |||||
| 70 | re turn null; | |||||
| 71 | } | |||||
| 72 | ||||||
| 73 | @Overr ide | |||||
| 74 | public Collectio n<Facility > getAllow edVistAFac ilities() { | |||||
| 75 | re turn this. facilities ; | |||||
| 76 | } | |||||
| 77 | ||||||
| 78 | @Overr ide | |||||
| 79 | public String ge tAuthority Name(final String oi d) { | |||||
| 80 | // TODO Auto -generated method st ub | |||||
| 81 | re turn null; | |||||
| 82 | } | |||||
| 83 | ||||||
| 84 | @Overr ide | |||||
| 85 | public PatientDo cument get ConsentDir ectiveDocu mentByType ( | |||||
| 86 | fi nal Consen tDirective consentDi rective, | |||||
| 87 | fi nal Patien tDocumentT ype patien tDocumentT ype) { | |||||
| 88 | // TODO Auto -generated method st ub | |||||
| 89 | re turn null; | |||||
| 90 | } | |||||
| 91 | ||||||
| 92 | @Overr ide | |||||
| 93 | public Collectio n<PatientD ocument> g etConsentD irectiveDo cuments( | |||||
| 94 | fi nal Consen tDirective consentDi rective) { | |||||
| 95 | // TODO Auto -generated method st ub | |||||
| 96 | re turn null; | |||||
| 97 | } | |||||
| 98 | ||||||
| 99 | @Overr ide | |||||
| 100 | public Collectio n<ConsentD irective> getConsent History( | |||||
| 101 | fi nal Collec tion<Strin g> patient Iens) { | |||||
| 102 | St ring patie ntIen = nu ll; | |||||
| 103 | fo r (final S tring ien : patientI ens) { | |||||
| 104 | patientI en = ien; | |||||
| 105 | break; | |||||
| 106 | } | |||||
| 107 | fi nal Consen tDirective consentDi rective1 = new Conse ntDirectiv e(); | |||||
| 108 | co nsentDirec tive1.setC onsentDirI d(999999L) ; | |||||
| 109 | co nsentDirec tive1.setO ptinTS(new Date()); | |||||
| 110 | co nsentDirec tive1.setE xpirationD ate(new Da te()); | |||||
| 111 | co nsentDirec tive1.setO ptinDate(n ew Date()) ; | |||||
| 112 | co nsentDirec tive1.setP atientIen( patientIen ); | |||||
| 113 | Co nsentType consentTyp e = new Co nsentType( ); | |||||
| 114 | co nsentType. setName("N wHIN Autho rization") ; | |||||
| 115 | co nsentDirec tive1.setO ptinConsen tType(cons entType); | |||||
| 116 | ||||||
| 117 | fi nal Consen tDirective consentDi rective2 = new Conse ntDirectiv e(); | |||||
| 118 | co nsentDirec tive2.setC onsentDirI d(999999L) ; | |||||
| 119 | co nsentDirec tive2.setO ptinTS(new Date()); | |||||
| 120 | co nsentDirec tive2.setE xpirationD ate(new Da te()); | |||||
| 121 | co nsentDirec tive2.setO ptinDate(n ew Date()) ; | |||||
| 122 | co nsentDirec tive2.setP atientIen( patientIen ); | |||||
| 123 | co nsentDirec tive2.setO ptoutTS(ne w Date()); | |||||
| 124 | co nsentDirec tive2.setO ptoutDate( new Date() ); | |||||
| 125 | co nsentDirec tive2.setO ptoutReaso n(this.get OptoutReas ons().iter ator() | |||||
| 126 | .next()) ; | |||||
| 127 | co nsentDirec tive2.setO ptinConsen tType(cons entType); | |||||
| 128 | ||||||
| 129 | co nsentDirec tive2.setE xcludedOrg anizations (this | |||||
| 130 | .getAllo wedOrganiz ations()); | |||||
| 131 | ||||||
| 132 | fi nal Collec tion<Conse ntDirectiv e> directi ves = new ArrayList< ConsentDir ective>(); | |||||
| 133 | di rectives.a dd(consent Directive2 ); | |||||
| 134 | di rectives.a dd(consent Directive1 ); | |||||
| 135 | ||||||
| 136 | re turn direc tives; | |||||
| 137 | } | |||||
| 138 | ||||||
| 139 | @Overr ide | |||||
| 140 | public Collectio n<OptoutRe ason> getO ptoutReaso ns() { | |||||
| 141 | fi nal Collec tion<Optou tReason> r easons = n ew ArrayLi st<OptoutR eason>(); | |||||
| 142 | re asons.add( new Optout Reason(1L, "Entered in Error") ); | |||||
| 143 | re asons.add( new Optout Reason(2L, "Patient Deceased") ); | |||||
| 144 | re asons.add( new Optout Reason(3L, "Revoked" )); | |||||
| 145 | re asons.add( new Optout Reason(3L, "New Auth orization" )); | |||||
| 146 | re turn reaso ns; | |||||
| 147 | } | |||||
| 148 | ||||||
| 149 | @Overr ide | |||||
| 150 | public Organizat ion getOrg anizationB yId(final Long id) { | |||||
| 151 | th row new Un supportedO perationEx ception("N ot support ed yet."); | |||||
| 152 | } | |||||
| 153 | ||||||
| 154 | @Overr ide | |||||
| 155 | public Organizat ion getOrg anizationB yOid(final String or gOrid) { | |||||
| 156 | th row new Un supportedO perationEx ception("N ot support ed yet."); | |||||
| 157 | } | |||||
| 158 | ||||||
| 159 | @Overr ide | |||||
| 160 | public Collectio n<PatientD ocumentTyp e> getPati entDocumen tTypes() { | |||||
| 161 | fi nal Collec tion<Patie ntDocument Type> pati entDocumen tType = ne w ArrayLis t<PatientD ocumentTyp e>(); | |||||
| 162 | pa tientDocum entType.ad d(new Pati entDocumen tType(1L, "Authorize ")); | |||||
| 163 | pa tientDocum entType.ad d(new Pati entDocumen tType(2L, "Revoke")) ; | |||||
| 164 | re turn patie ntDocument Type; | |||||
| 165 | } | |||||
| 166 | ||||||
| 167 | @Overr ide | |||||
| 168 | public PolicyCon straints g etPolicyCo nstraints( | |||||
| 169 | fi nal Collec tion<Strin g> patient Iens, Cons entType co nsentType) { | |||||
| 170 | // TODO Auto -generated method st ub | |||||
| 171 | re turn null; | |||||
| 172 | } | |||||
| 173 | ||||||
| 174 | public void setF acilities( final Coll ection<Fac ility> fac ilities) { | |||||
| 175 | th is.facilit ies = faci lities; | |||||
| 176 | } | |||||
| 177 | ||||||
| 178 | public void setO rganizatio ns(final C ollection< Organizati on> organi zations) { | |||||
| 179 | th is.organiz ations = o rganizatio ns; | |||||
| 180 | } | |||||
| 181 | ||||||
| 182 | public void setN onConsumer OnlyOrgani zations(fi nal Collec tion<Organ ization> n onConsumer OnlyOrgani zations) { | |||||
| 183 | th is.nonCons umerOnlyOr ganization s = nonCon sumerOnlyO rganizatio ns; | |||||
| 184 | } | |||||
| 185 | ||||||
| 186 | public void setC onsumerOnl yOrganizat ions(final Collectio n<Organiza tion> cons umerOnlyOr ganization s) { | |||||
| 187 | th is.consume rOnlyOrgan izations = consumerO nlyOrganiz ations; | |||||
| 188 | } | |||||
| 189 | ||||||
| 190 | @Overr ide | |||||
| 191 | public void stor eConsentDi rective(fi nal Consen tDirective consentDi rective) { | |||||
| 192 | // TODO Auto -generated method st ub | |||||
| 193 | } | |||||
| 194 | ||||||
| 195 | @Overr ide | |||||
| 196 | public Location getLocatio nByCode(St ring locat ionCode) { | |||||
| 197 | re turn null; | |||||
| 198 | } | |||||
| 199 | ||||||
| 200 | @Overr ide | |||||
| 201 | public void stor eOrganizat ion(final Organizati on organiz ation) { | |||||
| 202 | th row new Un supportedO perationEx ception("N ot support ed yet."); | |||||
| 203 | } | |||||
| 204 | ||||||
| 205 | @Overr ide | |||||
| 206 | public void stor ePatientDo cument(fin al Patient Document p atientDocu ment) { | |||||
| 207 | // TODO Auto -generated method st ub | |||||
| 208 | } | |||||
| 209 | ||||||
| 210 | @Overr ide | |||||
| 211 | public void upda tePatientD ocument(Pa tientDocum ent patien tDocument) { | |||||
| 212 | // TODO Auto -generated method st ub | |||||
| 213 | } | |||||
| 214 | ||||||
| 215 | public Facility getFacilit yByStation Id(String id) { | |||||
| 216 | re turn null; | |||||
| 217 | } | |||||
| 218 | ||||||
| 219 | @Overr ide | |||||
| 220 | public ConsentTy pe getCons entTypeByN ame(String name) { | |||||
| 221 | Co nsentType type = new ConsentTy pe(); | |||||
| 222 | ty pe.setName ("NwHIN Au thorizatio n"); | |||||
| 223 | re turn type; | |||||
| 224 | } | |||||
| 225 | ||||||
| 226 | @Overr ide | |||||
| 227 | public Collectio n<ConsentD irective> getActiveC onsentDire ctives( | |||||
| 228 | Co llection<S tring> pat ientIens) { | |||||
| 229 | // TODO Auto -generated method st ub | |||||
| 230 | re turn null; | |||||
| 231 | } | |||||
| 232 | ||||||
| 233 | @Overr ide | |||||
| 234 | public PurposeOf Use getPur poseOfUseB yValue(Str ing name) { | |||||
| 235 | if ("TREATME NT".equals (name)) { | |||||
| 236 | PurposeO fUse pou = new Purpo seOfUse(); | |||||
| 237 | pou.setP ouValue("T REATMENT") ; | |||||
| 238 | return p ou; | |||||
| 239 | } else if (" COVERAGE". equals(nam e)) { | |||||
| 240 | PurposeO fUse pou = new Purpo seOfUse(); | |||||
| 241 | pou.setP ouValue("C OVERAGE"); | |||||
| 242 | } | |||||
| 243 | re turn null; | |||||
| 244 | } | |||||
| 245 | ||||||
| 246 | @Overr ide | |||||
| 247 | public Collectio n<Organiza tion> getA llowedNonC onsumerOnl yOrganizat ions() { | |||||
| 248 | // TODO Auto -generated method st ub | |||||
| 249 | re turn this. nonConsume rOnlyOrgan izations; | |||||
| 250 | } | |||||
| 251 | ||||||
| 252 | @Overr ide | |||||
| 253 | public Collectio n<Organiza tion> getA llowedCons umerOnlyOr ganization s() { | |||||
| 254 | // TODO Auto -generated method st ub | |||||
| 255 | re turn this. consumerOn lyOrganiza tions; | |||||
| 256 | } | |||||
| 257 | ||||||
| 258 | @Overr ide | |||||
| 259 | public Collectio n<ConsentD irective> getExpirin gPatientCo nsentDirec tives( | |||||
| 260 | Co llection<S tring> pat ientIens, | |||||
| 261 | Co nsentDirec tiveDetail edExpirati onRequest consentDir ectiveExpi rationRequ est) { | |||||
| 262 | // TODO Auto -generated method st ub | |||||
| 263 | // TODO Some thing a li ttle bette r then thi s... | |||||
| 264 | re turn new A rrayList<C onsentDire ctive>(); | |||||
| 265 | } | |||||
| 266 | ||||||
| 267 | @Overr ide | |||||
| 268 | public ExpiringC onsentConf iguration getExpirin gConsentCo nfiguratio n() { | |||||
| 269 | re turn new E xpiringCon sentConfig uration(); | |||||
| 270 | } | |||||
| 271 | ||||||
| 272 | @Overr ide | |||||
| 273 | public void upda teExpiring ConsentCon figuration (ExpiringC onsentConf iguration config) { | |||||
| 274 | } | |||||
| 275 | ||||||
| 276 | @Overr ide | |||||
| 277 | public Collectio n<Detailed ConsentDir ective> ge tExpiringP atientDeta iledConsen tDirective s(ConsentD irectiveDe tailedExpi rationRequ est consen tDirective Expiration Request) { | |||||
| 278 | re turn null; | |||||
| 279 | } | |||||
| 280 | ||||||
| 281 | @Overr ide | |||||
| 282 | public Collectio n<Facility OptInConse nt> getAut horizedCon sentForSum mary() { | |||||
| 283 | re turn null; | |||||
| 284 | } | |||||
| 285 | ||||||
| 286 | @Overr ide | |||||
| 287 | public Collectio n<Announce mentOrg> g etAllAnnou ncementOrg s() { | |||||
| 288 | re turn null; | |||||
| 289 | } | |||||
| 290 | ||||||
| 291 | @Overr ide | |||||
| 292 | public Collectio n<Announce mentOrg> g etAnnounce mentOrgsBy Announceme nt(Announc ement anno uncement) { | |||||
| 293 | re turn null; | |||||
| 294 | } | |||||
| 295 | ||||||
| 296 | @Overr ide | |||||
| 297 | public void stor eAnnouncem entOrg(Ann ouncementO rg announc eOrg) { | |||||
| 298 | // TODO Auto -generated method st ub | |||||
| 299 | } | |||||
| 300 | ||||||
| 301 | @Overr ide | |||||
| 302 | public void upda teAnnounce mentOrg(An nouncement Org announ ceOrg) { | |||||
| 303 | } | |||||
| 304 | ||||||
| 305 | @Overr ide | |||||
| 306 | public Collectio n<ConsentD irective> getRecentl yExpiredCo nsent() { | |||||
| 307 | re turn new A rrayList<C onsentDire ctive>(); | |||||
| 308 | } | |||||
| 309 | ||||||
| 310 | @Overr ide | |||||
| 311 | public ConsentDi rective ge tConsentDi rective(Lo ng id) { | |||||
| 312 | re turn null; | |||||
| 313 | } | |||||
| 314 | ||||||
| 315 | @Overr ide | |||||
| 316 | public Facility getFacilit yByName(St ring facil ityName) { | |||||
| 317 | re turn null; | |||||
| 318 | } | |||||
| 319 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.