Produced by Araxis Merge on 10/5/2018 9:05:46 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 | MHEDP3_VAOS_VATS_SM_Sept2018.zip\SM 2.4.0\scheduling-manager-web-2.4.0.zip\scheduling-manager\test\selenium-ruby\models | patient.rb | Thu Jul 19 16:14:00 2018 UTC |
| 2 | MHEDP3_VAOS_VATS_SM_Sept2018.zip\SM 2.4.0\scheduling-manager-web-2.4.0.zip\scheduling-manager\test\selenium-ruby\models | patient.rb | Fri Oct 5 20:10:43 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 166 |
| Changed | 1 | 4 |
| 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 | #This clas s represen ts a patie nt and inc ludes rela ted databa se methods | |
| 2 | ||
| 3 | require 'm ysql' | |
| 4 | ||
| 5 | class Pati ent | |
| 6 | ||
| 7 | attr_ac cessor :pa tient_id | |
| 8 | attr_ac cessor :fi rst_name | |
| 9 | attr_ac cessor :la st_name | |
| 10 | attr_ac cessor :ss n | |
| 11 | attr_ac cessor :da te_of_birt h | |
| 12 | attr_ac cessor :te xt_messagi ng_allowed | |
| 13 | ||
| 14 | ||
| 15 | HOST = 'localhost ' | |
| 16 | USER = ' AI ' | |
| 17 | DBPASSWORD = 'A I ' | |
| 18 | SCHEMA = 'VARDB' | |
| 19 | def popu latePatien t() | |
| 20 | ||
| 21 | self.p atient_id ='P001' | |
| 22 | self.f irst_name = 'patient ' | |
| 23 | self.l ast_name = 'onedemo' | |
| 24 | self.s sn = '6660 00001' | |
| 25 | self.d ate_of_bir th = '1935 -04-07 00: 00:00' | |
| 26 | self.t ext_messag ing_allowe d = 0 | |
| 27 | ||
| 28 | end | |
| 29 | ||
| 30 | def popu lateAndSav ePatient() | |
| 31 | self.p opulatePat ient | |
| 32 | self.i nsertRecor d(self) | |
| 33 | ||
| 34 | end | |
| 35 | ||
| 36 | def ins ertRecord( target_rec ord) | |
| 37 | #crea te the ins ert statem ent and po st to the db | |
| 38 | begin | |
| 39 | con = Mysql.n ew(HOST, U SER, DBPAS SWORD, SCH EMA) | |
| 40 | ins ert_statem ent = "INS ERT INTO ` PATIENT` | |
| 41 | (`PATIENT_ ID`, | |
| 42 | `FIRST_NAM E`, | |
| 43 | `LAST_NAME `, | |
| 44 | `SSN`, | |
| 45 | `DATE_OF_B IRTH`, | |
| 46 | `TEXT_MESS AGING_ALLO WED`, | |
| 47 | `TEXT_MESS AGING_PHON E_NUMBER`) | |
| 48 | VALUES ('# {target_re cord.patie nt_id}', | |
| 49 | '#{target_ record.fir st_name}', | |
| 50 | '#{target_ record.las t_name}', | |
| 51 | '#{target_ record.ssn }', | |
| 52 | '#{target_ record.dat e_of_birth }', | |
| 53 | #{target_r ecord.text _messaging _allowed}, | |
| 54 | NULL | |
| 55 | );" | |
| 56 | rs = con.quer y(insert_s tatement) | |
| 57 | con .close | |
| 58 | ||
| 59 | rescu e Exceptio n=>e | |
| 60 | put s "MySQL E xception: " + e.to_s | |
| 61 | ||
| 62 | ensur e | |
| 63 | put s "insert patient st atement ex ecuted" | |
| 64 | end | |
| 65 | ||
| 66 | end | |
| 67 | ||
| 68 | def delete RecordById (record_id ) | |
| 69 | #creat e the sql statement from the i ncoming ta rget_date | |
| 70 | begin | |
| 71 | con = Mysql.ne w(HOST, US ER, DBPASS WORD, SCHE MA) | |
| 72 | # co n = Mysql. new(dbconf ig.host, d bconfig.us ername, db config.pas sword, dbc onfig.data base) | |
| 73 | rs = con.query ("DELETE F ROM VARDB. PATIENT WH ERE PATIEN T_ID = '#{ record_id} ';") | |
| 74 | rs.e ach { |res ult| | |
| 75 | pu ts "#{resu lt}"} | |
| 76 | con. close | |
| 77 | ||
| 78 | rescue Exception => e | |
| 79 | puts "MySQL Ex ception: " + e.to_s | |
| 80 | ||
| 81 | ensure | |
| 82 | puts "delete s tatement e xecuted" | |
| 83 | end | |
| 84 | end | |
| 85 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.