528. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/10/2018 8:40:01 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.

528.1 Files compared

# Location File Last Modified
1 MHED_APPS_CIF.zip\SM v2.2.5\scheduling-manager-web-2.2.5@30ba13bb3af.zip\scheduling-manager\test\watir-ruby\module\database OracleUtility.rb Sat Apr 7 11:28:42 2018 UTC
2 MHED_APPS_CIF.zip\SM v2.2.5\scheduling-manager-web-2.2.5@30ba13bb3af.zip\scheduling-manager\test\watir-ruby\module\database OracleUtility.rb Thu May 3 16:24:22 2018 UTC

528.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 356
Changed 1 4
Inserted 0 0
Removed 0 0

528.3 Comparison options

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

528.4 Active regular expressions

No regular expressions were active.

528.5 Comparison detail

  1   require 'r ubygems'
  2   require 'o ci8'
  3   require 'b igdecimal'
  4   require 'b igdecimal/ util'
  5   require_re lative '.. /../module /DateUtili ty'
  6  
  7   module Ora cleUtility
  8     include  DateUtilit y
  9     USER = " sys"
  10       PASSWORD =  " RED A CTED "
  11       VAMF_HOST_ PORT= "// IP             "
  12     SERVICE_ NAME = "va mfdb.local host.local domain"
  13     #SERVICE _NAME = "v amfdb"
  14  
  15  
  16     def exec uteQuery(s ql)
  17       begin
  18         # pu ts "execut eQuery() B egin"
  19         #put s "sql = "  + sql
  20         conn  = OCI8.ne w(USER, PA SSWORD, VA MF_HOST_PO RT + '/' +  SERVICE_N AME, :SYSD BA)
  21         conn .exec(sql)
  22         conn .commit
  23         conn .logoff
  24           #p uts ("exec uteQuery()  End")
  25       rescue  Exception  => e
  26         puts  "[ExcuteQ uery() Exc eption ]"  + e.messag e
  27       end
  28     end
  29  
  30  
  31     def exec uteAndGetD ataAndNumR ow(sql)
  32       puts " executeAnd getNumRowA ndData() B egin"
  33       conn =  OCI8.new( OracleUtil ity::USER,  OracleUti lity::PASS WORD, Orac leUtility: :VAMF_HOST _PORT + '/ ' + Oracle Utility::S ERVICE_NAM E, :SYSDBA )
  34       return edData = ' '
  35  
  36       num_ro ws = conn. exec(sql)  do |r|
  37  
  38         retu rnedData =  r.join(', ')
  39       end
  40  
  41       puts ( "num row i s " + num_ rows.to_s)
  42  
  43       puts " [returned  value] " +  returnedD ata.to_s
  44       conn.c ommit
  45       conn.l ogoff
  46  
  47       puts " executeAnd getNumRowA ndData() E nd"
  48       return  returnedD ata + "||"  + num_row s.to_s
  49     end
  50  
  51     def dele teUserFrom RightOfAcc ess(patien tId)
  52       execut eQuery("DE LETE FROM  HADB.USER_ RIGHTOFACC ESS WHERE  USER_ID='"  + patient Id + "'")
  53       puts " Deleted RO A for User ID=" + pat ientId
  54     end
  55  
  56     def setD efaultROAF orPatient( patientId)
  57       conn = OCI8.new(U SER, PASSW ORD, VAMF_ HOST_PORT  + "/" + SE RVICE_NAME , :SYSDBA)
  58  
  59       num_ro ws = conn. exec("SELE CT * FROM  HADB.USER_ RIGHTOFACC ESS WHERE  USER_ID='"  + patient Id + "'")  do |r|
  60         puts  r.join(', ')
  61       end
  62  
  63       puts ( "num row i s " + num_ rows.to_s)
  64  
  65       if num _rows == n il  || num _rows == 0  then
  66         conn .exec("INS ERT INTO H ADB.USER_R IGHTOFACCE SS (USER_I D, ROA_STA TE, ROA_DA TE, ROA_FO RM) VALUES  ('" + pat ientId + " ', TO_NUMB ER(1), TO_ DATE('2015 /05/31', ' YYYY/MM/DD '), utl_ra w.cast_to_ raw('empty '))")
  67  
  68       end
  69  
  70       conn.c ommit
  71       conn.l ogoff
  72  
  73       puts " [setDefaul tROAForPat ient]"
  74  
  75     end
  76  
  77     def upda teStatus(a ppmt_reque st_id, pat ient_id, s tatus, app ointment_t ype)
  78       sql =  "update VA RDB.appoin tment_requ est set st atus ='" +  status +  "' where P ATIENT_ID= '" + patie nt_id + "'  and appoi ntment_req uest_id =' " + appmt_ request_id  + "' and  appointmen t_type='"  + appointm ent_type +  "'"
  79       execut eQuery(sql )
  80     end
  81  
  82     def upda teAppointm entRequest edFields(d ate, optio n_date_tim e1, option _date_time 2, option_ date_time3 , patient_ id, appmt_ request_id , status)
  83       sql =  "update VA RDB.appoin tment_requ est set La st_Updated _Date=to_d ate('" + d ate + "',  'MM/DD/YYY Y'), Creat ed_Date=to _date('" +  date + "' , 'MM/DD/Y YYY'), Opt ion_date_1 ='" +optio n_date_tim e1[0] + "' , option_t ime_1='" +  option_da te_time1[1 ] +"', opt ion_date_2 ='" + opti on_date_ti me2[0] + " ', option_ time_2='"  + option_d ate_time2[ 1] +"', op tion_date_ 3='" + opt ion_date_t ime3[0]+ " ', option_ time_3='"  + option_d ate_time3[ 1] + "', p hone_numbe r='(123) 4 56-7890',  status='"  + status +  "' where  PATIENT_ID ='" + pati ent_id + " ' and appo intment_re quest_id = '" + appmt _request_i d + "'"
  84       execut eQuery(sql )
  85     end
  86  
  87     def upda teAppointm entRequest edPreferen ce(provide r_option,  purpose_of _visit, ot her_purpos e_of_visit , patient_ id, appmt_ request_id )
  88       sql =  "update VA RDB.appoin tment_requ est set pr ovider_opt ion='" + p rovider_op tion + "',  purpose_o f_visit='"  + purpose _of_visit+  "', other _purpose_o f_visit='"  + other_p urpose_of_ visit +"'  where PATI ENT_ID='"  + patient_ id + "' an d appointm ent_reques t_id ='" +  appmt_req uest_id +  "'"
  89       execut eQuery(sql )
  90     end
  91  
  92     def dele teMessage( patientId,  apmt_rqt_ id)
  93       sql =  "delete fr om vardb.a ppointment _request_m essage whe re sender_ id='" + pa tientId +   "' and ap pointment_ request_id ='" + apmt _rqt_id +" '"
  94       execut eQuery(sql )
  95  
  96       sql2 =   "delete  from vardb .appointme nt_request _message   where send er_id='sta ffscv' and  appointme nt_request _id='" + a pmt_rqt_id  +"'"
  97       execut eQuery(sql )
  98     end
  99  
  100  
  101     def getL astUpdated FromDB(pat ient_id, a ppmt_reque st_id)
  102       sql =  "select la st_updated _date from  vardb.app ointment_r equest whe re patient _id='" + p atient_id  + "' and a ppointment _request_i d='" + app mt_request _id + "'"
  103       return edData = e xecuteAndG etDataAndN umRow(sql)
  104  
  105       dateAr r = return edData.spl it("||")
  106       dateHH MM = dateA rr[0].spli t(" -")
  107  
  108       return  getFormat edDateStr( dateHHMM[0 ], "%Y-%m- %d %H:%M",  "%m/%d/%Y  %H:%M")
  109     end
  110  
  111     def rese tDataForPa tientOne()
  112       execut eQuery( "d elete from  vardb.bes t_time_to_ call where  appointme nt_request _id in (se lect appoi ntment_req uest_id fr om vardb.a ppointment _request w here patie nt_id ='P0 01' and ap pointment_ request_id  not in('0 0000000000 0000000000 0000000001 3', '00000 0000000000 0000000000 0000014',' 0000000000 0000000000 0000000000 15', '0000 0000000000 0000000000 00000016',  '00000000 0000000000 0000000000 0017'))")
  113       execut eQuery("de lete from  vardb.noti fication_p reference  where pati ent_id ='P 001'")
  114       execut eQuery("de lete from  vardb.ar_d etail_code  where use r_id='P001 '")
  115       #execu teQuery("d elete from  vardb.app ointment_r equest_mes sage where  appointme nt_request _id not in ('00000000 0000000000 0000000000 0013', '00 0000000000 0000000000 0000000014 ','0000000 0000000000 0000000000 00015', '0 0000000000 0000000000 0000000001 6', '00000 0000000000 0000000000 0000017')"  )
  116  
  117       execut eQuery("de lete from  vardb.appo intment_re quest_mess age where  sender_id= 'P001'")
  118       execut eQuery("de lete from  vardb.appo intment_re quest wher e patient_ id ='P001'  and appoi ntment_req uest_id no t in('0000 0000000000 0000000000 00000013',  '00000000 0000000000 0000000000 0014','000 0000000000 0000000000 000000015' , '0000000 0000000000 0000000000 00016', '0 0000000000 0000000000 0000000001 7')")
  119     end
  120  
  121     def dele tePatientD ata(patien tId)
  122       execut eQuery("de lete from  vardb.best _time_to_c all where  appointmen t_request_ id in (sel ect appoin tment_requ est_id fro m vardb.ap pointment_ request wh ere patien t_id ='" +  patientId  + "')")
  123       execut eQuery("de lete from  vardb.noti fication_p reference  where pati ent_id ='"  + patient Id + "'")
  124       execut eQuery("de lete from  vardb.ar_d etail_code  where app ointment_r equest_id  in (select  appointme nt_request _id from v ardb.appoi ntment_req uest where  patient_i d ='" + pa tientId +  "')")
  125       execut eQuery("de lete from  vardb.appo intment_re quest_mess age where  sender_id= '" + patie ntId +  "' ")
  126       execut eQuery("de lete from  vardb.appo intment_re quest wher e patient_ id ='" + p atientId +  "'")
  127     end
  128  
  129     def dele teNotifica tionPrefer ence(patie ntId)
  130       execut eQuery("de lete from  vardb.noti fication_p reference  where pati ent_id ='"  + patient Id + "'")
  131     end
  132  
  133     def dele teAllReque stData()
  134       execut eQuery("de lete from  vardb.best _time_to_c all")
  135       execut eQuery("de lete from  vardb.noti fication_p reference" )
  136       execut eQuery("de lete from  vardb.ar_d etail_code ")
  137       execut eQuery("de lete from  vardb.appo intment_re quest_mess age")
  138       execut eQuery("de lete from  vardb.appo intment_re quest")
  139       execut eQuery("de lete from  vardb.APPT _REQ_INPRO CESS")
  140     end
  141  
  142     def dele teAllCCReq uestData()
  143       execut eQuery("de lete from  vardb.best _time_to_c all")
  144       execut eQuery("de lete from  vardb.ar_d etail_code ")
  145       execut eQuery("de lete from  vardb.appo intment_re quest_mess age")
  146       execut eQuery("de lete from  vardb.appo intment_re quest")
  147       execut eQuery("de lete from  vardb.APPT _REQ_INPRO CESS")
  148       execut eQuery("de lete from  vardb.cc_a ppointment _request")
  149     end
  150  
  151     def inse rtRequest( sql)
  152       sql =  sql.split( ';')
  153       sql.ea ch do |que ry|
  154         quer y.strip!
  155         exec uteQuery(q uery) unle ss query.e mpty?
  156       end
  157  
  158     end
  159  
  160     def setS taffUserDi sclaimer(u serId, vis taLocation )
  161       puts " Start [set StaffUserD isclamimer Date]"
  162       conn =  OCI8.new( OracleUtil ity::USER,  OracleUti lity::PASS WORD, Orac leUtility: :VAMF_HOST _PORT + '/ ' + Oracle Utility::S ERVICE_NAM E, :SYSDBA )
  163  
  164       num_ro ws = conn. exec("SELE CT * FROM  HADB.STAFF _USER_DISC LAIMER WHE RE USER_ID ='" + user Id + "' an d VISTA_LO CATION='"  + vistaLoc ation + "' "  ) do |r |
  165         puts  r.join(', ')
  166       end
  167  
  168       if num _rows == n il  || num _rows == 0  then
  169         sqlS tring = "I NSERT INTO  HADB.STAF F_USER_DIS CLAIMER (U SER_ID, VI STA_LOCATI ON, SUD_ST ATE, SUD_D ATE ) VALU ES ('" + u serId + "' " + ", '"  + vistaLoc ation + "' , TO_NUMBE R(1), TO_D ATE('2017/ 02/01', 'Y YYY/MM/DD' ))"
  170  
  171         conn .exec(sqlS tring)
  172         conn .commit
  173       end
  174  
  175       conn.l ogoff
  176       puts " End [setSt affUserDis clamimerDa te]"
  177     end
  178  
  179  
  180   end