942. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/3/2017 11:16:06 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.

942.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features\steps vx_sync_steps.rb Tue Jan 10 16:20:50 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features\steps vx_sync_steps.rb Mon Oct 2 20:08:37 2017 UTC

942.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 354
Changed 2 4
Inserted 0 0
Removed 0 0

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

942.4 Active regular expressions

No regular expressions were active.

942.5 Comparison detail

  1   require "T estSupport .rb"
  2   require "V xSync.rb"
  3   require "h ttparty"
  4  
  5   Then(/^the  client re quests syn c process  for patien t with pid  "(.*?)" t hrough VX\ -Sync API$ /) do |pid |
  6     base_url  = Default Login.vx_s ync_url
  7     icn_pid  = check_fo r_icn_or_p id(pid)
  8     p path =  "#{base_u rl}/sync/d oLoad?#{ic n_pid}=#{p id}"
  9     
  10     vx_sync  = VxSync.n ew
  11     @respons e = vx_syn c.sync_req uest(path)
  12     
  13     expected _code_and_ error_mesg  = [202, " The sync r equest is  failed!"]
  14     vx_sync. response_h andler(@re sponse, ex pected_cod e_and_erro r_mesg)
  15  
  16   end
  17  
  18   Given(/^a  patient wi th pid "(. *?)" has n ot been sy nced throu gh VX\-Syn c API for  "(.*?)" si te\(s\)$/)  do |pid,  site_name_ list|
  19     max_wait _time = 30 0
  20     clear_pa tient = fa lse
  21     base_url  = Default Login.vx_s ync_url
  22     icn_pid  = check_fo r_icn_or_p id(pid)
  23     p status _path = "# {base_url} /sync/stat us?#{icn_p id}=#{pid} "
  24     
  25     vx_sync  = VxSync.n ew
  26     sync_req uested_sta tus = vx_s ync.check_ patient_if _has_been_ synced(sta tus_path,  site_name_ list)
  27  
  28     if sync_ requested_ status ==  "Campleted "
  29       p "The  patient h as been sy nced"
  30       clear_ patient =  true
  31     elsif sy nc_request ed_status  == "Reques ted_Not_Co mpleted"
  32       p "The  patient h as been sy nced but t he sync is  not compl eted yet!"
  33       vx_syn c.waiting_ message =  "Waiting f or syncing  to be com pleted at  site:"
  34       sync_c ompleted =  vx_sync.c heck_statu s_until_sy nc_process _completed (status_pa th, site_n ame_list,  check_opd_ pendeing =  false, ma x_wait_tim e)
  35       clear_ patient =  true
  36     else
  37       p "The  patient h as not bee n synced y et"
  38       clear_ patient =  false
  39     end
  40     
  41     if clear _patient = = true
  42       p clea r_path = " #{base_url }/sync/cle arPatient? #{icn_pid} =#{pid}"
  43         # http:// IP             /sync/clea rPatient?p id=9E7A;22 7
  44       respon se = vx_sy nc.clear_r equest(cle ar_path)
  45       fail " Unsync pat ient faild ! Expected  response  code 202,  received # {response. code}" unl ess respon se.code ==  202
  46     end
  47   end
  48  
  49   Given(/^th e client r equests sy nc status  for patien t with pid  "(.*?)"$/ ) do  |pid |
  50     base_url  = Default Login.vx_s ync_url
  51     @respons e = nil
  52     icn_pid  = check_fo r_icn_or_p id(pid) 
  53     p status _path = "# {base_url} /sync/stat us?#{icn_p id}=#{pid} "
  54    
  55     vx_sync  = VxSync.n ew
  56     json_obj ect = vx_s ync.find_s ync_status _body(stat us_path)
  57     @respons e = vx_syn c.response
  58     fail "Th e sync sta tus failed . Response : \n #{@re sponse}" i f @respons e == nil # || @respon se.code !=  200
  59   end
  60  
  61   Given(/^a  patient wi th pid "(. *?)" has b een synced  through V X\-Sync AP I for "(.* ?)" site\( s\)$/) do  |pid, site _name_list |
  62     # @@pid_ site_list_ not_sync =  TestSuppo rt.pid_sit e_list_not _sync
  63     # @@oper ational_da ta_synced  = TestSupp ort.operat ional_data _synced
  64     # @@oper ational_sy nc_been_ch ecked = Te stSupport. operationa l_sync_bee n_checked
  65     vx_sync  = VxSync.n ew
  66     vx_sync. check_pid_ if_found_l ist_not_sy nc(pid, si te_name_li st)
  67     
  68     # p stat us_path =  "#{base_ur l}/status/ #{pid}?det ailed=true "  
  69       
  70     base_url  = Default Login.vx_s ync_url
  71     icn_pid  = check_fo r_icn_or_p id(pid)
  72     p sync_p ath = "#{b ase_url}/s ync/doLoad ?#{icn_pid }=#{pid}"
  73     p status _path = "# {base_url} /sync/stat us?#{icn_p id}=#{pid} "
  74     
  75     max_wait _time = 30 0
  76     @respons e = nil
  77     sync_req uested_sta tus = vx_s ync.check_ patient_if _has_been_ synced(sta tus_path,  site_name_ list)
  78  
  79     if sync_ requested_ status ==  "Campleted "
  80       p "The  patient h as been sy nced"
  81     elsif sy nc_request ed_status  == "Reques ted_Not_Co mpleted"
  82       p "The  patient h as been sy nced but t he sync is  not compl eted yet!"
  83       vx_syn c.waiting_ message =  "Waiting f or syncing  to be com pleted at  site:"
  84       sync_c ompleted =  vx_sync.c heck_statu s_until_sy nc_process _completed (status_pa th, site_n ame_list,  check_opd_ pendeing =  false, ma x_wait_tim e)
  85     else
  86       p "The  patient h as not bee n synced y et"
  87       respon se = vx_sy nc.sync_re quest(sync _path)
  88       expect ed_code_an d_error_me sg = [202,  "The pati ent has no t been syn ced yet an d the sync  request i s failed!" ]
  89       vx_syn c.response _handler(r esponse, e xpected_co de_and_err or_mesg)
  90       
  91       vx_syn c.waiting_ message =  "Waiting f or syncing  to be com pleted at  site:"
  92       sync_c ompleted =  vx_sync.c heck_statu s_until_sy nc_process _completed (status_pa th, site_n ame_list,  check_opd_ pendeing =  false, ma x_wait_tim e)
  93     end
  94     
  95     vx_sync. save_pid_a nd_site_no t_sync(pid ) if sync_ completed  == false
  96     # p @@pi d_site_lis t_not_sync
  97     fail "Th e sync did  not compl ete for si te(s): \n  #{@site_is _not_sync} " if sync_ completed  == false
  98     @respons e = vx_syn c.response  
  99   end
  100  
  101   When(/^the  client re quests ope rational s ync status  for "(.*? )" site$/)  do |site_ name|
  102     operatio nal_sync_c ompleted =  false
  103     base_jds _url = Def aultLogin. jds_url
  104     p opd_pa th = "#{ba se_jds_url }/statusod /#{site_na me}"
  105     vx_sync  = VxSync.n ew
  106  
  107     json = v x_sync.fin d_sync_sta tus_body(o pd_path)
  108     @respons e = vx_syn c.response
  109     if json  != nil &&  json["comp letedStamp "] !=nil
  110       operat ional_sync _completed  = true
  111       # p "T his is the  responce  when testi ng the OPD  for site  #{site_nam e} >>>> #{ JSON.parse (@@respons e.body)}"
  112     else
  113       operat ional_sync _completed  = vx_sync .wait_unti l_site_ope rational_s ync_is_com pleted(bas e_jds_url,  site_name )
  114       p "*** ******* Op erational  data has b een synced  for #{sit e_name} ** ********"
  115       # p "T his is the  responce  when testi ng the OPD  for site  #{site_nam e} >>>> #{ JSON.parse (@@respons e.body)}"
  116     end
  117     fail "Th e operatio nal sync d id not com plete for  site: \n # {site_name }" unless  operationa l_sync_com pleted
  118   end
  119  
  120   Then(/^the  operation al data re sults cont ain differ ent domain s from "(. *?)"$/) do  |site_nam e, table|
  121     missing_ domain = " "
  122     json_obj ect = JSON .parse(@re sponse.bod y)
  123     table.ro ws.each do  |domain,  k|
  124       domain _runtime =  json_obje ct["comple tedStamp"] ["sourceMe taStamp"][ site_name] ["domainMe taStamp"]
  125       missin g_domain =  missing_d omain + "  \n" + doma in if doma in_runtime .nil? || d omain_runt ime[domain ].nil? ||  domain_run time[domai n].empty?
  126     end
  127     fail "Th e operatio nal data f or #{site_ name} site  has missi ng dimain( s): #{miss ing_domain }" unless  missing_do main.empty ?
  128   end
  129  
  130   When(/^the  client fo rced sync  for patien t with pid  "(.*?)" a t "(.*?)"  secondary  site\(s\)$ /) do |pid , site_nam e_list|
  131     base_url  = Default Login.vx_s ync_url
  132     icn_pid  = check_fo r_icn_or_p id(pid)
  133     sync_pat h = "#{bas e_url}/syn c/doLoad?# {icn_pid}= #{pid}"
  134     p status _path = "# {base_url} /sync/stat us?#{icn_p id}=#{pid} "
  135     
  136     site_nam es = site_ name_list. downcase.s plit";"
  137     site_nam es.each do  |site_nam e|
  138       fail " The specif ied site # {site_name } is not o ne of the  secondary  define sit es (dod, h dr, vler,  all) in yo ur script"  unless %w [dod hdr v ler all].i nclude? si te_name
  139     end
  140     
  141     if site_ names.incl ude? "all"
  142       site_n ame_list =  "dod;hdr; vler"
  143       site_n ames = "tr ue"
  144     else
  145       site_n ames = "["  + site_na mes.map {  | s | "%22 " + s + "% 22" }.join (',') + "] "
  146     end
  147      
  148     
  149     p path_f orced = sy nc_path +  "&forcedSy nc=#{site_ names}"
  150       # p path_f orced = "h ttp:// IP             /sync/doLo ad?pid=9E7 A;227&forc edSync=[%2 2dod%22,%2 2hdr%22,%2 2vler%22]"
  151     
  152     vx_sync  = VxSync.n ew
  153     max_wait _time = 30 0
  154     @respons e = nil
  155  
  156     p "The p atient has  been forc ed to sync "
  157     response  = vx_sync .sync_requ est(path_f orced)
  158      
  159     expected _code_and_ error_mesg  = [202, " The patien t has not  been synce d yet and  the sync r equest is  failed!"]
  160     vx_sync. response_h andler(res ponse, exp ected_code _and_error _mesg)
  161     vx_sync. waiting_me ssage = "W aiting for  syncing t o be compl eted at si te:"
  162       
  163     sync_com pleted = v x_sync.che ck_status_ until_sync _process_c ompleted(s tatus_path , site_nam e_list, ch eck_opd_pe ndeing = f alse, max_ wait_time)
  164     
  165     vx_sync. save_pid_a nd_site_no t_sync(pid ) if sync_ completed  == false
  166  
  167     fail "Th e sync did  not compl ete for si te(s): \n  #{@site_is _not_sync} " if sync_ completed  == false
  168     @respons e = vx_syn c.response  
  169   end
  170  
  171   def check_ for_icn_or _pid(pid)
  172     
  173     if (pid. include? " 9E7A") ||  (pid.inclu de? "C877" )
  174       icn_pi d = "pid"
  175     else
  176       icn_pi d = "icn"
  177     end
  178     return i cn_pid
  179   end