public void testConnectAndLogin() { RegionArray siteTable = _dao.getSites(); SiteTO selectedSite = null; // placeholder // we already know our site code but, just for completeness, showing walking through the region array here // the VA organizes itself logically and geographically by regions and sites. "regions" is roughly what // we term internally as VISNs. There are 23 VISNs in VA - Ann Arbor is in VISN 11. Since MDWS uses this organization // for other things, we modified the terminology slightly // This first foreach loop goes through all the regions in the site table - in our test environment we only have one region foreach (RegionTO region in siteTable.regions) { if (region.sites != null && region.sites.sites != null && region.sites.sites.Length > 0) { foreach (SiteTO site in region.sites.sites) { if (site.sitecode == "100") // we chose a really difficult way of finding our site! { selectedSite = site; break; } } } if (selectedSite != null) { break; } } UserTO user = _dao.connectAndLogin(selectedSite.sitecode, _accessCode, _verifyCode); Assert.IsNull(user.fault); }
/// <summary> /// get sites /// </summary> /// <param name="ra"></param> /// <returns></returns> public CStatus GetMDWSSites() { // CStatus status = IsMDWSValid(); // if (!status.Status) // { // return status; // } CStatus status = new CStatus(); //get the sites from MDWS RegionArray ra = GetMDWSSOAPClient().getVHA(); if (ra == null || ra.fault != null) { return(new CStatus(false, k_STATUS_CODE.Failed, "getVHA failed!")); } //transfer the patients to the checklist db CMDWSTransfer transfer = new CMDWSTransfer(this); status = transfer.TransferSites(ra); if (!status.Status) { return(status); } return(status); }
public RegionArray getSites() { RegionArray result = _svc.getVHA(); if (result.fault != null) { throw new ApplicationException(result.fault.message); } return(result); }
public RegionArray getSitesFile() { RegionArray regions = _emrSvc.getVHA(); if (regions.fault != null) { throw new ApplicationException(regions.fault.message); } foreach (RegionTO visn in regions.regions) { visn.name = "VISN " + visn.id + " - " + visn.name; // makes for a user friendly dropdown } return(regions); }