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

951.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features-arch\old_ehmp_features_ruby\steps data_expiration_steps.rb Tue Dec 15 14:05:18 2015 UTC
2 ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features-arch\old_ehmp_features_ruby\steps data_expiration_steps.rb Tue Oct 3 13:51:54 2017 UTC

951.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 9 316
Changed 8 24
Inserted 0 0
Removed 0 0

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

951.4 Active regular expressions

No regular expressions were active.

951.5 Comparison detail

  1   path = Fil e.expand_p ath '..',  __FILE__
  2   $LOAD_PATH .unshift p ath unless  $LOAD_PAT H.include? (path)
  3   path = Fil e.expand_p ath '../.. /../../sha red-test-r uby', __FI LE__
  4   $LOAD_PATH .unshift p ath unless  $LOAD_PAT H.include? (path)
  5   require 'V erifyJsonR untimeValu e.rb'
  6  
  7   Then(/^the  sync stat us for pat ient conta in:$/) do  |table|
  8     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  9     result_a rray = @js on_object[ "data"]["i tems"]
  10  
  11     json_ver ify = Veri fyJsonRunt imeValue.n ew
  12     json_ver ify.verify _json_runt ime_vlaue( result_arr ay, table)
  13   end
  14  
  15   Given(/^th e patient  "(.*?)" be  cleared f rom the ca che succes sfully$/)  do |pid|
  16     base_url  = Default Login.fhir _url
  17     path = " #{base_url }/admin/sy nc/#{pid}"
  18     response _code = 0
  19     run_inde x = 0
  20     while re sponse_cod e != 404 & & run_inde x < 3
  21       p run_ index =+1
  22       begin
  23         @res ponse = HT TPartyWith BasicAuth. get_with_a uthorizati on(path)
  24       rescue  Timeout:: Error
  25         p "S ync timed  out"
  26       end
  27       respon se_code =  @response. code
  28     end 
  29     expect(@ response.c ode).to eq (404), "Ex pected res ponse code  404, rece ived #{@re sponse.cod e}: respon se body #{ @response. body}"
  30     p "The p atient be  cleard fro m the cach e"
  31   end
  32  
  33   # Then(/^t he value o f "(.*?)"  is "(.*?)"  hours aft er the val ue of "(.* ?)" for si te "(.*?)" $/) do |ex _expires_o n, ex_hour s, ex_last _sync_time , site_nam e|
  34   Then(/^the  value of  "(.*?)" is  "(.*?)" h our\(s\) \ +\/\- "(.* ?)" minute \(s\) afte r the valu e of "(.*? )" for sit e "(.*?)"$ /) do |ex_ expires_on , ex_hours , dt_max_m in, ex_las t_sync_tim e, site_na me|
  35     error_ms g = "If th is scenari o fail, pl ease check  -chef.jso n in the v agrantfile . \n"
  36     error_ms g =  error _msg + "Th is scenari o will ver ify the de fault expi re time fo r the seco ndary site s. \n"
  37     error_ms g =  error _msg + "Th e default  expire tim e set 48 h our for Do D, 8 hours  for OCD5  and 24 hou rs for DAS . \n"
  38     dt_max_s econd = dt _max_min.t o_i * 60
  39     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  40     runtime_ json_objec t = @json_ object["da ta"]["item s"]
  41  
  42     find_jso n = FindJs onValueFor Field.new
  43     fields_n ame = 'syn cStatusByV istaSystem Id.'+ site _name + '. '+ ex_last _sync_time
  44     last_syn c_time = f ind_json.f ind_value_ from_json_ for_field( runtime_js on_object,  fields_na me)
  45     fields_n ame = 'syn cStatusByV istaSystem Id.'+ site _name + '. ' + ex_exp ires_on
  46     expires_ on = find_ json.find_ value_from _json_for_ field(runt ime_json_o bject, fie lds_name)
  47     
  48     last_syn c_time = T ime.parse( last_sync_ time)
  49     expires_ on = Time. parse(expi res_on)
  50     dt = (ex pires_on-l ast_sync_t ime)/(60*6 0)
  51     
  52     dt_abs =  (dt-ex_ho urs.to_i). abs
  53     # expect (dt_abs).t o be < 0.1 , error_ms g
  54     expect(d t_abs * 60  * 60).to  be < dt_ma x_second ,  "Expected : #{ex_hou rs} \n got : #{dt} \n  the diffe rence is m ore than # {dt_max_se cond} seco nd. \n" +  error_msg
  55   end
  56  
  57   Then(/^the  value of  "(.*?)" is  after "(. *?)" for s ite "(.*?) "$/) do |e x_expires_ on, ex_old _expiratio n, site_na me|
  58     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  59     runtime_ json_objec t = @json_ object["da ta"]["item s"]
  60  
  61     find_jso n = FindJs onValueFor Field.new
  62     fields_n ame = 'syn cStatusByV istaSystem Id.'+ site _name + '. ' + ex_exp ires_on
  63     current_ expiration  = find_js on.find_va lue_from_j son_for_fi eld(runtim e_json_obj ect, field s_name)
  64  
  65     old_valu e = Time.p arse(ex_ol d_expirati on)
  66     current_ value = Ti me.parse(c urrent_exp iration)
  67     expect(c urrent_val ue).to be  > old_valu e
  68   end
  69  
  70   Then(/^the  value of  "(.*?)" is  before "( .*?)" for  site "(.*? )"$/) do | ex_expires _on, ex_ol d_expirati on, site_n ame|
  71     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  72     runtime_ json_objec t = @json_ object["da ta"]["item s"]
  73  
  74     find_jso n = FindJs onValueFor Field.new
  75     fields_n ame = 'syn cStatusByV istaSystem Id.'+ site _name + '. ' + ex_exp ires_on
  76     current_ expiration  = find_js on.find_va lue_from_j son_for_fi eld(runtim e_json_obj ect, field s_name)
  77  
  78     old_valu e = Time.p arse(ex_ol d_expirati on)
  79     current_ value = Ti me.parse(c urrent_exp iration)
  80     expect(c urrent_val ue).to be  < old_valu e
  81   end
  82  
  83   When(/^man ual expira tion is ca lled for p atient wit h icn "(.* ?)" and si te "(.*?)" $/) do |ic n, site_na me|
  84       # https:// IP             /sync/expi re?icn=101 08V420871& vistaId=DO D&time=201 4091617091 7.999
  85     base_url  = Default Login.hmp_ url
  86     p path =  "#{base_u rl}/sync/e xpire?icn= #{icn}&vis taId=#{sit e_name}"
  87       user = " R E D A CTED ;500"
  88     pass = " REDACT;RED ACTED"
  89     begin
  90       @respo nse = HTTP artyWithBa sicAuth.po st_with_au thorizatio n_for_user (path, use r, pass)
  91     rescue T imeout::Er ror
  92       p "Syn c timed ou t"
  93       sync_t imed_out =  true
  94     end
  95   end
  96  
  97   When(/^the  client re quests man ual expira tion time  "(.*?)" fo r patient  with icn " (.*?)" and  site "(.* ?)"$/) do  |time, icn , site_nam e|
  98       # https:// IP             /sync/expi re?icn=101 08V420871& vistaId=DO D&time=201 4091617091 7.999
  99     base_url  = Default Login.hmp_ url
  100     p path =  "#{base_u rl}/sync/e xpire?icn= #{icn}&vis taId=#{sit e_name}&ti me=#{time} "
  101       user = " R E D A CTED ;500"
  102     pass = " REDACT;RED ACTED"
  103     begin
  104       @respo nse = HTTP artyWithBa sicAuth.po st_with_au thorizatio n_for_user (path, use r, pass)
  105     rescue T imeout::Er ror
  106       p "Syn c timed ou t"
  107       sync_t imed_out =  true
  108     end
  109   end
  110  
  111   When(/^man ual expira tion is ca lled for p atient wit h dfn "(.* ?)" and si te "(.*?)" $/) do |df n, site_na me|
  112       # https:// IP             /sync/expi re?dfn=101 08V420871& vistaId=DO D&time=201 4091617091 7.999
  113     base_url  = Default Login.hmp_ url
  114     p path =  "#{base_u rl}/sync/e xpire?dfn= #{dfn}&vis taId=#{sit e_name}"
  115       user = " R E D A CTED ;500"
  116     pass = " REDACT;RED ACTED"
  117     begin
  118       @respo nse = HTTP artyWithBa sicAuth.po st_with_au thorizatio n_for_user (path, use r, pass)
  119     rescue T imeout::Er ror
  120       p "Syn c timed ou t"
  121       sync_t imed_out =  true
  122     end
  123   end
  124  
  125   When(/^the  client re quests man ual expira tion time  "(.*?)" fo r patient  with dfn " (.*?)" and  site "(.* ?)"$/) do  |time, dfn , site_nam e|
  126       # https:// IP             /sync/expi re?dfn=101 08V420871& vistaId=DO D&time=201 4091617091 7.999
  127     base_url  = Default Login.hmp_ url
  128     p path =  "#{base_u rl}/sync/e xpire?dfn= #{dfn}&vis taId=#{sit e_name}&ti me=#{time} "
  129       user = " R E D A CTED ;500"
  130     pass = " REDACT;RED ACTED"
  131     begin
  132       @respo nse = HTTP artyWithBa sicAuth.po st_with_au thorizatio n_for_user (path, use r, pass)
  133     rescue T imeout::Er ror
  134       p "Syn c timed ou t"
  135       sync_t imed_out =  true
  136     end
  137   end
  138  
  139   Given(/^sa ve the las t sync tim e for site  "(.*?)" a nd wait fo r (\d+) se cond$/) do  |site_nam e, sleep_t ime|
  140     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  141     runtime_ json_objec t = @json_ object["da ta"]["item s"]
  142  
  143     find_jso n = FindJs onValueFor Field.new
  144     fields_n ame = "syn cStatusByV istaSystem Id."+ site _name + ". lastSyncTi me"
  145     p last_s ync_time =  find_json .find_valu e_from_jso n_for_fiel d(runtime_ json_objec t, fields_ name)
  146     p @last_ sync_time  = Time.par se(last_sy nc_time)
  147     sleep sl eep_time.t o_i
  148   end
  149  
  150   Then(/^the  last sync  time shou ld get upd ated for s ite "(.*?) "$/) do |s ite_name|
  151     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  152     runtime_ json_objec t = @json_ object["da ta"]["item s"]
  153  
  154     find_jso n = FindJs onValueFor Field.new
  155     fields_n ame = "syn cStatusByV istaSystem Id."+ site _name + ". lastSyncTi me"
  156     p new_sy nc_time =  find_json. find_value _from_json _for_field (runtime_j son_object , fields_n ame)
  157     p new_sy nc_time =  Time.parse (new_sync_ time)
  158     expect(T ime.at(new _sync_time )).to be >  Time.at(@ last_sync_ time)
  159   end
  160  
  161   Then(/^the  last sync  time shou ld not get  updated f or site "( .*?)"$/) d o |site_na me|
  162     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  163     runtime_ json_objec t = @json_ object["da ta"]["item s"]
  164  
  165     find_jso n = FindJs onValueFor Field.new
  166     fields_n ame = "syn cStatusByV istaSystem Id."+ site _name + ". lastSyncTi me"
  167     p new_sy nc_time =  find_json. find_value _from_json _for_field (runtime_j son_object , fields_n ame)
  168     p new_sy nc_time =  Time.parse (new_sync_ time)
  169     expect(T ime.at(new _sync_time )).to eq T ime.at(@la st_sync_ti me)
  170   end