private void LoadScoreDetail(string registryID) { XmlNode flaws = null; #region Get flaws from database using (EMR.gjtEmrService.emrServiceXml es = new EMR.gjtEmrService.emrServiceXml()) { string msg = es.GetValuateDetail(selfReport, registryID, ref flaws); if (msg != null) { MessageBox.Show(msg, ErrorMessage.Error); return; } } if (flaws == null) { return; } #endregion dgvPatients.Visible = false; newLocation = 0; foreach (XmlNode note in flaws.ChildNodes) { NewFlaw(note); } lbInfo.Text = ThisAddIn.GetPatientNameByRegistryID(registryID); }
private void LoadDoctorScore(string departmentCode) { if (selfInfo) { return; } XmlNode scores = null; using (EMR.gjtEmrService.emrServiceXml es = new EMR.gjtEmrService.emrServiceXml()) { string msg = es.GetDoctorScoreForDepartment(selfReport, departmentCode, dtpFrom.Value, dtpTo.Value, ref scores); if (msg != null) { MessageBox.Show(msg, ErrorMessage.Error); return; } } if (scores == null) { return; } dgvValuate.Rows.Clear(); int index = 0; double oneCount = 0; double emrCount = 0; foreach (XmlNode doctor in scores.ChildNodes) { emrCount = Convert.ToDouble(doctor.Attributes[AttributeNames.Num].Value); index = dgvValuate.Rows.Add(); dgvValuate.Rows[index].Cells[0].Value = doctor.Attributes[AttributeNames.A].Value; oneCount = Convert.ToDouble(doctor.Attributes[AttributeNames.A].Value); dgvValuate.Rows[index].Cells[1].Value = Percent(oneCount, emrCount); dgvValuate.Rows[index].Cells[2].Value = doctor.Attributes[AttributeNames.B].Value; oneCount = Convert.ToDouble(doctor.Attributes[AttributeNames.B].Value); dgvValuate.Rows[index].Cells[3].Value = Percent(oneCount, emrCount); dgvValuate.Rows[index].Cells[4].Value = doctor.Attributes[AttributeNames.C].Value; oneCount = Convert.ToDouble(doctor.Attributes[AttributeNames.C].Value); dgvValuate.Rows[index].Cells[5].Value = Percent(oneCount, emrCount); dgvValuate.Rows[index].Cells[6].Value = doctor.Attributes[AttributeNames.D].Value; oneCount = Convert.ToDouble(doctor.Attributes[AttributeNames.D].Value); dgvValuate.Rows[index].Cells[7].Value = Percent(oneCount, emrCount); string doctorID = doctor.Attributes[AttributeNames.Code].Value; dgvValuate.Rows[index].HeaderCell.Value = Globals.doctors.GetDoctorName(doctorID); dgvValuate.Rows[index].HeaderCell.Tag = doctorID; } dgvValuate.CurrentCell = dgvValuate.Rows[index + 1].Cells[0]; dgvValuate.Visible = true; dgvDepartment.Visible = false; dgvDepartment.Tag = departmentCode; lbInfo.Text = Globals.departments.GetDepartmentName(departmentCode); }
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); }