public visitSites ( string pwd, string sourceList, string permissionString ) : |
||
pwd | string | Client app's BSE security phrase |
sourceList | string | /// A comma-delimited list of station numbers and/or VISN IDs, as in /// "402,550" or "V12,V22" or "V1,V2,456". To visit all VistA systems set the param /// to "*". Duplicate station #'s are ignored. /// |
permissionString | string | If blank defaults to CPRS context |
return |
public TaggedTextArray visitSites(string pwd, string sourceList, string permissionString)
{
TaggedTextArray result = new TaggedTextArray();
if (mySession == null || mySession.SiteTable == null)
{
result.fault = new FaultTO("No site table");
}
else if (sourceList == "")
{
result.fault = new FaultTO("Missing sitelist");
}
else if (mySession.Credentials == null)
{
result.fault = new FaultTO("Cannot use this method without previous login");
}
if (result.fault != null)
{
return result;
}
Site[] sites = MdwsUtils.parseSiteList(mySession.SiteTable, sourceList);
List<DataSource> sources = new List<DataSource>(sites.Length);
for (int i = 0; i < sites.Length; i++)
{
for (int j = 0; j < sites[i].Sources.Length; j++)
{
if (sites[i].Sources[j].Protocol == "VISTA" ||
sites[i].Sources[j].Protocol == "FHIE" || sites[i].Sources[j].Protocol == "XVISTA")
{
sources.Add(sites[i].Sources[j]);
}
}
}
return setupMultiSourceQuery(pwd, sources, permissionString);
}
AccountLib::visitSites ( string pwd, string sourceList, string userSitecode, string userName, string DUZ, string permissionStr ) : |
|
AccountLib::visitSites ( string pwd, string sourceList, string userSitecode, string userName, string DUZ, string SSN, string permissionStr ) : |
public TaggedTextArray sitesHavePatch(string sitelist, string patchId) { TaggedTextArray result = new TaggedTextArray(); //if (mySession.ConnectionSet.Count == 0 || !mySession.ConnectionSet.IsAuthorized) //{ // result.fault = new FaultTO(NO_CONNECTIONS); //} if (String.IsNullOrEmpty(sitelist)) { result.fault = new FaultTO("Missing sitelist"); } else if (String.IsNullOrEmpty(patchId)) { result.fault = new FaultTO("Missing patchId"); } if (result.fault != null) { return(result); } try { AccountLib acctLib = new AccountLib(mySession); TaggedTextArray sites = acctLib.visitSites(mySession.MdwsConfiguration.AllConfigs[ConfigFileConstants.PRIMARY_CONFIG_SECTION][MdwsConfigConstants.SERVICE_ACCOUNT_PASSWORD], sitelist, MdwsConstants.CPRS_CONTEXT); ToolsApi api = new ToolsApi(); IndexedHashtable t = api.hasPatch(mySession.ConnectionSet, patchId); result = new TaggedTextArray(t); } catch (Exception e) { result.fault = new FaultTO(e.Message); } finally { mySession.ConnectionSet.disconnectAll(); } return(result); }