/// <summary> /// 查询是否存在指定的检查记录 /// </summary> /// <param name="model"></param> /// <returns></returns> public override bool Exists(IModel model) { MStudy m = (MStudy)model; strSql = "select * from " + TableName + " where EXAM_ACCESSION_NUM= '" + m.EXAM_ACCESSION_NUM + "'"; return(recordIsExist(strSql)); }
public void InitForm(MReport mReport, MStudy mStudy, string Path) { this.mStudy = mStudy; this.mReport = mReport; DisplayWord(Path); FillData(); this.Text = "申请序号:" + mStudy.EXAM_ACCESSION_NUM; }
public int OpenRpt(MReport mReport, MStudy mStudy, string Path) { this.winWordControl.CloseControl(); if (!Directory.Exists(Pacstemp)) { Directory.CreateDirectory(Pacstemp); } string TempPath = Pacstemp + DateTime.Now.ToString("yyyyMMddhhmmssFFF") + mReport.EXAM_NO + ".doc"; File.Copy(Path, TempPath, true); int i = wClass.PacsWordInit(mReport, mStudy, TempPath); return(i); }
private void WriteToStudy() { mStudy = new MStudy(); mStudy.PATIENT_ID = mWorklist.PATIENT_ID; mStudy.PATIENT_NAME = mWorklist.PATIENT_NAME; mStudy.PATIENT_SEX = mWorklist.PATIENT_SEX; mStudy.PATIENT_BIRTH = mWorklist.PATIENT_BIRTH; mStudy.PATIENT_AGE = mWorklist.PATIENT_AGE; mStudy.PATIENT_AGE_UNIT = mWorklist.PATIENT_AGE_UNIT; BPatientSource bps = new BPatientSource(); MPatientSource mps = (MPatientSource)bps.GetModel(mWorklist.PATIENT_SOURCE); mStudy.PATIENT_SOURCE = mps.PATIENT_SOURCE; mStudy.BIRTH_PLACE = mWorklist.BIRTH_PLACE; mStudy.IDENTITY = mWorklist.PATIENT_IDENTITY; mStudy.CHARGE_TYPE = mWorklist.CHARGE_TYPE.ToString(); mStudy.VISIT_ID = mWorklist.VISIT_ID; mStudy.INP_NO = mWorklist.INP_NO; mStudy.BED_NUM = mWorklist.BED_NUM; mStudy.ZIP_CODE = mWorklist.ZIP_CODE; mStudy.MAILING_ADDRESS = mWorklist.MAILING_ADDRESS; mStudy.TELEPHONE_NUMBER = mWorklist.TELEPHONE_NUM; mStudy.STUDY_ID = mWorklist.PATIENT_LOCAL_ID; mStudy.STUDY_INSTANCE_UID = mWorklist.STUDY_INSTANCE_UID + ".1985.7.5";//创建 mStudy.STUDY_DATE_TIME = DateTime.Now; mStudy.SERIES_COUNT = 0; mStudy.INSTANCE_COUNT = 0; mStudy.MODALITY = ILL.GetConfig.Modality; //配置文件中读取 mStudy.FACILITY = ""; //登陆时取得设备名 mStudy.REFER_DOCTOR = mWorklist.REFER_DOCTOR; mStudy.REFER_DEPT = mWorklist.REFER_DEPT; mStudy.REQ_MEMO = mWorklist.REQ_MEMO; mStudy.REQ_DATE_TIME = mWorklist.REQ_DATE_TIME; mStudy.REQ_DEPT_NAME = mWorklist.REQ_DEPT_NAME; mStudy.SCHEDULED_DATE = mWorklist.SCHEDULED_DATE; mStudy.SCH_OPERATOR = mWorklist.SCH_OPERATOR; mStudy.EXAM_NO = mWorklist.EXAM_NO; mStudy.EXAM_ACCESSION_NUM = mWorklist.EXAM_ACCESSION_NUM; mStudy.EXAM_CLASS = mWorklist.EXAM_CLASS; mStudy.EXAM_SUB_CLASS = mWorklist.EXAM_SUB_CLASS; mStudy.EXAM_ITEM = mWorklist.EXAM_ITEMS; mStudy.EXAM_MODE = mWorklist.EXAM_MODE; mStudy.EXAM_GROUP = mWorklist.EXAM_GROUP; mStudy.EXAM_DEPT_NAME = mWorklist.EXAM_DEPT_NAME; mStudy.EXAM_DOCTOR = mWorklist.EXAM_DOCTOR; mStudy.EXAM_INDEX = mWorklist.EXAM_INDEX; mStudy.IS_ONLINE = 1; mStudy.IS_MATCHED = 1; mStudy.IS_PACKPROCESS = 1; mStudy.REPORT_STATUS = 1; mStudy.APPROVER = "";//报告人--登陆者 mStudy.CLIN_DIAG = mWorklist.CLIN_DIAG; mStudy.CLIN_SYMP = mWorklist.CLIN_SYMP; mStudy.RELEVANT_DIAG = mWorklist.RELEVANT_DIAG; mStudy.RELEVANT_LAB_TEST = mWorklist.RELEVANT_LAB_TEST; mStudy.PHYS_SIGN = mWorklist.PHYS_SIGN; mStudy.DEVICE = mWorklist.DEVICE; if (!bStudy.Exists(mStudy)) { //bStudy.Update(mStudy, " Where EXAM_ACCESSION_NUM='" + mStudy.EXAM_ACCESSION_NUM + "'"); bStudy.Add(mStudy); } else { //bStudy.Update(mStudy, "EXAM_ACCESSION_NUM='" + mWorklist.EXAM_ACCESSION_NUM + "'"); } }
/// <summary> /// 更新指定的检查记录 /// </summary> /// <param name="iStudy"></param> /// <param name="where"></param> /// <returns></returns> public override int Update(IModel iStudy, string where) { MStudy m = (MStudy)iStudy; Hashtable ht = new Hashtable(); ht.Add("study_key", m.STUDY_KEY); ht.Add("patient_id", m.PATIENT_ID); ht.Add("patient_name", m.PATIENT_NAME); ht.Add("patient_sex", m.PATIENT_SEX); ht.Add("patient_birth", m.PATIENT_BIRTH); //日期 ht.Add("patient_age", m.PATIENT_AGE); //N ht.Add("patient_age_unit", m.PATIENT_AGE_UNIT); ht.Add("patient_source", m.PATIENT_SOURCE); ht.Add("birth_place", m.BIRTH_PLACE); ht.Add("identity", m.IDENTITY); //ht.Add("security", "");//N ht.Add("charge_type", m.CHARGE_TYPE); ht.Add("visit_id", m.VISIT_ID);//N ht.Add("inp_no", m.INP_NO); ht.Add("bed_num", m.BED_NUM); ht.Add("zip_code", m.ZIP_CODE); ht.Add("mailing_address", m.MAILING_ADDRESS); ht.Add("telephone_number", m.TELEPHONE_NUMBER); ht.Add("study_id", m.STUDY_ID); //?? //ht.Add("study_desc", dt.Rows[0]["PATIENT_ID"].ToString());//取自DICOM文件X ht.Add("study_instance_uid", m.STUDY_INSTANCE_UID); //CreateStudy_Instance_Uid方法 ht.Add("study_date_time", m.STUDY_DATE_TIME); //日期 // ht.Add("access_no", dt.Rows[0]["PATIENT_ID"].ToString());//?X // ht.Add("body_part", dt.Rows[0]["PATIENT_ID"].ToString());//?X ht.Add("series_count", "0"); //?X ht.Add("instance_count", "0"); //?X ht.Add("modality", m.MODALITY); // ht.Add("facility", m.FACILITY); ht.Add("refer_doctor", m.REFER_DOCTOR); ht.Add("refer_dept", m.REFER_DEPT); ht.Add("req_memo", m.REQ_MEMO); ht.Add("req_dept_name", m.REQ_DEPT_NAME); ht.Add("req_date_time", m.REQ_DATE_TIME); //日期 ht.Add("scheduled_date", m.SCHEDULED_DATE); //日期 ht.Add("sch_operator", m.SCH_OPERATOR); ht.Add("exam_no", m.EXAM_NO); ht.Add("exam_accession_num", m.EXAM_ACCESSION_NUM); ht.Add("exam_class", m.EXAM_CLASS); ht.Add("exam_sub_class", m.EXAM_SUB_CLASS); ht.Add("exam_item", m.EXAM_ITEM); ht.Add("exam_mode", m.EXAM_MODE); ht.Add("exam_group", m.EXAM_GROUP); ht.Add("exam_dept_name", m.EXAM_DEPT_NAME); ht.Add("exam_doctor", m.EXAM_DOCTOR); ht.Add("exam_index", m.EXAM_INDEX); //N ht.Add("is_online", "1"); //N ht.Add("is_matched", "1"); //N ht.Add("is_packprocess", "0"); //N ht.Add("report_status", "1"); //N // ht.Add("verified","0");//N ht.Add("approver", m.APPROVER);//报告人USERIINFO ht.Add("clin_diag", m.CLIN_DIAG); ht.Add("clin_symp", m.CLIN_SYMP); ht.Add("relevant_lab_test", m.RELEVANT_LAB_TEST); ht.Add("relevant_diag", m.RELEVANT_DIAG); ht.Add("phys_sign", m.PHYS_SIGN); // ht.Add("study_path",dt.Rows[0]["PATIENT_ID"].ToString()); // ht.Add("volume_key",dt.Rows[0]["PATIENT_ID"].ToString());// 不理 ht.Add("device", m.DEVICE); return(ExecuteSql(StringConstructor.UpdateSql(TableName, ht, where).ToString())); }
/// <summary> /// 获取指定检查申请号的检查记录 /// </summary> /// <param name="EXAM_ACCESSION_NUM"></param> /// <returns></returns> public override IModel GetModel(string EXAM_ACCESSION_NUM) { strSql = "select * from " + TableName + " where EXAM_ACCESSION_NUM = '" + EXAM_ACCESSION_NUM + "'"; DataTable dt = GetDataTable(strSql); MStudy model = new MStudy(); if (dt.Rows.Count > 0) { if (dt.Rows[0]["STUDY_KEY"].ToString() != "") { model.STUDY_KEY = int.Parse(dt.Rows[0]["STUDY_KEY"].ToString()); } model.PATIENT_ID = dt.Rows[0]["PATIENT_ID"].ToString(); model.PATIENT_NAME = dt.Rows[0]["PATIENT_NAME"].ToString(); model.PATIENT_SEX = dt.Rows[0]["PATIENT_SEX"].ToString(); if (dt.Rows[0]["PATIENT_BIRTH"].ToString() != "") { model.PATIENT_BIRTH = DateTime.Parse(dt.Rows[0]["PATIENT_BIRTH"].ToString()); } if (dt.Rows[0]["PATIENT_AGE"].ToString() != "") { model.PATIENT_AGE = int.Parse(dt.Rows[0]["PATIENT_AGE"].ToString()); } model.PATIENT_AGE_UNIT = dt.Rows[0]["PATIENT_AGE_UNIT"].ToString(); model.PATIENT_SOURCE = dt.Rows[0]["PATIENT_SOURCE"].ToString(); model.BIRTH_PLACE = dt.Rows[0]["BIRTH_PLACE"].ToString(); model.IDENTITY = dt.Rows[0]["IDENTITY"].ToString(); if (dt.Rows[0]["SECURITY"].ToString() != "") { model.SECURITY = int.Parse(dt.Rows[0]["SECURITY"].ToString()); } model.CHARGE_TYPE = dt.Rows[0]["CHARGE_TYPE"].ToString(); if (dt.Rows[0]["VISIT_ID"].ToString() != "") { model.VISIT_ID = int.Parse(dt.Rows[0]["VISIT_ID"].ToString()); } model.INP_NO = dt.Rows[0]["INP_NO"].ToString(); model.BED_NUM = dt.Rows[0]["BED_NUM"].ToString(); model.ZIP_CODE = dt.Rows[0]["ZIP_CODE"].ToString(); model.MAILING_ADDRESS = dt.Rows[0]["MAILING_ADDRESS"].ToString(); model.TELEPHONE_NUMBER = dt.Rows[0]["TELEPHONE_NUMBER"].ToString(); model.STUDY_ID = dt.Rows[0]["STUDY_ID"].ToString(); model.STUDY_DESC = dt.Rows[0]["STUDY_DESC"].ToString(); model.STUDY_INSTANCE_UID = dt.Rows[0]["STUDY_INSTANCE_UID"].ToString(); if (dt.Rows[0]["STUDY_DATE_TIME"].ToString() != "") { model.STUDY_DATE_TIME = DateTime.Parse(dt.Rows[0]["STUDY_DATE_TIME"].ToString()); } model.ACCESS_NO = dt.Rows[0]["ACCESS_NO"].ToString(); model.BODY_PART = dt.Rows[0]["BODY_PART"].ToString(); if (dt.Rows[0]["SERIES_COUNT"].ToString() != "") { model.SERIES_COUNT = int.Parse(dt.Rows[0]["SERIES_COUNT"].ToString()); } if (dt.Rows[0]["INSTANCE_COUNT"].ToString() != "") { model.INSTANCE_COUNT = int.Parse(dt.Rows[0]["INSTANCE_COUNT"].ToString()); } model.MODALITY = dt.Rows[0]["MODALITY"].ToString(); model.FACILITY = dt.Rows[0]["FACILITY"].ToString(); model.REFER_DOCTOR = dt.Rows[0]["REFER_DOCTOR"].ToString(); model.REFER_DEPT = dt.Rows[0]["REFER_DEPT"].ToString(); model.REQ_MEMO = dt.Rows[0]["REQ_MEMO"].ToString(); model.REQ_DEPT_NAME = dt.Rows[0]["REQ_DEPT_NAME"].ToString(); if (dt.Rows[0]["REQ_DATE_TIME"].ToString() != "") { model.REQ_DATE_TIME = DateTime.Parse(dt.Rows[0]["REQ_DATE_TIME"].ToString()); } if (dt.Rows[0]["SCHEDULED_DATE"].ToString() != "") { model.SCHEDULED_DATE = DateTime.Parse(dt.Rows[0]["SCHEDULED_DATE"].ToString()); } model.SCH_OPERATOR = dt.Rows[0]["SCH_OPERATOR"].ToString(); model.EXAM_NO = dt.Rows[0]["EXAM_NO"].ToString(); model.EXAM_ACCESSION_NUM = dt.Rows[0]["EXAM_ACCESSION_NUM"].ToString(); model.EXAM_CLASS = dt.Rows[0]["EXAM_CLASS"].ToString(); model.EXAM_SUB_CLASS = dt.Rows[0]["EXAM_SUB_CLASS"].ToString(); model.EXAM_ITEM = dt.Rows[0]["EXAM_ITEM"].ToString(); model.EXAM_MODE = dt.Rows[0]["EXAM_MODE"].ToString(); model.EXAM_GROUP = dt.Rows[0]["EXAM_GROUP"].ToString(); model.EXAM_DEPT_NAME = dt.Rows[0]["EXAM_DEPT_NAME"].ToString(); model.EXAM_DOCTOR = dt.Rows[0]["EXAM_DOCTOR"].ToString(); if (dt.Rows[0]["EXAM_INDEX"].ToString() != "") { model.EXAM_INDEX = int.Parse(dt.Rows[0]["EXAM_INDEX"].ToString()); } if (dt.Rows[0]["IS_ONLINE"].ToString() != "") { model.IS_ONLINE = int.Parse(dt.Rows[0]["IS_ONLINE"].ToString()); } if (dt.Rows[0]["IS_MATCHED"].ToString() != "") { model.IS_MATCHED = int.Parse(dt.Rows[0]["IS_MATCHED"].ToString()); } if (dt.Rows[0]["IS_PACKPROCESS"].ToString() != "") { model.IS_PACKPROCESS = int.Parse(dt.Rows[0]["IS_PACKPROCESS"].ToString()); } if (dt.Rows[0]["REPORT_STATUS"].ToString() != "") { model.REPORT_STATUS = int.Parse(dt.Rows[0]["REPORT_STATUS"].ToString()); } if (dt.Rows[0]["VERIFIED"].ToString() != "") { model.VERIFIED = int.Parse(dt.Rows[0]["VERIFIED"].ToString()); } model.APPROVER = dt.Rows[0]["APPROVER"].ToString(); model.CLIN_DIAG = dt.Rows[0]["CLIN_DIAG"].ToString(); model.CLIN_SYMP = dt.Rows[0]["CLIN_SYMP"].ToString(); model.RELEVANT_LAB_TEST = dt.Rows[0]["RELEVANT_LAB_TEST"].ToString(); model.RELEVANT_DIAG = dt.Rows[0]["RELEVANT_DIAG"].ToString(); model.PHYS_SIGN = dt.Rows[0]["PHYS_SIGN"].ToString(); model.STUDY_PATH = dt.Rows[0]["STUDY_PATH"].ToString(); model.VOLUME_KEY = dt.Rows[0]["VOLUME_KEY"].ToString(); model.DEVICE = dt.Rows[0]["DEVICE"].ToString(); return((IModel)model); } else { return(null); } }