Esempio n. 1
0
        /// <summary>
        /// 绑定病历信息
        /// </summary>
        /// <param name="patListId">病人id</param>
        /// <param name="dRow">数据行</param>
        private void BIndMedicalRecord(int patListId, DataRow dRow)
        {
            lblVisitNo.Text  = dRow["VisitNO"].ToString();
            lblRegDate.Text  = Convert.ToDateTime(dRow["RegDate"]).ToString("yyyy-MM-dd HH:mm");
            lblPatType.Text  = dRow["PatTypeName"].ToString();
            lblDeptName.Text = dRow["DocDeptName"].ToString();
            txtOName.Text    = dRow["PatName"].ToString();
            txtOSex.Text     = dRow["PatSex"].ToString();
            txtOAge.Text     = dRow["Age"].ToString();
            lblCardNo.Text   = dRow["CardNO"].ToString();
            txtOAddress.Text = dRow["Address"].ToString();
            txtOPhone.Text   = dRow["Mobile"].ToString();
            rtxtDisease.Text = dRow["DiseaseName"].ToString();
            OPD_MedicalRecord modelOMR = InvokeController("GetMedical", patListId) as OPD_MedicalRecord;

            if (modelOMR != null)
            {
                rtxtSymptoms.Text        = modelOMR.Symptoms;
                rtxtSicknessHistory.Text = modelOMR.SicknessHistory;
                rtxtPhysicalExam.Text    = modelOMR.PhysicalExam;
                rtxtAuxiliaryExam.Text   = modelOMR.AuxiliaryExam;
            }
            else
            {
                rtxtSymptoms.Text        = string.Empty;
                rtxtSicknessHistory.Text = string.Empty;
                rtxtPhysicalExam.Text    = string.Empty;
                rtxtAuxiliaryExam.Text   = string.Empty;
            }
        }
        public ServiceResponseData GetPatientOMRData()
        {
            int patListId = requestData.GetData <int>(0);
            OPD_MedicalRecord modelOMR = NewObject <OMRManager>().GetPatientOMRData(patListId);

            responseData.AddData(modelOMR);
            return(responseData);
        }
        public ServiceResponseData SaveOMRData()
        {
            OPD_MedicalRecord omrModel = requestData.GetData <OPD_MedicalRecord>(0);

            //更新当前医生ID
            NewObject <PrescriptionProcess>().UpdatePatCurrentDoctorID(omrModel.PatListID, omrModel.PresDoctorID, omrModel.PresDeptID);

            bool bRtn = NewObject <OMRManager>().SaveOMRData(omrModel);

            responseData.AddData(bRtn);
            return(responseData);
        }
        /// <summary>
        /// 拷贝病历
        /// </summary>
        /// <param name="currentPatId">当前病人id</param>
        /// <param name="hisPatListId">历史病人id</param>
        /// <param name="presDoctorID">处方医生Id</param>
        /// <param name="presDeptID">处方科室Id</param>
        private void CopyOMR(int currentPatId, int hisPatListId, int presDoctorID, int presDeptID)
        {
            //获取历史病人的病历
            List <OPD_MedicalRecord> omrList = NewObject <OPD_MedicalRecord>().getlist <OPD_MedicalRecord>("PatListID=" + hisPatListId);

            //存在病历记录再复制
            if (omrList.Count > 0)
            {
                //当前存在病历
                List <OPD_MedicalRecord> omrCurrList = NewObject <OPD_MedicalRecord>().getlist <OPD_MedicalRecord>("PatListID=" + currentPatId);
                OPD_MedicalRecord        copyModel   = NewObject <OPD_MedicalRecord>();

                //存在病历记录 更新
                if (omrCurrList.Count > 0)
                {
                    copyModel                 = omrCurrList[0];
                    copyModel.Symptoms        = omrList[0].Symptoms;
                    copyModel.SicknessHistory = omrList[0].SicknessHistory;
                    copyModel.PhysicalExam    = omrList[0].PhysicalExam;
                }
                else
                {
                    //不存在那么 创建
                    OP_PatList patModel = NewObject <OP_PatList>().getmodel(currentPatId) as OP_PatList;
                    copyModel.Symptoms        = omrList[0].Symptoms;
                    copyModel.SicknessHistory = omrList[0].SicknessHistory;
                    copyModel.PhysicalExam    = omrList[0].PhysicalExam;
                    copyModel.PatListID       = currentPatId;
                    copyModel.PresDeptID      = presDeptID;
                    copyModel.PresDoctorID    = presDoctorID;
                    copyModel.MemberID        = patModel.MemberID;
                }

                this.BindDb(copyModel);
                copyModel.save();
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 保存病历
        /// </summary>
        /// <param name="omrModel">病历实体</param>
        /// <returns>true成功</returns>
        public bool SaveOMRData(OPD_MedicalRecord omrModel)
        {
            //查询病历表
            List <OPD_MedicalRecord> ormList = NewObject <OPD_MedicalRecord>().getlist <OPD_MedicalRecord>("PatListID=" + omrModel.PatListID);
            //查询挂号表
            OP_PatList op = (OP_PatList)NewObject <OP_PatList>().getmodel(omrModel.PatListID);

            if (ormList.Count > 0)
            {
                //主键赋值
                omrModel.MedicalRecordID = ormList[0].MedicalRecordID;
            }
            //会员Id
            omrModel.MemberID = op.MemberID;
            this.BindDb(omrModel);
            int iRtn = omrModel.save();

            if (iRtn > 0)
            {
                return(true);
            }

            return(false);
        }
Esempio n. 6
0
        /// <summary>
        /// 加载默认勾选项网格数据
        /// </summary>
        public void InitdgData()
        {
            if (UpdateData != null)
            {
                if (ApplyType == ApplyControl.SelectedTabIndex.ToString())
                {
                    var       cbDepts = GetDeptObj();
                    DataTable dt      = new DataTable();
                    dt.Columns.Add("ExamItemID");
                    dt.Columns.Add("ExamItemName");
                    dt.Columns.Add("Price");
                    dt.Columns.Add("Amount");

                    //if (ApplyType == "2")
                    //{
                    //    dt.Columns.Add("Amount");
                    //}
                    dt.Columns.Add("ExecuteDeptName");
                    dt.Columns.Add("ApplyStatus");
                    dt.Columns.Add("DelFlag");
                    for (int i = 0; i < UpdateData.Rows.Count; i++)
                    {
                        DataRow newdr = dt.NewRow();
                        newdr["ExamItemID"]      = UpdateData.Rows[i]["ItemID"];
                        newdr["ExamItemName"]    = UpdateData.Rows[i]["ItemName"];
                        newdr["Price"]           = UpdateData.Rows[i]["Price"];
                        newdr["ExecuteDeptName"] = cbDepts.Text;
                        newdr["Amount"]          = UpdateData.Rows[i]["Amount"];

                        //if (ApplyType == "2")
                        //{
                        //    newdr["Amount"] = UpdateData.Rows[i]["Amount"];
                        //}
                        newdr["ApplyStatus"] = GetStatuName(UpdateData.Rows[i]["ApplyStatu"].ToString(), UpdateData.Rows[i]["IsReturns"].ToString());
                        newdr["DelFlag"]     = "移除";
                        dt.Rows.Add(newdr);
                    }

                    SetExecItem(dt);
                    InitProperty();
                }

                switch (ApplyType)
                {
                case "0":
                    dateTimeCheck.Text = UpdateData.Rows[0]["CheckDate"].ToString();
                    break;

                case "1":
                    datetimeHY.Text = UpdateData.Rows[0]["CheckDate"].ToString();
                    break;

                case "2":
                    dateTimeZL.Text = UpdateData.Rows[0]["CheckDate"].ToString();
                    break;
                }
            }
            else
            {
                if (SystemType == 0)
                {
                    OPD_MedicalRecord medical = InvokeController("GetMedical", PatListID) as OPD_MedicalRecord;
                    if (medical != null)
                    {
                        txtDigest.Text = medical.SicknessHistory;
                    }
                }
                else
                {
                    txtDigest.Text = string.Empty;
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 查询病历信息
        /// </summary>
        /// <param name="patListId">病人Id</param>
        /// <returns>病历信息实体</returns>
        public OPD_MedicalRecord GetPatientOMRData(int patListId)
        {
            OPD_MedicalRecord model = NewObject <OPD_MedicalRecord>().getlist <OPD_MedicalRecord>("PatListID = " + patListId).FirstOrDefault();

            return(model);
        }