Пример #1
0
        public List<VM.Appointment> GetAppointments(int InstitutionId)
        {
            Logger.DebugFormat("Institution Id: {0}", InstitutionId);
            List<VM.Appointment> appointments = new List<VM.Appointment>();
            if (InstitutionId != null)
            {

                _institutionId = InstitutionId;
                // SetUserSession();
                //appointments = HRACACHE.GetCache<List<VM.Appointment>>(InstitutionId);
                var list = new AppointmentList();

                list.clinicId = 1;
                list.Date = DateTime.Now.ToString("MM/dd/yyyy");
                list.BackgroundListLoad();

                appointments = list.FromRAppointmentList();

                return appointments;
            }
            return new List<VM.Appointment>();
        }
Пример #2
0
        /// <summary>
        /// To Show Appointments based on seacrh filter entered by user
        /// </summary>
        /// <param name="InstitutionId">Institution Id</param>
        /// <param name="searchfilter">Namevalue collection of seacrh parameter like ClinicId,Appointment Date, Name Or MRN</param>
        /// <returns>List of Appointments based on Search criteria</returns>
        public List<VM.Appointment> GetAppointments(int InstitutionId, NameValueCollection searchfilter)
        {
            Logger.DebugFormat("Institution Id: {0}", InstitutionId);
            List<VM.Appointment> appointments = new List<VM.Appointment>();

            if (InstitutionId != null)
            {
                _institutionId = InstitutionId;
                // SetUserSession();
                var list = new AppointmentList();
                if (Convert.ToString(searchfilter["clinicId"]) != null && Convert.ToString(searchfilter["clinicId"]) != "")
                    list.clinicId = Convert.ToInt32(searchfilter["clinicId"]);
                if (Convert.ToString(searchfilter["appdt"]) != null && Convert.ToString(searchfilter["appdt"]) != "")
                    list.Date = Convert.ToString(searchfilter["appdt"]);
                if (Convert.ToString(searchfilter["name"]) != null && Convert.ToString(searchfilter["name"]) != "")
                    list.NameOrMrn = Convert.ToString(searchfilter["name"]);
                list.BackgroundListLoad();
                foreach (RA.Appointment app in list)
                {

                    bool _DNCStatus = GetDNCStatus(InstitutionId, app.unitnum);
                    appointments.Add(app.FromRAppointment(_DNCStatus));

                }

                return appointments;

                //return list.FromRAppointmentList();
            }
            return new List<VM.Appointment>();
        }
Пример #3
0
        public VM.Appointment GetAppointmentForAdd(string MRN, int clinicId)
        {
            GoldenAppointment _appointment = new GoldenAppointment();
            _appointment.MRN = MRN;
            _appointment.Load();
            Patient _patient;
            VM.Appointment app = new VM.Appointment();
            if (_appointment.apptid.HasValue)
            {
                AppointmentList appts = new AppointmentList();
                appts.BackgroundListLoad();

              ////Appointment goldenAppointment = appts.First(appt => appt.id == _appointment.apptid);

              // // SessionManager.Instance.SetActivePatient(goldenAppointment.unitnum, goldenAppointment.apptID);
              //  SessionManager.Instance.GetActivePatient().BackgroundLoadWork();
              ////  SessionManager.Instance.MetaData.AllProviders.BackgroundListLoad();
              //  _patient = SessionManager.Instance.GetActivePatient();
              //  _patient.Providers.BackgroundListLoad();
              // // VM.Appointment app = goldenAppointment.FromRAppointment();
              //  app.clinics= GetClinicList();
              ////  app.Providers = SessionManager.Instance.MetaData.AllProviders.ToProviderList();
              //  app.FromRAppointment(_patient);
              //  app.IsGoldenAppointment = "Yes";
              //  app.IsCopyAppointment = "No";
                return app;

            }
            else
            {
                _patient = new Patient(MRN);
                _patient.Providers.LoadFullList();

                SessionManager.Instance.SetActivePatient(_patient.unitnum, _patient.apptid);
                Appointment appointment = new Appointment();
              //  appointment = new Appointment(clinicId, MRN) { };
              //  VM.Appointment app = appointment.FromRAppointment();
              //  app.clinics=GetClinicList();
              // // SessionManager.Instance.MetaData.AllProviders.BackgroundListLoad();
              ////  app.Providers = SessionManager.Instance.MetaData.AllProviders.ToProviderList();
              //  app.FromRAppointment(_patient);
              //  app.IsGoldenAppointment = "No";
              //  app.IsCopyAppointment = "No";
                return app;

            }
        }