102. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/10/2018 8:26:43 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.

102.1 Files compared

# Location File Last Modified
1 OSCIF MHED P3 Annie.zip\cms-staff-app-release-4.0.0@aff5ba84233.zip\automation_phase_3\src\main\java\com\agilex\annie\framework\pages\staff StaffPatientSearch.java Thu Feb 22 10:28:51 2018 UTC
2 OSCIF MHED P3 Annie.zip\cms-staff-app-release-4.0.0@aff5ba84233.zip\automation_phase_3\src\main\java\com\agilex\annie\framework\pages\staff StaffPatientSearch.java Wed May 9 13:08:32 2018 UTC

102.2 Comparison summary

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

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

102.4 Active regular expressions

No regular expressions were active.

102.5 Comparison detail

  1   package co m.agilex.a nnie.frame work.pages .staff;
  2  
  3   import com .agilex.an nie.framew ork.base.C linicalSta ffViewPage ;
  4   import com .agilex.co mmon.selen ium.Driver Util;
  5   import com .agilex.co mmon.selen ium.WebSit e;
  6   import com .agilex.co mmon.selen ium.WebTes tingExcept ion;
  7  
  8   import jav a.util.NoS uchElement Exception;
  9  
  10   public cla ss StaffPa tientSearc h extends  ClinicalSt affViewPag e {
  11       privat e static f inal Strin g PAGE_TIT LE = "Anni e";
  12  
  13       // Wel come heade r element
  14       privat e static f inal Strin g HEADER_W ELCOME = " id=heading -patient-s earch";
  15       privat e static f inal Strin g HEADER_W ELCOME_TEX T = "Patie nt Search" ;
  16  
  17       // Mai n search
  18       privat e static f inal Strin g FIELD_MA IN_SEARCH_ FOR_PATIEN T = "id=in put-sm-sea rch-bar";
  19       privat e static f inal Strin g BUTTON_M AIN_GO = " id=input-c ontent-sea rch-bar";
  20  
  21       // Sea rch result s
  22       privat e static f inal Strin g[] LINK_S EARCH_RESU LT_NAME_SU BSTRINGS =  {"id=pati ent[", "]. name"};
  23       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_DOB_SUB STRINGS =  {"id=patie nt[", "].d ob"};
  24       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_AGE_SUB STRINGS =  {"id=patie nt[", "].a ge"};
  25       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_MOBILE_ PHONE_SUBS TRINGS = { "id=patien t[", "].mo bile"};
  26       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_GENDER_ SUBSTRINGS  = {"id=pa tient[", " ].gender"} ;
  27       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_SSN_SUB STRINGS =  {"id=patie nt[", "].s sn"};
  28  
  29       privat e static f inal Strin g BUTTON_R EGISTER =  "id=regist er-btn";
  30  
  31  
  32       public  StaffPati entSearch( DriverUtil  driveruti l, WebSite  webSite)  {
  33           su per(driver util, webS ite);
  34       }
  35  
  36       @Overr ide
  37       public  String ge tPageTitle () {
  38           re turn PAGE_ TITLE;
  39       }
  40  
  41       // --- ---------- ------- Wa it for Pag e to Load  ---------- ----------
  42  
  43       public  void wait ForPageToL oad() {
  44           in t attempts  = 0, maxA ttempts =  5;
  45           tr y {
  46                Thread.s leep(3000) ;
  47           }c atch (Inte rruptedExc eption e){
  48                e.printS tackTrace( );
  49           }
  50           tr y {
  51                driverut il.waitFor VisibleTex t(HEADER_W ELCOME, HE ADER_WELCO ME_TEXT, d efaultTime OutSeconds );
  52           }  catch(WebT estingExce ption wte)  {
  53                if(attem pts < maxA ttempts) {
  54                    atte mpts++;
  55                } else {
  56                    thro w wte;
  57                }
  58           }
  59       }
  60  
  61  
  62       // --- ---------- ------- Pa ge Redirec ts ------- ---------- ---
  63  
  64       public  BcmVaFaci lityMessag es kickToV aFacilityM essagesPag e() {
  65           re turn (BcmV aFacilityM essages) w ebSite.set CurrentPag e(BcmVaFac ilityMessa ges.class) ;
  66       }
  67  
  68  
  69       // --- ---------- ------- Se arch for P atients -- ---------- --------
  70  
  71       public  void sear chForPatie ntMain(Str ing search Text) {
  72           dr iverutil.s etElementV alue(FIELD _MAIN_SEAR CH_FOR_PAT IENT, sear chText);
  73           dr iverutil.c lick(BUTTO N_MAIN_GO) ;
  74           dr iverutil.w aitSeconds (2);
  75       }
  76  
  77  
  78       // --- ---------- ------- Pa tient Sear ch Results  --------- ---------- -
  79  
  80       public  String ge tSearchRes ultName(in t resultIn dex) { ret urn driver util.getTe xt(buildEl ementLocat or(LINK_SE ARCH_RESUL T_NAME_SUB STRINGS, r esultIndex )); }
  81  
  82       public  String ge tSearchRes ultDob(int  resultInd ex) { retu rn driveru til.getTex t(buildEle mentLocato r(TEXT_SEA RCH_RESULT _DOB_SUBST RINGS, res ultIndex)) ; }
  83  
  84       public  String ge tSearchRes ultAge(int  resultInd ex) { retu rn driveru til.getTex t(buildEle mentLocato r(TEXT_SEA RCH_RESULT _AGE_SUBST RINGS, res ultIndex)) ; }
  85  
  86       public  String ge tSearchRes ultMobileP hone(int r esultIndex ) { return  driveruti l.getText( buildEleme ntLocator( TEXT_SEARC H_RESULT_M OBILE_PHON E_SUBSTRIN GS, result Index)); }
  87  
  88       public  String ge tSearchRes ultGender( int result Index) { r eturn driv erutil.get Text(build ElementLoc ator(TEXT_ SEARCH_RES ULT_GENDER _SUBSTRING S, resultI ndex)); }
  89  
  90       public  String ge tSearchRes ultSsn(int  resultInd ex) { retu rn driveru til.getTex t(buildEle mentLocato r(TEXT_SEA RCH_RESULT _SSN_SUBST RINGS, res ultIndex)) ; }
  91  
  92       public  int getSe archResult IndexByNam e(String p atientName ) {
  93           in t index =  0;
  94  
  95           wh ile(true)  {
  96                try {
  97                    if(g etSearchRe sultName(i ndex).equa ls(patient Name)) { r eturn inde x; }
  98                    else  { index++ ; }
  99                } catch( NoSuchElem entExcepti on nsee) {
  100                    retu rn -1;  //  No protoc ol is list ed with th e name spe cified nam e, return  an invalid  index
  101                }
  102           }
  103       }
  104  
  105       public  StaffPati entProtoco ls selectP atientSear chResult(i nt resultI ndex) {
  106           dr iverutil.c lick(build ElementLoc ator(LINK_ SEARCH_RES ULT_NAME_S UBSTRINGS,  resultInd ex));
  107           re turn (Staf fPatientPr otocols) w ebSite.set CurrentPag e(StaffPat ientProtoc ols.class) ;
  108       }
  109  
  110       public  StaffPati entProtoco ls selectP atientSear chResult(S tring pati entName) {
  111           re turn selec tPatientSe archResult (getSearch ResultInde xByName(pa tientName) );
  112       }
  113  
  114  
  115       // --- ---------- ------- Pa tient Regi stration - ---------- ---------
  116  
  117       public  StaffPati entRegistr ation regi sterPatien t() {
  118           dr iverutil.c lick(BUTTO N_REGISTER );
  119           wa itSeconds( 2);
  120           re turn (Staf fPatientRe gistration ) webSite. setCurrent Page(Staff PatientReg istration. class);
  121       }
  122  
  123       // bel ow is a te mporary co de to hand le switchi ng to sysA dmin
  124       public  SysAdminM anageTextC ommands go ToSysAdmin Page(){
  125             String url  = "https: // IP        /annie-pro vider/#/ma nage/comma nds";
  126           dr iverutil.o pen(url);
  127           re turn (SysA dminManage TextComman ds) webSit e.setCurre ntPage(Sys AdminManag eTextComma nds.class) ;
  128       }
  129   }