Produced by Araxis Merge on 3/27/2018 2:07:11 PM Eastern 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 | BMS_v2.4_Code.zip\BMS_v2.4_Code\UnitTests\BMS.VistaIntegration.ViaTests | ViaVistASessionFactoryTest.cs | Wed Mar 21 14:49:30 2018 UTC |
| 2 | BMS_v2.4_Code.zip\BMS_v2.4_Code\UnitTests\BMS.VistaIntegration.ViaTests | ViaVistASessionFactoryTest.cs | Thu Mar 22 17:21:35 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 1996 |
| Changed | 2 | 4 |
| 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 | using Syst em; | |
| 2 | using Syst em.Text; | |
| 3 | using Syst em.Collect ions.Gener ic; | |
| 4 | using Micr osoft.Visu alStudio.T estTools.U nitTesting ; | |
| 5 | using BMS. Utils; | |
| 6 | using BMS. VistaInteg ration.Dat a; | |
| 7 | using BMS. VistaInteg ration.Mdw s; | |
| 8 | using BMS. Facade; | |
| 9 | using BMS. VistaInteg ration.Vis tA; | |
| 10 | using BMS. VistaInteg ration.Via .Commands. WF; | |
| 11 | ||
| 12 | namespace BMS.VistaI ntegration .Via.Tests | |
| 13 | { | |
| 14 | [TestC lass] | |
| 15 | public class Via VistASessi onFactoryT est | |
| 16 | { | |
| 17 | pr ivate bool _compareT oMDWS = fa lse; | |
| 18 | pr ivate Site Parameters _sitePara ms = new S iteParamet ers(); | |
| 19 | pr ivate Vist ASite _vis taSite = n ull; | |
| 20 | pr ivate stri ng _site = "CHEYL19" ; | |
| 21 | ||
| 22 | [T estInitial ize()] | |
| 23 | pu blic void InitTests( ) | |
| 24 | { | |
| 25 | switch ( _site) | |
| 26 | { | |
| 27 | case "HOUTEST" : | |
| 28 | _vistaSite = new Vis tASite("te st", "V16H OU", "580" , TimeZone Info.Local , "http:// DNS . URL /QuerySvc. asmx"); | |
| 29 | BuildParam sForHousto n(); | |
| 30 | break; | |
| 31 | case "CHEYL19" : | |
| 32 | _vistaSite = new Vis tASite("te st", "CHEY L19", "516 ", TimeZon eInfo.Loca l, "http:/ / DNS . URL /QuerySvc. asmx"); | |
| 33 | BuildParam sForCheyl1 9(); | |
| 34 | break; | |
| 35 | } | |
| 36 | } | |
| 37 | ||
| 38 | pu blic void BuildParam sForCheyl1 9() | |
| 39 | { | |
| 40 | _sitePar ams.Patien tIEN = "39 77"; | |
| 41 | _sitePar ams.Patien tIENWithAd mission = "7185012"; //7185012 ^DRALEAU,L ORENE^F^26 70331^1016 25668^3041 105^73^202 ^204908~jh kdksdf^0^4 0 | |
| 42 | _sitePar ams.NewPer sonIEN = " 202"; | |
| 43 | } | |
| 44 | ||
| 45 | pu blic void BuildParam sForHousto n() | |
| 46 | { | |
| 47 | _sitePar ams = new SiteParame ters(); | |
| 48 | _sitePar ams.Patien tIEN = "52 "; | |
| 49 | } | |
| 50 | ||
| 51 | pu blic IVist AQuery Bui ldVistAQue ry(DataRet rievalMeth od retriev alMethod) | |
| 52 | { | |
| 53 | IVistAQu ery vistaQ uery = nul l; | |
| 54 | switch ( retrievalM ethod) | |
| 55 | { | |
| 56 | case DataRetri evalMethod .MDWS: | |
| 57 | MdwsVistAS ession ses sion = new MdwsVistA Session(_v istaSite); | |
| 58 | session.Op en(new Vis tAConnecti onInfo(_vi staSite.Md wsEndpoint Url, null, null)); | |
| 59 | vistaQuery = new Mdw sVistAQuer y(session) ; | |
| 60 | break; | |
| 61 | case DataRetri evalMethod .VIA: | |
| 62 | vistaQuery = new Via VistAQuery (new ViaVi stASession (_vistaSit e)); | |
| 63 | break; | |
| 64 | } | |
| 65 | ||
| 66 | return v istaQuery; | |
| 67 | } | |
| 68 | ||
| 69 | [T estMethod] | |
| 70 | pu blic void TestListBe dSwitch() | |
| 71 | { | |
| 72 | try | |
| 73 | { | |
| 74 | List <string> i ens = new List<strin g>() { }; // TODO - add IENS | |
| 75 | ||
| 76 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 77 | ILis t<Data.WF. BedSwitch> bedSwitch VIA = viaQ uery.GetBe dsSwitch(i ens); | |
| 78 | ||
| 79 | Asse rt.IsNotNu ll(bedSwit chVIA); | |
| 80 | ||
| 81 | if ( _compareTo MDWS) | |
| 82 | { | |
| 83 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 84 | IList<Data .WF.BedSwi tch> bedSw itchMDWS = mdwsQuery .GetBedsSw itch(iens) ; | |
| 85 | ||
| 86 | Assert.IsN otNull(bed SwitchMDWS ); | |
| 87 | ||
| 88 | Assert.Are Equal(bedS witchVIA.C ount, bedS witchMDWS. Count); | |
| 89 | } | |
| 90 | } | |
| 91 | catch (E xception e x) | |
| 92 | { | |
| 93 | Asse rt.Fail(ex .ToString( )); | |
| 94 | } | |
| 95 | } | |
| 96 | ||
| 97 | [T estMethod] | |
| 98 | pu blic void TestListPa tientByDat e() | |
| 99 | { | |
| 100 | try | |
| 101 | { | |
| 102 | Date Time start Date = new DateTime( 2003, 1, 1 ); // TODO - set dat es | |
| 103 | Date Time endDa te = new D ateTime(20 03, 2, 1); | |
| 104 | ||
| 105 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 106 | ||
| 107 | Date Time befor eVIA = Dat eTime.Now; | |
| 108 | ILis t<Patient> patientsV IA = viaQu ery.GetPat ients(star tDate, end Date); | |
| 109 | Date Time after VIA = Date Time.Now; | |
| 110 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 111 | ||
| 112 | Asse rt.IsNotNu ll(patient sVIA); | |
| 113 | ||
| 114 | if ( _compareTo MDWS) | |
| 115 | { | |
| 116 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 117 | IList<Pati ent> patie ntsMDWS = mdwsQuery. GetPatient s(startDat e, endDate ); | |
| 118 | ||
| 119 | Assert.IsN otNull(pat ientsMDWS) ; | |
| 120 | ||
| 121 | Assert.Are Equal(pati entsVIA.Co unt, patie ntsMDWS.Co unt); | |
| 122 | } | |
| 123 | ||
| 124 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 125 | } | |
| 126 | catch (E xception e x) | |
| 127 | { | |
| 128 | Asse rt.Fail(ex .ToString( )); | |
| 129 | } | |
| 130 | } | |
| 131 | ||
| 132 | [T estMethod] | |
| 133 | pu blic void TestListPa tientByIEN () | |
| 134 | { | |
| 135 | // spide rs out on Attending Physician to "NewPer son" and F acilityTre atingSpeci alty - "Tr eatingSpec ialty" | |
| 136 | try | |
| 137 | { | |
| 138 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 139 | ||
| 140 | Date Time befor eVIA = Dat eTime.Now; | |
| 141 | ILis t<Patient> patientsV IA = viaQu ery.GetPat ients(null , null, _s iteParams. PatientIEN ); | |
| 142 | Date Time after VIA = Date Time.Now; | |
| 143 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 144 | ||
| 145 | Asse rt.IsNotNu ll(patient sVIA); | |
| 146 | ||
| 147 | if ( _compareTo MDWS) | |
| 148 | { | |
| 149 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 150 | IList<Pati ent> patie ntsMDWS = mdwsQuery. GetPatient s(null, nu ll, _siteP arams.Pati entIEN); | |
| 151 | ||
| 152 | Assert.IsN otNull(pat ientsMDWS) ; | |
| 153 | ||
| 154 | Assert.Are Equal(pati entsVIA.Co unt, patie ntsMDWS.Co unt); | |
| 155 | } | |
| 156 | ||
| 157 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 158 | } | |
| 159 | catch (E xception e x) | |
| 160 | { | |
| 161 | Asse rt.Fail(ex .ToString( )); | |
| 162 | } | |
| 163 | } | |
| 164 | ||
| 165 | [T estMethod] | |
| 166 | pu blic void TestGetPat ient() | |
| 167 | { | |
| 168 | try | |
| 169 | { | |
| 170 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 171 | ||
| 172 | Date Time befor eVIA = Dat eTime.Now; | |
| 173 | Pati ent patien tVIA = via Query.GetP atientByIe n(_sitePar ams.Patien tIEN); | |
| 174 | Date Time after VIA = Date Time.Now; | |
| 175 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 176 | ||
| 177 | Asse rt.IsNotNu ll(patient VIA); | |
| 178 | ||
| 179 | if ( _compareTo MDWS) | |
| 180 | { | |
| 181 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 182 | Patient pa tientMDWS = mdwsQuer y.GetPatie ntByIen(_s iteParams. PatientIEN ); | |
| 183 | ||
| 184 | Assert.IsN otNull(pat ientMDWS); | |
| 185 | } | |
| 186 | ||
| 187 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 188 | } | |
| 189 | catch (E xception e x) | |
| 190 | { | |
| 191 | Asse rt.Fail(ex .ToString( )); | |
| 192 | } | |
| 193 | } | |
| 194 | ||
| 195 | [T estMethod] | |
| 196 | pu blic void TestListAd mittedPati entsForUpd ate() | |
| 197 | { | |
| 198 | try | |
| 199 | { | |
| 200 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 201 | ||
| 202 | Date Time befor eVIA = Dat eTime.Now; | |
| 203 | ILis t<Patient> patientsV IA = viaQu ery.GetAdm ittedPatie ntsForUpda te(); | |
| 204 | Date Time after VIA = Date Time.Now; | |
| 205 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 206 | ||
| 207 | Asse rt.IsNotNu ll(patient sVIA); | |
| 208 | ||
| 209 | if ( _compareTo MDWS) | |
| 210 | { | |
| 211 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 212 | IList<Pati ent> patie ntsMDWS = mdwsQuery. GetAdmitte dPatientsF orUpdate() ; | |
| 213 | ||
| 214 | Assert.IsN otNull(pat ientsMDWS) ; | |
| 215 | ||
| 216 | Assert.Are Equal(pati entsVIA.Co unt, patie ntsMDWS.Co unt); | |
| 217 | } | |
| 218 | ||
| 219 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 220 | } | |
| 221 | catch (E xception e x) | |
| 222 | { | |
| 223 | Asse rt.Fail(ex .ToString( )); | |
| 224 | } | |
| 225 | } | |
| 226 | ||
| 227 | [T estMethod] | |
| 228 | pu blic void TestGetPat ientBySSN( ) | |
| 229 | { | |
| 230 | try | |
| 231 | { | |
| 232 | ILis t<string> patientSSN s = new Li st<string> () { }; // TODO - ad d ssns | |
| 233 | ||
| 234 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 235 | ||
| 236 | Date Time befor eVIA = Dat eTime.Now; | |
| 237 | ILis t<Patient> patientsV IA = viaQu ery.GetPat ients(pati entSSNs); | |
| 238 | Date Time after VIA = Date Time.Now; | |
| 239 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 240 | ||
| 241 | Asse rt.IsNotNu ll(patient sVIA); | |
| 242 | ||
| 243 | if ( _compareTo MDWS) | |
| 244 | { | |
| 245 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 246 | IList<Pati ent> patie ntsMDWS = mdwsQuery. GetPatient s(patientS SNs); | |
| 247 | ||
| 248 | Assert.IsN otNull(pat ientsMDWS) ; | |
| 249 | ||
| 250 | Assert.Are Equal(pati entsVIA.Co unt, patie ntsMDWS.Co unt); | |
| 251 | } | |
| 252 | ||
| 253 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 254 | } | |
| 255 | catch (E xception e x) | |
| 256 | { | |
| 257 | Asse rt.Fail(ex .ToString( )); | |
| 258 | } | |
| 259 | } | |
| 260 | ||
| 261 | [T estMethod] | |
| 262 | pu blic void TestListAd mittedPati ents() | |
| 263 | { | |
| 264 | try | |
| 265 | { | |
| 266 | stri ng lastPat ientMoveme ntIEN = "" ; // TODO - add move ment IEN | |
| 267 | ||
| 268 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 269 | ||
| 270 | Date Time befor eVIA = Dat eTime.Now; | |
| 271 | ILis t<Admitted Patient> p atientsVIA = viaQuer y.GetAdmit tedPatient s(lastPati entMovemen tIEN); | |
| 272 | Date Time after VIA = Date Time.Now; | |
| 273 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 274 | ||
| 275 | Asse rt.IsNotNu ll(patient sVIA); | |
| 276 | ||
| 277 | if ( _compareTo MDWS) | |
| 278 | { | |
| 279 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 280 | IList<Admi ttedPatien t> patient sMDWS = md wsQuery.Ge tAdmittedP atients(la stPatientM ovementIEN ); | |
| 281 | ||
| 282 | Assert.IsN otNull(pat ientsMDWS) ; | |
| 283 | ||
| 284 | Assert.Are Equal(pati entsVIA.Co unt, patie ntsMDWS.Co unt); | |
| 285 | } | |
| 286 | ||
| 287 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 288 | } | |
| 289 | catch (E xception e x) | |
| 290 | { | |
| 291 | Asse rt.Fail(ex .ToString( )); | |
| 292 | } | |
| 293 | } | |
| 294 | ||
| 295 | [T estMethod] | |
| 296 | pu blic void TestGetWar dLocations () | |
| 297 | { | |
| 298 | try | |
| 299 | { | |
| 300 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 301 | ||
| 302 | Date Time befor eVIA = Dat eTime.Now; | |
| 303 | ILis t<WardLoca tion> ward LocationsV IA = viaQu ery.GetWar dLocations (); | |
| 304 | Date Time after VIA = Date Time.Now; | |
| 305 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 306 | ||
| 307 | Asse rt.IsNotNu ll(wardLoc ationsVIA) ; | |
| 308 | ||
| 309 | if ( _compareTo MDWS) | |
| 310 | { | |
| 311 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 312 | IList<Ward Location> wardLocati onsMDWS = mdwsQuery. GetWardLoc ations(); | |
| 313 | ||
| 314 | Assert.IsN otNull(war dLocations MDWS); | |
| 315 | ||
| 316 | Assert.Are Equal(ward LocationsV IA.Count, wardLocati onsMDWS.Co unt); | |
| 317 | } | |
| 318 | ||
| 319 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 320 | } | |
| 321 | catch (E xception e x) | |
| 322 | { | |
| 323 | Asse rt.Fail(ex .ToString( )); | |
| 324 | } | |
| 325 | } | |
| 326 | ||
| 327 | [T estMethod] | |
| 328 | pu blic void TestGetHos pitalLocat ions() | |
| 329 | { | |
| 330 | try | |
| 331 | { | |
| 332 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 333 | ILis t<Hospital Location> hospitalLo cationsVIA = viaQuer y.GetHospi talLocatio ns(); | |
| 334 | ||
| 335 | Asse rt.IsNotNu ll(hospita lLocations VIA); | |
| 336 | ||
| 337 | if ( _compareTo MDWS) | |
| 338 | { | |
| 339 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 340 | IList<Hosp italLocati on> hospit alLocation sMDWS = md wsQuery.Ge tHospitalL ocations() ; | |
| 341 | ||
| 342 | Assert.IsN otNull(hos pitalLocat ionsMDWS); | |
| 343 | ||
| 344 | Assert.Are Equal(hosp italLocati onsVIA.Cou nt, hospit alLocation sMDWS.Coun t); | |
| 345 | } | |
| 346 | ||
| 347 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 348 | } | |
| 349 | catch (E xception e x) | |
| 350 | { | |
| 351 | Asse rt.Fail(ex .ToString( )); | |
| 352 | } | |
| 353 | } | |
| 354 | ||
| 355 | [T estMethod] | |
| 356 | pu blic void TestListNe wPersonByD ateRange() | |
| 357 | { | |
| 358 | try | |
| 359 | { | |
| 360 | Date Time start Date = new DateTime( 2003, 1, 1 ); // TODO - set dat es | |
| 361 | Date Time endDa te = new D ateTime(20 03, 2, 1); | |
| 362 | ||
| 363 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 364 | ||
| 365 | Date Time befor eVIA = Dat eTime.Now; | |
| 366 | ILis t<NewPerso n> newPers onsVIA = v iaQuery.Ge tNewPerson s(startDat e, endDate ); | |
| 367 | Date Time after VIA = Date Time.Now; | |
| 368 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 369 | ||
| 370 | Asse rt.IsNotNu ll(newPers onsVIA); | |
| 371 | ||
| 372 | if ( _compareTo MDWS) | |
| 373 | { | |
| 374 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 375 | IList<NewP erson> new PersonsMDW S = mdwsQu ery.GetNew Persons(st artDate, e ndDate); | |
| 376 | ||
| 377 | Assert.IsN otNull(new PersonsMDW S); | |
| 378 | ||
| 379 | Assert.Are Equal(newP ersonsVIA. Count, new PersonsMDW S.Count); | |
| 380 | } | |
| 381 | ||
| 382 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 383 | } | |
| 384 | catch (E xception e x) | |
| 385 | { | |
| 386 | Asse rt.Fail(ex .ToString( )); | |
| 387 | } | |
| 388 | } | |
| 389 | ||
| 390 | [T estMethod] | |
| 391 | pu blic void TestListNe wPersonByI EN() | |
| 392 | { | |
| 393 | try | |
| 394 | { | |
| 395 | ViaV istAQuery viaQuery = BuildVist AQuery(Dat aRetrieval Method.VIA ) as ViaVi stAQuery; | |
| 396 | ||
| 397 | // m ake dynami c call to VIA comman d for new person | |
| 398 | List <NewPerson > newPerso nsVIA = vi aQuery.Get Results(ne w BMS.Vist aIntegrati on.Via.Com mands.Enti tySetCache .BulkEntit iesListCom mand<NewPe rson>(viaQ uery, BMS. VistaInteg ration.Via .Commands. EIS.ListNe wPersonCom mand.Targe t, new str ing[] { _s iteParams. NewPersonI EN }, BMS. VistaInteg ration.Via .Commands. EIS.ListNe wPersonCom mand.Argum entsCount, null)); | |
| 399 | Asse rt.IsNotNu ll(newPers onsVIA); | |
| 400 | ||
| 401 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 402 | } | |
| 403 | catch (E xception e x) | |
| 404 | { | |
| 405 | Asse rt.Fail(ex .ToString( )); | |
| 406 | } | |
| 407 | } | |
| 408 | ||
| 409 | [T estMethod] | |
| 410 | pu blic void TestListSp ecialty() | |
| 411 | { | |
| 412 | try | |
| 413 | { | |
| 414 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 415 | ||
| 416 | Date Time befor eVIA = Dat eTime.Now; | |
| 417 | ILis t<Specialt y> special tiesVIA = viaQuery.G etSpecialt ies(); | |
| 418 | Date Time after VIA = Date Time.Now; | |
| 419 | Time Span durat ionVIA = a fterVIA - beforeVIA; | |
| 420 | ||
| 421 | Asse rt.IsNotNu ll(special tiesVIA); | |
| 422 | ||
| 423 | if ( _compareTo MDWS) | |
| 424 | { | |
| 425 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 426 | IList<Spec ialty> spe cialtiesMD WS = mdwsQ uery.GetSp ecialties( ); | |
| 427 | ||
| 428 | Assert.IsN otNull(spe cialtiesMD WS); | |
| 429 | ||
| 430 | Assert.Are Equal(spec ialtiesVIA .Count, sp ecialtiesM DWS.Count) ; | |
| 431 | } | |
| 432 | ||
| 433 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 434 | } | |
| 435 | catch (E xception e x) | |
| 436 | { | |
| 437 | Asse rt.Fail(ex .ToString( )); | |
| 438 | } | |
| 439 | } | |
| 440 | ||
| 441 | [T estMethod] | |
| 442 | pu blic void TestListWa rdLocation () | |
| 443 | { | |
| 444 | // can't find MDWS or VIA im plementati on. There is a GetWa rdLocation s, but tha t's alread y tested a bove. | |
| 445 | throw ne w NotImple mentedExce ption(); | |
| 446 | } | |
| 447 | ||
| 448 | [T estMethod] | |
| 449 | pu blic void TestListFa cilityMove mentTypes( ) | |
| 450 | { | |
| 451 | try | |
| 452 | { | |
| 453 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 454 | ILis t<Facility MovementTy pe> facili tyMovement TypesVIA = viaQuery. GetFacilit yMovementT ypes(); | |
| 455 | ||
| 456 | Asse rt.IsNotNu ll(facilit yMovementT ypesVIA); | |
| 457 | ||
| 458 | if ( _compareTo MDWS) | |
| 459 | { | |
| 460 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 461 | IList<Faci lityMoveme ntType> fa cilityMove mentTypesM DWS = mdws Query.GetF acilityMov ementTypes (); | |
| 462 | ||
| 463 | Assert.IsN otNull(fac ilityMovem entTypesMD WS); | |
| 464 | ||
| 465 | Assert.Are Equal(faci lityMoveme ntTypesVIA .Count, fa cilityMove mentTypesM DWS.Count) ; | |
| 466 | } | |
| 467 | ||
| 468 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 469 | } | |
| 470 | catch (E xception e x) | |
| 471 | { | |
| 472 | Asse rt.Fail(ex .ToString( )); | |
| 473 | } | |
| 474 | } | |
| 475 | ||
| 476 | [T estMethod] | |
| 477 | pu blic void TestListFa cilityTrea tingSpecia lties() | |
| 478 | { | |
| 479 | try | |
| 480 | { | |
| 481 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 482 | ILis t<Facility TreatingSp ecialty> f acilityTre atingSpeci altiesVIA = viaQuery .GetFacili tyTreating Specialtie s(); | |
| 483 | ||
| 484 | Asse rt.IsNotNu ll(facilit yTreatingS pecialties VIA); | |
| 485 | ||
| 486 | if ( _compareTo MDWS) | |
| 487 | { | |
| 488 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 489 | IList<Faci lityTreati ngSpecialt y> facilit yTreatingS pecialties MDWS = mdw sQuery.Get FacilityTr eatingSpec ialties(); | |
| 490 | ||
| 491 | Assert.IsN otNull(fac ilityTreat ingSpecial tiesMDWS); | |
| 492 | ||
| 493 | Assert.Are Equal(faci lityTreati ngSpecialt iesVIA.Cou nt, facili tyTreating Specialtie sMDWS.Coun t); | |
| 494 | } | |
| 495 | ||
| 496 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 497 | } | |
| 498 | catch (E xception e x) | |
| 499 | { | |
| 500 | Asse rt.Fail(ex .ToString( )); | |
| 501 | } | |
| 502 | } | |
| 503 | ||
| 504 | [T estMethod] | |
| 505 | pu blic void TestListMa sMovementT ransaction Type() | |
| 506 | { | |
| 507 | // can't find MDWS or VIA im plementati on | |
| 508 | throw ne w NotImple mentedExce ption(); | |
| 509 | } | |
| 510 | ||
| 511 | [T estMethod] | |
| 512 | pu blic void TestListMe dicalCente rDivision( ) | |
| 513 | { | |
| 514 | try | |
| 515 | { | |
| 516 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 517 | ILis t<MedicalC enterDivis ion> medic alCenterDi visionsVIA = viaQuer y.GetMedic alCenterDi visions(); | |
| 518 | ||
| 519 | Asse rt.IsNotNu ll(medical CenterDivi sionsVIA); | |
| 520 | ||
| 521 | if ( _compareTo MDWS) | |
| 522 | { | |
| 523 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 524 | IList<Medi calCenterD ivision> m edicalCent erDivision MDWS = mdw sQuery.Get MedicalCen terDivisio ns(); | |
| 525 | ||
| 526 | Assert.IsN otNull(med icalCenter DivisionMD WS); | |
| 527 | ||
| 528 | Assert.Are Equal(medi calCenterD ivisionsVI A.Count, m edicalCent erDivision MDWS.Count ); | |
| 529 | } | |
| 530 | ||
| 531 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 532 | } | |
| 533 | catch (E xception e x) | |
| 534 | { | |
| 535 | Asse rt.Fail(ex .ToString( )); | |
| 536 | } | |
| 537 | } | |
| 538 | ||
| 539 | [T estMethod] | |
| 540 | pu blic void TestListOr derableIte ms() | |
| 541 | { | |
| 542 | try | |
| 543 | { | |
| 544 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 545 | ILis t<Orderabl eItem> ord erableItem sVIA = via Query.GetO rderableIt ems(); | |
| 546 | ||
| 547 | Asse rt.IsNotNu ll(orderab leItemsVIA ); | |
| 548 | ||
| 549 | if ( _compareTo MDWS) | |
| 550 | { | |
| 551 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 552 | IList<Orde rableItem> orderable ItemsMDWS = mdwsQuer y.GetOrder ableItems( ); | |
| 553 | ||
| 554 | Assert.IsN otNull(ord erableItem sMDWS); | |
| 555 | ||
| 556 | Assert.Are Equal(orde rableItems VIA.Count, orderable ItemsMDWS. Count); | |
| 557 | } | |
| 558 | ||
| 559 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 560 | } | |
| 561 | catch (E xception e x) | |
| 562 | { | |
| 563 | Asse rt.Fail(ex .ToString( )); | |
| 564 | } | |
| 565 | } | |
| 566 | ||
| 567 | [T estMethod] | |
| 568 | pu blic void TestListOr derStatuse s() | |
| 569 | { | |
| 570 | try | |
| 571 | { | |
| 572 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 573 | ILis t<OrderSta tus> order StatusesVI A = viaQue ry.GetOrde rStatuses( ); | |
| 574 | ||
| 575 | Asse rt.IsNotNu ll(orderSt atusesVIA) ; | |
| 576 | ||
| 577 | if ( _compareTo MDWS) | |
| 578 | { | |
| 579 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 580 | IList<Orde rStatus> o rderStatus esMDWS = m dwsQuery.G etOrderSta tuses(); | |
| 581 | ||
| 582 | Assert.IsN otNull(ord erStatuses MDWS); | |
| 583 | ||
| 584 | Assert.Are Equal(orde rStatusesV IA.Count, orderStatu sesMDWS.Co unt); | |
| 585 | } | |
| 586 | ||
| 587 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 588 | } | |
| 589 | catch (E xception e x) | |
| 590 | { | |
| 591 | Asse rt.Fail(ex .ToString( )); | |
| 592 | } | |
| 593 | } | |
| 594 | ||
| 595 | pr ivate void TestGetPa tientMovem ent(string patientIE N, DateTim e movement Date, Move mentTransa ctionType movementTy pe) | |
| 596 | { | |
| 597 | IVistAQu ery viaQue ry = Build VistAQuery (DataRetri evalMethod .VIA); | |
| 598 | PatientM ovement pa tientMovem entVIA = v iaQuery.Ge tPatientMo vement(pat ientIEN, m ovementDat e, movemen tType); | |
| 599 | ||
| 600 | Assert.I sNotNull(p atientMove mentVIA); | |
| 601 | ||
| 602 | if (_com pareToMDWS ) | |
| 603 | { | |
| 604 | IVis tAQuery md wsQuery = BuildVistA Query(Data RetrievalM ethod.MDWS ); | |
| 605 | Pati entMovemen t patientM ovementMDW S = mdwsQu ery.GetPat ientMoveme nt(patient IEN, movem entDate, m ovementTyp e); | |
| 606 | ||
| 607 | Asse rt.IsNotNu ll(patient MovementMD WS); | |
| 608 | } | |
| 609 | ||
| 610 | // TODO - check fi elds have expected v alues and match betw een VIA/MD WS | |
| 611 | } | |
| 612 | ||
| 613 | [T estMethod] | |
| 614 | pu blic void TestGetPat ientMoveme ntForAdmis sion() | |
| 615 | { | |
| 616 | try | |
| 617 | { | |
| 618 | Date Time movem entDate = new DateTi me(2010, 1 , 1); // T ODO get da te | |
| 619 | ||
| 620 | Test GetPatient Movement(_ siteParams .PatientIE N, movemen tDate, Mov ementTrans actionType .ADMISSION ); | |
| 621 | } | |
| 622 | catch (E xception e x) | |
| 623 | { | |
| 624 | Asse rt.Fail(ex .ToString( )); | |
| 625 | } | |
| 626 | } | |
| 627 | ||
| 628 | [T estMethod] | |
| 629 | pu blic void TestGetPat ientMoveme ntForDisch arge() | |
| 630 | { | |
| 631 | try | |
| 632 | { | |
| 633 | Date Time movem entDate = new DateTi me(2010, 1 , 1); // T ODO get da te | |
| 634 | ||
| 635 | Test GetPatient Movement(_ siteParams .PatientIE N, movemen tDate, Mov ementTrans actionType .DISCHARGE ); | |
| 636 | } | |
| 637 | catch (E xception e x) | |
| 638 | { | |
| 639 | Asse rt.Fail(ex .ToString( )); | |
| 640 | } | |
| 641 | } | |
| 642 | ||
| 643 | [T estMethod] | |
| 644 | pu blic void TestGetPat ientMoveme ntForSpeci altyTransf er() | |
| 645 | { | |
| 646 | try | |
| 647 | { | |
| 648 | Date Time movem entDate = new DateTi me(2010, 1 , 1); // T ODO get da te | |
| 649 | ||
| 650 | Test GetPatient Movement(_ siteParams .PatientIE N, movemen tDate, Mov ementTrans actionType .SPECIALTY _TRANSFER) ; | |
| 651 | } | |
| 652 | catch (E xception e x) | |
| 653 | { | |
| 654 | Asse rt.Fail(ex .ToString( )); | |
| 655 | } | |
| 656 | } | |
| 657 | ||
| 658 | [T estMethod] | |
| 659 | pu blic void TestGetPat ientMoveme ntForTrans fer() | |
| 660 | { | |
| 661 | try | |
| 662 | { | |
| 663 | Date Time movem entDate = new DateTi me(2010, 1 , 1); // T ODO get da te | |
| 664 | ||
| 665 | Test GetPatient Movement(_ siteParams .PatientIE N, movemen tDate, Mov ementTrans actionType .TRANSFER) ; | |
| 666 | } | |
| 667 | catch (E xception e x) | |
| 668 | { | |
| 669 | Asse rt.Fail(ex .ToString( )); | |
| 670 | } | |
| 671 | } | |
| 672 | ||
| 673 | [T estMethod] | |
| 674 | pu blic void TestGetPat ientMoveme ntByIEN() | |
| 675 | { | |
| 676 | string p atientMove mentIen = ""; // TOD O - get IE N | |
| 677 | ||
| 678 | IVistAQu ery viaQue ry = Build VistAQuery (DataRetri evalMethod .VIA); | |
| 679 | PatientM ovement pa tientMovem entVIA = v iaQuery.Ge tPatientMo vementByIe n(patientM ovementIen ); | |
| 680 | ||
| 681 | Assert.I sNotNull(p atientMove mentVIA); | |
| 682 | ||
| 683 | if (_com pareToMDWS ) | |
| 684 | { | |
| 685 | IVis tAQuery md wsQuery = BuildVistA Query(Data RetrievalM ethod.MDWS ); | |
| 686 | Pati entMovemen t patientM ovementMDW S = mdwsQu ery.GetPat ientMoveme ntByIen(pa tientMovem entIen); | |
| 687 | ||
| 688 | Asse rt.IsNotNu ll(patient MovementMD WS); | |
| 689 | } | |
| 690 | ||
| 691 | // TODO - check fi elds have expected v alues and match betw een VIA/MD WS | |
| 692 | } | |
| 693 | ||
| 694 | [T estMethod] | |
| 695 | pu blic void TestGetPat ientMoveme ntByDateRa nge() | |
| 696 | { | |
| 697 | DateTime startDate = new Dat eTime(2003 , 1, 1); / / TODO - s et dates | |
| 698 | DateTime endDate = new DateT ime(2003, 2, 1); | |
| 699 | ||
| 700 | IVistAQu ery viaQue ry = Build VistAQuery (DataRetri evalMethod .VIA); | |
| 701 | IList<Pa tientMovem ent> patie ntMovement sVIA = via Query.GetP atientMove ments(star tDate, end Date); | |
| 702 | ||
| 703 | Assert.I sNotNull(p atientMove mentsVIA); | |
| 704 | ||
| 705 | if (_com pareToMDWS ) | |
| 706 | { | |
| 707 | IVis tAQuery md wsQuery = BuildVistA Query(Data RetrievalM ethod.MDWS ); | |
| 708 | ILis t<PatientM ovement> p atientMove mentsMDWS = mdwsQuer y.GetPatie ntMovement s(startDat e, endDate ); | |
| 709 | ||
| 710 | Asse rt.IsNotNu ll(patient MovementsM DWS); | |
| 711 | } | |
| 712 | ||
| 713 | // TODO - check fi elds have expected v alues and match betw een VIA/MD WS | |
| 714 | } | |
| 715 | ||
| 716 | [T estMethod] | |
| 717 | pu blic void TestGetPat ientMoveme ntIENs() | |
| 718 | { | |
| 719 | DateTime startDate = new Dat eTime(2003 , 1, 1); / / TODO - s et dates | |
| 720 | DateTime endDate = new DateT ime(2003, 2, 1); | |
| 721 | ||
| 722 | IVistAQu ery viaQue ry = Build VistAQuery (DataRetri evalMethod .VIA); | |
| 723 | IList<Pa tientMovem entIen> pa tientMovem entIensVIA = viaQuer y.GetPatie ntMovement Iens(start Date, endD ate); | |
| 724 | ||
| 725 | Assert.I sNotNull(p atientMove mentIensVI A); | |
| 726 | ||
| 727 | if (_com pareToMDWS ) | |
| 728 | { | |
| 729 | IVis tAQuery md wsQuery = BuildVistA Query(Data RetrievalM ethod.MDWS ); | |
| 730 | ILis t<PatientM ovementIen > patientM ovementIen sMDWS = md wsQuery.Ge tPatientMo vementIens (startDate , endDate) ; | |
| 731 | ||
| 732 | Asse rt.IsNotNu ll(patient MovementIe nsMDWS); | |
| 733 | } | |
| 734 | ||
| 735 | // TODO - check fi elds have expected v alues and match betw een VIA/MD WS | |
| 736 | } | |
| 737 | ||
| 738 | [T estMethod] | |
| 739 | pu blic void TestGetPat ientMoveme ntByAdmiss ion() | |
| 740 | { | |
| 741 | string a dmissionIe n = ""; // TODO - ge t ien | |
| 742 | ||
| 743 | IVistAQu ery viaQue ry = Build VistAQuery (DataRetri evalMethod .VIA); | |
| 744 | IList<Pa tientMovem ent> patie ntMovement sVIA = via Query.GetP atientMove mentsForAd mission(ad missionIen ); | |
| 745 | ||
| 746 | Assert.I sNotNull(p atientMove mentsVIA); | |
| 747 | ||
| 748 | if (_com pareToMDWS ) | |
| 749 | { | |
| 750 | IVis tAQuery md wsQuery = BuildVistA Query(Data RetrievalM ethod.MDWS ); | |
| 751 | ILis t<PatientM ovement> p atientMove mentsMDWS = mdwsQuer y.GetPatie ntMovement sForAdmiss ion(admiss ionIen); | |
| 752 | ||
| 753 | Asse rt.IsNotNu ll(patient MovementsM DWS); | |
| 754 | } | |
| 755 | ||
| 756 | // TODO - check fi elds have expected v alues and match betw een VIA/MD WS | |
| 757 | } | |
| 758 | ||
| 759 | pr ivate void TestListS cheduledAd missions(D ateTime? s tartDate = null, Dat eTime? end Date = nul l, string patientIEN = null) | |
| 760 | { | |
| 761 | // "PATI EN","SDATE ","EDATE", "MAX","FRO M" | |
| 762 | // <crit eria>72008 76^3100510 ^3130520^^ </criteria > | |
| 763 | IVistAQu ery viaQue ry = Build VistAQuery (DataRetri evalMethod .VIA); | |
| 764 | IList<Sc heduledAdm ission> ca llVIA = vi aQuery.Get ScheduledA dmissions( startDate, endDate, patientIEN ); | |
| 765 | Assert.I sNotNull(c allVIA); | |
| 766 | ||
| 767 | if (_com pareToMDWS ) | |
| 768 | { | |
| 769 | IVis tAQuery md wsQuery = BuildVistA Query(Data RetrievalM ethod.MDWS ); | |
| 770 | ILis t<Schedule dAdmission > callMDWS = mdwsQue ry.GetSche duledAdmis sions(star tDate, end Date, pati entIEN); | |
| 771 | ||
| 772 | Asse rt.IsNotNu ll(callMDW S); | |
| 773 | ||
| 774 | Asse rt.AreEqua l(callVIA. Count, cal lMDWS.Coun t); | |
| 775 | } | |
| 776 | ||
| 777 | // TODO - check fi elds have expected v alues and match betw een VIA/MD WS | |
| 778 | } | |
| 779 | ||
| 780 | [T estMethod] | |
| 781 | pu blic void TestListSc heduledAdm issionsByS tartDate() | |
| 782 | { | |
| 783 | try | |
| 784 | { | |
| 785 | Date Time start Date = new DateTime( 2010, 5, 1 0); // TOD O - get da te | |
| 786 | ||
| 787 | Test ListSchedu ledAdmissi ons(startD ate); | |
| 788 | } | |
| 789 | catch (E xception e x) | |
| 790 | { | |
| 791 | Asse rt.Fail(ex .ToString( )); | |
| 792 | } | |
| 793 | } | |
| 794 | ||
| 795 | [T estMethod] | |
| 796 | pu blic void TestListSc heduledAdm issionsByD ateRange() | |
| 797 | { | |
| 798 | try | |
| 799 | { | |
| 800 | Date Time start Date = new DateTime( 2010, 5, 1 0); | |
| 801 | Date Time endDa te = new D ateTime(20 13, 5, 20) ; | |
| 802 | ||
| 803 | Test ListSchedu ledAdmissi ons(startD ate, endDa te); | |
| 804 | } | |
| 805 | catch (E xception e x) | |
| 806 | { | |
| 807 | Asse rt.Fail(ex .ToString( )); | |
| 808 | } | |
| 809 | } | |
| 810 | ||
| 811 | [T estMethod] | |
| 812 | pu blic void TestListSc heduledAdm issionsByP atientIEN( ) | |
| 813 | { | |
| 814 | try | |
| 815 | { | |
| 816 | Test ListSchedu ledAdmissi ons(null, null, _sit eParams.Pa tientIEN); | |
| 817 | } | |
| 818 | catch (E xception e x) | |
| 819 | { | |
| 820 | Asse rt.Fail(ex .ToString( )); | |
| 821 | } | |
| 822 | } | |
| 823 | ||
| 824 | pr ivate void TestListP atientAppo intments(D ateTime? s tartDate, DateTime? endDate, s tring pati entIEN, IE numerable< string> cl inics) | |
| 825 | { | |
| 826 | try | |
| 827 | { | |
| 828 | // " IENSB","MA X","SDATE" ,"EDATE"," CLNIEN","F ROM" | |
| 829 | // < criteria>7 208163^^31 01206^3101 206^1690^< /criteria> | |
| 830 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 831 | ILis t<PatientA ppointment > callVIA = viaQuery .GetPatien tAppointme nts(startD ate, endDa te, patien tIEN, clin ics); | |
| 832 | ||
| 833 | Asse rt.IsNotNu ll(callVIA ); | |
| 834 | ||
| 835 | if ( _compareTo MDWS) | |
| 836 | { | |
| 837 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 838 | IList<Pati entAppoint ment> call MDWS = mdw sQuery.Get PatientApp ointments( startDate, endDate, patientIEN , clinics) ; | |
| 839 | ||
| 840 | Assert.IsN otNull(cal lMDWS); | |
| 841 | ||
| 842 | Assert.Are Equal(call VIA.Count, callMDWS. Count); | |
| 843 | } | |
| 844 | ||
| 845 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 846 | } | |
| 847 | catch (E xception e x) | |
| 848 | { | |
| 849 | Asse rt.Fail(ex .ToString( )); | |
| 850 | } | |
| 851 | } | |
| 852 | ||
| 853 | [T estMethod] | |
| 854 | pu blic void TestListPa tientAppoi ntmentBySt artDate() | |
| 855 | { | |
| 856 | try | |
| 857 | { | |
| 858 | Date Time start Date = new DateTime( 2010, 12, 6); | |
| 859 | IEnu merable<st ring> clin ics = new[ ] { "1690" }; | |
| 860 | ||
| 861 | Test ListPatien tAppointme nts(startD ate, null, null, cli nics); | |
| 862 | } | |
| 863 | catch (E xception e x) | |
| 864 | { | |
| 865 | Asse rt.Fail(ex .ToString( )); | |
| 866 | } | |
| 867 | } | |
| 868 | ||
| 869 | [T estMethod] | |
| 870 | pu blic void TestListPa tientAppoi ntmentByDa teRange() | |
| 871 | { | |
| 872 | try | |
| 873 | { | |
| 874 | Date Time start Date = new DateTime( 2010, 12, 6); | |
| 875 | Date Time endDa te = new D ateTime(20 10, 12, 6) ; | |
| 876 | IEnu merable<st ring> clin ics = new[ ] { "1690" }; // TOD O - get cl inics for HOU | |
| 877 | ||
| 878 | Test ListPatien tAppointme nts(startD ate, endDa te, null, clinics); | |
| 879 | } | |
| 880 | catch (E xception e x) | |
| 881 | { | |
| 882 | Asse rt.Fail(ex .ToString( )); | |
| 883 | } | |
| 884 | } | |
| 885 | ||
| 886 | [T estMethod] | |
| 887 | pu blic void TestListCa ncelOrders () | |
| 888 | { | |
| 889 | // does n't return all the d ata | |
| 890 | try | |
| 891 | { | |
| 892 | // " IENSM" | |
| 893 | // < criteria>5 587620</cr iteria> | |
| 894 | IEnu merable<st ring> iens = new[] { "5587620" }; // TOD O - get ie ns for HOU | |
| 895 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 896 | ILis t<string> callVIA = viaQuery.G etCanceled Orders(ien s); | |
| 897 | ||
| 898 | Asse rt.IsNotNu ll(callVIA ); | |
| 899 | ||
| 900 | if ( _compareTo MDWS) | |
| 901 | { | |
| 902 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 903 | IList<stri ng> orders MDWS = mdw sQuery.Get CanceledOr ders(iens) ; | |
| 904 | ||
| 905 | Assert.IsN otNull(ord ersMDWS); | |
| 906 | ||
| 907 | Assert.Are Equal(call VIA.Count, ordersMDW S.Count); | |
| 908 | } | |
| 909 | ||
| 910 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 911 | } | |
| 912 | catch (E xception e x) | |
| 913 | { | |
| 914 | Asse rt.Fail(ex .ToString( )); | |
| 915 | } | |
| 916 | } | |
| 917 | ||
| 918 | [T estMethod] | |
| 919 | pu blic void TestListRo omBed() | |
| 920 | { | |
| 921 | try | |
| 922 | { | |
| 923 | // " IENSM","FR OM","MAX" | |
| 924 | // < criteria>^ ^1000</cri teria> | |
| 925 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 926 | ILis t<RoomBed> callVIA = viaQuery. GetRoomBed s(); | |
| 927 | ||
| 928 | Asse rt.IsNotNu ll(callVIA ); | |
| 929 | ||
| 930 | if ( _compareTo MDWS) | |
| 931 | { | |
| 932 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 933 | IList<Room Bed> callM DWS = mdws Query.GetR oomBeds(); | |
| 934 | ||
| 935 | Assert.IsN otNull(cal lMDWS); | |
| 936 | ||
| 937 | Assert.Are Equal(call VIA.Count, callMDWS. Count); | |
| 938 | } | |
| 939 | ||
| 940 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 941 | } | |
| 942 | catch (E xception e x) | |
| 943 | { | |
| 944 | Asse rt.Fail(ex .ToString( )); | |
| 945 | } | |
| 946 | } | |
| 947 | ||
| 948 | [T estMethod] | |
| 949 | pu blic void TestListCl inicAppoin tments() | |
| 950 | { | |
| 951 | // NOTE: This is n ot impleme nted speci fically in any IVist AQuery. Th is is call ed by GetP atientAppo intments, so this te st is some what redun dant. | |
| 952 | // There is no MDW S command for it. | |
| 953 | ||
| 954 | throw ne w NotImple mentedExce ption(); | |
| 955 | } | |
| 956 | ||
| 957 | [T estMethod] | |
| 958 | pu blic void TestListOr ders() | |
| 959 | { | |
| 960 | // No VI A command for ListOr ders. The main use c ase appear s to be Li stOrderAct ions. | |
| 961 | throw ne w NotImple mentedExce ption(); | |
| 962 | } | |
| 963 | ||
| 964 | [T estMethod] | |
| 965 | pu blic void TestListOr derActions () | |
| 966 | { | |
| 967 | // time s out | |
| 968 | try | |
| 969 | { | |
| 970 | // m ain use ca se has nul l patient IEN | |
| 971 | ||
| 972 | Date Time start Date = new DateTime( 2002, 2, 2 0); // TOD O - get pa ramters fo r HOU | |
| 973 | Date Time endDa te = new D ateTime(20 02, 2, 21) ; | |
| 974 | IEnu merable<st ring> orde rIENs = ne w[] { "73" , "75", "7 6", "360", "740" }; | |
| 975 | // " ORDIEN","I ENSB","SDA TE","EDATE ","VALUE", "MAX","FRO M" | |
| 976 | // < criteria>7 3,75,76,36 0,740^1336 650^302022 0^3020220^ 1^^</crite ria> | |
| 977 | IVis tAQuery vi aQuery = B uildVistAQ uery(DataR etrievalMe thod.VIA); | |
| 978 | ILis t<OrderAct ion> callV IA = viaQu ery.GetOrd erActions( startDate, endDate, "1336650", orderIENs ); | |
| 979 | ||
| 980 | Asse rt.IsNotNu ll(callVIA ); | |
| 981 | ||
| 982 | if ( _compareTo MDWS) | |
| 983 | { | |
| 984 | IVistAQuer y mdwsQuer y = BuildV istAQuery( DataRetrie valMethod. MDWS); | |
| 985 | IList<Orde rAction> c allMDWS = mdwsQuery. GetOrderAc tions(star tDate, end Date, "133 6650", ord erIENs); | |
| 986 | ||
| 987 | Assert.IsN otNull(cal lMDWS); | |
| 988 | ||
| 989 | Assert.Are Equal(call VIA.Count, callMDWS. Count); | |
| 990 | } | |
| 991 | ||
| 992 | // T ODO - chec k fields h ave expect ed values and match between VI A/MDWS | |
| 993 | } | |
| 994 | catch (E xception e x) | |
| 995 | { | |
| 996 | Asse rt.Fail(ex .ToString( )); | |
| 997 | } | |
| 998 | } | |
| 999 | } | |
| 1000 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.