예제 #1
0
 private ExpertBoard GetExpertBoard()
 {
     using (GmConnection conn = App.CreateConnection())
     {
         return(ExpertBoard.GetExpertBoard(conn, SelectedId));
     }
 }
 public ExpertBoardForm(ExpertBoard expertBoard, Patient patient)
 {
     InitializeComponent();
     this.expertBoard = expertBoard;
     this.patient     = patient;
     FormUtils.Init(this);
 }
예제 #3
0
        private void ucSelectReport_OnShowReport(object sender, HospitalDepartment.UserControls.SelectReportEventArgs e)
        {
            ExpertBoard expertBoard = GetExpertBoard();

            if (expertBoard != null)
            {
                switch (BaseReportBuilder.GetReportBuilderId(e.Report.ReportBuilderId))
                {
                case ReportBuilderId.ExpertBoard:
                    e.ReportBuilder = new ExpertBoardReportBuilder(App.ConnectionFactory, App.Config, patient, expertBoard);
                    break;
                }
            }
        }
예제 #4
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         ExpertBoard     expertBoard = new ExpertBoard(patient.Id);
         ExpertBoardForm form        = new ExpertBoardForm(expertBoard, patient);
         if (form.ShowDialog() == DialogResult.OK)
         {
             DataRow newRow = dataTable.NewRow();
             dataTable.Rows.Add(newRow);
             UpdateRow(newRow, expertBoard);
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
 }
예제 #5
0
 private void Open()
 {
     try
     {
         ExpertBoard expertBoard = GetExpertBoard();
         if (expertBoard != null)
         {
             ExpertBoardForm form = new ExpertBoardForm(expertBoard, patient);
             if (form.ShowDialog() == DialogResult.OK)
             {
                 UpdateRow(SelectedRow, expertBoard);
             }
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
 }
예제 #6
0
 public ExpertBoardReportBuilder(ConnectionFactory factory, Config config, Patient patient, ExpertBoard expertBoard)
     : base(ReportBuilderId.ExpertBoard)
 {
     AddParameter("SickListStartDate", patient.patientData.sickListStartDate);
     AddParameter("AdmissionDate", patient.admissionDate);
     AddParameter("Date", expertBoard.date);
     AddParameter("Diagnosis", expertBoard.expertBoardData.diagnosisInfo);
     AddParameter("DiagnosisCode", expertBoard.expertBoardData.diagnosisInfo.code);
     using (GmConnection conn = factory.CreateConnection())
     {
         Diagnosis d = expertBoard.expertBoardData.diagnosisInfo.GetDiagnosis(conn);
         AddParameter("MCode", d.mcode);
     }
 }
예제 #7
0
 private void UpdateRow(DataRow dr, ExpertBoard expertBoard)
 {
     dr["Id"]   = expertBoard.Id;
     dr["Date"] = expertBoard.date;
 }