/// <summary> /// 获取指定的文档信息组织医疗文档FTP路径 /// </summary> /// <param name="docInfo">文档信息</param> /// <param name="extension">文档扩展名</param> /// <returns>文档FTP路径</returns> public string GetFtpDocPath(MedDocInfo docInfo, string extension) { //链接病人根目录 StringBuilder ftpPath = new StringBuilder(); ftpPath.Append("/MEDDOC"); if (docInfo == null || docInfo.PATIENT_ID == null) { return(ftpPath.ToString()); } string szPatientID = docInfo.PATIENT_ID.PadLeft(10, '0'); for (int index = 0; index < 10; index += 2) { ftpPath.Append("/"); ftpPath.Append(szPatientID.Substring(index, 2)); } //链接就诊目录 ftpPath.Append("/"); ftpPath.Append(docInfo.VISIT_TYPE); if (docInfo.VISIT_TYPE == SystemData.VisitType.OP) { ftpPath.Append("_"); ftpPath.Append(docInfo.VISIT_TIME.ToString("yyyyMMddHHmmss")); } ftpPath.Append("_"); ftpPath.Append(docInfo.VISIT_ID); ftpPath.Append("/"); if (docInfo.EMR_TYPE == "HEREN") { ftpPath.Append(string.Format("{0}.{1}", docInfo.DOC_SETID, extension)); } else { ftpPath.Append(string.Format("{0}.{1}", docInfo.DOC_ID, extension)); } return(ftpPath.ToString()); }
/// <summary> /// 基本信息绑定 /// </summary> /// <param name="patVisitInfo"></param> /// <param name="docInfo"></param> /// <returns></returns> private static QcContentRecord CreateQcContentRecord(PatVisitInfo patVisitInfo, EMRDBLib.MedDocInfo docInfo) { EMRDBLib.Entity.QcContentRecord record = new EMRDBLib.Entity.QcContentRecord(); record.PatientID = patVisitInfo.PATIENT_ID; record.PatientName = patVisitInfo.PATIENT_NAME; record.VisitID = patVisitInfo.VISIT_ID; record.DocTypeID = docInfo.DOC_TYPE; record.Point = 0.0f; record.DocSetID = docInfo.DOC_SETID; record.DocTitle = docInfo.DOC_TITLE; record.ModifyTime = docInfo.MODIFY_TIME; record.BugCreateTime = DateTime.Now; record.CreateID = docInfo.CREATOR_ID; record.CreateName = docInfo.CREATOR_NAME; record.DocTime = docInfo.DOC_TIME; record.DocIncharge = patVisitInfo.INCHARGE_DOCTOR; record.DeptIncharge = patVisitInfo.DEPT_NAME; record.DeptCode = patVisitInfo.DEPT_CODE; return(record); }