Produced by Araxis Merge on 10/4/2017 8:04:41 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\acceptance-tests\features\steps\helper | QueryRDK.rb | Mon Aug 21 12:51:01 2017 UTC |
| 2 | rdk.zip\rdk\product\tests\acceptance-tests\features\steps\helper | QueryRDK.rb | Tue Oct 3 20:07:39 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 11 | 730 |
| Changed | 10 | 22 |
| 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 repl ace_path_v ar(var, va lue) | |
| 24 | @path. gsub!(var, value) | |
| 25 | end | |
| 26 | ||
| 27 | def add_ acknowledg e(ack) | |
| 28 | add_pa rameter("_ ack", ack) | |
| 29 | end | |
| 30 | ||
| 31 | def path | |
| 32 | #p URI .encode(@p ath) | |
| 33 | return URI.encod e(@path) | |
| 34 | end | |
| 35 | end | |
| 36 | ||
| 37 | class Pagi nationQuer y < BuildQ uery | |
| 38 | def init ialize | |
| 39 | super( ) | |
| 40 | end | |
| 41 | ||
| 42 | def add_ start(star t) | |
| 43 | add_pa rameter("s tart", sta rt) | |
| 44 | end | |
| 45 | ||
| 46 | def add_ limit(limi t) | |
| 47 | add_pa rameter("l imit", lim it) | |
| 48 | end | |
| 49 | end | |
| 50 | ||
| 51 | class RDKQ uery < Bui ldQuery | |
| 52 | def init ialize(tit le) | |
| 53 | super( ) | |
| 54 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 55 | @path. concat(dom ain_path) | |
| 56 | end | |
| 57 | end | |
| 58 | ||
| 59 | class RDKQ ueryPagina tion < Pag inationQue ry | |
| 60 | def init ialize(tit le) | |
| 61 | super( ) | |
| 62 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 63 | @path. concat(dom ain_path) | |
| 64 | end | |
| 65 | end | |
| 66 | ||
| 67 | class RDKQ ueryPickli st < Build Query | |
| 68 | def init ialize(tit le) | |
| 69 | super( ) | |
| 70 | domain _path = RD Class.reso urcedirect ory_pickli st.get_url (title) | |
| 71 | @path. concat(dom ain_path) | |
| 72 | end | |
| 73 | end | |
| 74 | ||
| 75 | class Quer yRDKSync < BuildQuer y | |
| 76 | def init ialize(com mand, pid = nil) | |
| 77 | super( ) | |
| 78 | ||
| 79 | title = "synchro nization-# {command}" | |
| 80 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 81 | @path. concat(dom ain_path) | |
| 82 | add_pa rameter("p id", pid) unless pid .nil? | |
| 83 | end | |
| 84 | end | |
| 85 | ||
| 86 | class RDCl ass | |
| 87 | @@resour cedirector y_fetch = nil | |
| 88 | @@resour cedirector y_writebac k = nil | |
| 89 | @@resour cedirector y_picklist = nil | |
| 90 | ||
| 91 | def self .resourced irectory_f etch | |
| 92 | if @@r esourcedir ectory_fet ch.nil? | |
| 93 | puts "FIRST FE TCH SERVER TIME: DIS COVER PATH S" | |
| 94 | base _url = Def aultLogin. rdk_fetch_ url | |
| 95 | path = "#{base _url}/reso urce/resou rcedirecto ry" | |
| 96 | puts base_url | |
| 97 | @res ponse = HT TParty.get (path) | |
| 98 | @@re sourcedire ctory_fetc h= FetchRe sourceDire ctory.new( JSON.parse (@response .body), ba se_url) | |
| 99 | end # if | |
| 100 | return @@resourc edirectory _fetch | |
| 101 | end #def self.reso urcedirect ory_fetch | |
| 102 | ||
| 103 | def self .resourced irectory_w riteback | |
| 104 | if @@r esourcedir ectory_wri teback.nil ? | |
| 105 | puts "FIRST WR ITEBACK SE RVER TIME: DISCOVER PATHS" | |
| 106 | base _url = Def aultLogin. rdk_writeb ack_url | |
| 107 | path = "#{base _url}/reso urce/write -health-da ta/resourc edirectory " | |
| 108 | puts base_url | |
| 109 | @res ponse = HT TParty.get (path) | |
| 110 | @@re sourcedire ctory_writ eback= Fet chResource Directory. new(JSON.p arse(@resp onse.body) , base_url ) | |
| 111 | end # if | |
| 112 | return @@resourc edirectory _writeback | |
| 113 | end #def self.reso urcedirect ory_writeb ack | |
| 114 | ||
| 115 | def self .resourced irectory_p icklist | |
| 116 | if @@r esourcedir ectory_pic klist.nil? | |
| 117 | puts "FIRST PI CKLIST SER VER TIME: DISCOVER P ATHS" | |
| 118 | base _url = Def aultLogin. rdk_pickli st_url | |
| 119 | path = "#{base _url}/reso urce/write -pick-list /resourced irectory" | |
| 120 | puts base_url | |
| 121 | @res ponse = HT TParty.get (path) | |
| 122 | @@re sourcedire ctory_pick list= Fetc hResourceD irectory.n ew(JSON.pa rse(@respo nse.body), base_url) | |
| 123 | end # if | |
| 124 | return @@resourc edirectory _picklist | |
| 125 | end #def self.reso urcedirect ory_pickli st | |
| 126 | end | |
| 127 | ||
| 128 | class Quer yRDKDomain < BuildQu ery | |
| 129 | # http:/ /127.0.0.1 :8888/pati entrecord/ domain/all ergy?pid=1 | |
| 130 | def init ialize(dat atype, pid = nil) | |
| 131 | super( ) | |
| 132 | title = "patient -record-#{ datatype}" | |
| 133 | domain _path = RD Class.reso urcedirect ory_fetch. get_url(ti tle) | |
| 134 | ||
| 135 | @path. concat(dom ain_path) | |
| 136 | @numbe r_paramete rs = 0 | |
| 137 | add_pa rameter("p id", pid) unless pid .nil? | |
| 138 | end | |
| 139 | end | |
| 140 | ||
| 141 | class Quer yRDKVisitA PI < Build Query | |
| 142 | def init ialize(com mand, pid = nil, fco de = nil) | |
| 143 | super( ) | |
| 144 | domain _path = RD Class.reso urcedirect ory_fetch. get_url("v isits-#{co mmand}") | |
| 145 | @path. concat(dom ain_path) | |
| 146 | @numbe r_paramete rs = 0 | |
| 147 | add_pa rameter("p id", pid) unless pid .nil? | |
| 148 | add_pa rameter("f acility.co de", fcode ) unless f code.nil? | |
| 149 | end | |
| 150 | end # clas s | |
| 151 | ||
| 152 | class Quer yGenericRD K < BuildQ uery | |
| 153 | # http:// IP /visits/pr oviders | |
| 154 | def init ialize(com mand, pid = nil, act ion = nil) | |
| 155 | super( ) | |
| 156 | @numbe r_paramete rs = 0 | |
| 157 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 158 | @path. concat("/# {command}" ) | |
| 159 | ||
| 160 | unless pid.nil? | |
| 161 | @pat h.concat(" /#{pid}") | |
| 162 | end | |
| 163 | unless action.ni l? | |
| 164 | @pat h.concat(" /#{action} ") | |
| 165 | end | |
| 166 | end | |
| 167 | ||
| 168 | def add_ parameter( param, val ue) | |
| 169 | if @nu mber_param eters == 0 | |
| 170 | @pat h.concat(" ?") | |
| 171 | else | |
| 172 | @pat h.concat(" &") | |
| 173 | end | |
| 174 | @numbe r_paramete rs += 1 | |
| 175 | @path. concat(par am) | |
| 176 | @path. concat("=" ) | |
| 177 | @path. concat(val ue) | |
| 178 | end | |
| 179 | ||
| 180 | def add_ acknowledg e(ack) | |
| 181 | add_pa rameter("_ ack", ack) | |
| 182 | end | |
| 183 | ||
| 184 | def path | |
| 185 | return @path | |
| 186 | end | |
| 187 | end # clas s | |
| 188 | ||
| 189 | #http:// IP /patientre cord/searc h/text?que ry=documen t&pid= R E D A CTED ;100022 | |
| 190 | class Quer yRDK < Bui ldQuery | |
| 191 | def init ialize(pid , type) | |
| 192 | super( ) | |
| 193 | domain _path = RD Class.reso urcedirect ory_fetch. get_url("p atient-rec ord-search -text") | |
| 194 | @path. concat(dom ain_path) | |
| 195 | add_pa rameter("q uery", typ e) | |
| 196 | add_pa rameter("p id", pid) | |
| 197 | #add_p arameter(" query", te xt) | |
| 198 | end | |
| 199 | end | |
| 200 | ||
| 201 | #http:// IP /fhir/pati ent/urn:va :patient: R E D A CTED :100716:10 0716 | |
| 202 | class Quer yRDKDemogr aphics < B uildQuery | |
| 203 | def init ialize(typ e, uid) | |
| 204 | super( ) | |
| 205 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 206 | @path. concat("/r esource/fh ir/" + typ e + "/" + uid) | |
| 207 | end | |
| 208 | ||
| 209 | def add_ acknowledg e(ack) | |
| 210 | add_pa rameter("_ ack", ack) | |
| 211 | end | |
| 212 | end | |
| 213 | ||
| 214 | #http:// IP /resource/ fhir/patie nt/ R E D A CTED ;253/obser vation | |
| 215 | class Quer yRDKFhir < BuildQuer y | |
| 216 | def init ialize(uid , domain) | |
| 217 | super( ) | |
| 218 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 219 | @path. concat("/r esource/fh ir/patient " + "/" + uid + "/" + domain) | |
| 220 | end | |
| 221 | ||
| 222 | def add_ acknowledg e(ack) | |
| 223 | add_pa rameter("_ ack", ack) | |
| 224 | end | |
| 225 | end | |
| 226 | ||
| 227 | #http:// IP /resource/ fhir/metad ata | |
| 228 | class Quer yRDKFhirMe tadata < B uildQuery | |
| 229 | def init ialize | |
| 230 | super( ) | |
| 231 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 232 | @path. concat("/r esource/fh ir/metadat a") | |
| 233 | end | |
| 234 | end | |
| 235 | ||
| 236 | #http:// IP /resource/ vler/ R E D A CTED ;8/toc?enc ounterUid= urn:va:vis it: R E D A CTED :8:1218 | |
| 237 | class Quer yRDKVler < BuildQuer y | |
| 238 | def init ialize(typ e) | |
| 239 | super( ) | |
| 240 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 241 | @path. concat("/r esource/vl er/" + typ e + "/toc" ) | |
| 242 | end | |
| 243 | ||
| 244 | def add_ encount(en count) | |
| 245 | add_pa rameter("e ncounterUi d", encoun t) | |
| 246 | end | |
| 247 | ||
| 248 | def add_ acknowledg e(ack) | |
| 249 | add_pa rameter("_ ack", ack) | |
| 250 | end | |
| 251 | end | |
| 252 | ||
| 253 | if __FILE_ _ == $PROG RAM_NAME | |
| 254 | q= Query RDKSync.ne w("one", " two") | |
| 255 | p q.path | |
| 256 | p QueryR DKAPI.new( "uid", "3" , "false") .path | |
| 257 | end | |
| 258 | ||
| 259 | #http:// IP /patientre cord/domai n/document ?pid=10108 V420871&fi lter=eq(ki nd,"Progre ss Note") | |
| 260 | class Quer yRDKFilter BySummary < BuildQue ry | |
| 261 | def init ialize(pid = nil, fi lter = nil ) | |
| 262 | super( ) | |
| 263 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 264 | @path. concat("/r esource/pa tient-reco rd/domain/ document") | |
| 265 | unless pid.nil? | |
| 266 | add_ parameter( "pid", pid ) | |
| 267 | end | |
| 268 | unless filter.ni l? | |
| 269 | add_ parameter( "filter", filter) | |
| 270 | end | |
| 271 | end | |
| 272 | end | |
| 273 | ||
| 274 | #http:// IP /resource/ tasks?acce ssCode= REDACT &verifyCod e= REDACTED &site= R E D A CTED | |
| 275 | #{"context ": "patien t","patien tICN":"101 08V420871" ,"status": "Ready"} | |
| 276 | class RDKP rocessList < BuildQue ry | |
| 277 | def init ialize | |
| 278 | super( ) | |
| 279 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 280 | @path. concat("/r esource/ta sks") | |
| 281 | end | |
| 282 | end | |
| 283 | ||
| 284 | #http:// IP /resource/ tasks/star tprocess?a ccessCode= REDACT &verifyCod e= REDACTED &site= R E D A CTED | |
| 285 | #{"deploym entId":"Vi staCore:FI TLabProjec t:0.0.0"," processDef Id":"FITLa bProject.F ITLabActiv ity","para meter":{"i cn":"10108 V420871"," facility": " R E D A CTED "}} | |
| 286 | class RDKS tartProces s< BuildQu ery | |
| 287 | def init ialize | |
| 288 | super( ) | |
| 289 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 290 | @path. concat("/r esource/ta sks/startp rocess") | |
| 291 | end | |
| 292 | end | |
| 293 | ||
| 294 | #http:// IP /resource/ patient/re cord/domai n/vital?fi lter=and(D ATEFILTER) &pid=10107 V395912 | |
| 295 | class Quer yRDKCCB < BuildQuery | |
| 296 | def init ialize(typ e) | |
| 297 | super( ) | |
| 298 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 299 | @path. concat("/r esource/pa tient/reco rd/domain/ vital?filt er=ne(resu lt,Pass)&p id=" + typ e) | |
| 300 | end | |
| 301 | end | |
| 302 | ||
| 303 | class Quer yCDSInvoca tion < Bui ldQuery | |
| 304 | def init ialize | |
| 305 | super( ) | |
| 306 | @path = String.n ew(Default Login.cds_ url) | |
| 307 | end | |
| 308 | end | |
| 309 | ||
| 310 | class Quer yRDKCDS < BuildQuery | |
| 311 | def init ialize | |
| 312 | super( ) | |
| 313 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 314 | @path. concat("/r esource/cd s") | |
| 315 | end | |
| 316 | end | |
| 317 | ||
| 318 | class Quer yRDKCDSMet rics < Bui ldQuery | |
| 319 | def init ialize | |
| 320 | super( ) | |
| 321 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 322 | @path. concat("/r esource/cd s/metrics" ) | |
| 323 | end | |
| 324 | end | |
| 325 | ||
| 326 | class Quer yRDKCDSfhi r < BuildQ uery | |
| 327 | def init ialize | |
| 328 | super( ) | |
| 329 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 330 | @path. concat("/r esource/fh ir") | |
| 331 | end | |
| 332 | end | |
| 333 | ||
| 334 | #query RDK Patient R ecord Doma in | |
| 335 | class Quer yRDKPRD < BuildQuery | |
| 336 | def init ialize | |
| 337 | super( ) | |
| 338 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 339 | @path. concat("/r esource/pa tient/reco rd/domain/ patient?pi d=") | |
| 340 | end | |
| 341 | end | |
| 342 | ||
| 343 | #query RDK orderable s search | |
| 344 | class Quer yRDKOrdera bles < Bui ldQuery | |
| 345 | def init ialize | |
| 346 | super( ) | |
| 347 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 348 | @path. concat("/r esource/or derables?s earchStrin g=") | |
| 349 | end | |
| 350 | end | |
| 351 | ||
| 352 | #query RDK enterpris e orderabl es search | |
| 353 | class Quer yRDKEnterp riseOrdera ble < Buil dQuery | |
| 354 | def init ialize | |
| 355 | super( ) | |
| 356 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 357 | @path. concat("/r esource/en terprise-o rderable?" ) | |
| 358 | end | |
| 359 | end | |
| 360 | ||
| 361 | #Extened F HIR API qu ery | |
| 362 | class Quer yRDKExtend FhirAPI < BuildQuery | |
| 363 | def init ialize | |
| 364 | super( ) | |
| 365 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 366 | @path. concat("/r esource/fh ir/patient /") | |
| 367 | end | |
| 368 | end | |
| 369 | ||
| 370 | class RDKO rder < Bui ldQuery | |
| 371 | def init ialize | |
| 372 | super( ) | |
| 373 | @path = String.n ew(Default Login.rdk_ fetch_url) | |
| 374 | @path. concat("/r esource/") | |
| 375 | end | |
| 376 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.