51. EPMO Open Source Coordination Office Redaction File Detail Report

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

51.1 Files compared

# Location File Last Modified
1 OSCIF MHED P3 Annie.zip\cms-staff-app-release-4.0.0@aff5ba84233.zip\automation_phase_2\src\test\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_2\src\test\java\com\agilex\annie\framework\pages\staff StaffPatientSearch.java Wed May 9 13:08:06 2018 UTC

51.2 Comparison summary

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

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

51.4 Active regular expressions

No regular expressions were active.

51.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   import com .agilex.an nie.framew ork.modals .StaffSele ctPatientT oRegister;
  8   import org .junit.Ass ert;
  9  
  10   import jav a.util.NoS uchElement Exception;
  11  
  12   public cla ss StaffPa tientSearc h extends  ClinicalSt affViewPag e {
  13       privat e static f inal Strin g PAGE_TIT LE = "Anni e";
  14  
  15       // Wel come heade r element
  16       privat e static f inal Strin g HEADER_W ELCOME = " id=heading -patient-s earch";
  17       privat e static f inal Strin g HEADER_W ELCOME_TEX T = "Patie nt Search" ;
  18       privat e static f inal Strin g SEARCH_C RITERIA_TE XT = "Vali d Search C riteria (F irst Initi al of Last  Name + La st 4 of SS N; SSN; La st Name, F irst Name;  or Last N ame)";
  19       privat e static f inal Strin g PATIENT_ NOT_FOUND_ ISNTRUCTIO NAL_TEXT =  "You may  now search  and regis ter the pa tient from  VistA or  search Ann ie again." ;
  20       privat e static f inal Strin g[] PATIEN T_NOT_FOUN D_TEXT_ANN IE = {"Pat ient '", " ' Not Foun d in Annie "};
  21       privat e static f inal Strin g[] PATIEN T_NOT_FOUN D_TEXT_VIS TA = {"Pat ient '", " ' Not Foun d in VistA "};
  22       privat e static f inal Strin g REFINE_S ERCH_TEXT  = "Refine  Search Cri terion";
  23  
  24       // Mai n search
  25       privat e static f inal Strin g FIELD_MA IN_SEARCH_ FOR_PATIEN T = "id=in put-sm-sea rch-bar";
  26       privat e static f inal Strin g BUTTON_S EARCH = "i d=patientS earchButto n";
  27  
  28       // Sea rch result s
  29       privat e static f inal Strin g[] LINK_S EARCH_RESU LT_NAME_SU BSTRINGS =  {"id=pati ent[", "]. name"};
  30       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_DOB_SUB STRINGS =  {"id=patie nt[", "].d ob"};
  31       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_AGE_SUB STRINGS =  {"id=patie nt[", "].a ge"};
  32       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_MOBILE_ PHONE_SUBS TRINGS = { "id=patien t[", "].mo bile"};
  33       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_GENDER_ SUBSTRINGS  = {"id=pa tient[", " ].gender"} ;
  34       privat e static f inal Strin g[] TEXT_S EARCH_RESU LT_SSN_SUB STRINGS =  {"id=patie nt[", "].s sn"};
  35       privat e static f inal Strin g TEXT_VAL ID_SEARCH_ CRITERIA =  "id=searc hCriteria" ;
  36       privat e static f inal Strin g TEXT_NO_ PATIEN_FOU ND = "id=n o-patient- found-text ";
  37       privat e static f inal Strin g TEXT_NO_ PATIEN_FOU ND_HEADING  = "id=hea ding-patie nt-not-fou nd";
  38       privat e static f inal Strin g TEXT_NO_ PATIENT_FO UND_VISTA  = "id=refi ne-search- vista";
  39       privat e static f inal Strin g TOO_MANY _VISTA_RES ULTS = "id =too-many- vista-resu lts";
  40  
  41       privat e static f inal Strin g BUTTON_S EARCH_VIST A = "id=re gister-btn ";
  42  
  43  
  44       public  StaffPati entSearch( DriverUtil  driveruti l, WebSite  webSite)  {
  45           su per(driver util, webS ite);
  46       }
  47  
  48       @Overr ide
  49       public  String ge tPageTitle () {
  50           re turn PAGE_ TITLE;
  51       }
  52  
  53       // --- ---------- ------- Wa it for Pag e to Load  ---------- ----------
  54  
  55       public  void wait ForPageToL oad() {
  56           in t attempts  = 0, maxA ttempts =  5;
  57           tr y {
  58                Thread.s leep(3000) ;
  59           }c atch (Inte rruptedExc eption e){
  60                e.printS tackTrace( );
  61           }
  62           tr y {
  63                driverut il.waitFor VisibleTex t(HEADER_W ELCOME, HE ADER_WELCO ME_TEXT, d efaultTime OutSeconds );
  64           }  catch(WebT estingExce ption wte)  {
  65                if(attem pts < maxA ttempts) {
  66                    atte mpts++;
  67                } else {
  68                    thro w wte;
  69                }
  70           }
  71       }
  72  
  73  
  74       // --- ---------- ------- Pa ge Redirec ts ------- ---------- ---
  75  
  76       public  BcmVaFaci lityMessag es kickToV aFacilityM essagesPag e() {
  77           re turn (BcmV aFacilityM essages) w ebSite.set CurrentPag e(BcmVaFac ilityMessa ges.class) ;
  78       }
  79  
  80  
  81       // --- ---------- ------- Se arch for P atients -- ---------- --------
  82  
  83       public  void sear chForPatie ntMain(Str ing search Text) {
  84           dr iverutil.s etElementV alue(FIELD _MAIN_SEAR CH_FOR_PAT IENT, sear chText);
  85           dr iverutil.c lick(BUTTO N_SEARCH);
  86           dr iverutil.w aitSeconds (2);
  87       }
  88  
  89  
  90       // --- ---------- ------- Pa tient Sear ch Results  --------- ---------- -
  91  
  92       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 )); }
  93  
  94       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)) ; }
  95  
  96       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)) ; }
  97  
  98       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)); }
  99  
  100       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)); }
  101  
  102       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)) ; }
  103  
  104       public  int getSe archResult IndexByNam e(String p atientName ) {
  105           in t index =  0;
  106  
  107           wh ile(true)  {
  108                try {
  109                    if(g etSearchRe sultName(i ndex).equa ls(patient Name)) { r eturn inde x; }
  110                    else  { index++ ; }
  111                } catch( NoSuchElem entExcepti on nsee) {
  112                    retu rn -1;  //  No protoc ol is list ed with th e name spe cified nam e, return  an invalid  index
  113                }
  114           }
  115       }
  116  
  117       public  StaffPati entProtoco ls selectP atientSear chResult(i nt resultI ndex) {
  118           dr iverutil.c lick(build ElementLoc ator(LINK_ SEARCH_RES ULT_NAME_S UBSTRINGS,  resultInd ex));
  119           re turn (Staf fPatientPr otocols) w ebSite.set CurrentPag e(StaffPat ientProtoc ols.class) ;
  120       }
  121  
  122       public  StaffPati entProtoco ls selectP atientSear chResult(S tring pati entName) {
  123           re turn selec tPatientSe archResult (getSearch ResultInde xByName(pa tientName) );
  124       }
  125  
  126       public  StaffSele ctPatientT oRegister  selectPati entToRegis terInAnnie (int resul tIndex) {
  127           dr iverutil.c lick(build ElementLoc ator(LINK_ SEARCH_RES ULT_NAME_S UBSTRINGS,  resultInd ex));
  128           wa itSeconds( 2);
  129           re turn (Staf fSelectPat ientToRegi ster) webS ite.setCur rentPage(S taffSelect PatientToR egister.cl ass);
  130       }
  131  
  132       public  StaffSele ctPatientT oRegister  selectPati entToRegis terInAnnie (String pa tientName) {
  133           re turn selec tPatientTo RegisterIn Annie(getS earchResul tIndexByNa me(patient Name));
  134       }
  135  
  136  
  137       // --- ---------- ------- Pa tient Regi stration - ---------- ---------
  138  
  139       public  void sear chVistA(){
  140           dr iverutil.c lick(BUTTO N_SEARCH_V ISTA);
  141           wa itSeconds( 5);
  142       }
  143  
  144  
  145       public  void veri fyValidSer rchCriteri aText(){
  146           As sert.asser tTrue(SEAR CH_CRITERI A_TEXT.equ als(driver util.getTe xt(TEXT_VA LID_SEARCH _CRITERIA) ));
  147       }
  148  
  149       public  void veri fyResultPa tientNotFo undAnnie(S tring sear chText){
  150           St ring searc hResultTex t = String .format("% s%s%s", PA TIENT_NOT_ FOUND_TEXT _ANNIE[0],  searchTex t, PATIENT _NOT_FOUND _TEXT_ANNI E[1]);
  151           As sert.asser tTrue(sear chResultTe xt.equals( driverutil .getText(T EXT_NO_PAT IEN_FOUND_ HEADING))) ;
  152       }
  153  
  154       public  void vrif yPatientNo tFoundInst ructionalT ext(){
  155           As sert.asser tTrue(driv erutil.get Text(TEXT_ NO_PATIEN_ FOUND).con tains(PATI ENT_NOT_FO UND_ISNTRU CTIONAL_TE XT));
  156       }
  157       public  void veri fyResultPa tientNotFo undVistA(S tring sear chText){
  158           wa itSeconds( 9);
  159           St ring searc hResultTex t = String .format("% s%s%s", PA TIENT_NOT_ FOUND_TEXT _VISTA[0],  searchTex t, PATIENT _NOT_FOUND _TEXT_VIST A[1]);
  160           As sert.asser tTrue(sear chResultTe xt.equals( driverutil .getText(T EXT_NO_PAT IENT_FOUND _VISTA)));
  161       }
  162  
  163       public  void veri fyRefineSe archText() {
  164           As sert.asser tTrue(REFI NE_SERCH_T EXT.equals (driveruti l.getText( TOO_MANY_V ISTA_RESUL TS)));
  165       }
  166  
  167       // bel ow is a te mporary co de to hand le switchi ng to sysA dmin
  168       public  SysAdminM anageTextC ommands go ToSysAdmin Page(){
  169             String url  = "https: // IP        /annie-pro vider/#/ma nage/comma nds";
  170           dr iverutil.o pen(url);
  171           re turn (SysA dminManage TextComman ds) webSit e.setCurre ntPage(Sys AdminManag eTextComma nds.class) ;
  172       }
  173   }