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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | rdk.zip\rdk\product\tests\acceptance-tests\features\steps | f883_create_sign_consult.rb | Mon Aug 21 12:51:01 2017 UTC |
| 2 | rdk.zip\rdk\product\tests\acceptance-tests\features\steps | f883_create_sign_consult.rb | Tue Oct 3 20:10:02 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 6 | 234 |
| Changed | 5 | 16 |
| 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 | def create _a_default _consult(p id) | |
| 2 | expect(@ deployment _id).to_no t be_nil | |
| 3 | request = RDKQuery .new('acti vities-sta rt') | |
| 4 | user = ' R E D A CTED ; DNS ' | |
| 5 | default_id = 'urn:va :user: R E D A CTED :100000002 72' | |
| 6 | default_ name = 'KH AN, VIHAAN ' | |
| 7 | paramete r_hash = { } | |
| 8 | paramete r_hash['ic n'] = pid | |
| 9 | paramete r_hash['as signedTo'] = '[FC:PA NORAMA(500 )/TF:Physi cal Therap y(81)]' | |
| 10 | paramete r_hash['ex ecutionUse rId'] = de fault_id | |
| 11 | paramete r_hash['ex ecutionUse rName'] = default_na me | |
| 12 | paramete r_hash['fo rmAction'] = 'accept ed' | |
| 13 | paramete r_hash['or deringProv ider displ ayName'] = default_n ame | |
| 14 | paramete r_hash['or deringProv ider uid'] = default _id | |
| 15 | paramete r_hash['de stination facility c ode'] = 50 0 | |
| 16 | paramete r_hash['de stination facility n ame'] = 'P ANORAMA' | |
| 17 | ||
| 18 | path = r equest.pat h | |
| 19 | ||
| 20 | payload = start_co nsult_requ est_payloa d | |
| 21 | payload = start_co nsult_para meter payl oad, param eter_hash | |
| 22 | payload = start_co nsult_cons ult_order payload, p arameter_h ash | |
| 23 | payload = start_co nsult_orde rable payl oad, param eter_hash | |
| 24 | payload_ json = pay load.to_js on | |
| 25 | @respons e = HTTPar tyRDK.post _as_user(p ath, user, TestClien ts.passwor d_for(user ), payload _json, Tas kHelper.he aders) | |
| 26 | expect(@ response.c ode).to eq (200) | |
| 27 | json = J SON.parse( @response. body) | |
| 28 | @process instanceid = json['d ata']['pro cessInstan ceId'] | |
| 29 | p "creat ed a defau lt consult with proc essInstanc eId #{@pro cessinstan ceid}" | |
| 30 | end | |
| 31 | ||
| 32 | def retrie ve_task_id (user) | |
| 33 | expect(@ processins tanceid).t o_not be_n il | |
| 34 | request = RDKQuery .new('task s-tasks') | |
| 35 | today = TaskHelper .formated_ today | |
| 36 | enddate = TaskHelp er.formate d_future | |
| 37 | ||
| 38 | context = 'user' | |
| 39 | subconte xt = 'team roles' | |
| 40 | payload_ json = JSO N.parse(%Q [{"context ":"#{conte xt}","subC ontext":"# {subcontex t}","statu s":"Create d,Ready,Re served,InP rogress"," getNotific ations":tr ue,"startD ate":"#{to day}","end Date":"#{e nddate}"}] ).to_json | |
| 41 | ||
| 42 | path = r equest.pat h | |
| 43 | ||
| 44 | @respons e = HTTPar tyRDK.post _as_user(p ath, user, TestClien ts.passwor d_for(user ), payload _json, Tas kHelper.he aders) | |
| 45 | expect(@ response.c ode).to eq (200) | |
| 46 | retrieve _task_id_f rom_respon se_body | |
| 47 | end | |
| 48 | ||
| 49 | def retrie ve_task_id _from_resp onse_body( extra_para meters = n il) | |
| 50 | p extra_ parameters | |
| 51 | @json_ob ject = JSO N.parse(@r esponse.bo dy) | |
| 52 | json_ver ify = Json Verifier.n ew | |
| 53 | ||
| 54 | result_a rray = @js on_object[ "data"]['i tems'] | |
| 55 | ||
| 56 | table = [] | |
| 57 | ||
| 58 | table.pu sh(['PROCE SSINSTANCE ID', @proc essinstanc eid.to_s]) | |
| 59 | unless e xtra_param eters.nil? | |
| 60 | extra_ parameters .rows.each do | para meter, val ue | | |
| 61 | tabl e.push([pa rameter, v alue]) | |
| 62 | end | |
| 63 | end | |
| 64 | ||
| 65 | table.ea ch do |fie ldpath, fi eldvaluest ring| | |
| 66 | json_v erify.rese t_output | |
| 67 | ||
| 68 | found = json_ver ify.build_ subarray(f ieldpath, fieldvalue string, re sult_array ) | |
| 69 | result _array = j son_verify .subarry | |
| 70 | p "Che cking for #{fieldpat h}: #{resu lt_array.l ength}" | |
| 71 | end | |
| 72 | expect(r esult_arra y.length). to eq(1), "Did not f ind the ex pected com bo with PR OCESSINSTA NCEID: #{@ processins tanceid} i n response : #{@json_ object["da ta"]['item s']}" | |
| 73 | @task_to _update = result_arr ay[0]['TAS KID'].to_s | |
| 74 | expect(@ task_to_up date).to_n ot eq(''), "Expected response to contain a TASKID: #{result_ array[0]}" | |
| 75 | end | |
| 76 | ||
| 77 | def sign_a _default_c onsult(pid ) | |
| 78 | expect(@ deployment _id).to_no t be_nil | |
| 79 | expect(@ task_to_up date).to_n ot be_nil | |
| 80 | ||
| 81 | user = ' R E D A CTED ; DNS ' | |
| 82 | # start update | |
| 83 | start_up date_paylo ad = {} | |
| 84 | start_up date_paylo ad['deploy mentId'] = @deployme nt_id | |
| 85 | start_up date_paylo ad['proces sDefId'] = 'Order.Co nsult' | |
| 86 | start_up date_paylo ad['taskid '] = @task _to_update | |
| 87 | start_up date_paylo ad['icn'] = pid | |
| 88 | start_up date_paylo ad['state' ] = 'start ' | |
| 89 | start_si gning_upda te start_u pdate_payl oad, user | |
| 90 | expect(@ response.c ode).to eq (200), "Di d not get a 200 resp onse when starting u pdate" | |
| 91 | ||
| 92 | # sign | |
| 93 | sign_con sult_paylo ad = {} | |
| 94 | sign_con sult_paylo ad['pid'] = pid | |
| 95 | sign_consu lt_payload ['site'] = " R E D A CTED " | |
| 96 | sign_consu lt_payload ['uid'] = "urn:va:us er: R E D A CTED :100000002 72" | |
| 97 | sign_consu lt_payload ['duz site '] = " R E D A CTED " | |
| 98 | sign_con sult_paylo ad['duz id '] = "1000 0000272 " | |
| 99 | sign_con sult_paylo ad['facili ty'] = "PA NORAMA" | |
| 100 | sign_con sult_paylo ad['firstn ame'] = "V IHAAN" | |
| 101 | sign_con sult_paylo ad['lastna me'] = "KH AN" | |
| 102 | sign_con sult_paylo ad['divisi on'] = "50 0" | |
| 103 | sign_con sult_paylo ad['signer '] = user | |
| 104 | payload = sign_con sult sign_ consult_pa yload | |
| 105 | post_sig n_consult( payload, u ser) | |
| 106 | expect(@ response.c ode).to eq (200), "Di d not get a 200 resp onse when signing co nsult" | |
| 107 | ||
| 108 | # comple te update | |
| 109 | complete _update_pa yload = {} | |
| 110 | complete _update_pa yload['pat ient_pid'] = pid | |
| 111 | complete _update_pa yload['icn '] = pid | |
| 112 | complete_u pdate_payl oad['execu tionUserId '] = 'urn: va:user: R E D A CTED :100000002 72' | |
| 113 | complete _update_pa yload['exe cutionUser Name'] = ' KHAN, VIHA AN' | |
| 114 | complete _update_pa yload['for mAction'] = 'accept ed' | |
| 115 | complete _update_pa yload['ord eringProvi der displa yName'] = 'KHAN, VIH AAN' | |
| 116 | complete_u pdate_payl oad['order ingProvide r uid'] = 'urn:va:us er: R E D A CTED :100000002 72' | |
| 117 | complete _update_pa yload['sta te'] = 'co mplete' | |
| 118 | @paramet er_hash = complete_u pdate_payl oad | |
| 119 | @patient _id = @par ameter_has h['patient _pid'] | |
| 120 | @activit y_user_id = @paramet er_hash['i nitiator'] | |
| 121 | ||
| 122 | payload_ json = upd ate_sign.t o_json | |
| 123 | post_upd ate_sign_c ompleted(p ayload_jso n, user) | |
| 124 | expect(@ response.c ode).to eq (200), "Di d not get a 200 resp onse when completing update" | |
| 125 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.