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 |
리턴 |
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); }
public TaggedNoteArrays getNotesForBhie(string pwd, string mpiPid, string fromDate, string toDate, string nNotes) { TaggedNoteArrays result = new TaggedNoteArrays(); if (pwd != "iBnOfs55iEZ,d") { result.fault = new FaultTO("Invalid application password"); } else if (String.IsNullOrEmpty(mpiPid)) { result.fault = new FaultTO("Missing mpiPid"); } else if (String.IsNullOrEmpty(fromDate)) { result.fault = new FaultTO("Missing fromDate"); } else if (String.IsNullOrEmpty(toDate)) { result.fault = new FaultTO("Missing toDate"); } if (result.fault != null) { return(result); } if (nNotes == "") { nNotes = "50"; } try { int maxNotes = Convert.ToInt16(nNotes); PatientLib patLib = new PatientLib(_mySession); TaggedTextArray sites = patLib.getPatientSitesByMpiPid(mpiPid); if (sites == null) { return(null); } if (sites.fault != null) { result.fault = sites.fault; return(result); } string sitelist = ""; for (int i = 0; i < sites.count; i++) { if ((string)sites.results[i].tag == "200") { continue; } if (sites.results[i].fault != null) { } else { sitelist += (string)sites.results[i].tag + ','; } } sitelist = sitelist.Substring(0, sitelist.Length - 1); AccountLib acctLib = new AccountLib(_mySession); sites = acctLib.visitSites("BHIE", sitelist, MdwsConstants.CPRS_CONTEXT); if (sites.fault != null) { result.fault = sites.fault; return(result); } PatientApi patApi = new PatientApi(); IndexedHashtable t = patApi.setLocalPids(_mySession.ConnectionSet, mpiPid); NoteApi api = new NoteApi(); IndexedHashtable tNotes = api.getNotes(_mySession.ConnectionSet, fromDate, toDate, maxNotes); IndexedHashtable tSumms = api.getDischargeSummaries(_mySession.ConnectionSet, fromDate, toDate, 50); result = new TaggedNoteArrays(mergeNotesAndDischargeSummaries(tNotes, tSumms)); } catch (Exception ex) { result.fault = new FaultTO(ex); } finally { if (_mySession.ConnectionSet != null) { _mySession.ConnectionSet.disconnectAll(); } } return(result); }
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; }
public TaggedNoteArrays getNotesForBhie(string pwd, string mpiPid, string fromDate, string toDate, string nNotes) { TaggedNoteArrays result = new TaggedNoteArrays(); if (String.Equals(pwd, _mySession.MdwsConfiguration.AllConfigs[ConfigFileConstants.PRIMARY_CONFIG_SECTION][MdwsConfigConstants.BHIE_PASSWORD])) { result.fault = new FaultTO("Invalid application password"); } else if (String.IsNullOrEmpty(mpiPid)) { result.fault = new FaultTO("Missing mpiPid"); } else if (String.IsNullOrEmpty(fromDate)) { result.fault = new FaultTO("Missing fromDate"); } else if (String.IsNullOrEmpty(toDate)) { result.fault = new FaultTO("Missing toDate"); } if (result.fault != null) { return result; } if (nNotes == "") { nNotes = "50"; } try { int maxNotes = Convert.ToInt16(nNotes); PatientLib patLib = new PatientLib(_mySession); TaggedTextArray sites = patLib.getPatientSitesByMpiPid(mpiPid); if (sites == null) { return null; } if (sites.fault != null) { result.fault = sites.fault; return result; } string sitelist = ""; for (int i = 0; i < sites.count; i++) { if ((string)sites.results[i].tag == "200") { continue; } if (sites.results[i].fault != null) { } else { sitelist += (string)sites.results[i].tag + ','; } } sitelist = sitelist.Substring(0, sitelist.Length - 1); AccountLib acctLib = new AccountLib(_mySession); sites = acctLib.visitSites("BHIE", sitelist, MdwsConstants.CPRS_CONTEXT); if (sites.fault != null) { result.fault = sites.fault; return result; } PatientApi patApi = new PatientApi(); IndexedHashtable t = patApi.setLocalPids(_mySession.ConnectionSet, mpiPid); NoteApi api = new NoteApi(); IndexedHashtable tNotes = api.getNotes(_mySession.ConnectionSet, fromDate, toDate, maxNotes); IndexedHashtable tSumms = api.getDischargeSummaries(_mySession.ConnectionSet, fromDate, toDate, 50); result = new TaggedNoteArrays(mergeNotesAndDischargeSummaries(tNotes, tSumms)); } catch (Exception ex) { result.fault = new FaultTO(ex); } finally { if (_mySession.ConnectionSet != null) { _mySession.ConnectionSet.disconnectAll(); } } return result; }