Esempio n. 1
0
 void controller_AfterReadPatientPrescription(object sender, AfterReadPatientPrescriptionArgs e)
 {
     if (e.PrescCount == 0)
     {
         if (!e.AfterBalance)
         {
             txtPresDoctor.Focus( );
         }
         else
         {
             txtPresDoctor.MemberValue = null;
             txtPresDoctor.Text        = "";
             txtDocDept.MemberValue    = null;
             txtDocDept.Text           = "";
             plPatient.Clear( );
             plPatient.Focus( );
         }
     }
     else
     {
         if (txtPresDoctor.MemberValue != null)
         {
             tlbFunBar.Focus( );
             btnNewPrescription.Select( );
         }
         else
         {
             txtPresDoctor.Focus( );
         }
     }
 }
        /// <summary>
        /// 读取病人未收费的处方
        /// </summary>
        public void ReadPatientNotBalancePrescription(bool afterBalance)
        {
            OutPatient patient = PatientConvert.ConvertPatient((UIOutPatient)formView.Patient);

            Prescription[] prescriptions = patient.GetPrescriptions(PresStatus.未收费, true);
            for (int i = 0; i < prescriptions.Length; i++)
            {
                prescriptions[i].Selected = true;
            }

            DataTable tbPresc = formView.Prescriptions;

            tbPresc.Rows.Clear( );

            FillPrescData(prescriptions, tbPresc);

            CalculateAllPrescriptionFee( );

            AfterReadPatientPrescriptionArgs e = new AfterReadPatientPrescriptionArgs();

            e.PrescCount = GetPrescriptionAmbitList( ).Rows.Count;
            if (tbPresc.Select(COL_DOC_PRESDETAIL_ID + " <> 0").Length > 0)
            {
                e.HasDoctorPresc = true;
            }
            else
            {
                e.HasDoctorPresc = false;
            }

            e.AfterBalance = afterBalance;

            if (AfterReadPatientPrescription != null)
            {
                AfterReadPatientPrescription(this, e);
            }
        }