示例#1
0
        protected override void OnSaveComplete()
        {
            base.OnSaveComplete();
            HistoryProcedure obj = this.GetSelectedProcedure(this.dgvHistoryData);

            this.LoadHistoryProcedure(obj);

            this.cmbAssociateComplain.SelectedItem = null;
            this.cmbChiefComplain.SelectedItem     = null;
            this.cmbHistoryOfProblem.SelectedItem  = null;
            this.txtAssociateComplainDuration.ResetText();
            this.txtFamilyHistory.ResetText();
            this.txtFamilyHistoryDuration.ResetText();
            this.txtProblemSince.ResetText();
            this.txtBP.ResetText();
            this.txtHR.ResetText();
            this.txtRR.ResetText();
            this.txtTemp.ResetText();
            this.txtRBS.ResetText();
            this.txtECG.ResetText();
            this.txtWt.ResetText();
            this.txtOther.ResetText();
            this.txtMLC.ResetText();
            this.txtTimeHour.ResetText();
            this.txtTimeMinute.ResetText();
            this.txtTimeAMPM.ResetText();
            this.dtpFollowUp.Value    = DateTime.Now;
            this.dtpHistoryDate.Value = DateTime.Now;

            this.mHistoryProcedure = new HistoryProcedure();
        }
示例#2
0
        private HistoryProcedure GetSelectedProcedure(DataGridView dgv)
        {
            HistoryProcedure obj = null;

            if (dgv != null && dgv.CurrentRow != null)
            {
                obj = dgv.CurrentRow.Tag as HistoryProcedure;
            }
            return(obj);
        }
示例#3
0
        private void OPDPriscription_Load(object sender, EventArgs e)
        {
            DataSet1 ds = new DataSet1();


            objHP = new HistoryProcedure(HistoryProcedureGuid);
            var obj          = Report.GetOPDPrescription(objHP.Date);
            var objTreatment = Report.GetOPDTreatment(objHP.Date);

            objPatient = new Patient(objHP.PatientGuid);
            if (obj != null)
            {
                ds.Tables[2].Merge(obj);
            }
            if (objTreatment != null)
            {
                ds.Tables[3].Merge(objTreatment);
            }
            TreatRpt = new Reports.TreatmentReport();
            TreatRpt.SetDataSource(ds);
            objrpt = new Reports.OPDPriscription();
            objrpt.SetDataSource(ds);

            TextObject txtDate        = objrpt.ReportDefinition.ReportObjects["txtDate"] as TextObject;
            TextObject txtPatientName = objrpt.ReportDefinition.ReportObjects["txtPatientName"] as TextObject;
            TextObject txtBP          = objrpt.ReportDefinition.ReportObjects["txtBP"] as TextObject;
            TextObject txtHR          = objrpt.ReportDefinition.ReportObjects["txtHR"] as TextObject;
            TextObject txtRR          = objrpt.ReportDefinition.ReportObjects["txtRR"] as TextObject;
            TextObject txtTEMP        = objrpt.ReportDefinition.ReportObjects["txtTEMP"] as TextObject;
            TextObject txtRBS         = objrpt.ReportDefinition.ReportObjects["txtRBS"] as TextObject;
            TextObject txtECG         = objrpt.ReportDefinition.ReportObjects["txtECG"] as TextObject;
            TextObject txtWt          = objrpt.ReportDefinition.ReportObjects["txtWt"] as TextObject;
            TextObject txtOther       = objrpt.ReportDefinition.ReportObjects["txtOther"] as TextObject;
            TextObject txtFollowUp    = objrpt.ReportDefinition.ReportObjects["txtFollowUp"] as TextObject;

            txtPatientName.Text = objPatient.DisplayName;
            // txtDate.Text = objHP.Date.ToShortDateString();
            txtDate.Text     = objHP.Date.ToString("dd/MM/yyyy");
            txtBP.Text       = objHP.BP;
            txtHR.Text       = objHP.HR;
            txtRR.Text       = objHP.RR;
            txtTEMP.Text     = objHP.Temp;
            txtRBS.Text      = objHP.RBS;
            txtECG.Text      = objHP.ECG;
            txtWt.Text       = objHP.Wt;
            txtOther.Text    = objHP.Other;
            txtFollowUp.Text = objHP.FollowUpDate != DateTime.MinValue ? objHP.FollowUpDate.ToString("dd/MM/yyyy") : string.Empty;

            ReportDocument reportdocument = new ReportDocument();

            crystalReportViewer1.ReportSource = objrpt;
            crystalReportViewer1.Refresh();
        }
示例#4
0
        //

        public HistoryProcedureForm(Patient obj)
            : base(obj, false)
        {
            this.mPatient          = obj;
            this.mHistoryProcedure = new HistoryProcedure();

            this.mHistoryCollection  = new HistoryProcedureCollection(this.mPatient.ObjectGuid);
            this.mHistoryCollections = new HistoryProcedureCollections(this.mHistoryProcedure.ObjectGuid);

            this.OPDChiefComplains     = new OPDChiefComplains(this.mHistoryProcedure.ObjectGuid);
            this.OPDAssociateComplains = new OPDAssociateComplains(this.mHistoryProcedure.ObjectGuid);
            this.OPDHistorys           = new OPDHistorys(this.mHistoryProcedure.ObjectGuid);

            this.InitializeComponent();
            this.UserInitialize();
        }
示例#5
0
        private void LoadHistoryProcedure(HistoryProcedure selected)
        {
            int count = 0;

            this.LoadEntityList <HistoryProcedure>(this.dgvHistoryData, this.clmId.Index, new HistoryProcedureCollection(this.mPatient.ObjectGuid), selected, true, true,
                                                   delegate(DataGridViewRow row, HistoryProcedure obj)
            {
                count++;
                row.Cells[this.clmId.Index].Value                        = obj.Id;
                row.Cells[this.clmGuid.Index].Value                      = obj.ObjectGuid;
                row.Cells[this.clmChiefComplain.Index].Value             = obj.ChiefComplain;
                row.Cells[this.clmProblemSince.Index].Value              = obj.ProblemSince;
                row.Cells[this.clmAssociateComplain.Index].Value         = obj.AssociateComplain;
                row.Cells[this.clmAssociateComplainDuration.Index].Value = obj.AssociateComplainDuration;
                row.Cells[this.clmHistoryOfProblem.Index].Value          = obj.History;
                row.Cells[this.clmFamilyHistory.Index].Value             = obj.FamilyHistory;
                row.Cells[this.clmFamilyHistoryDuration.Index].Value     = obj.FamilyHistoryDuration;
                row.Cells[this.clmDate.Index].Value                      = obj.Date.ToString() != string.Empty ? string.Format("{0:dd/MM/yyyy}", obj.Date) : string.Empty;
            }
                                                   );
        }
示例#6
0
        protected override void OnDeleteClick()
        {
            HistoryProcedure obj = this.GetSelectedProcedure(this.dgvHistoryData);

            if (obj != null)
            {
                this.mHistoryProcedure = obj;
                this.mHistoryProcedure.MarkToDelete();
                this.mHistoryProcedure.UpdateChanges();
            }
            // Chief Complain Clear

            for (int i = 0; i < cmbChiefComplain.Items.Count; i++)
            {
                if (cmbChiefComplain.GetItemChecked(i))
                {
                    cmbChiefComplain.SetItemChecked(i, false);
                }
            }

            // Associate Complain Clear

            for (int i = 0; i < cmbAssociateComplain.Items.Count; i++)
            {
                if (cmbAssociateComplain.GetItemChecked(i))
                {
                    cmbAssociateComplain.SetItemChecked(i, false);
                }
            }

            // History Complain Clear

            for (int i = 0; i < cmbHistoryOfProblem.Items.Count; i++)
            {
                if (cmbHistoryOfProblem.GetItemChecked(i))
                {
                    cmbHistoryOfProblem.SetItemChecked(i, false);
                }
            }

            this.txtAssociateComplainDuration.ResetText();
            this.txtFamilyHistory.ResetText();
            this.txtFamilyHistoryDuration.ResetText();
            this.txtProblemSince.ResetText();
            this.dtpHistoryDate.Value = DateTime.Now;
            this.txtBP.ResetText();
            this.txtHR.ResetText();
            this.txtRR.ResetText();
            this.txtTemp.ResetText();
            this.txtRBS.ResetText();
            this.txtECG.ResetText();
            this.txtWt.ResetText();
            this.txtOther.ResetText();
            this.txtMLC.ResetText();
            this.txtTimeHour.ResetText();
            this.txtTimeMinute.ResetText();
            this.txtTimeAMPM.ResetText();
            this.dtpFollowUp.Value = DateTime.Now;
            LoadHistoryProcedure(GetSelectedProcedure(this.dgvHistoryData));

            this.mHistoryProcedure = new HistoryProcedure();
            this.cmbAssociateComplain.SelectedItem = null;
            this.cmbChiefComplain.SelectedItem     = null;
            this.cmbHistoryOfProblem.SelectedItem  = null;
        }
示例#7
0
        private void OnOpenClick(object sender, EventArgs e)
        {
            HistoryProcedure obj = this.GetSelectedProcedure(this.dgvHistoryData);

            if (obj != null)
            {
                obj.RefershData();
                this.mHistoryProcedure = obj;

                // Chief Complain Clear

                for (int i = 0; i < cmbChiefComplain.Items.Count; i++)
                {
                    if (cmbChiefComplain.GetItemChecked(i))
                    {
                        cmbChiefComplain.SetItemChecked(i, false);
                    }
                }

                //Chief Complain
                if (this.mHistoryProcedure.OPDChiefComplains.Count > 0)
                {
                    for (int i = 0; i < cmbChiefComplain.Items.Count; i++)
                    {
                        for (int j = 0; j < this.mHistoryProcedure.OPDChiefComplains.Count; j++)
                        {
                            if (mHistoryProcedure.OPDChiefComplains[j].ChiefComplainGuid == new Guid(cmbChiefComplain.Items[i].ToString()))
                            {
                                cmbChiefComplain.SetItemChecked(i, true);
                                break;
                            }
                        }
                    }
                }

                // Associate Complain Clear

                for (int i = 0; i < cmbAssociateComplain.Items.Count; i++)
                {
                    if (cmbAssociateComplain.GetItemChecked(i))
                    {
                        cmbAssociateComplain.SetItemChecked(i, false);
                    }
                }

                //Associate Complain
                if (this.mHistoryProcedure.OPDAssociateComplains.Count > 0)
                {
                    for (int i = 0; i < cmbAssociateComplain.Items.Count; i++)
                    {
                        for (int j = 0; j < this.mHistoryProcedure.OPDAssociateComplains.Count; j++)
                        {
                            if (mHistoryProcedure.OPDAssociateComplains[j].AssociateComplainGuid == new Guid(cmbAssociateComplain.Items[i].ToString()))
                            {
                                cmbAssociateComplain.SetItemChecked(i, true);
                                break;
                            }
                        }
                    }
                }

                // History Complain Clear

                for (int i = 0; i < cmbHistoryOfProblem.Items.Count; i++)
                {
                    if (cmbHistoryOfProblem.GetItemChecked(i))
                    {
                        cmbHistoryOfProblem.SetItemChecked(i, false);
                    }
                }

                //History Complain
                if (this.mHistoryProcedure.OPDHistorys.Count > 0)
                {
                    for (int i = 0; i < cmbHistoryOfProblem.Items.Count; i++)
                    {
                        for (int j = 0; j < this.mHistoryProcedure.OPDHistorys.Count; j++)
                        {
                            if (mHistoryProcedure.OPDHistorys[j].HistoryGuid == new Guid(cmbHistoryOfProblem.Items[i].ToString()))
                            {
                                cmbHistoryOfProblem.SetItemChecked(i, true);
                                break;
                            }
                        }
                    }
                }


                this.txtProblemSince.Text              = obj.ProblemSince;
                this.txtFamilyHistory.Text             = obj.FamilyHistory;
                this.txtFamilyHistoryDuration.Text     = obj.FamilyHistoryDuration;
                this.txtAssociateComplainDuration.Text = obj.AssociateComplainDuration;
                this.txtBP.Text         = obj.BP;
                this.txtHR.Text         = obj.HR;
                this.txtRR.Text         = obj.RR;
                this.txtRBS.Text        = obj.RBS;
                this.txtMLC.Text        = obj.MLCNo;
                this.txtOther.Text      = obj.Other;
                this.txtTemp.Text       = obj.Temp;
                this.txtWt.Text         = obj.Wt;
                this.txtECG.Text        = obj.ECG;
                this.txtTimeHour.Text   = obj.TimeHour;
                this.txtTimeMinute.Text = obj.TimeMinute;
                this.txtTimeAMPM.Text   = obj.TimeAMPM;
                if (!string.IsNullOrEmpty(obj.FollowUpDate.ToString()) && (obj.FollowUpDate != DateTime.MinValue))
                {
                    this.dtpFollowUp.Checked = true;
                    this.dtpFollowUp.Value   = obj.FollowUpDate;
                }

                this.dtpHistoryDate.Value = obj.Date;
            }
        }