271. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/4/2017 8:04: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.

271.1 Files compared

# Location File Last Modified
1 rdk.zip\rdk\product\tests\acceptance-tests\features\steps HealthSummary_Steps.rb Mon Aug 21 12:51:01 2017 UTC
2 rdk.zip\rdk\product\tests\acceptance-tests\features\steps HealthSummary_Steps.rb Tue Oct 3 17:27:03 2017 UTC

271.2 Comparison summary

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

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

271.4 Active regular expressions

No regular expressions were active.

271.5 Comparison detail

  1   #require " httparty"
  2  
  3   Given(/^a  patient "( .*?)"$/) d o |_arg1|
  4     # this s tep does n othing but  convey in fo to the  feature fi le reader
  5   end
  6  
  7   And(/^a re quest data  was sent  with pid " (.*?)"$/)  do |arg1|
  8     query =  RDKQuery.n ew('health summaries- getSitesIn foFromPati entData')
  9     query.ad d_paramete r("pid", a rg1)
  10     query.ad d_acknowle dge('true' )
  11     path = q uery.path
  12     #p path
  13     @respons e = HTTPar tyRDK.get( path)
  14     # puts J SON.pretty _generate( @response)
  15   end
  16  
  17   Then(/^aut henticatio n error re turned for  an unauth enticated  user$/) do
  18     #path =  QueryRDKHS .new("").p ath
  19     query =  RDKQuery.n ew('health summaries- getSitesIn foFromPati entData')
  20     query.ad d_paramete r("pid", ' ')
  21     query.ad d_acknowle dge('true' )
  22     path = q uery.path
  23     #p path
  24     user = " "
  25     pass = " bad"
  26     @respons e = HTTPar ty.get(pat h)
  27     result_a rray = JSO N.parse(@r esponse.bo dy)
  28     expect(@ response.c ode).to eq (401), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  29     p JSON.p retty_gene rate(@resp onse)
  30     if resul t_array["d ata"]["err or"] == "W eb Token c ould not b e verified . Log out,  clear bro wser cooki es and log  in again. "
  31       p "    +++   TEST  CASE PASS ED   +++   "
  32     else fai l(" test c ase failed ")
  33     end   
  34   end
  35  
  36   When(/^a r equest dat a was sent  without p id$/) do 
  37     query =  RDKQuery.n ew('health summaries- getSitesIn foFromPati entData')
  38     query.ad d_paramete r("pid", ' ')
  39     query.ad d_acknowle dge('true' )
  40     path = q uery.path
  41     #p path
  42     @respons e = HTTPar tyRDK.get( path)
  43     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  44     p @json_ object
  45     result_a rray = @js on_object
  46     #p resul t_array
  47     #puts JS ON.parse(@ response.b ody)
  48     if resul t_array["m essage"] = = "The req uired para meter \"pi d\" is mis sing."
  49       p "    +++   TEST  CASE PASS ED   +++   "
  50     else fai l(" test c ase failed  ")
  51     end   
  52   end
  53  
  54   Then(/^val idation er ror messag e returned $/) do
  55     expect(@ response.c ode).to eq (400), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  56     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  57     #puts JS ON.pretty_ generate(@ json_objec t)
  58   end
  59  
  60   Then(/^the  error mes sage retur ned$/) do
  61     expect(@ response.c ode).to eq (404), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  62     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  63     #puts JS ON.pretty_ generate(@ json_objec t)
  64   end
  65  
  66   Then(/^cor rect JSON  data retur ned$/) do
  67     expect(@ response.c ode).to eq (200), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  68     @json_ob ject = JSO N.parse(@r esponse.bo dy)["data" ]
  69     #json_ve rify = Jso nVerifier. new
  70     result_a rray = @js on_object
  71     j = @jso n_object.l ength
  72     #puts "+ ++++++++++ ++++ Total  of Sites  (Primary/n on Primary ) = #{j} + ++++++++++ +++"
  73     #puts JS ON.pretty_ generate(@ json_objec t)
  74     i =0
  75     while i  <= j 
  76       result _array = @ json_objec t[i]
  77       if (re sult_array ["facility Name"] ==  "KODAK") o r (result_ array["fac ilityName" ] == "PANO RAMA")
  78         #put s "  +++++ ++++++++ T he Primary  Site is:  ++++++++++ + "
  79         #put s @json_ob ject[i]
  80         brea k
  81       else
  82         i +=  1
  83       end
  84     end 
  85   end
  86  
  87   Given(/^a  request da ta was sen t with bad  pid "(.*? )"$/) do | arg1|
  88     #path =  QueryRDKHS .new(arg1) .path
  89     query =  RDKQuery.n ew('health summaries- getSitesIn foFromPati entData')
  90     query.ad d_paramete r("pid", a rg1)
  91     query.ad d_acknowle dge('true' )
  92     path = q uery.path
  93  
  94     @respons e = HTTPar tyRDK.get( path)
  95     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  96     result_a rray = @js on_object[ "data"]
  97     #puts JS ON.pretty_ generate(@ json_objec t)
  98     if resul t_array["e rror"]["me ssage"] ==  "This pat ient's rec ord is not  yet acces sible. Ple ase try ag ain in a f ew minutes . If it is  still not  accessibl e, please  contact yo ur HIMS re presentati ve and hav e the pati ent loaded  into your  local Vis tA."
  99       #p "    +++   TES T CASE PAS SED   +++   "
  100     else fai l(" test c ase failed  ")
  101     end 
  102   end
  103  
  104   Then(/^cor rect JSON  data of pr imary site s returned $/) do
  105     expect(@ response.c ode).to eq (200), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  106     @json_ob ject = JSO N.parse(@r esponse.bo dy)["data" ]
  107     result_a rray = @js on_object
  108     j = @jso n_object.l ength
  109     p j
  110     #puts "+ ++++++++++ ++++ Total  of Sites  (Primary/n on Primary ) = #{j} + ++++++++++ +++"
  111     #puts JS ON.pretty_ generate(@ json_objec t)
  112     i =0
  113     while i  <= j 
  114       result _array = @ json_objec t[i]
  115       if ((r esult_arra y["facilit yName"] ==  "KODAK")  or (result _array["fa cilityName "] == "PAN ORAMA")) a nd (result _array["is Primary"]  == true)
  116         #put s "  +++++ ++++++++ T he Primary  Site is:  ++++++++++ + "
  117         #put s @json_ob ject[i]
  118         brea k
  119       else
  120         i +=  1
  121       end
  122     end 
  123   end
  124  
  125   Then(/^cor rect JSON  data of no n\-primary  sites ret urned$/) d o
  126     expect(@ response.c ode).to eq (200), "re sponse cod e was #{@r esponse.co de}: respo nse body # {@response .body}"
  127     @json_ob ject = JSO N.parse(@r esponse.bo dy)["data" ]
  128     result_a rray = @js on_object
  129     j = @jso n_object.l ength
  130     #puts "+ ++++++++++ ++++ Total  of Sites  (non Prima ry) = #{j}  +++++++++ +++++"
  131     #puts JS ON.pretty_ generate(@ json_objec t)
  132     i =0
  133     while i  <= j 
  134       result _array = @ json_objec t[i]
  135       if (re sult_array ["facility Name"] !=  "KODAK") a nd (result _array["fa cilityName "] != "PAN ORAMA") an d (result_ array["isP rimary"] = = false)
  136         #put s "  +++++ ++++++++ T he non-Pri mary Site  is: ++++++ +++++ "
  137         #put s @json_ob ject[i]
  138         brea k
  139         #i + = 1
  140       else
  141         #fai l ("test c ase failed ")
  142         i +=  1
  143       end
  144     end 
  145   end
  146  
  147   Given(/^a  HS report  request wa s sent wit h patientI D "(.*?)",  siteID "( .*?)", rep ortID "(.* ?)"$/) do  |pid, site , reportID |
  148     @rid = r eportID
  149     query =  RDKQuery.n ew('health summaries- getReportC ontentByRe portID')
  150     query.ad d_paramete r("pid", p id)
  151     query.ad d_paramete r("site.co de", site)
  152     query.ad d_paramete r("id", re portID)
  153     query.ad d_acknowle dge('true' )
  154     path = q uery.path
  155     p path
  156     @respons e = HTTPar tyRDK.get( path)
  157       #@response  = HTTPart yRDK.get_w ith_author ization_fo r_user(pat h, ' PW           ', ' REDACTED ')
  158     #p @resp onse
  159     expect(@ response.c ode).to eq (200)
  160   end
  161  
  162   Given(/^a  HS report  request wa s sent wit h reportID  "(.*?)",  siteID "(. *?)"$/) do  |reportId , site|
  163     query =  RDKQuery.n ew('health summaries- getReportC ontentByRe portID')
  164     query.ad d_paramete r("site.co de", site)
  165     query.ad d_paramete r("id", re portId)
  166     query.ad d_acknowle dge('true' )
  167     path = q uery.path
  168  
  169     @respons e = HTTPar tyRDK.get( path)
  170  
  171     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  172     result_a rray = @js on_object
  173     #puts JS ON.pretty_ generate(@ json_objec t)
  174   end
  175  
  176   Given(/^a  HS report  request wa s sent wit h reportID  "(.*?)",  patientID  "(.*?)"$/)  do |repor tId, pid|
  177     query =  RDKQuery.n ew('health summaries- getReportC ontentByRe portID')
  178     query.ad d_paramete r("pid", p id)
  179     query.ad d_paramete r("id", re portId)
  180     query.ad d_acknowle dge('true' )
  181     path = q uery.path
  182     @respons e = HTTPar tyRDK.get( path)
  183     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  184     result_a rray = @js on_object
  185     #puts JS ON.pretty_ generate(@ json_objec t)
  186   end
  187  
  188   Given(/^a  HS report  request wa s sent wit h siteID " (.*?)", pa tientID "( .*?)"$/) d o |site, p id|
  189     query =  RDKQuery.n ew('health summaries- getReportC ontentByRe portID')
  190     query.ad d_paramete r("pid", p id)
  191     query.ad d_paramete r("site.co de", site)
  192     query.ad d_acknowle dge('true' )
  193     path = q uery.path
  194     @respons e = HTTPar tyRDK.get( path)
  195     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  196     result_a rray = @js on_object
  197     #puts JS ON.pretty_ generate(@ json_objec t)
  198   end
  199  
  200   Then(/^pat ient HS re port retur ned$/) do
  201     expect(@ response.c ode).to eq (200)
  202     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  203     result_a rray = @js on_object[ "data"]
  204     #puts JS ON.pretty_ generate(@ json_objec t)
  205     #puts "+ ++++++++++ ++++++++++ "
  206     #puts @r id
  207     if (resu lt_array[" reportID"]  != @rid.s plit(";"). first) or  (result_ar ray["hsRep ort"] != @ rid.split( ";").last)
  208       fail(" the test f ailed")
  209     else
  210       #puts  "the test  passed"
  211     end
  212   end
  213  
  214   Then(/^the  patient i d missing  error mess age return ed$/) do
  215     expect(@ response.c ode).to eq (400)
  216     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  217     result_a rray = @js on_object
  218     #puts JS ON.pretty_ generate(@ json_objec t)
  219     if resul t_array["m essage"] ! = "The req uired para meter \"pi d\" is mis sing."
  220       fail(" the test f ailed")
  221     else
  222       #puts  "the test  passed"
  223     end
  224   end
  225  
  226   Then(/^the  site id m issing err or message  returned$ /) do
  227     expect(@ response.c ode).to eq (400)
  228     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  229     result_a rray = @js on_object
  230     #puts JS ON.pretty_ generate(@ json_objec t)
  231     if resul t_array["m essage"] ! = "The req uired para meter \"si te.code\"  is missing ."
  232       fail(" the test f ailed")
  233     else
  234       #puts  "the test  passed"
  235     end
  236   end
  237  
  238   Then(/^the  report id  missing e rror messa ge returne d$/) do
  239     expect(@ response.c ode).to eq (400)
  240     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  241     result_a rray = @js on_object
  242     #puts JS ON.pretty_ generate(@ json_objec t)
  243     if resul t_array["m essage"] ! = "The req uired para meter \"id \" is miss ing."
  244       fail(" the test f ailed")
  245     else
  246       #puts  "the test  passed"
  247     end
  248   end
  249  
  250   Given(/^a  HS report  request wa s sent wit h siteID " (.*?)", pa tientID "( .*?)", and  reportID  "(.*?)" wi thout repo rt title$/ ) do |site , pid, rep ortID|
  251     query =  RDKQuery.n ew('health summaries- getReportC ontentByRe portID')
  252     query.ad d_paramete r("pid", p id)
  253     query.ad d_paramete r("site.co de", site)
  254     query.ad d_paramete r("id", re portID)
  255     query.ad d_acknowle dge('true' )
  256     path = q uery.path
  257     @respons e = HTTPar tyRDK.get( path)
  258   end
  259  
  260   Then(/^the  report ti tle missin g error me ssage retu rned$/) do
  261     expect(@ response.c ode).to eq (400)
  262     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  263     result_a rray = @js on_object
  264     #puts JS ON.pretty_ generate(@ json_objec t)
  265     if resul t_array["m essage"] ! = "Report  Id is not  in correct  format"
  266       fail(" the test f ailed")
  267     else
  268       #puts  "the test  passed"
  269     end
  270   end