//获取文件到硬盘 private void PackSubFileToISO_WorkList(string subFileName, string NowParentDirectNamePath, string ServerPath) { DataTable ImageDatatable = b_image.GetList(" EXAM_ACCESSION_NUM ='" + subFileName + "'"); SIS_Function.FileTransfer socket = new SIS_Function.FileTransfer(ILL.GetConfig.ServerIp, ILL.GetConfig.ServerPort);//连接SOCKET //创建二级目录 string NowSubDirectNamePath = NowParentDirectNamePath + "\\" + subFileName; Directory.CreateDirectory(NowSubDirectNamePath); //NeroFolder subFolder = new NeroFolderClass(); //ParentFloder.Folders.Add(subFolder); //subFolder.Name = studySet.series_instance_uid[j].ToString(); MReport m_Report = (MReport)b_report.GetModel(subFileName); //读取WROD报告 if (m_Report != null) { FileOp.FileSave(m_Report.REPORT_NAME, NowSubDirectNamePath + "\\" + subFileName + ".DOC"); } for (int i = 0; i < ImageDatatable.Rows.Count; i++) { string tPath = ImageDatatable.Rows[i]["IMAGE_PATH"].ToString().Replace('/', '\\'); socket.FileDown(ServerPath + tPath, NowSubDirectNamePath + tPath.Substring(tPath.LastIndexOf('\\'), tPath.Length - tPath.LastIndexOf('\\'))); } }
private void dgv_WorkList_Click(object sender, EventArgs e) { if (this.dgv_WorkList.Rows.Count == 0 || this.dgv_WorkList.SelectedRows.Count == 0) { return; } string ExamAccessionNum = this.dgv_WorkList.CurrentRow.Cells["EXAM_ACCESSION_NUM"].Value.ToString(); BReport br = new BReport(); mrpt = (MReport)br.GetModel(ExamAccessionNum); Path = TemDir + ExamAccessionNum + ".doc"; if (!File.Exists(Path)) { fOpe.FileSave(mrpt.REPORT_NAME, Path); } }
private void lv_Patient_MouseDoubleClick(object sender, MouseEventArgs e) { ListViewItem lvi = lv_Patient.GetItemAt(e.X, e.Y); if (lvi == null) return; if (lvi.ImageIndex != 1) return; BWorkList bwk = new BWorkList(); MWorkList mwk = (MWorkList)bwk.GetModel(lvi.Tag.ToString()); BReport brt = new BReport(); MReport mrt = (MReport)brt.GetModel(lvi.Tag.ToString()); ImageCopy ic = new ImageCopy(); string saveDir = System.Windows.Forms.Application.StartupPath + "\\temp"; List<ImgObj> arrayImg = ic.LoadImages(mwk, saveDir); frmReportEdit frmRE = new frmReportEdit(); frmRE.initForm(mwk, mrt,ILL.GetConfig.RS_OpenWord); frmRE.ShowDialog(); }
/// <summary> /// 下载报告 /// </summary> /// <returns></returns> public IModel ReportDownLoad(IModel iWorklist, string saveDir) { string ReportPath = saveDir + "\\report.doc"; try { if (GetConfig.DALAndModel == "SIS") { SIS_Model.MWorkList mWorklist = (SIS_Model.MWorkList)iWorklist; SIS_Model.MReport mReport = (SIS_Model.MReport)bReport.GetModel(mWorklist.EXAM_ACCESSION_NUM); if (mReport == null || mReport.REPORT_NAME == null) { if (mReport == null) { mReport = new SIS_Model.MReport(); } SIS_Model.MPrintTemplateDict mPrint = (SIS_Model.MPrintTemplateDict)bPrint.GetModel(mWorklist.EXAM_CLASS, mWorklist.EXAM_SUB_CLASS); if (mPrint != null) { FileOp.FileSave(mPrint.FILE_NAME, ReportPath); mReport.FIELD_INF = mPrint.FIELD_INF; mReport.PRINT_TEMPLATE = mPrint.PRINT_TEMPLATE; } else//无此检查类别,检查子类的打印模版时,下载此检查类别下的默认打印模版 { DataTable dt = bPrint.GetList("EXAM_CLASS = '" + mWorklist.EXAM_CLASS + "'"); if (dt.Rows.Count > 0) { mPrint = (SIS_Model.MPrintTemplateDict)bPrint.GetModel(dt.Rows[0]); FileOp.FileSave(mPrint.FILE_NAME, ReportPath); mReport.FIELD_INF = mPrint.FIELD_INF; mReport.PRINT_TEMPLATE = mPrint.PRINT_TEMPLATE; } else { return(null); } } } else { FileOp.FileSave(mReport.REPORT_NAME, ReportPath); } return(mReport); } else { PACS_Model.MWorkList mWorklist = (PACS_Model.MWorkList)iWorklist; PACS_Model.MReport mReport = (PACS_Model.MReport)bReport.GetModel(mWorklist.EXAM_ACCESSION_NUM); if (mReport == null || mReport.REPORT_NAME == null) { if (mReport == null) { mReport = new PACS_Model.MReport(); } PACS_Model.MPrintTemplateDict mPrint = (PACS_Model.MPrintTemplateDict)bPrint.GetModel(mWorklist.EXAM_CLASS, mWorklist.EXAM_SUB_CLASS); if (mPrint != null) { FileOp.FileSave(mPrint.FILE_NAME, ReportPath); mReport.FIELD_INF = mPrint.FIELD_INF; mReport.PRINT_TEMPLATE = mPrint.PRINT_TEMPLATE; } else//无此检查类别,检查子类的打印模版时,下载此检查类别下的默认打印模版 { DataTable dt = bPrint.GetList("EXAM_CLASS = '" + mWorklist.EXAM_CLASS + "'"); if (dt.Rows.Count > 0) { mPrint = (PACS_Model.MPrintTemplateDict)bPrint.GetModel(dt.Rows[0]); FileOp.FileSave(mPrint.FILE_NAME, ReportPath); mReport.FIELD_INF = mPrint.FIELD_INF; mReport.PRINT_TEMPLATE = mPrint.PRINT_TEMPLATE; } else { return(null); } } } else { FileOp.FileSave(mReport.REPORT_NAME, ReportPath); } return(mReport); } } catch { return(null); } }