4295. EPMO Open Source Coordination Office Redaction File Detail Report

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

4295.1 Files compared

# Location File Last Modified
1 Fri Jun 9 19:51:26 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-web\src\main\java\gov\va\nvap\web\patient PatientAnnounceThread.java Fri Apr 21 20:03:30 2017 UTC

4295.2 Comparison summary

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

4295.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

4295.4 Active regular expressions

No regular expressions were active.

4295.5 Comparison detail

        1   package go v.va.nvap. web.patien t;
        2  
        3   import gov .va.nvap.c ommon.vali dation.Nul lChecker;
        4   import gov .va.nvap.p rivacy.Org anizationT ype;
        5   import gov .va.nvap.s ervice.pdq .PatientDe mographics ;
        6   import gov .va.nvap.s ervice.pdq .PatientDe mographics Query;
        7   import gov .va.nvap.s ervice.pdq .PatientDe mographics Response;
        8   import gov .va.nvap.s ervice.pdq .PdqExcept ion;
        9   import gov .va.nvap.s ervice.pdq .PdqServic e;
        10   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.dat a.PatientA nnouncer;
        11   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.jax b.Announce PatientReq uest;
        12   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.jax b.Announce PatientRes ponse;
        13   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.jax b.Authoriz edOrganiza tionType;
        14   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.jax b.PatientT ype;
        15   import gov .va.nvap.s vc.consent mgmt.stub. adapter.an nounce.jax b.UserType ;
        16   import gov .va.nvap.w eb.helper. facility.F acilityHel per;
        17   import gov .va.nvap.w eb.helper. privacy.Co nsentManag ementHelpe r;
        18   import jav a.util.Col lection;
        19   import jav a.util.Dat e;
        20   import jav a.util.log ging.Level ;
        21   import jav a.util.log ging.Logge r;
        22  
        23   /**
        24    * Class t o create a nd run a s eparate th read for s ingle pati ent announ cements
        25    * 
        26    * @author  Zack Pete rson
        27    */
        28   public cla ss Patient AnnounceTh read imple ments Runn able{
        29       
        30       privat e static f inal Logge r logger =  
        31                Logger.g etLogger(P atientAnno unceThread .class.get Name());
        32       
        33       privat e ConsentM anagementH elper cmsH elper;
        34       privat e Facility Helper fac ilityHelpe r;
        35       privat e PdqServi ce pdqServ ice;
        36       privat e PatientA nnouncer p atientAnno uncer;
        37       privat e String r emoteUserI d;
        38       privat e String p atientIcn;
        39       
        40       privat e Thread t hread;
        41       privat e final St ring threa dName;
        42       
        43       Patien tAnnounceT hread(Stri ng name) {
        44           th is.threadN ame = name ;
        45       }
        46  
        47       /**
        48        * Pat ient annou nce code f or the new  thread
        49        */
        50       @Overr ide
        51       public  void run( ) {
        52           //  Get the o pted-in or ganization s
        53           fi nal Collec tion<Organ izationTyp e> organiz ations = 
        54                    this .cmsHelper .getAllowe dNonConsum erOnlyOrga nizations( );
        55           //  Announce  to each on e of them
        56           if  (NullChec ker.isNotE mpty(organ izations))  {
        57                try {
        58                    bool ean announ ceError =  false;
        59                    fina l String u serId = th is.remoteU serId;
        60                    fina l String u serFacilit yStationId  = 
        61                             this.f acilityHel per.getFac iltyStatio nIdByUserI d(userId);
        62                    // A dd the aut horized or ganization
        63                    Stri ng message  = "Announ cement to  Veteran wi th VA iden tifier "
        64                             + pati entIcn
        65                             + " in itiated by  user id "
        66                             + user Id
        67                             + " fr om facilit y "
        68                             + user FacilitySt ationId
        69                             + ".\n \nAnnounce  Results:\ n ";
        70  
        71                    fina l Announce PatientReq uest annou ncePatient Request =  new Announ cePatientR equest();
        72                    anno uncePatien tRequest.s etCreatedD ate(new Da te());
        73                    fina l PatientD emographic sQuery que ry = new P atientDemo graphicsQu ery();
        74                    quer y.setPatie ntId(patie ntIcn);
        75                    fina l PatientD emographic sResponse  patientDem ographicsR esponse =  this.pdqSe rvice
        76                             .getPa tientDemog raphics(qu ery);
        77                    fina l PatientD emographic s demogpra hics = pat ientDemogr aphicsResp onse
        78                             .getPa tientDemog raphics();
        79                    fina l PatientT ype patien tType = ne w PatientT ype();
        80                    pati entType.se tPatientId (patientIc n);
        81                    pati entType.se tGivenName (demogprah ics.getFir stName());
        82                    pati entType.se tMiddleNam e(demogpra hics.getMi ddleName() );
        83                    pati entType.se tLastName( demogprahi cs.getLast Name());
        84                    pati entType.se tSsn(demog prahics.ge tSsn());
        85                    anno uncePatien tRequest.s etPatient( patientTyp e);
        86  
        87                    fina l UserType  userType  = new User Type();
        88                    user Type.setUs erId(userI d);
        89                    user Type.setFa cilityNumb er(userFac ilityStati onId);
        90                    anno uncePatien tRequest.s etUser(use rType);
        91  
        92                    for  (final Org anizationT ype organi zation : o rganizatio ns) {
        93                         final Auth orizedOrga nizationTy pe authori zedOrganiz ation = ne w Authoriz edOrganiza tionType() ;
        94                         authorized Organizati on.setOrgN umber(orga nization
        95                                 .g etOrgNumbe r());
        96                         authorized Organizati on.setOrgN ame(organi zation
        97                                 .g etOrgName( ));
        98                         authorized Organizati on.setOrgO id(organiz ation
        99                                 .g etOrgOid() );
        100                         announcePa tientReque st.getAuth orizedOrga nizations( )
        101                                 .a dd(authori zedOrganiz ation);
        102                    }
        103  
        104                    try  {
        105                         final Anno uncePatien tResponse  announcePa tientRespo nse = 
        106                                 th is.patient Announcer. announceAl l(announce PatientReq uest);
        107                         if (announ cePatientR esponse.ge tResult()  > 0) {
        108                             // Ann ouncement  to Veteran  with iden tifier :
        109                             // <id >
        110                             messag e = messag e + "SUCCC ESS! [Resp onse Code: "
        111                                      + announ cePatientR esponse.ge tResult()
        112                                      + "]";
        113  
        114                         } else {
        115                             messag e = messag e + "FAILU RE! [Respo nse Code:"
        116                                      + announ cePatientR esponse.ge tResult()
        117                                      + "]";
        118                             announ ceError =  true;
        119                         }
        120  
        121                    } ca tch (final  Exception  ex) {
        122                         announceEr ror = true ;
        123                         message =  message
        124                                 +  "FAILURE!  Exception  Thrown - R eason: "
        125                                 +  ex.getMess age();
        126                    }
        127  
        128                    if ( announceEr ror) {
        129                         // Throw a n exceptio n with the  message
        130                         logger.log (Level.INF O, "Announ ce Error:  {0}", mess age);
        131                    }
        132  
        133                } catch  (final Pdq Exception  ex) {
        134                    thro w new Runt imeExcepti on(ex);
        135                }
        136           }
        137       }
        138  
        139       /**
        140        * Cre ates new t hread and  starts it
        141        */
        142       public  void star t() {
        143           if  (thread = = null) {
        144                thread =  new Threa d(this, th readName);
        145                thread.s tart();
        146           }
        147       }
        148       
        149       public  void setC msHelper(C onsentMana gementHelp er cmsHelp er) {
        150           th is.cmsHelp er = cmsHe lper;
        151       }
        152  
        153       public  void setF acilityHel per(Facili tyHelper f acilityHel per) {
        154           th is.facilit yHelper =  facilityHe lper;
        155       }
        156  
        157       public  void setP dqService( PdqService  pdqServic e) {
        158           th is.pdqServ ice = pdqS ervice;
        159       }
        160  
        161       public  void setP atientAnno uncer(Pati entAnnounc er patient Announcer)  {
        162           th is.patient Announcer  = patientA nnouncer;
        163       }
        164  
        165       public  void setR emoteUserI d(String r emoteUserI d) {
        166           th is.remoteU serId = re moteUserId ;
        167       }
        168  
        169       public  void setP atientIcn( String pat ientIcn) {
        170           th is.patient Icn = pati entIcn;
        171       }
        172       
        173   }