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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features\steps | vx-sync_icn_dod_only_steps.rb | Tue Jan 10 16:20:50 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features\steps | vx-sync_icn_dod_only_steps.rb | Mon Oct 2 20:08:35 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 170 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 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 | When(/^the data retu rn for "(. *?)" is "( .*?)"$/) d o |arg1, a rg2| | |
| 8 | @json_ob ject = JSO N.parse(@r esponse.bo dy) | |
| 9 | result_a rray = @js on_object[ "syncStatu s"]["compl etedStamp" ]["sourceM etaStamp"] .keys | |
| 10 | end | |
| 11 | ||
| 12 | Then(/^the client re cieved dat a just for site\(s\) "(.*?)"$/ ) do |site _list| | |
| 13 | site_lis t = site_l ist.upcase .split";" | |
| 14 | ||
| 15 | @json_ob ject = JSO N.parse(@r esponse.bo dy) | |
| 16 | complete d_result_a rray = @js on_object[ "syncStatu s"]["compl etedStamp" ]["sourceM etaStamp"] .keys | |
| 17 | ||
| 18 | result = (complete d_result_a rray - sit e_list) + (site_list - complet ed_result_ array) | |
| 19 | fail "Th e site nam e does not match for site(s): \n #{resul t}" unless result.em pty? | |
| 20 | end | |
| 21 | ||
| 22 | Then(/^the job statu s array an d inProgre ss array a re empty$/ ) do | |
| 23 | @json_ob ject = JSO N.parse(@r esponse.bo dy) | |
| 24 | job_stat us = @json _object["j obStatus"] | |
| 25 | inprogre ss_result_ array = @j son_object ["syncStat us"]["inPr ogress"] | |
| 26 | ||
| 27 | fail "Th e Job Stat us array i s not empt y: \n #{jo b_status}" unless jo b_status.e mpty? | |
| 28 | fail "Th e inProgre ss array i s not empt y: \n #{jo b_status}" unless in progress_r esult_arra y.nil? | |
| 29 | end | |
| 30 | ||
| 31 | When(/^a p atient wit h icn "([^ "]*)" has no demogra phics we s hould rece ive an err or message $/) do |ic n| | |
| 32 | base_url = Default Login.vx_s ync_url | |
| 33 | p path = "#{base_u rl}/sync/d oLoad?icn= #{icn}" | |
| 34 | ||
| 35 | vx_sync = VxSync.n ew | |
| 36 | p @respo nse = vx_s ync.sync_r equest(pat h) | |
| 37 | @respons e = nil | |
| 38 | p status _path = "# {base_url} /sync/stat us?icn=#{i cn}" | |
| 39 | # p status_p ath = "htt p:// IP /sync/stat us?icn=432 5679V43256 79" | |
| 40 | demograp hic_error_ return = f alse | |
| 41 | max_inde x_run = 60 | |
| 42 | index = 0 | |
| 43 | sleep_ti me = 2 | |
| 44 | demograp hic_error = "no erro r returned " | |
| 45 | while de mographic_ error_retu rn == fals e && index < max_ind ex_run | |
| 46 | sleep sleep_time | |
| 47 | # p resp onse = HTT PartyWithB asicAuth.g et_with_au thorizatio n(status_p ath) | |
| 48 | ||
| 49 | p json _object = vx_sync.fi nd_sync_st atus_body( status_pat h) | |
| 50 | p @res ponse = vx _sync.resp onse | |
| 51 | begin | |
| 52 | demo graphic_er ror = @res ponse["job Status"][0 ]["error"] ["message" ] | |
| 53 | demo graphic_er ror_return = true | |
| 54 | # resc ue | |
| 55 | # demo graphic_er ror = "no error retu rned" | |
| 56 | end | |
| 57 | index = index + sleep_time | |
| 58 | end | |
| 59 | expect(d emographic _error).to eq "Patie nt has no demographi c record a nd none wa s provided ." | |
| 60 | # fail "T he sync st atus faile d. Respons e: \n #{@r esponse}" if @respon se == nil #|| @respo nse.code ! = 200 | |
| 61 | end | |
| 62 | ||
| 63 | #Then(/^in sert demog raphics fo r patient with icn " ([^"]*)"$/ ) do |icn| | |
| 64 | Then(/^ins ert demogr aphics for patient I CNONLY, PA TIENT \(wi th icn (\d +)V(\d+)\) $/) do |no tused1, no tused2| | |
| 65 | base_url = Default Login.vx_s ync_url | |
| 66 | p path = "#{base_u rl}/sync/d emographic Sync" | |
| 67 | p param = String(' {"icn":"43 25679V4325 679","demo graphics": {"givenNam es":"PATIE NT","famil yName":"IC NONLY","ge nderCode": "M","ssn": "*****1235 ","birthDa te":"19671 010","addr ess":[{"ci ty":"Norfo lk","line1 ":"ICN Str eet","stat e":"VA","u se":"H","z ip":"20152 "}],"telec om":[{"use ":"H","val ue":"301-2 22-3334"}] ,"id":"432 5679V43256 79^NI^200M ^USVHA","f acility":" 200M","dat aSource":" USVHA","pi d":"432567 9V4325679" ,"idType": "NI","idCl ass":"ICN" ,"fullName ":"ICNONLY ,PATIENT", "displayNa me":"ICNON LY,PATIENT ","age":47 ,"ssn4":"1 235","gend erName":"M ale","ageY ears":"Unk ","dob":"1 9671010"}} ') | |
| 68 | # param = @param.to _json | |
| 69 | # p path = @path | |
| 70 | # p param = @param | |
| 71 | p param | |
| 72 | begin | |
| 73 | #p "VX Sync write Back Respo nse" + "^* "* 20 | |
| 74 | p @res ponse = HT TPartyWith BasicAuth. post_write _back(path , param) | |
| 75 | #p "^* "* 20 | |
| 76 | succes s_result = true | |
| 77 | rescue E xception = > e | |
| 78 | puts " An error h as occured in demogr aphic inse rt." | |
| 79 | puts e | |
| 80 | respon se = e | |
| 81 | succes s_result = false | |
| 82 | end | |
| 83 | # json_ob ject = JSO N.parse(@r esponse.bo dy) | |
| 84 | p @respo nse.code | |
| 85 | expect(@ response.c ode).to eq 202 | |
| 86 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.