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 | xls.rb | Tue Jan 10 16:20:50 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\tests\data_load_scripts | xls.rb | Tue Oct 3 14:33:39 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 222 |
| 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 | @broker = VistaRPC4r ::RPCBroke rConnectio n.new(" IP ", PORT , "
|
|
| 4 | @broker.co nnect | |
| 5 | @broker.se tContext(' OR CPRS GU I CHART') | |
| 6 | ||
| 7 | ||
| 8 | vrpc = Vis taRPC4r::V istaRPC.ne w("ORWUL F V4DG", Vis taRPC4r::R PCResponse ::SINGLE_V ALUE) | |
| 9 | ||
| 10 | vrpc.param s = [ | |
| 11 | "U D RX", | |
| 12 | ] | |
| 13 | ||
| 14 | resp = @br oker.execu te(vrpc) | |
| 15 | ||
| 16 | drug_table = resp.va lue.split( '^').first | |
| 17 | ||
| 18 | def get_do se(select_ med, name) | |
| 19 | vr pc = Vista RPC4r::Vis taRPC.new( "ORWDPS2 O ISLCT", Vi staRPC4r:: RPCRespons e::ARRAY) | |
| 20 | ||
| 21 | vr pc.params = [ | |
| 22 | sele ct_med, | |
| 23 | "U", | |
| 24 | "3", | |
| 25 | "Y", | |
| 26 | "Y" | |
| 27 | ] | |
| 28 | ||
| 29 | do ses = [] | |
| 30 | ||
| 31 | re sp = @brok er.execute (vrpc) | |
| 32 | ||
| 33 | is _dose = fa lse | |
| 34 | re sp.value.e ach_with_i ndex do |d , index| | |
| 35 | is_d ose = fals e if d == "~Dispense " | |
| 36 | ||
| 37 | if i s_dose | |
| 38 | array = d.split( '^') | |
| 39 | ||
| 40 | detail s_array = array[3].s plit('&') | |
| 41 | ||
| 42 | # puts "#{select _med} - #{ name} - #{ details_ar ray[5]} - #{array[4] }" # this is the amo unt | |
| 43 | ||
| 44 | dose = {id: deta ils_array[ 5], amount : array[4] , all: arr ay[3]} | |
| 45 | ||
| 46 | doses. push(dose) | |
| 47 | ||
| 48 | end | |
| 49 | is_d ose = true if d == " ~Dosage" | |
| 50 | en d | |
| 51 | do ses | |
| 52 | end | |
| 53 | ||
| 54 | all_drugs = {} | |
| 55 | ||
| 56 | vrpc = Vis taRPC4r::V istaRPC.ne w("ORWUL F VSUB", Vis taRPC4r::R PCResponse ::ARRAY) | |
| 57 | ||
| 58 | vrpc.param s = [ | |
| 59 | dr ug_table, | |
| 60 | "1 ", | |
| 61 | "1 0000" | |
| 62 | ] | |
| 63 | ||
| 64 | resp = @br oker.execu te(vrpc) | |
| 65 | ||
| 66 | resp.value .each do | d| | |
| 67 | array = d.split( '^') | |
| 68 | ||
| 69 | unless array[1]. nil? | |
| 70 | unless a rray[1].in clude?('<' ) | |
| 71 | all_ drugs[arra y[0]] = ar ray[1] | |
| 72 | end | |
| 73 | en d | |
| 74 | end | |
| 75 | ||
| 76 | ||
| 77 | puts all_d rugs.count | |
| 78 | ||
| 79 | all_dose = [] | |
| 80 | ||
| 81 | all_drugs. each do |k ey, value| | |
| 82 | do se = get_d ose(key, v alue) | |
| 83 | do se.each do |d| | |
| 84 | d[:m ed] = valu e | |
| 85 | d[:m ed_id] = k ey | |
| 86 | all_ dose << d | |
| 87 | en d | |
| 88 | end | |
| 89 | ||
| 90 | all_dose.e ach do |i| | |
| 91 | pu ts "#{i[:m ed]} - #{i [:amount]} " | |
| 92 | end | |
| 93 | ||
| 94 | ||
| 95 | # puts all _drugs['35 45'] | |
| 96 | ||
| 97 | ||
| 98 | # puts all _drugs | |
| 99 | # print "S elect Drug ID: " | |
| 100 | ||
| 101 | # select_m ed = gets. chomp | |
| 102 | ||
| 103 | ||
| 104 | ||
| 105 | # med = me d_lookup() | |
| 106 | ||
| 107 | ||
| 108 | ||
| 109 | # puts med | |
| 110 | ||
| 111 | ||
| 112 | @broker.cl ose |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.