24. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/11/2017 8:05:38 AM 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.

24.1 Files compared

# Location File Last Modified
1 MHV_CIF_2017.4.0.0.zip\MHV_CIF_2017.4.0.0\MHV_CIF_2017.4.0.0\mhv_source\mhv_rxrefill\mhv-rx-refill-portal-main\src\main\java\gov\va\med\mhv\rxrefill\service\impl MyCompleteMedicationsServiceImpl.java Tue May 2 23:49:06 2017 UTC
2 MHV_CIF_2017.4.0.0.zip\MHV_CIF_2017.4.0.0\MHV_CIF_2017.4.0.0\mhv_source\mhv_rxrefill\mhv-rx-refill-portal-main\src\main\java\gov\va\med\mhv\rxrefill\service\impl MyCompleteMedicationsServiceImpl.java Thu Sep 7 19:06:44 2017 UTC

24.2 Comparison summary

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

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

24.4 Active regular expressions

No regular expressions were active.

24.5 Comparison detail

  1   package go v.va.med.m hv.rxrefil l.service. impl;
  2  
  3   import gov .va.med.mh v.common.a pi.excepti on.MHVExce ption;
  4   import gov .va.med.mh v.common.a pi.util.Re sponseUtil ;
  5   import gov .va.med.mh v.rxrefill .converter .MyComplet eMedicatio nConverter ;
  6   import gov .va.med.mh v.rxrefill .dto.Medic ationAndSu pplimentCr iteria;
  7   import gov .va.med.mh v.rxrefill .dto.Medic ationHisto ryDTO;
  8   import gov .va.med.mh v.rxrefill .dto.MyCom pleteMedic ationDTO;
  9   import gov .va.med.mh v.rxrefill .dto.Presc riptionDTO ;
  10   import gov .va.med.mh v.rxrefill .service.M edicationS upplementS ervice;
  11   import gov .va.med.mh v.rxrefill .service.M yCompleteM edications Service;
  12   import gov .va.med.mh v.rxrefill .service.P harmacyRef illWebServ ice;
  13  
  14   import jav a.util.Arr ayList;
  15   import jav a.util.Lis t;
  16  
  17   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  18   import org .springfra mework.bea ns.factory .annotatio n.Qualifie r;
  19   import org .springfra mework.ste reotype.Co mponent;
  20  
  21   @Component
  22   public cla ss MyCompl eteMedicat ionsServic eImpl impl ements MyC ompleteMed icationsSe rvice{
  23           
  24           @A utowired
  25           @Q ualifier(" prService" )
  26           pr ivate Phar macyRefill WebService   pharmacy RefillServ ice;
  27           
  28           @A utowired
  29           pr ivate Medi cationSupp lementServ ice  medic ationSuppl ementServi ce;
  30  
  31           @O verride
  32           pu blic List< MyComplete Medication DTO> getCo mpleteMedi cationList ( Medicati onAndSuppl imentCrite ria search Criteria)   throws MH VException  {
  33                    List <MyComplet eMedicatio nDTO> comp letMedicat ionList =  null;
  34                    Resp onseUtil<L ist<Prescr iptionDTO> > prescrip tionRespon se = null;
  35                    try{
  36                             
  37                             comple tMedicatio nList = ne w ArrayLis t<MyComple teMedicati onDTO>();
  38                             List<M yCompleteM edicationD TO> vaPres criptionLi st =null;
  39                             List<P rescriptio nDTO> pres clist=null ;
  40                             
  41                             prescr iptionResp onse = pha rmacyRefil lService.g etPrescrip tionsHisto ry(searchC riteria.ge tUserProfi leId());
  42  
  43                    if ( !prescript ionRespons e.isFailur e()) {
  44                             prescl ist = (Lis t<Prescrip tionDTO>)  prescripti onResponse .getPojoOb ject();
  45                             }
  46  
  47                             if(pre sclist !=  null){
  48                                       vaPrescrip tionList = MyComplete Medication Converter. convert DNS    yCompList( presclist) ;
  49                             }
  50                             List<M edicationH istoryDTO>   historyL ist = medi cationSupp lementServ ice.getMed icationsBy UserId(sea rchCriteri a.getUserP rofileId() );
  51                             List<M yCompleteM edicationD TO> nonVAP rescriptio nList=null ;
  52                             if(his toryList ! = null){
  53                                      nonVAPre scriptionL ist = MyCo mpleteMedi cationConv erter.conv ertMedicat ionHistory DTOList(hi storyList) ;
  54                             }
  55                             filter Source(com pletMedica tionList,v aPrescript ionList,no nVAPrescri ptionList, searchCrit eria);
  56                             comple tMedicatio nList=filt erStatus(c ompletMedi cationList ,searchCri teria);
  57                             comple tMedicatio nList=filt erCategory (completMe dicationLi st,searchC riteria);
  58                    
  59                    } ca tch(Except ion e){
  60                             throw  new MHVExc eption("An  error occ urred whil e getting  complete m edications  list.", e );
  61                    }
  62                    retu rn complet Medication List;
  63           }
  64  
  65           
  66           pr ivate List <MyComplet eMedicatio nDTO> filt erCategory (List<MyCo mpleteMedi cationDTO>  completeM edicationL ist,
  67                             Medica tionAndSup plimentCri teria sear chCriteria ) {
  68                    List <MyComplet eMedicatio nDTO> comp Medication List = new  ArrayList <MyComplet eMedicatio nDTO>();
  69                    if(c ompleteMed icationLis t != null  && complet eMedicatio nList.size () > 0){
  70                             if(sea rchCriteri a.getHerbs Suppliment s() && sea rchCriteri a.getOtc()
  71                                               && searchC riteria.ge tOther() & & searchCr iteria.get RxMedicati on()){
  72                                      compMedi cationList =completeM edicationL ist;
  73                             }else{
  74                                      for(MyCo mpleteMedi cationDTO  prescDTO:c ompleteMed icationLis t ){
  75                                               if(!search Criteria.g etHerbsSup pliments() ){
  76                                                       if (prescDTO. getCategor y().equals ("Herbal")  || 
  77                                                           prescDTO. getCategor y().equals ("Suppleme nt")  ){
  78                                                           continue;
  79                                                       }
  80                                               }
  81                                               if(!search Criteria.g etOtc()){
  82                                                       if (prescDTO. getCategor y().equals ("Over-the -Counter") ){
  83                                                           continue;
  84                                                       }
  85                                               }
  86                                               if(!search Criteria.g etOther()) {
  87                                                       if (prescDTO. getCategor y().equals ("Other")) {
  88                                                           continue;
  89                                                       }
  90                                               }
  91                                               if(!search Criteria.g etRxMedica tion()){
  92                                                       if (prescDTO. getCategor y().equals ("Rx Medic ation")){
  93                                                           continue;
  94                                                       }
  95                                               }
  96                                               compMedica tionList.a dd(prescDT O);
  97                                      }
  98                             }
  99                    }
  100                    retu rn compMed icationLis t;
  101           }
  102  
  103           pr ivate List <MyComplet eMedicatio nDTO> filt erStatus(L ist<MyComp leteMedica tionDTO> c ompleteMed icationLis t,
  104                             Medica tionAndSup plimentCri teria sear chCriteria ) {
  105                    List <MyComplet eMedicatio nDTO> comp Medication List = new  ArrayList <MyComplet eMedicatio nDTO>();
  106                    if(c ompleteMed icationLis t != null  && complet eMedicatio nList.size () > 0){
  107                             if(sea rchCriteri a.getStatu s().equals ("BOTH")){
  108                                      compMedi cationList =completeM edicationL ist;
  109                             }else  if(searchC riteria.ge tStatus(). equals("AC TIVE")){
  110                                      for(MyCo mpleteMedi cationDTO  prescDTO:c ompleteMed icationLis t ){
  111                                               if(prescDT O.getDispS tatus().eq uals("Acti ve")){
  112                                                       co mpMedicati onList.add (prescDTO) ;
  113                                               }
  114                                      }
  115                             }else{
  116                                      for(MyCo mpleteMedi cationDTO  prescDTO:c ompleteMed icationLis t ){
  117                                               if(prescDT O.getDispS tatus().eq uals("Expi red") ||
  118                                                  prescDT O.getDispS tatus().eq uals("Disc ontinued") ){
  119                                                       co mpMedicati onList.add (prescDTO) ;
  120                                               }
  121                                      }
  122                             }
  123                    }
  124                    retu rn compMed icationLis t;
  125           }
  126  
  127           pr ivate void  filterSou rce(List<M yCompleteM edicationD TO> comple tMedicatio nList,List <MyComplet eMedicatio nDTO> vaPr escription List,
  128                             List<M yCompleteM edicationD TO> nonVAP rescriptio nList, Med icationAnd Suppliment Criteria s earchCrite ria) {
  129                    
  130                    if(s earchCrite ria.getSou rce().equa ls("BOTH") ){
  131                             if(vaP rescriptio nList != n ull){
  132                                      completM edicationL ist.addAll (vaPrescri ptionList) ;
  133                             }
  134                             if(non VAPrescrip tionList ! = null){
  135                                      completM edicationL ist.addAll (nonVAPres criptionLi st);
  136                             }
  137                    }els e if(searc hCriteria. getSource( ).equals(" VA")){
  138                             if(vaP rescriptio nList != n ull){
  139                                      completM edicationL ist.addAll (vaPrescri ptionList) ;
  140                             }
  141                    }els e if(searc hCriteria. getSource( ).equals(" NONVA")){
  142                             if(non VAPrescrip tionList ! = null){
  143                                      completM edicationL ist.addAll (nonVAPres criptionLi st);
  144                             }
  145                    }
  146           }
  147   }