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

957.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features-arch\old_ehmp_features_ruby\steps rdk_audit_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 rdk_audit_steps.rb Tue Oct 3 13:54:52 2017 UTC

957.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 172
Changed 2 8
Inserted 0 0
Removed 0 0

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

957.4 Active regular expressions

No regular expressions were active.

957.5 Comparison detail

  1   class Audi tTestUsers
  2     @@users  = {}
  3  
  4       @@users[" DNS          "] = " REDACTED "
  5       @@users["U nauthorize dUser"] =  " REDACTED "
  6       @@users["A uditLogTes ter"] = " REDACTED "
  7  
  8     def self .password_ for(userna me)
  9       return  @@users[u sername]
  10     end
  11   end
  12  
  13   Given(/^an  authorize d client " (.*?)" has  requested  allergies  for patie nt "(.*?)" $/) do |us ername, pi d|
  14     path = Q ueryRDKDom ain.new("a llergy", p id).path
  15     @respons e = HTTPar tyWithBasi cAuth.get_ with_autho rization_f or_user(pa th, userna me, AuditT estUsers.p assword_fo r(username ))
  16     expect(@ response.c ode).to eq (200), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  17  
  18   end
  19  
  20   Given(/^an  authorize d client " (.*?)" has  requested  vitals fo r patient  "(.*?)"$/)  do |usern ame, pid|
  21     path = Q ueryRDKDom ain.new("v ital", pid ).path
  22     @respons e = HTTPar tyWithBasi cAuth.get_ with_autho rization_f or_user(pa th, userna me, AuditT estUsers.p assword_fo r(username ))
  23     expect(@ response.c ode).to eq (200), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  24  
  25   end
  26  
  27   When(/^aud it logs fo r patient  "(.*?)" ar e requeste d$/) do |p id|
  28     path = Q ueryRDKAud it.new("pa tient", pi d).path
  29     @respons e = HTTPar tyWithBasi cAuth.get_ with_autho rization_f or_user(pa th, "Audit LogTester" , AuditTes tUsers.pas sword_for( "AuditLogU ser"))
  30     #expect( @response. code).to e q(200), "r esponse co de was #{@ response.c ode}: resp onse body  #{@respons e.body}"
  31   end
  32  
  33   Then(/^the  audit log  entry con tains$/) d o |table|
  34     dateform at = /\d\d \d\d-\d\d- \d\dT\d\d: \d\d:\d\d. \d\d\d-\d\ d:\d\d/
  35  
  36     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  37  
  38     json_ver ify = Json Verifier.n ew
  39  
  40     audit_ar ray = @jso n_object[" log"]
  41     expect(a udit_array .length).t o be > 0
  42     result_a rray = []
  43     result_a rray.push( audit_arra y[audit_ar ray.length -1])
  44  
  45     table.ro ws.each do  | fieldpa th, fieldv aluestring  |
  46       json_v erify.rese t_output
  47       if fie ldvaluestr ing.eql? " IS_FORMATT ED_DATE"
  48         foun d = json_v erify.matc hes_date_f ormat(fiel dpath, dat eformat, r esult_arra y)
  49       elsif  fieldvalue string.eql ? "IS_SET"
  50         foun d = json_v erify.defi ned?([fiel dpath], re sult_array )
  51       elsif  fieldvalue string.eql ? "IS_NOT_ SET"
  52         foun d = json_v erify.not_ defined?([ fieldpath] , result_a rray)
  53       elsif  fieldvalue string.sta rt_with? " CONTAINS"
  54         term  = fieldva luestring. split(' ')
  55         fiel dvalue = [ term[1]]
  56         foun d = json_v erify.obje ct_contain s_partial_ value(fiel dpath, fie ldvalue, r esult_arra y)
  57       else
  58         foun d = json_v erify.buil d_subarray (fieldpath , fieldval uestring,  result_arr ay)
  59         resu lt_array =  json_veri fy.subarry
  60       end
  61  
  62       if fou nd == fals e
  63         outp ut = json_ verify.out put
  64         outp ut.each do  | msg|
  65           p  msg
  66         end  #output.ea ch
  67         puts  "for fiel d #{fieldp ath}: #{js on_verify. error_mess age}"
  68       end #  if found = = false
  69       expect (found).to  be_true
  70       expect (result_ar ray.length ).to_not e q(0)
  71     end # ta ble.rows.e ach
  72   end
  73  
  74   When(/^aud it logs fo r user "(. *?)" are r equested$/ ) do |user name|
  75     path = Q ueryRDKAud it.new("us er", usern ame).path
  76     @respons e = HTTPar tyWithBasi cAuth.get_ with_autho rization_f or_user(pa th, "Audit LogUser",  AuditTestU sers.passw ord_for("A uditLogUse r"))
  77   end
  78  
  79   Given(/^th e rdk audi t logs are  cleared$/ ) do
  80     base_pat h = Defaul tLogin.rdk _url
  81     path = " #{base_pat h}/audit/c lear"
  82     p path
  83     @respons e = HTTPar tyWithBasi cAuth.get_ with_autho rization_f or_user(pa th, "Audit LogUser",  AuditTestU sers.passw ord_for("A uditLogUse r"))
  84     expect(@ response.c ode).to eq (200), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  85   end
  86  
  87   if __FILE_ _ == $PROG RAM_NAME
  88       p AuditTes tUsers.pas sword_for( " DNS          ")
  89     p AuditT estUsers.p assword_fo r("badname ")
  90   end