Пример #1
0
 private void frmListDoctor_Load(object sender, System.EventArgs e)
 {
     if (DoctorID.Trim() != "")
     {
         txtDoctor.Tag  = DoctorID.Trim();
         txtDoctor.Text = DoctorName.Trim();
         PatientID      = "";
         PatientName    = "";
     }
     else
     {
         DoctorID    = "";
         DoctorName  = "";
         PatientID   = "";
         PatientName = "";
     }
     if (this.LoginInfo != null)
     {
         txtDoctor.Tag  = this.LoginInfo.m_strEmpID;
         txtDoctor.Text = this.LoginInfo.m_strEmpName;
         PatientID      = "";
         PatientName    = "";
         txtPatient_KeyDown(null, new KeyEventArgs(Keys.Enter));
     }
 }
Пример #2
0
        private void StartAppointment()
        {
            DataTable CheckedInPatients = PatientDBConverter.GetCheckedInAppointments();

            if (CheckedInPatients.Rows.Count == 0)
            {
                Alert("No avaliable appointments.", "No patients are checked in. There are no appointments avalaible to be seen.");
                return;
            }

            int averageDuration         = AppointmentLogic.GetAverage();
            int remainingShiftInMinutes = StaffDBConverter.GetRemainingShiftInMinutes(DoctorID);

            if (remainingShiftInMinutes < averageDuration)
            {
                if (Confirmation("Are you sure?", "There may not be enough time in your schedule to finish the next appointment. Are you sure you would like to proceed?") == "NO")
                {
                    return;
                }
            }

            DataRow selectedAppointment = null;

            // check if any patients are waiting first.

            if (Convert.ToBoolean(CheckedInPatients.Rows[0]["isEmergency"]) == true)
            {
                selectedAppointment = CheckedInPatients.Rows[0];
            }

            foreach (DataRow dr in CheckedInPatients.Rows)
            {
                if (selectedAppointment == null)
                {
                    if (Convert.ToBoolean(dr["isReservation"]) == false)
                    {
                        selectedAppointment = dr;
                    }
                    else if (Convert.ToBoolean(dr["isReservation"]) == true && DoctorID.Equals(int.Parse(dr["AppointmentDoctorID"].ToString())))
                    {
                        selectedAppointment = dr;
                    }
                }
                else
                {
                    TimeSpan selectedAppointmentTime = TimeSpan.Parse(selectedAppointment["AppointmentTime"].ToString());
                    TimeSpan drAppointmentTime       = TimeSpan.Parse(dr["AppointmentTime"].ToString());

                    if (drAppointmentTime.Subtract(selectedAppointmentTime).TotalMinutes <= 10 && (Convert.ToBoolean(dr["isReservation"]) == false))
                    {
                        selectedAppointment = dr;
                        break;
                    }
                }
            }

            PatientDBConverter.StartAppointment(selectedAppointment, DoctorID);
            MessengerInstance.Send <string>("DoctorAppointmentView");
        }
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = GetType().GetHashCode();
                hash = (hash * 31) ^ PatientID.GetHashCode();
                hash = (hash * 31) ^ DoctorID.GetHashCode();

                return(hash);
            }
        }
Пример #4
0
        public override int GetHashCode()
        {
            int hashCode = 292862208;

            hashCode = hashCode * -1521134295 + DoctorCalendarID.GetHashCode();
            hashCode = hashCode * -1521134295 + DoctorID.GetHashCode();
            hashCode = hashCode * -1521134295 + Date.GetHashCode();
            hashCode = hashCode * -1521134295 + StartTime.GetHashCode();
            hashCode = hashCode * -1521134295 + EndTime.GetHashCode();
            hashCode = hashCode * -1521134295 + HospitalID.GetHashCode();
            return(hashCode);
        }
Пример #5
0
        public override int GetHashCode()
        {
            int hashCode = -1986329711;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + PatientID.GetHashCode();
            hashCode = hashCode * -1521134295 + DoctorID.GetHashCode();
            hashCode = hashCode * -1521134295 + DiseaseID.GetHashCode();
            hashCode = hashCode * -1521134295 + TreatmentID.GetHashCode();
            hashCode = hashCode * -1521134295 + Date.GetHashCode();
            return(hashCode);
        }
Пример #6
0
        public override int GetHashCode()
        {
            int hashCode = 1832843767;

            hashCode = hashCode * -1521134295 + AppointmentID.GetHashCode();
            hashCode = hashCode * -1521134295 + UserID.GetHashCode();
            hashCode = hashCode * -1521134295 + DoctorID.GetHashCode();
            hashCode = hashCode * -1521134295 + AppDate.GetHashCode();
            hashCode = hashCode * -1521134295 + DoctorCalendarID.GetHashCode();
            hashCode = hashCode * -1521134295 + StartTime.GetHashCode();
            hashCode = hashCode * -1521134295 + EndTime.GetHashCode();
            return(hashCode);
        }
Пример #7
0
        public override int GetHashCode()
        {
            int hashCode = -1998789331;

            hashCode = hashCode * -1521134295 + ConsulatationFeeID.GetHashCode();
            hashCode = hashCode * -1521134295 + DoctorID.GetHashCode();
            hashCode = hashCode * -1521134295 + HospitalID.GetHashCode();
            hashCode = hashCode * -1521134295 + FeeAmount.GetHashCode();
            hashCode = hashCode * -1521134295 + DoctorAmount.GetHashCode();
            hashCode = hashCode * -1521134295 + StartDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EndDate.GetHashCode();
            return(hashCode);
        }
Пример #8
0
 private void lsvDoctor_DoubleClick(object sender, EventArgs e)
 {
     if (lsvDoctor.SelectedItems.Count > 0)
     {
         int CurrIndex = lsvDoctor.SelectedItems[0].Index;
         DoctorID       = ((DataTable)lsvDoctor.Tag).Rows[CurrIndex]["EMPID_CHR"].ToString().Trim();
         DoctorName     = ((DataTable)lsvDoctor.Tag).Rows[CurrIndex]["LASTNAME_VCHR"].ToString().Trim();
         txtDoctor.Text = DoctorName.Trim();
         txtDoctor.Tag  = DoctorID.Trim();
         lsvDoctor.Hide();
         txtPatient_KeyDown(null, new KeyEventArgs(Keys.Enter));
     }
 }
Пример #9
0
        public override int GetHashCode()
        {
            int hashCode = 1370643586;

            hashCode = hashCode * -1521134295 + DoctorID.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(LicenseNumber);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Specialist);

            hashCode = hashCode * -1521134295 + Active.GetHashCode();
            hashCode = hashCode * -1521134295 + VerifiedBy.GetHashCode();
            hashCode = hashCode * -1521134295 + UserID.GetHashCode();
            return(hashCode);
        }
Пример #10
0
        public override int GetHashCode()
        {
            int hashCode = 1968497320;

            hashCode = hashCode * -1521134295 + DoctorID.GetHashCode();
            hashCode = hashCode * -1521134295 + UserID.GetHashCode();
            hashCode = hashCode * -1521134295 + AppointmentID.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(UserName);

            hashCode = hashCode * -1521134295 + StartTime.GetHashCode();
            hashCode = hashCode * -1521134295 + EndTime.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(HospitalName);

            hashCode = hashCode * -1521134295 + Date.GetHashCode();
            return(hashCode);
        }
Пример #11
0
        private void txtPatient_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (DoctorID != null && DoctorID.Trim() != "")
                {
                    m_lngGetPatientByDoctor("", DoctorID.Trim());
//					if(txtPatient.Text.Trim()=="")
//					{
//						m_lngGetPatientByDoctor("",DoctorID.Trim());
//					}
//					else
//					{
//						m_lngGetPatientByDoctor(" A.INPATIENTID_CHR LIKE '"+txtPatient.Tag.ToString().Trim()+"%' ",DoctorID.Trim());
//					}
                }
                lsvPatient.Show();
                lsvPatient.Focus();
                if (lsvPatient.Items.Count > 0)
                {
//					lsvPatient.Items[0].Selected=true;
                }
            }
        }
Пример #12
0
 public override string ToString()
 {
     return(VisitDate.Date.ToString() + " " + DoctorID.ToString() + " " + PatientID.ToString());
 }