public override void tearDownQuery(MySession session) { if (Convert.ToBoolean(session.MdwsConfiguration.AllConfigs[MdwsConfigConstants.CONNECTION_POOL_CONFIG_SECTION][MdwsConfigConstants.CONNECTION_POOLING])) { SessionMgr.getInstance().returnConnections(session); } }
public UserTO login(string token, string username, string pwd, string permission) { MySession session = SessionMgr.getInstance().getSession(token); return((UserTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, UserTO> (new rest.AccountLib(session).login), new object[] { username, pwd, permission })); }
public PatientArray getPatientsByClinic(string token, string clinicId, string startDate, string stopDate) { MySession session = SessionMgr.getInstance().getSession(token); return((PatientArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, PatientArray> (new SchedulingLib(session).getPatientsByClinic), new object[] { clinicId, startDate, stopDate })); }
public AppointmentTypeArray getAppointmentTypes(string token, string target) { MySession session = SessionMgr.getInstance().getSession(token); return((AppointmentTypeArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, AppointmentTypeArray> (new SchedulingLib(session).getAppointmentTypes), new object[] { target })); }
public TaggedAppointmentArray getPendingAppointments(string token, string startDate) { MySession session = SessionMgr.getInstance().getSession(token); return((TaggedAppointmentArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, TaggedAppointmentArray> (new SchedulingLib(session).getPendingAppointments), new object[] { startDate })); }
public HospitalLocationTO getClinicSchedulingDetails(string token, string clinicId) { MySession session = SessionMgr.getInstance().getSession(token); return((HospitalLocationTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, HospitalLocationTO> (new SchedulingLib(session).getClinicSchedulingDetails), new object[] { clinicId })); }
public TaggedHospitalLocationArray getClinics(string token, string target) { MySession session = SessionMgr.getInstance().getSession(token); return((TaggedHospitalLocationArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, TaggedHospitalLocationArray> (new EncounterLib(session).getClinics), new object[] { "", target, "" })); }
public PatientTO select(string token, string pid) { MySession session = SessionMgr.getInstance().getSession(token); return((PatientTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, PatientTO> (new PatientLib(session).select), new object[] { pid })); }
public AppointmentTO makeAppointment(string token, string clinicId, string appointmentTimestamp, string purpose, string purposeSubcategory, string appointmentType, string appointmentLength) { MySession session = SessionMgr.getInstance().getSession(token); return((AppointmentTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, string, string, string, AppointmentTO> (new SchedulingLib(session).makeAppointment), new object[] { clinicId, appointmentTimestamp, purpose, purposeSubcategory, appointmentLength, appointmentType })); }
public static SessionMgr getInstance() { if (_mgr == null) { MySession session = new MySession(); // need this so we can read config file for connection pool if (Convert.ToBoolean(session.MdwsConfiguration.AllConfigs[MdwsConfigConstants.CONNECTION_POOL_CONFIG_SECTION][MdwsConfigConstants.CONNECTION_POOLING])) { startConnectionPool(); } _mgr = new SessionMgr(); _mgr._sessions = new Dictionary <string, MySession>(); } return(_mgr); }
public DataSourceArray connect(string sitelist) { MySession newSession = new MySession(); DataSourceArray src = new rest.ConnectionLib(newSession).connectToLoginSite(sitelist); if (src.fault == null) // successful connect! { newSession.Token = SessionMgr.getInstance().getNewToken(); newSession.LastUsed = DateTime.Now; SessionMgr.getInstance().addSession(newSession); WebOperationContext.Current.OutgoingResponse.Headers.Add("token", newSession.Token); } SessionMgr.getInstance().returnConnections(newSession); return(src); }
public TaggedTextArray disconnect(string token) { return(new rest.ConnectionLib(SessionMgr.getInstance().getSession(token)).disconnectAll()); }