Produced by Araxis Merge on 10/3/2017 11:16:07 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 | ehmp.zip\ehmp\ehmp\product\tests\data_load_scripts | performance_load2.rb | Tue Jan 10 16:20:50 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\tests\data_load_scripts | performance_load2.rb | Tue Oct 3 14:32:46 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 492 |
| Changed | 1 | 2 |
| 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 'v istarpc4r' | |
| 2 | ||
| 3 | @patients = [] | |
| 4 | ||
| 5 | load_start _time = Ti me.now | |
| 6 | puts "Star ting Data Upload" | |
| 7 | ||
| 8 | @broker = VistaRPC4r ::RPCBroke rConnectio n.new(" IP ", PORT , " REDACTED ", " REDACTED ", false) | |
| 9 | @broker.co nnect | |
| 10 | @broker.se tContext(' OR CPRS GU I CHART') | |
| 11 | ||
| 12 | def format _params(pa rams, ssn, increment , ssn_name = "PAT_SS N") | |
| 13 | fo rmated_par ams = [ | |
| 14 | ["1" , "#{ssn_n ame}^#{ssn }"] | |
| 15 | ] | |
| 16 | ||
| 17 | pa rams.each_ with_index do |item, index| | |
| 18 | item = item.su b("T-", "T -#{increme nt}") | |
| 19 | item = item.su b("T+", "T +#{increme nt}") | |
| 20 | ||
| 21 | form ated_param s << ["#{i ndex+2}", item] | |
| 22 | en d | |
| 23 | fo rmated_par ams | |
| 24 | end | |
| 25 | ||
| 26 | def rpc_lo ad(name, r pc, params , times = [1], ssn_n ame = "PAT _SSN") | |
| 27 | st art = Time .now | |
| 28 | pu ts "Loadi ng #{name} \n" | |
| 29 | @v rpc = Vist aRPC4r::Vi staRPC.new (rpc, Vist aRPC4r::RP CResponse: :ARRAY) | |
| 30 | ||
| 31 | @s sn_name = ssn_name | |
| 32 | ||
| 33 | de f exicute( times, ssn , params) | |
| 34 | x = 1 | |
| 35 | ||
| 36 | unti l x > time s | |
| 37 | format ed_params = format_p arams(para ms, ssn, x , @ssn_nam e) | |
| 38 | @vrpc. params = [ formated_p arams] | |
| 39 | resp = @broker.e xecute(@vr pc) | |
| 40 | ||
| 41 | # puts resp | |
| 42 | ||
| 43 | x += 1 | |
| 44 | end | |
| 45 | en d | |
| 46 | ||
| 47 | co unt = 0 | |
| 48 | @p atients.ea ch do |ssn | | |
| 49 | coun t += 1 | |
| 50 | ||
| 51 | per_ count = @p atients.co unt / time s.count | |
| 52 | ||
| 53 | inde x = (count - 1) / pe r_count | |
| 54 | time = times[i ndex] | |
| 55 | exic ute(time, ssn, param s) | |
| 56 | ||
| 57 | perc ent = coun t / @patie nts.count. to_f | |
| 58 | ||
| 59 | load _done = (p ercent*100 ).to_i | |
| 60 | ||
| 61 | ||
| 62 | outp ut = "[" | |
| 63 | ||
| 64 | load _done.time s do | |
| 65 | output += "=" | |
| 66 | end | |
| 67 | ||
| 68 | (100 - load_do ne).times do | |
| 69 | output += " " | |
| 70 | end | |
| 71 | ||
| 72 | outp ut += "]" | |
| 73 | ||
| 74 | prin t "\r" | |
| 75 | prin t output | |
| 76 | en d | |
| 77 | ||
| 78 | co mp_time = (Time.now - start).t o_f.divmod (60) | |
| 79 | co mp_mins = comp_time[ 0] | |
| 80 | co mp_secs = comp_time[ 1].round(1 ) | |
| 81 | ||
| 82 | ||
| 83 | pu ts "\n#{n ame} Load Completed in #{comp_ mins} Mins #{comp_se cs} Secs \ n" | |
| 84 | end | |
| 85 | ||
| 86 | def num_to _string(nu m) | |
| 87 | al ph = ("a". ."z").to_a | |
| 88 | ou tput = "" | |
| 89 | ||
| 90 | be gin | |
| 91 | num, remainder = num.div mod(10) | |
| 92 | ||
| 93 | outp ut += alph [remainder ] | |
| 94 | en d until nu m == 0 | |
| 95 | ||
| 96 | ou tput.upcas e.reverse | |
| 97 | end | |
| 98 | ||
| 99 | def create _patients( number) | |
| 100 | ||
| 101 | pu ts "Creati ng patient s" | |
| 102 | st art = Time .now | |
| 103 | pa tient_rpc = VistaRPC 4r::VistaR PC.new("IS I IMPORT P AT", Vista RPC4r::RPC Response:: ARRAY) | |
| 104 | ||
| 105 | i = 0 | |
| 106 | un til i >= n umber | |
| 107 | last = "PERFOR MANCE" | |
| 108 | firs t = num_to _string(i) | |
| 109 | ||
| 110 | name = "#{last },#{first} " | |
| 111 | ||
| 112 | pati ent_rpc.pa rams = [[ | |
| 113 | ["1", "TEMPLATE^ DEFAULT"], | |
| 114 | ["2", "IMP_TYPE^ I"], | |
| 115 | ["3", "NAME^#{na me}"] | |
| 116 | ]] | |
| 117 | pati ent_resp = @broker.e xecute(pat ient_rpc) | |
| 118 | soci al = patie nt_resp.va lue.last.s plit('^')[ 1] | |
| 119 | @pat ients.push (social) | |
| 120 | ||
| 121 | i += 1 | |
| 122 | ||
| 123 | perc ent = i.to _f / numbe r | |
| 124 | load _done = (p ercent*100 ).to_i | |
| 125 | ||
| 126 | outp ut = "[" | |
| 127 | ||
| 128 | load _done.time s do | |
| 129 | output += "=" | |
| 130 | end | |
| 131 | ||
| 132 | (100 - load_do ne).times do | |
| 133 | output += " " | |
| 134 | end | |
| 135 | ||
| 136 | outp ut += "]" | |
| 137 | ||
| 138 | prin t "\r" | |
| 139 | prin t output | |
| 140 | en d | |
| 141 | ||
| 142 | co mp_time = (Time.now - start).t o_f.divmod (60) | |
| 143 | co mp_mins = comp_time[ 0] | |
| 144 | co mp_secs = comp_time[ 1].round(1 ) | |
| 145 | ||
| 146 | ||
| 147 | pu ts "\nPat ients Load Completed in #{comp _mins} Min s #{comp_s ecs} Secs \n" | |
| 148 | end | |
| 149 | ||
| 150 | create_pat ients(10) | |
| 151 | ||
| 152 | params = [ | |
| 153 | "H ISTORIC^1" , | |
| 154 | "A LLERGEN^PO LLEN", | |
| 155 | "S YMPTOM^ITC HING", | |
| 156 | "S YMPTOM^ITC HING,WATER ING EYES", | |
| 157 | "O RIG_DATE^T -", | |
| 158 | "O RIGINTR^PR OVIDER,ONE " | |
| 159 | ] | |
| 160 | ||
| 161 | rpc_load(" Allergies" , "ISI IMP ORT ALLERG Y", params ) | |
| 162 | ||
| 163 | params = [ | |
| 164 | "C ONSULT^CAR DIOLOGY", | |
| 165 | "L OC^PRIMARY CARE", | |
| 166 | "P ROV^PROVID ER,ONE", | |
| 167 | "T EXT^Testin g consult importer." | |
| 168 | ] | |
| 169 | ||
| 170 | rpc_load(" Consults", "ISI IMPO RT CONSULT ", params) | |
| 171 | ||
| 172 | params = [ | |
| 173 | "R APROC^KNEE 2 VIEWS", | |
| 174 | "M AGLOC^RADI OLOGY MAIN FLOOR", | |
| 175 | "P ROV^PROVID ER,ONE", | |
| 176 | "R ADTE^T+", | |
| 177 | "R EQLOC^PRIM ARY CARE", | |
| 178 | "R EASON^This is a test .", | |
| 179 | "H ISTORY^Thi s is some history." | |
| 180 | ] | |
| 181 | ||
| 182 | rpc_load(" Orders", " ISI IMPORT RAD ORDER ", params, [200]) | |
| 183 | ||
| 184 | params = [ | |
| 185 | "A DATE^T-@14 :00", | |
| 186 | "C LIN^PRIMAR Y CARE" | |
| 187 | ] | |
| 188 | ||
| 189 | rpc_load(" Appointmen ts 1/2", " ISI IMPORT APPT", pa rams, [50, 65, 75, 8 5, 100], " PATIENT") | |
| 190 | ||
| 191 | ||
| 192 | params = [ | |
| 193 | "A DATE^T-@8: 00", | |
| 194 | "C LIN^GENERA L MEDICINE " | |
| 195 | ] | |
| 196 | ||
| 197 | rpc_load(" Appointmen ts 2/2", " ISI IMPORT APPT", pa rams, [50, 65, 75, 8 5, 100], " PATIENT") | |
| 198 | ||
| 199 | ||
| 200 | ||
| 201 | params = [ | |
| 202 | "V ITAL_TYPE^ BLOOD PRES SURE", | |
| 203 | "R ATE^172/63 ", | |
| 204 | "L OCATION^PR IMARY CARE ", | |
| 205 | "D T_TAKEN^T- ", | |
| 206 | "E NTERED_BY^ PROVIDER,O NE" | |
| 207 | ] | |
| 208 | ||
| 209 | rpc_load(" Vitals 1/2 ", "ISI IM PORT VITAL S", params , [50, 200 , 300, 400 , 500]) | |
| 210 | ||
| 211 | params = [ | |
| 212 | "V ITAL_TYPE^ TEMPERATUR E", | |
| 213 | "R ATE^89.6", | |
| 214 | "L OCATION^GE NERAL MEDI CINE", | |
| 215 | "D T_TAKEN^T- ", | |
| 216 | "E NTERED_BY^ NURSE,TEN" | |
| 217 | ] | |
| 218 | ||
| 219 | rpc_load(" Vitals 2/2 ", "ISI IM PORT VITAL S", params , [50, 200 , 300, 400 , 500]) | |
| 220 | ||
| 221 | params = [ | |
| 222 | "T IU_NAME^CR ISIS NOTE" , | |
| 223 | "V LOC^GENERA L MEDICINE ", | |
| 224 | "V DT^T-", | |
| 225 | "P ROV^PROVID ER,ONE", | |
| 226 | "T EXT^Anothe r test." | |
| 227 | ] | |
| 228 | ||
| 229 | rpc_load(" Notes 1/2" , "ISI IMP ORT NOTE", params, [ 125, 250, 375, 500, 600]) | |
| 230 | ||
| 231 | ||
| 232 | params = [ | |
| 233 | "T IU_NAME^CA RDIOLOGY N OTE", | |
| 234 | "V LOC^PRIMAR Y CARE", | |
| 235 | "V DT^T-", | |
| 236 | "P ROV^PROVID ER,ONE", | |
| 237 | "T EXT^This i s a test o f the note stuffer." | |
| 238 | ] | |
| 239 | ||
| 240 | rpc_load(" Notes 2/2" , "ISI IMP ORT NOTE", params, [ 125, 250, 375, 500, 600]) | |
| 241 | ||
| 242 | load_time = (Time.no w - load_s tart_time) .to_f.divm od(60) | |
| 243 | load_mins = load_tim e[0] | |
| 244 | load_secs = load_tim e[1].round (1) | |
| 245 | ||
| 246 | puts "Loa d Complete d! in #{lo ad_mins} M ins #{load _secs} Sec s" | |
| 247 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.