Produced by Araxis Merge on 10/5/2018 9:05:45 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 | appointment_request.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 | appointment_request.rb | Fri Oct 5 20:08:55 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 404 |
| 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 an appo intment re quest and includes r elated dat abase meth ods | |
| 2 | #TODO: rep lace the e lements an d methods in this cl ass and us e a real O RM gem as this class is a hack | |
| 3 | ||
| 4 | require 'm ysql' | |
| 5 | # require 'yaml' | |
| 6 | ||
| 7 | class Appo intmentReq uest #< Ac tiveRecord ::Base | |
| 8 | ||
| 9 | attr_ac cessor :ap pointment_ request_id | |
| 10 | attr_ac cessor :pa tient_id | |
| 11 | attr_ac cessor :la st_updated _date | |
| 12 | attr_ac cessor :cr eated_date | |
| 13 | attr_ac cessor :de leted_date | |
| 14 | attr_ac cessor :ac tive | |
| 15 | attr_ac cessor :se cond_reque st | |
| 16 | attr_ac cessor :ap pointment_ date | |
| 17 | attr_ac cessor :ap pointment_ time | |
| 18 | attr_ac cessor :op tion_date_ 1 | |
| 19 | attr_ac cessor :op tion_time_ 1 | |
| 20 | attr_ac cessor :op tion_date_ 2 | |
| 21 | attr_ac cessor :op tion_time_ 2 | |
| 22 | attr_ac cessor :op tion_date_ 3 | |
| 23 | attr_ac cessor :op tion_time_ 3 | |
| 24 | attr_ac cessor :st atus | |
| 25 | attr_ac cessor :ap pointment_ type | |
| 26 | attr_ac cessor :fa cility_cod e | |
| 27 | attr_ac cessor :em ail | |
| 28 | attr_ac cessor :ph one_number | |
| 29 | attr_ac cessor :te xt_messagi ng_allowed | |
| 30 | attr_ac cessor :te xt_messagi ng_phone_n umber | |
| 31 | attr_ac cessor :pu rpose_of_v isit | |
| 32 | attr_ac cessor :ot her_purpos e_of_visit | |
| 33 | attr_ac cessor :vi sit_type | |
| 34 | attr_ac cessor :pr ovider_id | |
| 35 | attr_ac cessor :pr ovider_nam e | |
| 36 | attr_ac cessor :pr ovider_per son_class | |
| 37 | attr_ac cessor :pr ovider_opt ion | |
| 38 | attr_ac cessor :se cond_reque st_submitt ed | |
| 39 | attr_ac cessor :pa rent_reque st_id | |
| 40 | attr_ac cessor :ha s_veteran_ new_messag e | |
| 41 | attr_ac cessor :ha s_provider _new_messa ge | |
| 42 | attr_ac cessor :pr ovider_see n_appt_req | |
| 43 | attr_ac cessor :re quested_ph one_call | |
| 44 | ||
| 45 | ||
| 46 | HOST = 'localhost ' | |
| 47 | USER = ' AI ' | |
| 48 | DBPASSWORD = 'A I ' | |
| 49 | SCHEMA = 'VARDB' | |
| 50 | ||
| 51 | def popu lateDefaul tAppointme ntRequest( ) | |
| 52 | ||
| 53 | # self .appointme nt_request _id ='0000 0000000000 0000000000 00000910' | |
| 54 | self.a ppointment _request_i d ='402880 eb45b8fff3 0145b9338f b50004' | |
| 55 | # self .patient_i d = 'P004' #ssn: 666 -00-0004 | |
| 56 | self.p atient_id = 'P001' # ssn: 666-0 0-0001 | |
| 57 | self.l ast_update d_date = D ateTime.no w.strftime ('%Y-%m-%d %H:%M:%S' ) | |
| 58 | self.c reated_dat e = DateTi me.now.str ftime('%Y- %m-%d %H:% M:%S') | |
| 59 | self.d eleted_dat e = 'NULL' #DateTime .now.strft ime('%Y-%m -%d %H:%M: %S') #"nul l" #nil | |
| 60 | self.a ctive = 1 | |
| 61 | self.s econd_requ est = 0 | |
| 62 | self.a ppointment _date = '' | |
| 63 | self.a ppointment _time = '' | |
| 64 | self.o ption_date _1 = (Date Time.now + 10).strft ime('%m/%d /%Y') | |
| 65 | self.o ption_time _1 = 'PM' | |
| 66 | self.o ption_date _2 = 'No D ate Select ed' | |
| 67 | self.o ption_time _2 = 'No T ime Select ed' | |
| 68 | self.o ption_date _3 = 'No D ate Select ed' | |
| 69 | self.o ption_time _3 = 'No T ime Select ed' | |
| 70 | self.s tatus = 'S ubmitted' | |
| 71 | self.a ppointment _type = 'P rimary Car e' | |
| 72 | self.f acility_co de = '777' | |
| 73 | self.e mail = '' | |
| 74 | self.p hone_numbe r = '444-4 44-4444' | |
| 75 | self.t ext_messag ing_allowe d = 0 | |
| 76 | self.t ext_messag ing_phone_ number = ' ' | |
| 77 | self.p urpose_of_ visit = 'N ew Issue' | |
| 78 | self.o ther_purpo se_of_visi t = '' | |
| 79 | self.v isit_type = 'Phone C all' | |
| 80 | self.p rovider_id = 'PROV1' | |
| 81 | self.p rovider_na me = 'zzte st appoint ment_provi der1' | |
| 82 | self.p rovider_pe rson_class = '' | |
| 83 | self.p rovider_op tion = 'NU LL' | |
| 84 | self.s econd_requ est_submit ted = 0 | |
| 85 | self.p arent_requ est_id = ' NULL' | |
| 86 | self.h as_veteran _new_messa ge = 0 | |
| 87 | self.h as_provide r_new_mess age = 0 | |
| 88 | self.p rovider_se en_appt_re q = 0 | |
| 89 | self.r equested_p hone_call = 1 | |
| 90 | ||
| 91 | end | |
| 92 | ||
| 93 | def popu lateAndSav eDefaultAp pointmentR equest() | |
| 94 | self.p opulateDef aultAppoin tmentReque st | |
| 95 | self.i nsertRecor d(self) | |
| 96 | end | |
| 97 | ||
| 98 | def ins ertRecord( target_rec ord) | |
| 99 | #crea te the ins ert statem ent and po st to the db | |
| 100 | begin | |
| 101 | con = Mysql.n ew(HOST, U SER, DBPAS SWORD, SCH EMA) | |
| 102 | # c on = Mysql .new(dbcon fig.host, dbconfig.u sername, d bconfig.pa ssword, db config.dat abase) | |
| 103 | ins ert_statem ent = "INS ERT INTO ` APPOINTMEN T_REQUEST` | |
| 104 | (`APPOINTM ENT_REQUES T_ID`, | |
| 105 | `PATIENT_I D`, | |
| 106 | `LAST_UPDA TED_DATE`, | |
| 107 | `CREATED_D ATE`, | |
| 108 | `DELETED_D ATE`, | |
| 109 | `ACTIVE`, | |
| 110 | `SECOND_RE QUEST`, | |
| 111 | `APPOINTME NT_DATE`, | |
| 112 | `APPOINTME NT_TIME`, | |
| 113 | `OPTION_DA TE_1`, | |
| 114 | `OPTION_TI ME_1`, | |
| 115 | `OPTION_DA TE_2`, | |
| 116 | `OPTION_TI ME_2`, | |
| 117 | `OPTION_DA TE_3`, | |
| 118 | `OPTION_TI ME_3`, | |
| 119 | `STATUS`, | |
| 120 | `APPOINTME NT_TYPE`, | |
| 121 | `FACILITY_ CODE`, | |
| 122 | `EMAIL`, | |
| 123 | `PHONE_NUM BER`, | |
| 124 | `TEXT_MESS AGING_ALLO WED`, | |
| 125 | `TEXT_MESS AGING_PHON E_NUMBER`, | |
| 126 | `PURPOSE_O F_VISIT`, | |
| 127 | `OTHER_PUR POSE_OF_VI SIT`, | |
| 128 | `VISIT_TYP E`, | |
| 129 | `PROVIDER_ ID`, | |
| 130 | `PROVIDER_ NAME`, | |
| 131 | `PROVIDER_ PERSON_CLA SS`, | |
| 132 | `PROVIDER_ OPTION`, | |
| 133 | `SECOND_RE QUEST_SUBM ITTED`, | |
| 134 | `PARENT_RE QUEST_ID`, | |
| 135 | `HAS_VETER AN_NEW_MES SAGE`, | |
| 136 | `HAS_PROVI DER_NEW_ME SSAGE`, | |
| 137 | `PROVIDER_ SEEN_APPT_ REQ`, | |
| 138 | `REQUESTED _PHONE_CAL L`) | |
| 139 | VALUES ('# {target_re cord.appoi ntment_req uest_id}', | |
| 140 | '#{target_ record.pat ient_id}', | |
| 141 | '#{target_ record.las t_updated_ date}', | |
| 142 | '#{target_ record.cre ated_date} ', | |
| 143 | #{target_r ecord.dele ted_date}, | |
| 144 | #{target_r ecord.acti ve}, | |
| 145 | #{target_r ecord.seco nd_request }, | |
| 146 | '#{target_ record.app ointment_d ate}', | |
| 147 | '#{target_ record.app ointment_t ime}', | |
| 148 | '#{target_ record.opt ion_date_1 }', | |
| 149 | '#{target_ record.opt ion_time_1 }', | |
| 150 | '#{target_ record.opt ion_date_2 }', | |
| 151 | '#{target_ record.opt ion_time_2 }', | |
| 152 | '#{target_ record.opt ion_date_3 }', | |
| 153 | '#{target_ record.opt ion_time_3 }', | |
| 154 | '#{target_ record.sta tus}', | |
| 155 | '#{target_ record.app ointment_t ype}', | |
| 156 | '#{target_ record.fac ility_code }', | |
| 157 | '#{target_ record.ema il}', | |
| 158 | '#{target_ record.pho ne_number} ', | |
| 159 | #{target_r ecord.text _messaging _allowed}, | |
| 160 | '#{target_ record.tex t_messagin g_phone_nu mber}', | |
| 161 | '#{target_ record.pur pose_of_vi sit}', | |
| 162 | '#{target_ record.oth er_purpose _of_visit} ', | |
| 163 | '#{target_ record.vis it_type}', | |
| 164 | '#{target_ record.pro vider_id}' , | |
| 165 | '#{target_ record.pro vider_name }', | |
| 166 | '#{target_ record.pro vider_pers on_class}' , | |
| 167 | #{target_r ecord.prov ider_optio n}, | |
| 168 | #{target_r ecord.seco nd_request _submitted }, | |
| 169 | #{target_r ecord.pare nt_request _id}, | |
| 170 | #{target_r ecord.has_ veteran_ne w_message} , | |
| 171 | #{target_r ecord.has_ provider_n ew_message }, | |
| 172 | #{target_r ecord.prov ider_seen_ appt_req}, | |
| 173 | #{target_r ecord.requ ested_phon e_call} | |
| 174 | );" | |
| 175 | rs = con.quer y(insert_s tatement) | |
| 176 | con .close | |
| 177 | ||
| 178 | rescu e Exceptio n=>e | |
| 179 | put s "MySQL E xception: " + e.to_s | |
| 180 | ||
| 181 | ensur e | |
| 182 | put s "insert appointmen t request statement executed" | |
| 183 | end | |
| 184 | ||
| 185 | end | |
| 186 | ||
| 187 | def dele teRecordBy Id(record_ id) | |
| 188 | #creat e the sql statement from the i ncoming ta rget_date | |
| 189 | begin | |
| 190 | con = Mysql.ne w(HOST, US ER, DBPASS WORD, SCHE MA) | |
| 191 | # co n = Mysql. new(dbconf ig.host, d bconfig.us ername, db config.pas sword, dbc onfig.data base) | |
| 192 | rs = con.query ("Delete F ROM VARDB. APPOINTMEN T_REQUEST where APPO INTMENT_RE QUEST_ID= '#{record_ id}';") | |
| 193 | rs.e ach { |res ult| | |
| 194 | pu ts "#{resu lt}"} | |
| 195 | con. close | |
| 196 | ||
| 197 | rescue Exception => e | |
| 198 | puts "MySQL Ex ception: " + e.to_s | |
| 199 | ||
| 200 | ensure | |
| 201 | puts "delete s tatement e xecuted" | |
| 202 | end | |
| 203 | end | |
| 204 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.