Produced by Araxis Merge on 5/29/2018 12:14:32 PM 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 | mobile-kidney-web-2.0.0.zip\mobile-kidney-web\acceptance_test\watir\lib\module | DBOperationsModule.rb | Wed Apr 4 20:16:46 2018 UTC |
2 | mobile-kidney-web-2.0.0.zip\mobile-kidney-web\acceptance_test\watir\lib\module | DBOperationsModule.rb | Tue May 29 15:32:16 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 5 | 82 |
Changed | 4 | 20 |
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 | require 'w atir-webdr iver' | |
2 | ||
3 | # Commente d out for remote cap ability | |
4 | # require 'oci8' | |
5 | ||
6 | module DBO perationsM odule | |
7 | DBPASSWORD = "A I " | |
8 | USER = " AI " | |
9 | SCHEMA = "
|
|
10 | AUTHSCHE MA = "AUTH DB" | |
11 | MOCKSCHE MA = "MOCK DB" | |
12 | ||
13 | ||
14 | def dele teUserFrom RightOfAcc ess(patien tId) | |
15 | con = Mysq l.new(' IP ', USER, D BPASSWORD, SCHEMA) | |
16 | rs = c on.query(' DELETE FRO M USER_RIG HTOFACCESS WHERE USE R_ID="' + patientId + '"') | |
17 | con.cl ose | |
18 | puts " Deleted RO A for User ID=" + pat ientId | |
19 | end | |
20 | ||
21 | def setD efaultROAF orPatient( patientId) | |
22 | con = Mysq l.new(' IP ', USER, D BPASSWORD, SCHEMA) | |
23 | rs = c on.query(' SELECT * F ROM USER_R IGHTOFACCE SS WHERE U SER_ID="' + patientI d + '"') | |
24 | entry = rs.fetch _hash | |
25 | if ent ry == nil then | |
26 | con. query('INS ERT INTO U SER_RIGHTO FACCESS (U SER_ID, RO A_STATE, R OA_DATE, R OA_FORM) V ALUES ("' + patientI d + '", "1 ", "2014-0 9-18 18:59 :59", "emp ty")') | |
27 | end | |
28 | con.cl ose | |
29 | puts " Updated RO A State" | |
30 | end | |
31 | ||
32 | def upda teUserRigh tOfAccess( patientId, roaState) | |
33 | host = " IP " | |
34 | user = "
|
|
35 | dbpass = " A I " | |
36 | port = PORT | |
37 | sid = " AI " | |
38 | conn_s tring="(DE SCRIPTION= (ADDRESS=( PROTOCOL=T CP)(HOST=# {host})(PO RT=#{port} ))(CONNECT _DATA=(SER VER=DEDICA TED)(SID=# {sid})))" | |
39 | ||
40 | conn = OCI8.new( user+"/"+d bpass+"@"+ conn_strin g) | |
41 | ||
42 | puts " patientId: roaState : " + "#{pa tientId}"+ ":"+"#{roa State}" | |
43 | ||
44 | conn.e xec("UPDAT E USER_RIG HTOFACCESS ura | |
45 | SE T ura.ROA_ STATE = '# {roaState} ' | |
46 | WHER E ura.USER _ID ='#{pa tientId}'" ) | |
47 | conn.e xec("COMMI T") | |
48 | ||
49 | end | |
50 | ||
51 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.