Пример #1
0
        private void LoadPatientScore(string doctorID, string departmentCode)
        {
            XmlNode scores = null;

            using (EMR.gjtEmrService.emrServiceXml es = new EMR.gjtEmrService.emrServiceXml())
            {
                string msg = es.GetPatientScoreForDoctor(selfReport, doctorID, departmentCode,
                                                         dtpFrom.Value, dtpTo.Value, ref scores);
                if (msg != null)
                {
                    MessageBox.Show(msg, ErrorMessage.Error);
                    return;
                }
            }
            if (scores == null)
            {
                return;
            }

            dgvPatients.Rows.Clear();
            int index = 0;

            foreach (XmlNode patient in scores.ChildNodes)
            {
                index = dgvPatients.Rows.Add();
                int scoreIndex = Convert.ToInt32(patient.Attributes[AttributeNames.Score].Value);
                dgvPatients.Rows[index].Cells[0].Value = ScoreLevel(scoreIndex);
                string registryID = patient.Attributes[AttributeNames.RegistryID].Value;
                dgvPatients.Rows[index].HeaderCell.Value = ThisAddIn.GetPatientNameByRegistryID(registryID);
                dgvPatients.Rows[index].HeaderCell.Tag   = registryID;
            }


            dgvPatients.CurrentCell = null;
            dgvPatients.Visible     = true;
            //2009-07-02 modify by sunfan.
            dgvDepartment.Visible = false;
            dgvValuate.Visible    = false;

            lbInfo.Text = Globals.doctors.GetDoctorName(doctorID);
        }