Produced by Araxis Merge on 10/4/2017 8:04:43 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 | rdk.zip\rdk\product\tests\rspec-tests\lib\helper | QueryRDK.rb | Mon Aug 21 12:51:01 2017 UTC |
| 2 | rdk.zip\rdk\product\tests\rspec-tests\lib\helper | QueryRDK.rb | Tue Oct 3 17:28:20 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 14 | 806 |
| Changed | 13 | 28 |
| 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 | path = Fil e.expand_p ath '..', __FILE__ | |
| 2 | $LOAD_PATH .unshift p ath unless $LOAD_PAT H.include? (path) | |
| 3 | require 'D efaultLogi n.rb' | |
| 4 | ||
| 5 | class Buil dQuery | |
| 6 | def init ialize | |
| 7 | @path = '' | |
| 8 | @numbe r_paramete rs = 0 | |
| 9 | end | |
| 10 | ||
| 11 | def add_ parameter( param, val ue) | |
| 12 | if @nu mber_param eters == 0 | |
| 13 | @pat h.concat(" ?") | |
| 14 | else | |
| 15 | @pat h.concat(" &") | |
| 16 | end | |
| 17 | @numbe r_paramete rs += 1 | |
| 18 | @path. concat(par am) | |
| 19 | @path. concat("=" ) | |
| 20 | @path. concat(val ue) | |
| 21 | end | |
| 22 | ||
| 23 | def add_ acknowledg e(ack) | |
| 24 | add_pa rameter("_ ack", ack) | |
| 25 | end | |
| 26 | ||
| 27 | def path | |
| 28 | #p URI .encode(@p ath) | |
| 29 | return URI.encod e(@path) | |
| 30 | end | |
| 31 | end | |
| 32 | ||
| 33 | class Pagi nationQuer y < BuildQ uery | |
| 34 | def init ialize | |
| 35 | super( ) | |
| 36 | end | |
| 37 | ||
| 38 | def add_ start(star t) | |
| 39 | add_pa rameter("s tart", sta rt) | |
| 40 | end | |
| 41 | ||
| 42 | def add_ limit(limi t) | |
| 43 | add_pa rameter("l imit", lim it) | |
| 44 | end | |
| 45 | end | |
| 46 | ||
| 47 | class RDKQ uery < Bui ldQuery | |
| 48 | def init ialize(tit le) | |
| 49 | super( ) | |
| 50 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 51 | p "dom ain path: #{domain_p ath}" | |
| 52 | @path. concat(dom ain_path) | |
| 53 | end | |
| 54 | end | |
| 55 | ||
| 56 | class RDKQ ueryPagina tion < Pag inationQue ry | |
| 57 | def init ialize(tit le) | |
| 58 | super( ) | |
| 59 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 60 | p "dom ain path: #{domain_p ath}" | |
| 61 | @path. concat(dom ain_path) | |
| 62 | end | |
| 63 | end | |
| 64 | ||
| 65 | class Quer yRDKSync < BuildQuer y | |
| 66 | def init ialize(com mand, pid = nil) | |
| 67 | super( ) | |
| 68 | ||
| 69 | title = "synchro nization-# {command}" | |
| 70 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 71 | @path. concat(dom ain_path) | |
| 72 | add_pa rameter("p id", pid) unless pid .nil? | |
| 73 | end | |
| 74 | end | |
| 75 | ||
| 76 | class RDCl ass | |
| 77 | @@resour cedirector y_fetch = nil | |
| 78 | @@resour cedirector y_writebac k = nil | |
| 79 | @@resour cedirector y_picklist = nil | |
| 80 | ||
| 81 | def self .resourced irectory_f etch | |
| 82 | if @@r esourcedir ectory_fet ch.nil? | |
| 83 | p "F IRST TIME: DISCOVER PATHS" | |
| 84 | base _url = Def aultLogin. rdk_fetch_ url | |
| 85 | path = "#{base _url}/reso urce/resou rcedirecto ry" | |
| 86 | p ba se_url | |
| 87 | @res ponse = HT TPartyWith BasicAuth. get_with_a uthorizati on(path) | |
| 88 | @@re sourcedire ctory_fetc h= FetchRe sourceDire ctory.new( JSON.parse (@response .body), ba se_url) | |
| 89 | end # if | |
| 90 | return @@resourc edirectory _fetch | |
| 91 | end #def self.reso urcedirect ory_fetch | |
| 92 | ||
| 93 | def self .resourced irectory_w riteback | |
| 94 | if @@r esourcedir ectory_wri teback.nil ? | |
| 95 | p "F IRST TIME: DISCOVER PATHS" | |
| 96 | base _url = Def aultLogin. rdk_writeb ack_url | |
| 97 | path = "#{base _url}/reso urce/write -health-da ta/resourc edirectory " | |
| 98 | p ba se_url | |
| 99 | @res ponse = HT TPartyWith BasicAuth. get_with_a uthorizati on(path) | |
| 100 | @@re sourcedire ctory_writ eback= Wri tebackReso urceDirect ory.new(JS ON.parse(@ response.b ody), base _url) | |
| 101 | end # if | |
| 102 | return @@resourc edirectory _writeback | |
| 103 | end #def self.reso urcedirect ory_writeb ack | |
| 104 | ||
| 105 | def self .resourced irectory_p icklist | |
| 106 | if @@r esourcedir ectory_pic klist.nil? | |
| 107 | p "F IRST TIME: DISCOVER PATHS" | |
| 108 | base _url = Def aultLogin. rdk_pickli st_url | |
| 109 | path = "#{base _url}/reso urce/write -pick-list /resourced irectory" | |
| 110 | p ba se_url | |
| 111 | @res ponse = HT TPartyWith BasicAuth. get_with_a uthorizati on(path) | |
| 112 | @@re sourcedire ctory_pick list= Pick listResour ceDirector y.new(JSON .parse(@re sponse.bod y), base_u rl) | |
| 113 | end # if | |
| 114 | return @@resourc edirectory _picklist | |
| 115 | end #def self.reso urcedirect ory_pickli st | |
| 116 | end | |
| 117 | ||
| 118 | # class Qu erySingleI tem < Buil dQuery | |
| 119 | # #http:// IP /patientre cord/domai n?pid=1010 8&uid=uid | |
| 120 | # def in itialize(p id, uid) | |
| 121 | # supe r() | |
| 122 | # titl e = "uid" | |
| 123 | # doma in_path = RDClass.re sourcedire ctory_fetc h.get_url( title) | |
| 124 | # p "d omain path : #{domain _path}" | |
| 125 | # @pat h.concat(d omain_path ) | |
| 126 | # @num ber_parame ters = 0 | |
| 127 | # add_ parameter( "pid", pid ) | |
| 128 | # add_ parameter( "uid", uid ) | |
| 129 | # p "p ath: #{pat h}" | |
| 130 | # end | |
| 131 | # end | |
| 132 | ||
| 133 | class Quer yRDKDomain < BuildQu ery | |
| 134 | # http:/ /127.0.0.1 :8888/pati entrecord/ domain/all ergy?pid=1 | |
| 135 | def init ialize(dat atype, pid = nil) | |
| 136 | super( ) | |
| 137 | title = "patient -record-#{ datatype}" | |
| 138 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 139 | ||
| 140 | @path. concat(dom ain_path) | |
| 141 | @numbe r_paramete rs = 0 | |
| 142 | add_pa rameter("p id", pid) unless pid .nil? | |
| 143 | end | |
| 144 | end | |
| 145 | ||
| 146 | class Quer yRDKVisitA PI < Build Query | |
| 147 | def init ialize(com mand, pid = nil, fco de = nil) | |
| 148 | super( ) | |
| 149 | domain _path = RD Class.reso urcedirect ory_fetch. get_url("v isits-#{co mmand}") | |
| 150 | @path. concat(dom ain_path) | |
| 151 | @numbe r_paramete rs = 0 | |
| 152 | add_pa rameter("p id", pid) unless pid .nil? | |
| 153 | add_pa rameter("f acility.co de", fcode ) unless f code.nil? | |
| 154 | end | |
| 155 | end # clas s | |
| 156 | ||
| 157 | class Quer yGenericRD K < BuildQ uery | |
| 158 | # http:// IP /visits/pr oviders | |
| 159 | def init ialize(com mand, pid = nil, act ion = nil) | |
| 160 | super( ) | |
| 161 | @numbe r_paramete rs = 0 | |
| 162 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 163 | @path. concat("/# {command}" ) | |
| 164 | ||
| 165 | if pid != nil | |
| 166 | @pat h.concat(" /#{pid}") | |
| 167 | end | |
| 168 | if act ion != nil | |
| 169 | @pat h.concat(" /#{action} ") | |
| 170 | end | |
| 171 | end | |
| 172 | ||
| 173 | def add_ parameter( param, val ue) | |
| 174 | if @nu mber_param eters == 0 | |
| 175 | @pat h.concat(" ?") | |
| 176 | else | |
| 177 | @pat h.concat(" &") | |
| 178 | end | |
| 179 | @numbe r_paramete rs += 1 | |
| 180 | unless param.nil ? | |
| 181 | @pat h.concat(p aram) | |
| 182 | @pat h.concat(" =") | |
| 183 | end | |
| 184 | unless value.nil ? | |
| 185 | @pat h.concat(v alue) | |
| 186 | end | |
| 187 | end | |
| 188 | ||
| 189 | def add_ acknowledg e(ack) | |
| 190 | add_pa rameter("_ ack", ack) | |
| 191 | end | |
| 192 | ||
| 193 | def path | |
| 194 | return @path | |
| 195 | end | |
| 196 | end # clas s | |
| 197 | ||
| 198 | #http:// IP /patientre cord/searc h/text?que ry=documen t&pid=9E7A ;100022 | |
| 199 | class Quer yRDK < Bui ldQuery | |
| 200 | p "insid e class Qu eryRDK" | |
| 201 | def init ialize(pid , type) | |
| 202 | super( ) | |
| 203 | domain _path = RD Class.reso urcedirect ory_fetch. get_url("p atient-rec ord-search -text") | |
| 204 | @path. concat(dom ain_path) | |
| 205 | add_pa rameter("q uery", typ e) | |
| 206 | add_pa rameter("p id", pid) | |
| 207 | #add_p arameter(" query", te xt) | |
| 208 | end | |
| 209 | end | |
| 210 | ||
| 211 | #http:// IP /fhir/pati ent/urn:va :patient:9 E7A:100716 :100716 | |
| 212 | class Quer yRDKDemogr aphics < B uildQuery | |
| 213 | def init ialize(typ e, uid) | |
| 214 | super( ) | |
| 215 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 216 | @path. concat("/r esource/fh ir/" + typ e + "/" + uid) | |
| 217 | end | |
| 218 | ||
| 219 | def add_ acknowledg e(ack) | |
| 220 | add_pa rameter("_ ack", ack) | |
| 221 | end | |
| 222 | end | |
| 223 | ||
| 224 | #http:// IP /resource/ fhir/patie nt/9E7A;25 3/observat ion | |
| 225 | class Quer yRDKFhir < BuildQuer y | |
| 226 | def init ialize(uid , domain) | |
| 227 | super( ) | |
| 228 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 229 | @path. concat("/r esource/fh ir/patient " + "/" + uid + "/" + domain) | |
| 230 | end | |
| 231 | ||
| 232 | def add_ acknowledg e(ack) | |
| 233 | add_pa rameter("_ ack", ack) | |
| 234 | end | |
| 235 | end | |
| 236 | ||
| 237 | #http:// IP /fhir/***/ ?subject.i dentifier= C877;10003 3 | |
| 238 | # class Qu eryRDKAll < BuildQue ry | |
| 239 | # def in itialize(t ype) | |
| 240 | # supe r() | |
| 241 | # @pat h = String .new(Defau ltLogin.rd k_url) | |
| 242 | # @pat h.concat(" /resource/ fhir/" + t ype) | |
| 243 | # end | |
| 244 | # def ad d_acknowle dge(ack) | |
| 245 | # add_ parameter( "_ack", ac k) | |
| 246 | # end | |
| 247 | # end | |
| 248 | ||
| 249 | #http:// IP /resource/ vler/9E7A; 8/toc?enco unterUid=u rn:va:visi t:9E7A:8:1 218 | |
| 250 | class Quer yRDKVler < BuildQuer y | |
| 251 | def init ialize(typ e) | |
| 252 | super( ) | |
| 253 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 254 | @path. concat("/r esource/vl er/" + typ e + "/toc" ) | |
| 255 | end | |
| 256 | ||
| 257 | def add_ encount(en count) | |
| 258 | add_pa rameter("e ncounterUi d", encoun t) | |
| 259 | end | |
| 260 | ||
| 261 | def add_ acknowledg e(ack) | |
| 262 | add_pa rameter("_ ack", ack) | |
| 263 | end | |
| 264 | end | |
| 265 | ||
| 266 | if __FILE_ _ == $PROG RAM_NAME | |
| 267 | q= Query RDKSync.ne w("one", " two") | |
| 268 | p q.path | |
| 269 | p QueryR DKAPI.new( "uid", "3" , "false") .path | |
| 270 | end | |
| 271 | ||
| 272 | #http:// IP /patientre cord/domai n/document ?pid=10108 V420871&fi lter=eq(ki nd,"Progre ss Note") | |
| 273 | class Quer yRDKFilter BySummary < BuildQue ry | |
| 274 | p "insid e class Qu eryRDKFilt erBySummar y" | |
| 275 | def init ialize(pid = nil, fi lter = nil ) | |
| 276 | super( ) | |
| 277 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 278 | @path. concat("/r esource/pa tient-reco rd/domain/ document") | |
| 279 | if pid != nil | |
| 280 | add_ parameter( "pid", pid ) | |
| 281 | end | |
| 282 | if fil ter != nil | |
| 283 | add_ parameter( "filter", filter) | |
| 284 | end | |
| 285 | end | |
| 286 | end | |
| 287 | ||
| 288 | # class Qu eryRDKfilt er < Build Query | |
| 289 | # def in itialize(c ommand, pi d = nil, f ilter = ni l) | |
| 290 | # supe r() | |
| 291 | # titl e = "synch ronization -#{command }" | |
| 292 | # doma in_path = RDClass.re sourcedire ctory_fetc h.get_url( title) | |
| 293 | # @pat h.concat(d omain_path ) | |
| 294 | # if p id != nil | |
| 295 | # ad d_paramete r("pid", p id) | |
| 296 | # end | |
| 297 | # if f ilter != n il | |
| 298 | # ad d_paramete r("filter" , filter) | |
| 299 | # end | |
| 300 | # end | |
| 301 | # end | |
| 302 | # | |
| 303 | # I can't find /reso urce/locat ions/clini cs/search listed in the resour ce directo ry | |
| 304 | # class RD KclinicSea rch < Buil dQuery | |
| 305 | # p "ins ide class RDKcliniCS earch " | |
| 306 | # def in itialize(l ocationUid = nil , f ilter = ni l) | |
| 307 | # supe r() | |
| 308 | # @pat h = String .new(Defau ltLogin.rd k_fetch_ur l) | |
| 309 | # @pat h.concat(" /resource/ locations/ clinics/se arch") | |
| 310 | # add_ parameter( "locationU id", locat ionUid) un less locat ionUid.nil ? | |
| 311 | # add_ parameter( "filter", filter) un less filte r.nil? | |
| 312 | # # add _parameter ("startDat e", startD ate) unles s startDat e.nil? | |
| 313 | # end | |
| 314 | # end | |
| 315 | ||
| 316 | #http:// IP /resource/ user/set/t his?pid=10 108V420871 &accessCod e= REDACT &verifyCod e= REDACTED &site=9E7A | |
| 317 | class RDKD elWorkspac eContent< BuildQuery | |
| 318 | def init ialize(pid = nil) | |
| 319 | super( ) | |
| 320 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 321 | @path. concat("/r esource/us er/screens ") | |
| 322 | if pid != nil | |
| 323 | add_ parameter( "pid", pid ) | |
| 324 | end | |
| 325 | end | |
| 326 | end | |
| 327 | ||
| 328 | #http:// IP /resource/ tasks/star tprocess?d eploymentI d=All&proc essDefId=p roject1.Fo llowUpWork flow& | |
| 329 | #patientid =1234567&p atientname =EightPati ent&descri ption=Firs tHumanTask &where=VA& when=date& site=9E7A& accessCode = REDACT &verifyCod e= REDACTED | |
| 330 | class RDKS tartProces s< BuildQu ery | |
| 331 | def init ialize(pDe fId = nil, pid = nil , pname = nil, descr iption = n il, pwhere = nil, pw hen = nil) | |
| 332 | super( ) | |
| 333 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 334 | @path. concat("/r esource/ta sks/startp rocess") | |
| 335 | add_pa rameter("d eploymentI d", "All") | |
| 336 | add_pa rameter("p rocessDefI d", pDefId ) unless p DefId.nil? | |
| 337 | add_pa rameter("p atientid", pid) unle ss pid.nil ? | |
| 338 | add_pa rameter("p atientname ", pname) unless pna me.nil? | |
| 339 | add_pa rameter("d escription ", descrip tion) unle ss descrip tion.nil? | |
| 340 | add_pa rameter("w here", pwh ere) unles s pwhere.n il? | |
| 341 | add_pa rameter("w hen", pwhe n) unless pwhen.nil? | |
| 342 | end | |
| 343 | end | |
| 344 | ||
| 345 | class Quer yGenericVI STA < Buil dQuery | |
| 346 | # http:// IP /visits/pr oviders | |
| 347 | def init ialize(com mand, pid = nil, act ion = nil) | |
| 348 | super( ) | |
| 349 | @numbe r_paramete rs = 0 | |
| 350 | @path = String.n ew(Default Login.vist a_url) | |
| 351 | @path. concat("/# {command}" ) | |
| 352 | # @pat h.concat(p id) | |
| 353 | if pid != nil | |
| 354 | @pat h.concat(" /#{pid}") | |
| 355 | end | |
| 356 | if act ion != nil | |
| 357 | @pat h.concat(" /#{action} ") | |
| 358 | end | |
| 359 | end | |
| 360 | end | |
| 361 | ||
| 362 | #http:// IP /resource/ patient/re cord/domai n/vital?fi lter=and(D ATEFILTER) &pid=10107 V395912 | |
| 363 | class Quer yRDKCCB < BuildQuery | |
| 364 | def init ialize(typ e) | |
| 365 | super( ) | |
| 366 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 367 | @path. concat("/r esource/pa tient/reco rd/domain/ vital?filt er=and(ne( r350407%22 %2C%222015 0420235959 %22))%2C%2 0ne(result %2CPass)&p id=" + typ e) | |
| 368 | end | |
| 369 | end | |
| 370 | ||
| 371 | class Quer yCDSInvoca tion < Bui ldQuery | |
| 372 | def init ialize | |
| 373 | super( ) | |
| 374 | @path = String.n ew(Default Login.cds_ url) | |
| 375 | end | |
| 376 | end | |
| 377 | ||
| 378 | #http:// IP /resource/ user/list? accessCode = REDACT &verifyCod e= REDACTED &site=9E7A | |
| 379 | class Quer yUserList < BuildQue ry | |
| 380 | def init ialize | |
| 381 | super( ) | |
| 382 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 383 | @path. concat("/r esource/us er/list") | |
| 384 | end | |
| 385 | end | |
| 386 | ||
| 387 | class Quer yRoles < B uildQuery | |
| 388 | def init ialize | |
| 389 | super( ) | |
| 390 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 391 | @path. concat("/r esource/ro les/list") | |
| 392 | end | |
| 393 | end | |
| 394 | ||
| 395 | class Quer yUserRoles < BuildQu ery | |
| 396 | def init ialize(uid ) | |
| 397 | super( ) | |
| 398 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 399 | @path. concat("/r esource/ro les/getUse rRoles?uid =" + uid) | |
| 400 | end | |
| 401 | end | |
| 402 | ||
| 403 | class Quer yRolesEdit < BuildQu ery | |
| 404 | def init ialize | |
| 405 | super( ) | |
| 406 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 407 | @path. concat("/r esource/ro les/edit") | |
| 408 | end | |
| 409 | end | |
| 410 | ||
| 411 | class Quer yRDKCDS < BuildQuery | |
| 412 | def init ialize | |
| 413 | super( ) | |
| 414 | @path = String.n ew(Default Login.rdk_ url) | |
| 415 | @path. concat("/r esource/cd s") | |
| 416 | end | |
| 417 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.