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

274.1 Files compared

# Location File Last Modified
1 rdk.zip\rdk\product\tests\acceptance-tests\features\steps laborderswriteback_steps.rb Mon Aug 21 12:51:01 2017 UTC
2 rdk.zip\rdk\product\tests\acceptance-tests\features\steps laborderswriteback_steps.rb Tue Oct 3 20:10:33 2017 UTC

274.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 11 300
Changed 10 20
Inserted 0 0
Removed 0 0

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

274.4 Active regular expressions

No regular expressions were active.

274.5 Comparison detail

  1   path = Fil e.expand_p ath '..',  __FILE__
  2   $LOAD_PATH .unshift p ath unless  $LOAD_PAT H.include? (path)
  3   require 'Q ueryRDK.rb '
  4   #require ' createorde r.json'
  5  
  6   class LabO rdersByTyp eQuery < B uildQuery
  7     def init ialize(par ameter_has h_table)
  8       super( )
  9       title  = "write-h ealth-data "    
  10       base_u rl = Defau ltLogin.rd k_url
  11       writeb ack_url= D efaultLogi n.rdk_writ eback_url
  12       path =  "#{base_u rl}/resour ce/resourc edirectory "
  13       @respo nse = HTTP artyRDK.ge t(path)
  14         # /patient / R E D A CTED ;100470/or ders?acces sCode= PL      &verifyCod e= PL      !!&site= R E D A CTED &pid= R E D A CTED ;100470"
  15       domain _path = RD Class.reso urcedirect ory.get_ur l(title)
  16       p doma in_path
  17       p "dom ain path:  #{domain_p ath}"
  18       #@path .concat(do main_path)  
  19         @path = "# {writeback _url}/reso urce/resou rcedirecto ry/write-h ealth-data /patient/ R E D A CTED ;100470/or ders?acces sCode= PL      &verifyCod e= PL      !!&site= R E D A CTED &pid= R E D A CTED ;100470" 
  20       p "pat h: #{path} "
  21       p @pat h
  22  
  23       
  24       parame ter_hash_t able.each  do |key, v alue|
  25         add_ parameter( key, value ) unless v alue.nil?  || value.e mpty?
  26       end
  27     end # in itialize
  28   end # LabO rdersByTyp eQuery
  29  
  30   def valida te_result_ counts(tot al_items,  current_it ems, start _index)
  31     json = J SON.parse( @response. body)
  32  
  33     total_it ems = tota l_items.to _i
  34     query_to tal_items  = json["da ta"]["tota lItems"]
  35     expect(q uery_total _items).to  eq(total_ items), "r ecieved in correct va lue for to talItems:  expected # {total_ite ms} receiv ed #{query _total_ite ms}"
  36  
  37     current_ items = cu rrent_item s.to_i
  38     query_cu rrent_item s = json[" data"]["cu rrentItemC ount"]
  39     expect(q uery_curre nt_items). to eq(curr ent_items) , "recieve d incorrec t value fo r currentI temCount:  expected # {current_i tems} rece ived #{que ry_current _items}"
  40  
  41     query_it ems = json ["data"][" items"]
  42     expect(q uery_items .length).t o eq(curre nt_items),  "recieved  incorrect  number of  items: ex pected #{c urrent_ite ms} receiv ed #{query _items.len gth}"
  43  
  44     unless s tart_index .nil?
  45       start_ index = st art_index. to_i
  46       query_ start_inde x = json[" data"]["st artIndex"]
  47       expect (query_sta rt_index). to eq(star t_index),  "recieved  incorrect  value for  startIndex : expected  #{start_i ndex} rece ived #{que ry_start_i ndex}"
  48     end
  49   end
  50  
  51   #When(/^th e client r equest a r esponse in  VPR forma t from RDK  API with  the parame ters$/) do  |paramete r_table|
  52   #  paramet er_hash_ta ble = para meter_tabl e.hashes[0 ]
  53   #  p param eter_hash_ table
  54   #  path =  LabOrdersB yTypeQuery .new(param eter_hash_ table).pat h
  55   #  p path
  56   #  @respon se = HTTPa rtyRDK.get _with_auth orization( path)
  57   #end
  58  
  59   When(/^the  client re quest a re sponse in  VPR format  from RDK  API with t he paramet ers$/) do
  60     #path =  LabOrdersB yTypeQuery .new(param eter_hash_ table).pat
  61     #@respon se = HTTPa rtyRDK.get _with_auth orization( path)
  62     #p Dir.e ntries './ features/s teps'
  63       HTTParty.p ost("http: // IP                /resource/ write-heal th-data/pa tient/ R E D A CTED ;100472/or ders?acces sCode= PL      &verifyCod e= PL      !!&site= R E D A CTED &pid= R E D A CTED ;100472",
  64                    {
  65                      bo dy:        File.read( './feature s/steps/da ta/create_ order.json '),
  66                      he aders:   
  67                     { ' Content-Ty pe' => 'ap plication/ json', 
  68                       ' Accept' =>  'applicat ion/json'  }     
  69                    })  
  70   end
  71  
  72   Then(/^the  VPR resul t contain$ /) do |tab le|
  73       @response= HTTParty.g et("http:/ / IP                /vpr/ R E D A CTED ;100472/fi nd/order",
  74                              {        
  75                                hea ders: { 'C ontent-Typ e' => 'app lication/j son', 'Acc ept' => 'a pplication /json' }       
  76                              })  
  77     
  78     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  79     #puts @j son_object .class
  80     #puts @j son_object ['content' ]
  81     
  82     #json_ve rify = Jso nVerifier. new
  83     #puts '* ********** ********** *****'
  84     #  items _ary = @js on_object[ "data"]["i tems"]
  85     #  last_ index = (i tems_ary.l ength) - 1
  86     #  puts  items_ary[ last_index ]['localId ']
  87       
  88     #  @json _object["d ata"]["ite ms"].each  do |item_a ry|
  89     #    put s item_ary [item_ary. length]['l ocalId']
  90     #  end
  91     # @order _id=@respo nse.body(l ocalId)
  92     #p @orde r_id
  93     result_a rray = @js on_object[ "data"]["i tems"]
  94     #puts '* ********** ********** *****'
  95     #puts re sult_array .inspect
  96     search_j son(result _array, ta ble)  
  97   end
  98  
  99   When(/^the  client up dates orde r in VPR f ormat from  RDK API w ith the pa rameters$/ ) do 
  100     #@respon se = HTTPa rtyRDK.get _with_auth orization( path)
  101       @response= HTTParty.g et("http:/ / IP                /vpr/ R E D A CTED ;100472/fi nd/order",
  102                              {        
  103                                hea ders: { 'C ontent-Typ e' => 'app lication/j son', 'Acc ept' => 'a pplication /json' }
  104                                  
  105                              }) 
  106     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  107     items_ar y = @json_ object["da ta"]["item s"]
  108     last_ind ex = (item s_ary.leng th) - 1
  109     puts ord er_id=item s_ary[last _index]['l ocalId']
  110       
  111     @object= JSON.parse (File.read ('./featur es/steps/d ata/update _order.jso n'))
  112     @object[ 'orderId']  = order_i d
  113     @object  = @object. to_json
  114     File.wri te('./feat ures/steps /data/upda te_order.j son', @obj ect)
  115  
  116       HTTParty.p ut("http:/ / IP                /resource/ write-heal th-data/pa tient/ R E D A CTED ;100472/or ders/order _id;1?acce ssCode= PL      &verifyCod e= PL      !!&site= R E D A CTED &pid= R E D A CTED ;100472",
  117                   { 
  118                     bod y:    File .read('./f eatures/st eps/data/u pdate_orde r.json'),
  119                     hea ders: { 'C ontent-Typ e' => 'app lication/j son', 'Acc ept' => 'a pplication /json' }    
  120                   })
  121   end
  122  
  123   When(/^the  client di scontinues  order in  VPR format  from RDK  API with t he paramet ers$/) do 
  124     #@respon se = HTTPa rtyRDK.get _with_auth orization( path)
  125       @response= HTTParty.g et("http:/ / IP                /vpr/ R E D A CTED ;100472/fi nd/order",
  126                              { 
  127                               
  128                                hea ders: { 'C ontent-Typ e' => 'app lication/j son', 'Acc ept' => 'a pplication /json' }
  129                               
  130                              }) 
  131     @json_ob ject = JSO N.parse(@r esponse.bo dy)
  132     items_ar y = @json_ object["da ta"]["item s"]
  133     last_ind ex = (item s_ary.leng th) - 1
  134     puts ord er_id=item s_ary[last _index]['l ocalId']
  135       
  136     @object= JSON.parse (File.read ('./featur es/steps/d ata/discon tinue_orde r.json'))
  137     @object[ 'orderId']  = order_i d
  138     @object  = @object. to_json
  139     File.wri te('./feat ures/steps /data/disc ontinue_or der.json',  @object)
  140     
  141       HTTParty.d elete("htt p:// IP                /resource/ write-heal th-data/pa tient/ R E D A CTED ;100472/or ders/order _id;1?acce ssCode= PL      &verifyCod e= PL      !!&site= R E D A CTED &pid= R E D A CTED ;100472",
  142                      { 
  143                         body:    F ile.read(' ./features /steps/dat a/disconti nue_order. json'),
  144                         headers: {  'Content- Type' => ' applicatio n/json', ' Accept' =>  'applicat ion/json'  }     
  145                      })  
  146   end
  147       
  148   And(/^the  client cle ars patien t with pid  "(.*?)" i nfo from v xsync$/) d o |_pid|
  149       HTTParty.p ost("http: // IP             /sync/clea rPatient?p id= R E D A CTED ;100472 ",
  150                    { 
  151                     
  152                    })     
  153   end
  154  
  155   Then(/^the  client sy ncs the pa tient with  pid "(.*? )" in vxsy nc$/) do | _pid|
  156       HTTParty.g et("http:/ / IP             /sync/doLo ad?pid= R E D A CTED ;100472 ",
  157                   { 
  158                    
  159                   })     
  160   end