예제 #1
0
        /// <summary>
        /// 获取病人病案记录和病案内容
        /// </summary>
        /// <param name="patlistid">病人Id</param>
        /// <param name="patDeptID">科室Id</param>
        /// <param name="patDeptName">科室名称</param>
        /// <param name="empid">人员ID</param>
        /// <param name="empName">人员姓名</param>
        public void GetMedicalCase(int patlistid, int patDeptID, string patDeptName, int empid, string empName)
        {
            _currpatlistid = patlistid;
            _patdeptid     = patDeptID;
            _patdeptname   = patDeptName;
            _empid         = empid;
            _empname       = empName;
            StreamReader stream = controller.OpenFile(patlistid);

            if (stream != null)
            {
                writerControl1.ExecuteCommand("FileOpen", false, stream);
            }
            else
            {
                //从文件中打开病案首页
                string fileName = Path.Combine(Application.StartupPath, "HomePageTempLate\\CaseTemplate.xml");
                writerControl1.ExecuteCommand("FileOpen", false, fileName);
            }
            //获取病人信息绑定数据源
            MedicalCasePatient casePatInfo = controller.GetCasePatInfoDataSource(patlistid);

            writerControl1.SetDocumentParameterValue("MedicalCasePatient", casePatInfo);

            //获取病人诊断信息绑定数据源
            MedicalCaseDiagoInfo caseDiagInfo = controller.GetCaseDiagInfo(patlistid);

            writerControl1.SetDocumentParameterValue("MedicalCaseDiagoInfo", caseDiagInfo);
            writerControl1.WriteDataFromDataSourceToDocument();
        }
예제 #2
0
        /// <summary>
        /// 获取绑定数据源信息
        /// </summary>
        /// <param name="patlistid">病人ID</param>
        /// <returns>病人信息数据</returns>
        public MedicalCaseDiagoInfo GetCaseDiagInfo(int patlistid)
        {
            MedicalCaseDbHelper  helper       = new MedicalCaseDbHelper();
            MedicalCaseDiagoInfo caseDiagInfo = helper.GetCaseDiagInfo(patlistid);

            return(caseDiagInfo);
        }
예제 #3
0
 /// <summary>
 /// 给实体属性赋值
 /// </summary>
 /// <param name="item">对象</param>
 /// <param name="propertyName">属性名称</param>
 /// <param name="propertyValue">属性值</param>
 private void SetPropertyValues(MedicalCaseDiagoInfo item, string propertyName, string propertyValue)
 {
     System.Reflection.PropertyInfo[] properties = item.GetType().GetProperties();
     for (int i = 0; i < properties.Length; i++)
     {
         if (properties[i].Name == propertyName)
         {
             properties[i].SetValue(item, propertyValue);
         }
     }
 }
예제 #4
0
        /// <summary>
        /// 获取病案首页诊断信息
        /// </summary>
        /// <param name="patlistID">病人Id</param>
        /// <returns>诊断信息</returns>
        public MedicalCaseDiagoInfo GetCaseDiagInfo(int patlistID)
        {
            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(patlistID);
            });
            ServiceResponseData  retdata  = InvokeWcfService("EMRDocProject.Service", "HomePageController", "GetCaseDiagInfo", requestAction);
            MedicalCaseDiagoInfo diagInfo = retdata.GetData <MedicalCaseDiagoInfo>(0);

            return(diagInfo);
        }
예제 #5
0
        public ServiceResponseData GetCaseDiagInfo()
        {
            int patlistid = requestData.GetData <int>(0);
            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.LoginRight = LoginUserInfo;
                request.AddData(patlistid);
            });
            ServiceResponseData  retdata      = InvokeWcfService("EMRHISInterface.Service", "EmrHomePageDataSourceController", "GetCaseDiagInfo", requestAction);
            DataTable            dtDiagInfo   = retdata.GetData <DataTable>(0);
            MedicalCaseDiagoInfo caseDiagInfo = new MedicalCaseDiagoInfo();

            if (dtDiagInfo.Rows.Count > 0)
            {
                int       opddiagId  = 0;
                int       mainDiagId = 0;
                DataRow[] rows       = dtDiagInfo.Select("Code='01'");
                if (rows.Length > 0)
                {
                    opddiagId = Convert.ToInt32(rows[0]["Id"]);
                    caseDiagInfo.OpdocDiagName = rows[0]["DiagnosisName"].ToString();
                    caseDiagInfo.OpdocDiagCode = rows[0]["ICDCode"].ToString();
                }

                rows = dtDiagInfo.Select("Main=1");
                if (rows.Length > 0)
                {
                    mainDiagId = Convert.ToInt32(rows[0]["Id"]);
                    caseDiagInfo.MainDiagName     = rows[0]["DiagnosisName"].ToString();
                    caseDiagInfo.MainDiagNameCode = rows[0]["ICDCode"].ToString();
                    caseDiagInfo.Rybq1            = rows[0]["Effect"].ToString();
                }

                int index = 2;
                for (int i = 0; i < dtDiagInfo.Rows.Count; i++)
                {
                    if (Convert.ToInt32(dtDiagInfo.Rows[i]["ID"]) != opddiagId && Convert.ToInt32(dtDiagInfo.Rows[i]["ID"]) != mainDiagId)
                    {
                        string zdname = "Cyzd" + index;
                        string zdcode = "CyzdCode" + index;
                        string rybq   = "Rybq" + index;
                        SetPropertyValues(caseDiagInfo, zdname, dtDiagInfo.Rows[i]["DiagnosisName"].ToString());
                        SetPropertyValues(caseDiagInfo, zdcode, dtDiagInfo.Rows[i]["ICDCode"].ToString());
                        SetPropertyValues(caseDiagInfo, rybq, dtDiagInfo.Rows[i]["Effect"].ToString());
                        index += 1;
                    }
                }
            }

            responseData.AddData(caseDiagInfo);
            return(responseData);
        }