3857. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/9/2017 3:50:56 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.

3857.1 Files compared

# Location File Last Modified
1 Fri Jun 9 19:50:56 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\announce AnnouncerImpl.java Fri Apr 21 20:03:28 2017 UTC

3857.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 1 240
Removed 0 0

3857.3 Comparison options

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

3857.4 Active regular expressions

No regular expressions were active.

3857.5 Comparison detail

        1   /*
        2    * To chan ge this te mplate, ch oose Tools  | Templat es
        3    * and ope n the temp late in th e editor.
        4    */
        5   package go v.va.nvap. server.ann ounce;
        6  
        7   import gov .va.nvap.s vc.consent mgmt.Annou ncementOrg Controller Interface;
        8   import gov .va.nvap.s vc.consent mgmt.jpa.e xceptions. Preexistin gEntityExc eption;
        9   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.dat a.Announce ment;
        10   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.dat a.Announce mentBatchS ummary;
        11   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.dat a.Announce mentOrg;
        12   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.dat a.Announce rInterface ;
        13   import gov .va.nvap.s vc.consent mgmt.stub. data.Organ ization;
        14   import jav a.util.Arr ayList;
        15  
        16   import jav a.util.Col lection;
        17   import jav a.util.Dat e;
        18   import jav a.util.Has hMap;
        19   import jav a.util.Has hSet;
        20   import jav a.util.Lis t;
        21   import org .springfra mework.bea ns.factory .annotatio n.Required ;
        22  
        23   /**
        24    * 
        25    * @author  vhaislegb erb
        26    * @author  Irakli Ka kushadze
        27    * @author  Zack Pete rson
        28    */
        29   public cla ss Announc erImpl imp lements An nouncerInt erface {
        30       privat e Announce rControlle rInterface  patientAn nounceCont roller;
        31       
        32       privat e Announce mentOrgCon trollerInt erface ann ouncementO rgControll er;
        33       
        34       /*
        35            *  Timeframe  to block  Opt-In Ann ouncements
        36            * /
        37           pr ivate int  announceEx clusionTim eframeHour s;
        38  
        39           @O verride
        40           pu blic Strin g createAn nouncement sBatch(
        41                             final  Organizati on targete dOrganizat ion, final  String us erId,
        42                             final  Date dateR angeStart,  final Dat e dateRang eStop,
        43                             final  boolean re announce)  {
        44  
        45                    retu rn this.pa tientAnnou nceControl ler.create AnnounceBa tch(
        46                                      targeted Organizati on, userId , dateRang eStart, da teRangeSto p,
        47                                      reannoun ce);
        48           }
        49  
        50           @O verride
        51           pu blic Strin g createAn nouncement sBatch(
        52                             final  Organizati on targete dOrganizat ion, final  String us erId, Hash Set<String > iens) {
        53  
        54                    retu rn this.pa tientAnnou nceControl ler.create AnnounceBa tch(target edOrganiza tion, user Id, iens);
        55           }
        56       
        57       @Overr ide
        58       public  String cr eateAnnoun cementsBat ch(
        59                             final  Collection <Organizat ion> targe tedOrganiz ations, fi nal String  userId,
        60                             final  Date dateR angeStart,  final Dat e dateRang eStop,
        61                             final  boolean re announce)  {
        62  
        63                    Stri ng batchId  = this.pa tientAnnou nceControl ler.create AnnounceBa tch(
        64                                      targeted Organizati ons, userI d, dateRan geStart, d ateRangeSt op,
        65                                      reannoun ce);
        66  
        67           re turn batch Id;
        68           }
        69  
        70           @O verride
        71           pu blic Strin g createAn nouncement sBatch(
        72                             final  Collection <Organizat ion> targe tedOrganiz ations, fi nal String  userId, H ashSet<Str ing> iens)  {
        73  
        74                    Stri ng batchId  = this.pa tientAnnou nceControl ler.create AnnounceBa tch(null,  userId, ie ns);
        75  
        76           re turn batch Id;
        77           }
        78  
        79       @Overr ide
        80       public  void crea teAnnounce mentOrg(An nouncement Org announ ceOrg) {
        81           tr y {
        82                this.ann ouncementO rgControll er.create( announceOr g);
        83           }  catch (Pre existingEn tityExcept ion ex) {
        84                // Annou nceOrg alr eady exist s
        85           }  catch (Exc eption ex)  {
        86                // Annou nceOrg sto rage fail
        87           }
        88       }
        89  
        90           @O verride
        91           pu blic Annou ncement ge tAnnouncem entById(fi nal Long a nnouncemen tId) {
        92                    retu rn this.pa tientAnnou nceControl ler.findAn nouncement (announcem entId);
        93           }
        94  
        95       /**
        96        * Fin ds all ann ouncements  for a par ticular us er.
        97        * 
        98        * @pa ram userId  User ID
        99        * @re turn List  of objects  of type A nnouncemen t found fo r this use r
        100        */
        101       @Overr ide
        102       public  List<Anno uncement>  getAnnounc ementsByUs erId(Strin g userId)  {
        103           re turn this. patientAnn ounceContr oller.find Announceme ntsByUserI d(userId);
        104       }
        105       
        106       /**
        107        * Fin ds all ann ouncements  for a lis t of conse nt directi ve ID numb ers
        108        * 
        109        * @pa ram consen tDirective Ids list o f consent  directive  ID numbers
        110        * @re turn List  of objects  of type A nnouncemen t found fo r this pat ient
        111        */
        112       @Overr ide
        113       public  List<Anno uncement>  getAnnounc ementsByCo nsentDirec tiveId(Lis t<Long> co nsentDirec tiveIds) {
        114           re turn this. patientAnn ounceContr oller.find Announceme ntsByConse ntDirectiv eId(consen tDirective Ids);
        115       }
        116       
        117       /**
        118        * Fin ds all ann ouncements  created a fter input  date for  a particul ar patient .
        119        * 
        120        * @pa ram create dTs
        121        * @pa ram patien tIen
        122        *
        123        * @re turn List  of objects  of type A nnouncemen t found fo r this pat ient
        124        */
        125       @Overr ide
        126       public  List<Anno uncement>  getNonBatc hAnnouncem entsByCrea tedTs(Date  createdTs , String p atientIen)  {
        127           re turn this. patientAnn ounceContr oller.find NonBatchAn nouncement sByCreated Ts(created Ts, patien tIen);
        128       }
        129  
        130           @O verride
        131           pu blic List< Announceme ntBatchSum mary> getB atchSummar y(
        132                             final  List<Strin g> batchId s) {
        133           Li st<Announc ementBatch Summary> s ummaries =  
        134                    this .announcem entOrgCont roller.ret rieveBatch Summaries( batchIds);
        135           if  (summarie s == null  || summari es.isEmpty ()) {
        136                return t his.patien tAnnounceC ontroller. retrieveBa tchSummari es(batchId s);
        137           }
        138           re turn summa ries;
        139           }
        140       
        141       @Overr ide
        142       public  void remo veByAnnoun cement(Ann ouncement  announceme nt) {
        143           tr y {
        144                this.ann ouncementO rgControll er.removeB yAnnouncem ent(announ cement);
        145           }  catch (Exc eption ex)  {
        146                // Annou nceOrg des troy fail
        147           }
        148       }
        149  
        150           @O verride
        151           pu blic List< Announceme ntBatchSum mary> getB atchSummar yByDateRan ge(
        152                             final  Date start Date, fina l Date end Date) {
        153                    retu rn this.pa tientAnnou nceControl ler
        154                                      .retriev eBatchSumm ariesByDat eRange(sta rtDate, en dDate);
        155           }
        156  
        157           @O verride
        158           pu blic Colle ction<Anno uncement>  getUnsched uledAnnoun cementsByB atchId(
        159                             final  String bat chId, fina l int maxA nnouncemen ts, final  int firstR esult) {
        160                    retu rn this.pa tientAnnou nceControl ler
        161                                      .findUns cheduledAn nouncement sByBatchId (batchId,
        162                                                       ma xAnnouncem ents, firs tResult);
        163           }
        164  
        165           @O verride
        166           pu blic void  removeAnno uncementBa tches(fina l Collecti on<String>  batchIds)
        167                             throws  Announcer Exception  {
        168           fo r (String  batchId :  batchIds)  {
        169                List<Ann ouncement>  announcem ents = thi s.patientA nnounceCon troller.fi ndAllAnnou ncementsBy BatchId(ba tchId);
        170                for (Ann ouncement  announceme nt : annou ncements)  {
        171                    this .announcem entOrgCont roller.rem oveByAnnou ncement(an nouncement );
        172                }
        173           }
        174                    this .patientAn nounceCont roller.rem oveByBatch Id(batchId s);
        175           }
        176  
        177           @O verride
        178           pu blic List< Announceme ntBatchSum mary> retr ieveBatchS ummaries(
        179                             final  Date start Date, fina l Date end Date, fina l String o rgOid,
        180                             final  String use rId, final  int first Result, fi nal int ma xResults)  {
        181                    retu rn this.pa tientAnnou nceControl ler.retrie veBatchSum maries(sta rtDate,
        182                                      endDate,  orgOid, u serId, fir stResult,  maxResults );
        183           }
        184  
        185           /* *
        186            *  @param pa tientAnnou nceControl ler
        187            * /
        188           pu blic void  setPatient AnnounceCo ntroller(
        189                             final  AnnouncerC ontrollerI nterface p atientAnno unceContro ller) {
        190                    this .patientAn nounceCont roller = p atientAnno unceContro ller;
        191           }
        192  
        193           @O verride
        194           pu blic void  storeAnnou ncement(fi nal Announ cement ann ouncement)  {
        195                    if ( announceme nt.getAnno uncementId () == null ) {
        196                             try {
        197                                      this.pat ientAnnoun ceControll er.create( announceme nt);
        198                             } catc h (final E xception e x) {
        199                                      throw ne w Announce rException (
        200                                                       "A n error oc curred whi le creatin g the new  announceme nt in the  persistent  store.",
        201                                                       ex );
        202                             }
        203                    } el se {
        204                             try {
        205                                      this.pat ientAnnoun ceControll er.edit(an nouncement );
        206                             } catc h (final E xception e x) {
        207                                      throw ne w Announce rException (
        208                                                       "A n error oc cured whil e updating  the annou ncement.",  ex);
        209                             }
        210                    }
        211           }
        212  
        213       public  Announcem entOrgCont rollerInte rface getA nnouncemen tOrgContro ller() {
        214           re turn annou ncementOrg Controller ;
        215       }
        216  
        217       public  void setA nnouncemen tOrgContro ller(Annou ncementOrg Controller Interface  announceme ntOrgContr oller) {
        218           th is.announc ementOrgCo ntroller =  announcem entOrgCont roller;
        219       }
        220       
        221       @Requi red
        222       public  void setA nnounceExc lusionTime frameHours (int annou nceExclusi onTimefram eHours) {
        223           th is.announc eExclusion TimeframeH ours = ann ounceExclu sionTimefr ameHours;
        224       }
        225       
        226       @Overr ide
        227       public  int getAn nounceExcl usionTimef rameHours( ) {
        228                    retu rn this.an nounceExcl usionTimef rameHours;
        229           }
        230       
        231       @Overr ide
        232       public  List<Anno uncementOr g> getAnno uncementOr gsByAnnoun cement(fin al Announc ement anno uncement)  {
        233           re turn this. announceme ntOrgContr oller.find Announceme ntOrgsByAn nouncement (announcem ent);
        234       }
        235       
        236       @Overr ide
        237       public  HashMap g etAnnounce mentsByBat chIdWithPa ging(Strin g batchId,  String or gId, Integ er startRo w, Integer  maxRows)  {
        238           re turn this. patientAnn ounceContr oller.find AllAnnounc ementsByBa tchIdWithP aging(batc hId, orgId , startRow , maxRows) ;
        239       }
        240   }