Exemple #1
0
        public WebAppointments()
        {
            appts = new AppointmentList();

            string url = Configurator.getCloudWebURL();
            cloud = new RiskApps3.HraCloudServices.RiskAppsCloudServices(url);

            InitializeComponent();

            label14.Visible = true;
            progressBar1.Visible = true;
            progressBar1.Enabled = true;
            label14.Text = "Fetching Available Web Surveys...";
            button1.Enabled = false;
            fastDataListView1.Enabled = false;
            backgroundWorker1.RunWorkerAsync();

            foreach (Clinic c in SessionManager.Instance.ActiveUser.userClinicList)
            {
                comboBox1.Items.Add(c);
            }
            if (comboBox1.Items.Count > 0)
            {
                comboBox1.SelectedIndex = 0;
            }
            webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(DocLoadComplete);
        }
        private void ok_Click(object sender, EventArgs e)
        {
            if (textBoxMrn.Text.Length == 0)
            {
                MessageBox.Show(PleaseEnterAMedicalRecordNumberToAddAnAppointment);
                return;
            }
            if (!_init)
            {
                _init = true;

                this.Enabled = false;

                this._appointment.MRN = this.textBoxMrn.Text;
                this._appointment.Load();

                AddAppointmentView view;
                if (this._appointment.apptid.HasValue)
                {
                    AppointmentList appts = new AppointmentList();
                    appts.LoadFullList();
                    appts.LoadList();

                    Appointment goldenAppointment = appts.First(appt => appt.apptID == this._appointment.apptid);

                    view = new AddAppointmentView(goldenAppointment, this._clinicId, AddAppointmentView.Mode.Copy);
                }
                else
                {
                    view = new AddAppointmentView(this._appointment.MRN, this._clinicId);
                }
                view.ShowDialog();
                this.Close();
            }
        }
Exemple #3
0
        public static List <Appointment> FromRAppointmentList(this RiskApps3.Model.Clinic.AppointmentList apps)
        {
            List <Appointment> appointments = new List <Appointment>();

            foreach (RA.Appointment app in apps)
            {
                appointments.Add(app.FromRAppointment());
            }
            return(appointments);
        }
Exemple #4
0
        private void GetNewAppointmentList()
        {
            //checkBox2_CheckedChanged(this, null);

            //loadingCircle1.Enabled = true;
            //loadingCircle1.Visible = true;
            //loadingCircle1.Active = true;
            fastDataListView1.Visible = false;

            if (appts != null)
                appts.ReleaseListeners(this);

            appts = new AppointmentList();
            if (checkBox1.Checked)
                appts.Date = dateTimePicker1.Value.ToShortDateString();
            else
                appts.Date = null;

            if (comboBox2.SelectedItem != null)
            {
                appts.clinicId = ((Clinic) comboBox2.SelectedItem).clinicID;
            }
            //appts.groupName = SessionManager.Instance.UserGroup;
            appts.NameOrMrn = textBoxFilterData.Text;
            appts.AddHandlersWithLoad(AppointmentListChanged,
                                      AppointmentListLoaded,
                                      AppointmentChanged);
        }
Exemple #5
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>();
        }
Exemple #6
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>();
        }
Exemple #7
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;

            }
        }
Exemple #8
0
        public void DeleteTasks(int _institutionId, string unitnum, int apptid)
        {
            //SetUserSession();
            string assignedBy = "";
            if (SessionManager.Instance.ActiveUser != null)
            {
                if (string.IsNullOrEmpty(SessionManager.Instance.ActiveUser.ToString()) == false)
                {
                    assignedBy = SessionManager.Instance.ActiveUser.ToString();
                }
            }
            SessionManager.Instance.SetActivePatient(unitnum, apptid);
            RiskApps3.Model.PatientRecord.Patient p = SessionManager.Instance.GetActivePatient();
            //Creating task object
            RiskApps3.Model.PatientRecord.Communication.Task t = new RiskApps3.Model.PatientRecord.Communication.Task(p, "Task", null, assignedBy, DateTime.Now);
            HraModelChangedEventArgs args = new HraModelChangedEventArgs(null);
            TaskList tList = new TaskList(p);
            tList.LoadFullList();

            AppointmentList apt = new AppointmentList();
            apt.LoadFullList();

            foreach (RiskApps3.Model.PatientRecord.Communication.Task task in tList)
            {
                PtFollowupList fList = new PtFollowupList(task);
                fList.LoadFullList();
                HraModelChangedEventArgs args1 = new HraModelChangedEventArgs(null);
                args1.Delete = true;
                foreach (PtFollowup followup in fList)
                {
                    followup.BackgroundPersistWork(args1);
                }
                task.BackgroundPersistWork(args1);
            }
            //Creating folowup object
        }
 public void Setup(AppointmentList schedule)
 {
     appts = schedule;
     fastDataListView1.ClearObjects();
     fastDataListView1.SetObjects(appts);
 }