Produced by Araxis Merge on 10/2/2017 1:40:10 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 | chef-repo.zip\chef-repo\project_cookbooks\vista\recipes | import_alpha.rb | Wed Jun 3 20:37:07 2015 UTC |
| 2 | chef-repo.zip\chef-repo\project_cookbooks\vista\recipes | import_alpha.rb | Mon Oct 2 15:27:23 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 122 |
| 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 | # | |
| 2 | # Cookbook Name:: vi sta | |
| 3 | # Recipe:: import_al pha | |
| 4 | # | |
| 5 | ||
| 6 | chef_gem ' vistarpc4r ' do | |
| 7 | version '0.3.0' | |
| 8 | end | |
| 9 | ||
| 10 | require 'r ubygems' | |
| 11 | require 'v istarpc4r' | |
| 12 | ||
| 13 | ruby_block "import_a lpha" do | |
| 14 | block do | |
| 15 | ||
| 16 | broker = V istaRPC4r: :RPCBroker Connection .new("127. 0.0.1", 92 10, " REDACTED ", " REDACTED ", false) | |
| 17 | broker .connect | |
| 18 | broker .setContex t('OR CPRS GUI CHART ') | |
| 19 | ||
| 20 | data_b ag('alpha' ).each do | vistaIte m | | |
| 21 | Chef ::Log.info ("Found vi tals data: #{vistaIt em}\n") | |
| 22 | p = data_bag_i tem('alpha ', vistaIt em) | |
| 23 | if p ['vitals'] != nil && p['vitals ']['observ ations'] ! = nil | |
| 24 | p[ 'vitals'][ 'observati ons'].each do |obser vation| | |
| 25 | vrpc = Vis taRPC4r::V istaRPC.ne w("GMV ADD VM", Vist aRPC4r::RP CResponse: :ARRAY) | |
| 26 | vrpc.param s[0] = "#{ p['vitals' ]['date']} .#{p['vita ls']['time ']}^#{p['v itals']['p atientIEN' ]}^#{obser vation['VI TAL TYPE'] };#{observ ation['res ult']};^#{ p['vitals' ]['locatio n']}^#{p[' vitals'][' userIEN']} " | |
| 27 | broker.exe cute(vrpc) | |
| 28 | en d | |
| 29 | elsi f p['aller gies'] != nil && p[' allergies' ]['list'] != nil | |
| 30 | th ird_parame ter = [] | |
| 31 | p[ 'allergies ']['list'] .each do | list| | |
| 32 | if list['o rdinal'] = = nil || l ist['ordin al'] == "" | |
| 33 | third_pa rameter << ["\"#{lis t['key']}\ "", list[' value']] | |
| 34 | else | |
| 35 | third_pa rameter << ["\"#{lis t['key']}\ ", #{list[ 'ordinal'] }", list[' value']] | |
| 36 | end | |
| 37 | en d | |
| 38 | vr pc = Vista RPC4r::Vis taRPC.new( "ORWDAL32 SAVE ALLER GY", Vista RPC4r::RPC Response:: SINGLE_VAL UE) | |
| 39 | vr pc.params[ 0] = "0" # first par ameter is the allerg y IEN to u pdate/inse rt, if ins erting, de fault to 0 | |
| 40 | vr pc.params[ 1] = p['al lergies'][ 'patientIE N'] # seco nd paramet er is the DFN of the patient t o insert t he allergy for | |
| 41 | # third para meter is t he list of allergy i nformation to insert | |
| 42 | vr pc.params[ 2] = third _parameter | |
| 43 | br oker.execu te(vrpc) | |
| 44 | end | |
| 45 | end | |
| 46 | end | |
| 47 | end | |
| 48 | ||
| 49 | vista_mump s_block "R un MUMPS c ommands on alpha" do | |
| 50 | duz 1 | |
| 51 | programm er_mode tr ue | |
| 52 | namespac e node[:vi sta][:name space] | |
| 53 | command [ | |
| 54 | "K FDA ", | |
| 55 | "S FDA (1,52,\"40 1106,\",26 )=3150101" , | |
| 56 | "D FIL E^DIE(,\"F DA(1)\")", | |
| 57 | "K FDA ", | |
| 58 | "S FDA (1,200,\"1 0000000227 ,\",9)=983 493891", | |
| 59 | "D FIL E^DIE(,\"F DA(1)\")" | |
| 60 | ] | |
| 61 | log node [:vista][: chef_log] | |
| 62 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.