public getAppointments ( gov.va.medora.mdo.dao.AbstractConnection cxn ) : Appointment[] | ||
cxn | gov.va.medora.mdo.dao.AbstractConnection | |
return | Appointment[] |
public TaggedAppointmentArrays getAppointments() { TaggedAppointmentArrays result = new TaggedAppointmentArrays(); if (!mySession.ConnectionSet.IsAuthorized) { result.fault = new FaultTO("Connections not ready for operation", "Need to login?"); } if (result.fault != null) { return result; } try { EncounterApi api = new EncounterApi(); IndexedHashtable t = api.getAppointments(mySession.ConnectionSet); return new TaggedAppointmentArrays(t); } catch (Exception e) { result.fault = new FaultTO(e); return result; } }
public TaggedAppointmentArray getAppointmentsFromSite( string pwd, string sitecode, string mpiPid) { TaggedAppointmentArray result = new TaggedAppointmentArray(); if (String.IsNullOrEmpty(sitecode)) { result.fault = new FaultTO("Missing sitecode"); } else if (String.IsNullOrEmpty(mpiPid)) { result.fault = new FaultTO("Missing mpiPid"); } if (result.fault != null) { return result; } AccountLib acctLib = new AccountLib(mySession); try { SiteArray sites = acctLib.patientVisit(pwd, sitecode, mpiPid, false); if (sites.fault != null) { result.fault = sites.fault; return result; } // Get the labs... EncounterApi api = new EncounterApi(); Appointment[] appts = api.getAppointments(mySession.ConnectionSet.getConnection(sitecode)); for (int i = 0; i < appts.Length; i++) { appts[i].Status = undecodeApptStatus(appts[i].Status); } result = new TaggedAppointmentArray(sitecode, appts); } catch (Exception e) { result.fault = new FaultTO(e.Message); } finally { mySession.close(); } return result; }