public CSelectP(MainForm etp) { InitializeComponent(); emrTaskPane = etp; this.Location = new Point(450, 120); if (ThisAddIn.CanOption(ElementNames.ArchiveDepartment)) { cboQy.Enabled = !Globals.ArchiveDepartment; string str = ThisAddIn.CanOptionText(ElementNames.ArchiveDepartmentText).Trim(); if (ThisAddIn.CanOption(ElementNames.ArchiveDepartment) && ThisAddIn.CanOptionText(ElementNames.ArchiveDepartmentText).Trim() != "") { if (str.Contains(",") == true) { string[] strlist = str.Split(','); foreach (string strEach in strlist) { if (strEach.Trim() == Globals.OpDepartID) { cboQy.Enabled = true; cboHz.Enabled = true; return; } else { cboQy.Enabled = false; cboHz.Enabled = false; } return; } } } } }
private void GetDocInfo(string registryID) { DataSet dst = new DataSet(); using (gjtEmrService.emrServiceXml es = new gjtEmrService.emrServiceXml()) { dst = es.GetTransferInfoExEx(registryID, Globals.DoctorID, false); DataTable dt = dst.Tables[0]; dt.Columns.Add("选择", typeof(bool)); dt.Columns["选择"].SetOrdinal(0); for (int i = 0; i < dt.Rows.Count; i++) { dt.Rows[i]["选择"] = true; } if (dt.Rows.Count > 0) { dataGridView1.DataSource = dt; return; } string noteID = ThisAddIn.CanOptionText(ElementNames.ConsentID); XmlNode[] emrNotes = Globals.childPattern.GetChildNote(ThisAddIn.CanOptionText(ElementNames.ConsentID)); DataTable dtN = new DataTable(); dtN.Columns.Add("选择", typeof(bool)); dtN.Columns.Add("病历名称", typeof(string)); dtN.Columns.Add("张数", typeof(int)); string departmentCode = Globals.myConfig.GetDepartmentCode(); foreach (XmlNode emrNote in emrNotes) { if (emrNote == null) { break; } if (emrNote.Attributes[AttributeNames.BelongDepartment] != null && emrNote.Attributes[AttributeNames.BelongDepartment].Value != departmentCode) { continue; } string noteName = emrNote.Attributes[AttributeNames.NoteName].Value; if (!HaveID(dt, noteName)) { DataRow drTemp = dtN.NewRow(); drTemp["选择"] = false; drTemp["病历名称"] = noteName; drTemp["张数"] = 1; dtN.Rows.Add(drTemp); } } dataGridView1.DataSource = dtN; } }