/// <summary>
        /// 从实体中获取数据形成数组
        /// </summary>
        /// <param name="Diag"></param>
        /// <returns></returns>
        private string[] myGetItemParm(Neusoft.HISFC.Models.HealthRecord.Diagnose Diag)
        {
            string[] strParm = new string[13];
            String   isMain  = "";

            if (Diag.DiagInfo.IsMain)
            {
                isMain = "1";
            }
            else
            {
                isMain = "0";
            }
            strParm[0]  = Diag.DiagInfo.Patient.ID;            // 住院流水号
            strParm[1]  = Diag.DiagInfo.HappenNo.ToString();   // 发生序号
            strParm[2]  = Diag.DiagInfo.Patient.Card.ID;       //就诊卡号
            strParm[3]  = Diag.DiagInfo.DiagType.ID;           // 诊断类别
            strParm[4]  = Diag.DiagInfo.ICD10.ID;              // 诊断ICD码
            strParm[5]  = Diag.DiagInfo.ICD10.Name;            // 诊断名称
            strParm[6]  = Diag.DiagInfo.ICD10.SpellCode;       // 诊断拼音
            strParm[7]  = isMain;                              // 是否主诊断1是0否
            strParm[8]  = Diag.Pvisit.PatientLocation.Dept.ID; // 患者科室
            strParm[9]  = this.Operator.ID;                    // 操作员
            strParm[10] = this.GetSysDateTime().ToString();    // 操作时间
            strParm[11] = Diag.DiagInfo.DiagDate.ToString();   // 诊断时间
            strParm[12] = Diag.DiagInfo.Doctor.ID;             // 诊断医生

            return(strParm);
        }
        /// <summary>
        /// 获取出院主诊断
        /// </summary>
        /// <param name="inpatientNo">住院流水号</param>
        /// <returns>主诊断数组</returns>
        public ArrayList GetOutMainDiagnose(string inpatientNo)
        {
            ArrayList myArr        = null;            //存放该住院流水号所有诊断信息
            ArrayList mainDiagNose = new ArrayList(); //存放出院主诊断信息

            myArr = this.QueryDiagnoseBoth(inpatientNo);
            Neusoft.HISFC.Models.HealthRecord.Diagnose tempDiagNose = null;
            #region 查询出院主诊断,插入数组
            for (int i = 0; i < myArr.Count; i++)
            {
                tempDiagNose = (Neusoft.HISFC.Models.HealthRecord.Diagnose)myArr[i];

                #region 判断是否出院主诊断

                if (tempDiagNose.DiagInfo.User03 == "医保")             //是否医保诊断
                {
                    if (tempDiagNose.DiagInfo.IsMain)                 //是否主诊断
                    {
                        if (tempDiagNose.DiagInfo.DiagType.ID == "1") //诊断类型是否是主诊断(出院诊断)
                        {
                            mainDiagNose.Add(tempDiagNose);
                        }
                    }
                }
                #endregion
            }
            #endregion
            return(mainDiagNose);
        }
        /// <summary>
        /// 修改医保诊断
        /// </summary>
        /// <param name="dg">Neusoft.HISFC.Models.HealthRecord.Diagnose</param>
        /// <returns>成功0 失败-1</returns>
        public int UpdateDiagnoseMedicare(Neusoft.HISFC.Models.HealthRecord.Diagnose dg)
        {
            String strSQL = "";

            if (this.Sql.GetSql("CASE.DiagnoseMedicare.Update.1", ref strSQL) == -1)
            {
                return(-1);
            }
            string[] strParm = this.myGetItemParm(dg);
            return(this.ExecNoQuery(strSQL, strParm));
        }
示例#4
0
        /// <summary>
        /// 获取诊断
        /// </summary>
        protected string GetDiagnose(Neusoft.HISFC.Models.RADT.PatientInfo patientInfo)
        {
            Neusoft.HISFC.BizLogic.HealthRecord.Diagnose diag = new Neusoft.HISFC.BizLogic.HealthRecord.Diagnose();
            if (patientInfo.CaseState == "1" || patientInfo.CaseState == "2")
            {
                //从医生站录入的信息中查询
                ArrayList diagList = diag.QueryCaseDiagnose(patientInfo.ID, "%", Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC);
                if (diagList != null && diagList.Count > 0)
                {
                    Neusoft.HISFC.Models.HealthRecord.Diagnose obj = diagList[0] as Neusoft.HISFC.Models.HealthRecord.Diagnose;
                    return(obj.DiagInfo.ICD10.Name);
                }
            }

            return("");
        }
        private ArrayList myQuery(string strSQL)
        {
            ArrayList arrl = new ArrayList();

            Neusoft.HISFC.Models.HealthRecord.Diagnose diags;
            this.ExecQuery(strSQL);

            try
            {
                while (this.Reader.Read())
                {
                    diags = new Neusoft.HISFC.Models.HealthRecord.Diagnose();

                    diags.DiagInfo.Patient.ID            = this.Reader[0].ToString();                                                //住院流水号
                    diags.DiagInfo.HappenNo              = Neusoft.FrameWork.Function.NConvert.ToInt32(this.Reader[1].ToString());   //发生序号
                    diags.DiagInfo.Patient.Card.ID       = this.Reader[2].ToString();                                                //就诊卡号
                    diags.DiagInfo.DiagType.ID           = this.Reader[3].ToString();                                                //诊断类别
                    diags.DiagInfo.ICD10.ID              = this.Reader[4].ToString();                                                //诊断ICD码
                    diags.DiagInfo.ICD10.Name            = this.Reader[5].ToString();                                                //诊断名称
                    diags.DiagInfo.ICD10.SpellCode       = this.Reader[6].ToString();                                                //诊断拼音
                    diags.DiagInfo.IsMain                = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[7].ToString()); //是否主诊断
                    diags.Pvisit.PatientLocation.Dept.ID = this.Reader[8].ToString();                                                //患者科室
                    diags.ID = this.Reader[9].ToString();                                                                            //操作员
                    diags.OperInfo.OperTime  = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[10].ToString());           //操作时间
                    diags.DiagInfo.DiagDate  = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[11].ToString());           //诊断时间
                    diags.DiagInfo.Doctor.ID = this.Reader[12].ToString();                                                           //诊断医生
                    diags.DiagInfo.User03    = this.Reader[13].ToString();                                                           //诊断代码类别 '医保';'ICD10'
                    diags.OperType           = this.Reader[14].ToString();                                                           //类别 1 医生站录入诊断  2 病案室录入诊断
                    arrl.Add(diags);
                }
                this.Reader.Close();
            }
            catch (Exception ex)
            {
                this.Err = "获得医保病案诊断信息出错![MET_COM_DIAGNOSE_MEDICARE]" + ex.Message;
                this.WriteErr();
                if (!this.Reader.IsClosed)
                {
                    this.Reader.Close();
                }
            }

            this.Reader.Close();

            return(arrl);
        }
示例#6
0
 /// <summary>
 /// 更新病案诊断记录
 /// </summary>
 /// <param name="dgMc">Neusoft.HISFC.Models.HealthRecord.Diagnose</param>
 /// <returns>int 0 成功 -1 失败</returns>
 public int UpdateDiagnose(Neusoft.HISFC.Models.HealthRecord.Diagnose dg)
 {
     this.SetDB(diagMgr);
     return(diagMgr.UpdateDiagnose(dg));
 }
示例#7
0
 /// <summary>
 /// 插入病案诊断信息
 /// </summary>
 /// <param name="Item">Neusoft.HISFC.Models.HealthRecord.Diagnose</param>
 /// <returns>int 0 成功 -1 失败</returns>
 public int InsertDiagnose(Neusoft.HISFC.Models.HealthRecord.Diagnose Item)
 {
     this.SetDB(diagMgr);
     return(diagMgr.InsertDiagnose(Item));
 }
        /// <summary>
        /// 获取修改过的信息
        /// </summary>
        /// <returns></returns>
        private ArrayList GetChangeInfo()
        {
            ArrayList list = new ArrayList();

            try
            {
                Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBase dia = new Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBase();
                Neusoft.HISFC.Models.HealthRecord.Diagnose info = null;
                for (int i = 0; i < this.fpEnter1_Sheet1.RowCount; i++)
                {
                    info = new Neusoft.HISFC.Models.HealthRecord.Diagnose();
                    info.DiagInfo.Patient.ID = inpatientNo;
                    //诊断类别
                    info.DiagInfo.DiagType.ID = diagnoseTypeHelper.GetID(this.fpEnter1_Sheet1.Cells[i, (int)Cols.diagType].Text);
                    info.DiagInfo.ICD10.ID    = fpEnter1_Sheet1.Cells[i, (int)Cols.ICDCode].Text;//2
                    //if (info.DiagInfo.DiagType.ID == "1") //将主诊断设置成
                    //{

                    //}
                    //else
                    //{
                    //    info.DiagInfo.IsMain = false;
                    //}
                    info.DiagInfo.ICD10.Name = fpEnter1_Sheet1.Cells[i, (int)Cols.ICDName].Text;
                    //if (row["出院情况"] != DBNull.Value)
                    //{
                    info.DiagOutState = diagOutStateListHelper.GetID(fpEnter1_Sheet1.Cells[i, (int)Cols.outState].Text); //3
                    //}
                    //if (row["有无手术"] != DBNull.Value)
                    //{
                    info.OperationFlag = OperListHelper.GetID(fpEnter1_Sheet1.Cells[i, (int)Cols.Operation].Text);
                    //}

                    //if ()//5
                    //{
                    info.Is30Disease = Neusoft.FrameWork.Function.NConvert.ToInt32(ConvertBool(fpEnter1_Sheet1.Cells[i, (int)Cols.disease].Value)).ToString();
                    //}
                    //else
                    //{
                    //    info.Is30Disease = "0";
                    //}
                    //if (ConvertBool(row["病理符合"]))//6
                    //{
                    info.CLPA = Neusoft.FrameWork.Function.NConvert.ToInt32(ConvertBool(fpEnter1_Sheet1.Cells[i, (int)Cols.clpa].Value)).ToString();
                    //}
                    //else
                    //{
                    //info.CLPA = "0";
                    //}
                    //if (row["分级"] != DBNull.Value)
                    //{
                    info.LevelCode = LeveListHelper.GetID(fpEnter1_Sheet1.Cells[i, (int)Cols.levelCode].Text); //7
                    //}
                    //if (row["分期"] != DBNull.Value)
                    //{
                    info.PeriorCode = PeriorListHelper.GetID(fpEnter1_Sheet1.Cells[i, (int)Cols.perionCode].Text);//8
                    //}
                    //if (ConvertBool(row["是否疑诊"]))//9
                    //{
                    info.DubDiagFlag     = Neusoft.FrameWork.Function.NConvert.ToInt32(ConvertBool(fpEnter1_Sheet1.Cells[i, (int)Cols.dubdiag].Value)).ToString();;
                    info.DiagInfo.IsMain = ConvertBool(fpEnter1_Sheet1.Cells[i, (int)Cols.mainDiag].Value);
                    //}
                    //else
                    //{
                    //    info.DubDiagFlag = "0";
                    //}
                    info.DiagInfo.HappenNo = i;
                    info.DiagInfo.DiagDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(fpEnter1_Sheet1.Cells[i, (int)Cols.diagTime].Text); //11
                    info.Pvisit.InTime     = Neusoft.FrameWork.Function.NConvert.ToDateTime(fpEnter1_Sheet1.Cells[i, (int)Cols.inTime].Text);   //12
                    info.Pvisit.OutTime    = Neusoft.FrameWork.Function.NConvert.ToDateTime(fpEnter1_Sheet1.Cells[i, (int)Cols.outTime].Text);  //13
                    if (frmType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC)
                    {
                        info.OperType = "1";
                    }
                    else if (frmType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS)
                    {
                        info.OperType = "2";
                    }

                    if (fpEnter1_Sheet1.Cells[i, 0].Tag != null)
                    {
                        Neusoft.HISFC.Models.HealthRecord.Diagnose obj = (Neusoft.HISFC.Models.HealthRecord.Diagnose)fpEnter1_Sheet1.Cells[i, 0].Tag;
                        info.DiagInfo.Doctor = obj.DiagInfo.Doctor;
                    }
                    else
                    {
                        info.DiagInfo.Doctor.ID   = deptMgr.Operator.ID;
                        info.DiagInfo.Doctor.Name = deptMgr.Operator.Name;
                    }
                    list.Add(info);
                }
                return(list);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(null);
            }
        }
示例#9
0
 /// <summary>
 /// 生成诊断列表
 /// </summary>
 /// <param name="arr"></param>
 private void FillList(ArrayList arr)
 {
     this.InitDiagnoseList();
     try
     {
         Neusoft.HISFC.Models.HealthRecord.Diagnose diagns = null;
         Neusoft.HISFC.Models.Base.Spell            dsType = null;
         Neusoft.HISFC.Models.Base.Employee         emp    = null;
         String    strDsType   = "";
         String    strDsTypeID = "";
         String    strDrName   = "";
         String    mainFlag    = "";
         ArrayList dsTypeList  = Neusoft.HISFC.Models.HealthRecord.DiagnoseType.SpellList();
         ArrayList drList      = this.managerIntegrate.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
         for (int i = 0; i < arr.Count; i++)
         {
             diagns = (Neusoft.HISFC.Models.HealthRecord.Diagnose)arr[i];
             //填入诊断类型中文名称
             for (int j = 0; j < dsTypeList.Count; j++)
             {
                 dsType = (Neusoft.HISFC.Models.Base.Spell)dsTypeList[j];
                 if (dsType.ID.ToString() == diagns.DiagInfo.DiagType.ID)
                 {
                     strDsType   = dsType.Name;
                     strDsTypeID = dsType.ID;
                     break;
                 }
             }
             //填入诊断医生姓名
             for (int j = 0; j < drList.Count; j++)
             {
                 emp = (Neusoft.HISFC.Models.Base.Employee)drList[j];
                 if (emp.ID.ToString() == diagns.DiagInfo.Doctor.ID)
                 {
                     strDrName = emp.Name;
                     break;
                 }
             }
             //是否主诊断
             if (diagns.DiagInfo.IsMain)
             {
                 mainFlag = "1";
             }
             else
             {
                 mainFlag = "0";
             }
             ListViewItem item1 = listView1.Items.Add("");
             item1.SubItems.Add(strDsType);                                    // 诊断类型
             item1.SubItems.Add(diagns.DiagInfo.ICD10.Name);                   // 诊断名称
             item1.SubItems.Add(strDrName);                                    // 诊断医师
             item1.SubItems.Add(diagns.DiagInfo.DiagDate.ToShortDateString()); // 诊断时间
             item1.SubItems.Add("");                                           // 状态?
             item1.SubItems.Add(diagns.DiagInfo.HappenNo.ToString());          // 发生序号
             item1.SubItems.Add(diagns.OperType);                              // 操作类型
             item1.SubItems.Add(diagns.DiagInfo.ICD10.ID);                     //ICD代码
             item1.SubItems.Add(diagns.DiagInfo.User03);                       //ICD类别 'ICD10';'医保(市)';'医保(省)'
             item1.SubItems.Add(mainFlag);                                     //MAIN_FLAG 是否主诊断1是0否
             if (strDsTypeID == "1" && mainFlag == "1" && diagns.DiagInfo.User03 == "医保")
             {
                 item1.ForeColor = Color.Red;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Language.Msg("生成诊断信息列表出错!" + ex.Message));
         this.listView1.Clear();
         return;
     }
 }
        void Neusoft.HISFC.BizProcess.Interface.HealthRecord.HealthRecordInterface.ControlValue(Neusoft.HISFC.Models.HealthRecord.Base obj)
        {
            #region 赋值
            Neusoft.HISFC.BizLogic.HealthRecord.Base      baseDml    = new Neusoft.HISFC.BizLogic.HealthRecord.Base();
            Neusoft.HISFC.BizLogic.HealthRecord.DeptShift deptMger   = new Neusoft.HISFC.BizLogic.HealthRecord.DeptShift();
            Neusoft.HISFC.BizLogic.HealthRecord.Fee       feeCaseMgr = new Neusoft.HISFC.BizLogic.HealthRecord.Fee();
            Neusoft.HISFC.Models.HealthRecord.Base        myItem     = obj as Neusoft.HISFC.Models.HealthRecord.Base;

            this.payKindCbx.Text = GetPaykindForCaseFirst(myItem.PatientInfo.Pact.ID); // myItem.PatientInfo.Pact.Name;//.PayKind.ID;//付费方式、
            this.cardNO.Text     = myItem.PatientInfo.PID.CardNO;                      //门诊卡号
            this.xNO.Text        = myItem.XNum;                                        //X光号

            this.InpatientNO.Text    = myItem.PatientInfo.PID.PatientNO;               //住院号
            this.medCardTextBox.Text = myItem.PatientInfo.SSN;                         //社保号
            txtInHosNo.Text          = myItem.PatientInfo.InTimes.ToString();          //入院次数
            //this.inpatientNOTextBox.Text = myItem.PatientInfo.ID; //住院流水号
            this.nameTextBox.Text = myItem.PatientInfo.Name;                           //姓名
            this.sexComboBox.Text = myItem.PatientInfo.Sex.Name;                       //性别
            if (myItem.PatientInfo.Sex.ID.ToString() == "M")
            {
                sexComboBox.Text = "1";
            }
            else if (myItem.PatientInfo.Sex.ID.ToString() == "F")
            {
                sexComboBox.Text = "2";
            }
            //if(myItem.PatientInfo.MainDiagnose.ToString()!= null)
            if (myItem.PatientInfo.ClinicDiagnose != null)
            {
                this.inDiagComboBox.Text = myItem.PatientInfo.ClinicDiagnose.ToString(); //住院诊断
            }
            this.birYear.Text    = myItem.PatientInfo.Birthday.Year.ToString();          //出生日期
            this.birMon.Text     = myItem.PatientInfo.Birthday.Month.ToString();         //出生日期
            this.birDay.Text     = myItem.PatientInfo.Birthday.Day.ToString();           //出生日期
            this.ageTextBox.Text = this.inpatientManager.GetAge(myItem.PatientInfo.Birthday);
            //this.ageTextBox.Text = myItem.PatientInfo.Age;//年龄
            //this.marryComboBox.Tag = myItem.PatientInfo.MaritalStatus.ID;//婚姻状况

            switch (myItem.PatientInfo.MaritalStatus.ID.ToString())
            {
            case "M":
                marryTextBox.Text = "2";
                break;

            case "W":
                marryTextBox.Text = "4";
                break;

            case "A":
                marryTextBox.Text = "3";
                break;

            case "D":
                marryTextBox.Text = "3";
                break;

            case "R":
                marryTextBox.Text = "2";
                break;

            case "S":
                marryTextBox.Text = "1";
                break;
            }
            //marryTextBox.Text = myItem.PatientInfo.ClinicDiagnose.ToString();// MaritalStatus.ID.ToString();
            this.neuComboBox1.Tag  = myItem.PatientInfo.Profession.ID;
            this.workComboBox.Text = this.neuComboBox1.Text;
            //this.workComboBox.Tag = myItem.PatientInfo.Profession.ID;//职业
            //this.workComboBox.Text = myItem.PatientInfo.Profession.Name;

            this.birthInComboBox1.Tag = myItem.PatientInfo.AreaCode; //出生地
            //this.birthInComboBox.Text = this.birthInComboBox1.Text;
            this.birthInComboBox.Text = myItem.PatientInfo.AreaCode; //出生地
            //switch (myItem.PatientInfo.Nationality.ID.ToString())
            //{
            //    case "1":
            //        this.nationComboBox.Text = "汉族";
            //}


            this.nationComboBox1.Tag   = myItem.PatientInfo.Nationality.ID;     //.ID;//民族
            this.nationComboBox.Text   = this.nationComboBox1.Text;             //myItem.PatientInfo.Country.ToString();
            this.districtComboBox.Text = myItem.PatientInfo.Country.ToString(); //国籍
            //this.districtComboBox.Text = myItem.PatientInfo.DIST; //籍贯
            this.IDTextBox.Text         = myItem.PatientInfo.IDCard;            //身份证
            this.workAdressTextBox.Text = myItem.PatientInfo.AddressBusiness;;  //工作单位地址
            this.workPhoneTextBox.Text  = myItem.PatientInfo.PhoneBusiness;     //工作单位电话
            this.workZipTextBox.Text    = myItem.PatientInfo.BusinessZip;       //邮编 
            this.homeAdTextBox.Text     = myItem.PatientInfo.AddressHome;       //家庭住址
            this.homeZipTextBox.Text    = myItem.PatientInfo.HomeZip;           //邮编 
            this.linkNameTextBox.Text   = myItem.PatientInfo.Kin.Name;          //联系人名称
            //this.relationComboBox.Tag = myItem.PatientInfo.Kin.RelationLink;//联系人关系
            this.neuComboBox2.Tag      = myItem.PatientInfo.Kin.Relation.ID;    // PatientInfo.Kin.RelationLink;
            this.relationComboBox.Text = myItem.PatientInfo.Kin.Relation.Name;  //联系人关系

            //this.relationComboBox.Text =  myItem.PatientInfo.Kin.Relation.Name;
            this.linkAdressTextBox.Text = myItem.PatientInfo.Kin.RelationAddress; //联系人地址 有待考察;
            this.linkPhoneTextBox.Text  = myItem.PatientInfo.Kin.RelationPhone;   //联系人电话 有待考察;

            //由变更表获取 入院科室
            Neusoft.HISFC.Models.RADT.Location indept = baseDml.GetDeptIn(myItem.PatientInfo.ID);
            if (indept != null) //入院科室
            {
                //入院科室代码
                inDeptComboBox.Tag = indept.Dept.ID;
                //入院科室名称
                inDeptComboBox.Text = indept.Dept.Name;
            }
            else
            {
                this.inDeptComboBox.Tag  = myItem.PatientInfo.PVisit.PatientLocation.Dept.ID;
                this.inDeptComboBox.Text = myItem.PatientInfo.PVisit.PatientLocation.Dept.Name;
            }
            //由变更表获取 出院科室
            Neusoft.HISFC.Models.RADT.Location outDept = baseDml.GetDeptOut(myItem.PatientInfo.ID);
            if (outDept != null)
            {
                this.outDeptComboBox.Tag  = outDept.Dept.ID;
                this.outDeptComboBox.Text = outDept.Dept.Name;
            }

            this.CYear2.Text     = myItem.PatientInfo.PVisit.InTime.Year.ToString();  //入院时间
            this.CMon2.Text      = myItem.PatientInfo.PVisit.InTime.Month.ToString(); //入院时间
            this.CDay2.Text      = myItem.PatientInfo.PVisit.InTime.Day.ToString();   //入院时间
            this.neuLabel21.Text = myItem.PatientInfo.PVisit.Circs.ID;                //入院情况

            //出院时间不等于最小时间且患者状态为 出院登记状态
            if (myItem.PatientInfo.PVisit.OutTime != System.DateTime.MinValue && myItem.PatientInfo.PVisit.InState.ID.ToString() == "B")
            {
                this.OutYear.Text = myItem.PatientInfo.PVisit.OutTime.Year.ToString();  //出院日期
                this.OutMon.Text  = myItem.PatientInfo.PVisit.OutTime.Month.ToString(); //出院日期
                this.OutDay.Text  = myItem.PatientInfo.PVisit.OutTime.Day.ToString();   //出院日期
            }
            this.ClinicDiag.Text     = myItem.ClinicDiag.Name;                          //门诊诊断
            this.inDiagComboBox.Text = myItem.InHospitalDiag.Name;                      //入院诊断

            #region 暂时不用 打印的时候 不需要打印人员
            //				houseDocComboBox.Tag = myItem.PatientInfo.PVisit.AdmittingDoctor.ID ;
            //				houseDocTextBox.Text = myItem.PatientInfo.PVisit.AdmittingDoctor.ID ;
            //				//住院医师姓名
            //				houseDocComboBox.Text = myItem.PatientInfo.PVisit.AdmittingDoctor.Name;
            //				//主治医师代码
            //				chargeDocComboBox.Tag = myItem.PatientInfo.PVisit.AttendingDoctor.ID;
            //				chargeDocComboBox.Text = myItem.PatientInfo.PVisit.AttendingDoctor.Name;
            //				chargeDocTextBox.Text =  myItem.PatientInfo.PVisit.AttendingDoctor.ID;
            //				//主任医师代码
            //				chiefDocComboBox.Tag = myItem.PatientInfo.PVisit.ConsultingDoctor.ID;
            //				chiefDocComboBox.Text = myItem.PatientInfo.PVisit.ConsultingDoctor.Name;
            //				chiefDocTextBox.Text = myItem.PatientInfo.PVisit.ConsultingDoctor.ID;
            //				//科主任代码
            //				//			info.PVisit.ReferringDoctor.ID
            //				//进修医师代码
            //				refDocComboBox.Tag = myItem.RefresherDocd;
            //				refDocTextBox.Text = myItem.RefresherDocd;
            //				refDocComboBox.Text = myItem.RefresherDonm;
            //				//研究生实习医师代码
            //				graDocComboBox.Tag = myItem.GraDocCode;
            //				graDocComboBox.Text = myItem.GraDocName;
            //				//实习医师代码
            //				praDocComboBox.Tag = myItem.PraDocCode;
            //				praDocComboBox.Text = myItem.PraDocName;
            #endregion

            //if (this.OutYear.Text != "1")
            //{
            //    int inDays = (int)new System.TimeSpan(myItem.PatientInfo.PVisit.OutTime.Ticks
            //        - myItem.PatientInfo.PVisit.InTime.Ticks).TotalDays;
            //    if (inDays > 0)
            //        this.inDaysTextBox.Text = inDays.ToString();//住院天数
            //}
            //else
            //{
            //    this.inDaysTextBox.Text = "";
            //}
            this.inDaysTextBox.Text = myItem.InHospitalDays.ToString();//住院天数


            //this.inSourceComboBox.Tag = myItem.PatientInfo.PVisit.InSource.ID;//入院来源


            //诊断信息
            Neusoft.HISFC.BizLogic.HealthRecord.Diagnose diag = new Neusoft.HISFC.BizLogic.HealthRecord.Diagnose();
            ArrayList alDiag = new ArrayList();

            //中日只能医生录入病案
            alDiag = diag.QueryCaseDiagnose(myItem.PatientInfo.ID, "%", Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC);
            if (alDiag.Count > 0)
            {
                Neusoft.HISFC.Models.HealthRecord.Diagnose diagNose = new Neusoft.HISFC.Models.HealthRecord.Diagnose();

                //foreach (Neusoft.HISFC.Models.HealthRecord.Diagnose diagNose in alDiag)
                #region 诊断赋值
                int row = 0;
                for (int i = 0; i < alDiag.Count; i++)
                {
                    diagNose = alDiag[i] as Neusoft.HISFC.Models.HealthRecord.Diagnose;
                    if (diagNose.DiagInfo.IsMain)
                    {
                        this.mainDiagICD.Text  = diagNose.DiagInfo.ICD10.ID;
                        this.MainDiagName.Text = diagNose.DiagInfo.ICD10.Name;
                        switch (diagNose.DiagOutState)
                        {
                        case "1":
                            this.MainDiag1.Text = "√";
                            break;

                        case "2":
                            this.MainDiag2.Text = "√";
                            break;

                        case "3":
                            this.MainDiag3.Text = "√";
                            break;

                        case "4":
                            this.MainDiag4.Text = "√";
                            break;

                        case "5":
                            this.MainDiag5.Text = "√";
                            break;
                        }
                    }
                    else if (diagNose.DiagInfo.DiagType.ID == "6")//病理诊断
                    {
                        this.txtDiagClPa.Text = diagNose.DiagInfo.ICD10.Name;
                    }
                    else if (diagNose.DiagInfo.DiagType.ID == "10")//门诊诊断
                    {
                        this.ClinicDiag.Text = diagNose.DiagInfo.ICD10.Name;
                    }
                    else if (diagNose.DiagInfo.DiagType.ID == "11")//入院诊断
                    {
                        this.inDiagComboBox.Text = diagNose.DiagInfo.ICD10.Name;
                    }
                    else if (diagNose.DiagInfo.DiagType.ID == "4")
                    {
                        this.txtInfectionPosition.Text += diagNose.DiagInfo.ICD10.Name + " ";
                    }
                    else
                    {
                        if (i > 6)
                        {
                            continue;
                        }
                        row = row + 1;
                        switch (row)
                        {
                        case 1:
                            this.otherDiagName1.Text = diagNose.DiagInfo.ICD10.Name;
                            this.otherDiagCode1.Text = diagNose.DiagInfo.ICD10.ID;
                            switch (diagNose.DiagOutState)
                            {
                            case "1":
                                this.otherDiag11.Text = "√";
                                break;

                            case "2":
                                this.otherDiag12.Text = "√";
                                break;

                            case "3":
                                this.otherDiag13.Text = "√";
                                break;

                            case "4":
                                this.otherDiag14.Text = "√";
                                break;

                            case "5":
                                this.otherDiag15.Text = "√";
                                break;
                            }
                            break;

                        case 2:
                            this.otherDiagName2.Text = diagNose.DiagInfo.ICD10.Name;
                            this.otherDiagCode2.Text = diagNose.DiagInfo.ICD10.ID;
                            switch (diagNose.DiagOutState)
                            {
                            case "1":
                                this.otherDiag21.Text = "√";
                                break;

                            case "2":
                                this.otherDiag22.Text = "√";
                                break;

                            case "3":
                                this.otherDiag23.Text = "√";
                                break;

                            case "4":
                                this.otherDiag24.Text = "√";
                                break;

                            case "5":
                                this.otherDiag25.Text = "√";
                                break;
                            }
                            break;

                        case 3:
                            this.otherDiagName3.Text = diagNose.DiagInfo.ICD10.Name;
                            this.otherDiagCode3.Text = diagNose.DiagInfo.ICD10.ID;
                            switch (diagNose.DiagOutState)
                            {
                            case "1":
                                this.otherDiag31.Text = "√";
                                break;

                            case "2":
                                this.otherDiag32.Text = "√";
                                break;

                            case "3":
                                this.otherDiag33.Text = "√";
                                break;

                            case "4":
                                this.otherDiag34.Text = "√";
                                break;

                            case "5":
                                this.otherDiag35.Text = "√";
                                break;
                            }
                            break;

                        case 4:
                            this.otherDiagName4.Text = diagNose.DiagInfo.ICD10.Name;
                            this.otherDiagCode4.Text = diagNose.DiagInfo.ICD10.ID;
                            switch (diagNose.DiagOutState)
                            {
                            case "1":
                                this.otherDiag41.Text = "√";
                                break;

                            case "2":
                                this.otherDiag42.Text = "√";
                                break;

                            case "3":
                                this.otherDiag43.Text = "√";
                                break;

                            case "4":
                                this.otherDiag44.Text = "√";
                                break;

                            case "5":
                                this.otherDiag45.Text = "√";
                                break;
                            }
                            break;

                        case 5:
                            this.otherDiagName5.Text = diagNose.DiagInfo.ICD10.Name;
                            this.otherDiagCode5.Text = diagNose.DiagInfo.ICD10.ID;
                            switch (diagNose.DiagOutState)
                            {
                            case "1":
                                this.otherDiag51.Text = "√";
                                break;

                            case "2":
                                this.otherDiag52.Text = "√";
                                break;

                            case "3":
                                this.otherDiag53.Text = "√";
                                break;

                            case "4":
                                this.otherDiag54.Text = "√";
                                break;

                            case "5":
                                this.otherDiag55.Text = "√";
                                break;
                            }
                            break;

                        case 6:
                            this.otherDiagName6.Text = diagNose.DiagInfo.ICD10.Name;
                            this.otherDiagCode6.Text = diagNose.DiagInfo.ICD10.ID;
                            switch (diagNose.DiagOutState)
                            {
                            case "1":
                                this.otherDiag61.Text = "√";
                                break;

                            case "2":
                                this.otherDiag62.Text = "√";
                                break;

                            case "3":
                                this.otherDiag63.Text = "√";
                                break;

                            case "4":
                                this.otherDiag64.Text = "√";
                                break;

                            case "5":
                                this.otherDiag65.Text = "√";
                                break;
                            }
                            break;

                        case 7:
                            this.otherDiagName7.Text = diagNose.DiagInfo.ICD10.Name;
                            this.otherDiagCode7.Text = diagNose.DiagInfo.ICD10.ID;
                            switch (diagNose.DiagOutState)
                            {
                            case "1":
                                this.otherDiag71.Text = "√";
                                break;

                            case "2":
                                this.otherDiag72.Text = "√";
                                break;

                            case "3":
                                this.otherDiag73.Text = "√";
                                break;

                            case "4":
                                this.otherDiag74.Text = "√";
                                break;

                            case "5":
                                this.otherDiag75.Text = "√";
                                break;
                            }
                            break;
                        }
                    }
                }

                #endregion
            }

            //this.txtInfectionPosition.Text = myItem.InfectionPosition.Name;//感染部位名称
            if (string.IsNullOrEmpty(myItem.FirstAnaphyPharmacy.Name))//药物过敏1
            {
                myItem.FirstAnaphyPharmacy.Name = "";
            }
            if (string.IsNullOrEmpty(myItem.SecondAnaphyPharmacy.Name))//药物过敏2
            {
                myItem.SecondAnaphyPharmacy.Name = "";
            }
            txtAnaphyFlag.Text = myItem.FirstAnaphyPharmacy.Name + " " + myItem.SecondAnaphyPharmacy.Name;

            if (string.IsNullOrEmpty(myItem.Hbsag))
            {
                myItem.Hbsag = "00";
            }
            if (string.IsNullOrEmpty(myItem.HcvAb))
            {
                myItem.HcvAb = "00";
            }
            if (string.IsNullOrEmpty(myItem.HivAb))
            {
                myItem.HivAb = "00";
            }
            if (string.IsNullOrEmpty(myItem.CePi))
            {
                myItem.CePi = "00";
            }
            if (string.IsNullOrEmpty(myItem.ClPa))
            {
                myItem.ClPa = "00";
            }
            if (string.IsNullOrEmpty(myItem.PiPo))
            {
                myItem.PiPo = "00";
            }
            if (string.IsNullOrEmpty(myItem.OpbOpa))
            {
                myItem.OpbOpa = "00";
            }
            if (string.IsNullOrEmpty(myItem.FsBl))
            {
                myItem.FsBl = "00";
            }

            this.HbsAg.Text            = myItem.Hbsag.Substring(myItem.Hbsag.Length - 1);
            this.HCVAb.Text            = myItem.HcvAb.Substring(myItem.Hbsag.Length - 1);
            this.HIVAb.Text            = myItem.HivAb.Substring(myItem.Hbsag.Length - 1);
            this.txtCepi.Text          = myItem.CePi.Substring(myItem.Hbsag.Length - 1);   //门诊与出院
            this.txtClPa.Text          = myItem.ClPa.Substring(myItem.Hbsag.Length - 1);   //临床_病理符合
            this.txtPiPo.Text          = myItem.PiPo.Substring(myItem.Hbsag.Length - 1);   //入出_院符合
            this.txtOpbOpa.Text        = myItem.OpbOpa.Substring(myItem.Hbsag.Length - 1); //术前_后符合
            this.txtFsBl.Text          = myItem.FsBl.Substring(myItem.Hbsag.Length - 1);   //放射_病理符合
            this.txtSalvTimes.Text     = myItem.SalvTimes.ToString();                      //抢救次数
            this.txtSuccTimes.Text     = myItem.SuccTimes.ToString();                      //成功次数
            this.txtDeptChiefDonm.Text = myItem.PatientInfo.PVisit.ReferringDoctor.Name;   //科主任
            this.txtChiefDocName.Text  = myItem.PatientInfo.PVisit.ConsultingDoctor.Name;  //主任医师
            this.txtChargeDocName.Text = myItem.PatientInfo.PVisit.AttendingDoctor.Name;   //主治医师
            this.RefresherDoc.Text     = myItem.RefresherDoc.Name;                         //进修医生
            this.txtGraDocName.Text    = myItem.GraduateDoc.Name;                          //研究生实习医生
            this.txtHouseDocName.Text  = myItem.PatientInfo.PVisit.AdmittingDoctor.Name;   //住院医师
            this.txtPraDocCode.Text    = myItem.PatientInfo.PVisit.TempDoctor.Name;        //实习医师
            this.txtCodingCode.Text    = myItem.CodingOper.Name;                           //编码员

            #endregion

            ////保存转科信息的列表
            //ArrayList changeDept = new ArrayList();
            ////获取转科信息
            //changeDept = deptMger.QueryChangeDeptFromShiftApply(myItem.PatientInfo.ID, "2");
            //LoadChangeDept(changeDept);

            //ArrayList alOrg = new ArrayList();
            //Neusoft.HISFC.BizLogic.HealthRecord.Diagnose diag = new Neusoft.HISFC.BizLogic.HealthRecord.Diagnose();
            //alOrg = diag.QueryCaseDiagnose(myItem.PatientInfo.ID, "%", Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC);
        }
示例#11
0
        /// <summary>
        /// 住院检查
        /// </summary>
        /// <param name="patient"></param>
        /// <param name="orderList"></param>
        public void ControlValue(Neusoft.HISFC.Models.RADT.Patient patient, List <Neusoft.HISFC.Models.Order.Inpatient.Order> orderList)
        {
            this.neuSpread1_Sheet1.Cells[0, 0].Value = this.mgrIntegrate.GetHospitalName() + orderList[0].Item.Name.ToString() + "检查申请单";

            if (orderList[0].IsEmergency)
            {
                this.neuSpread1_Sheet1.Cells[0, 9].Value         = "加  急";//加急
                this.neuSpread1_Sheet1.Cells.Get(0, 9).ForeColor = System.Drawing.Color.Red;
            }
            if (orderList[0].BeginTime != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 1].Value = orderList[0].BeginTime.ToString();//申请日期
            }
            if (patient.PID.PatientNO != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 5].Value = patient.PID.PatientNO.ToString();//住院号
            }
            if (patient.Pact.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[2, 9].Value = patient.Pact.Name.ToString();//费用类别
            }
            if (patient.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 1].Value = patient.Name.ToString();//姓名
            }
            if (patient.Sex != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 3].Value = patient.Sex.ToString();//性别
            }
            if (patient.Age != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 5].Value = patient.Age.ToString();//年龄
            }
            if (orderList[0].NurseStation.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 7].Value = orderList[0].NurseStation.Name.ToString();//病区
            }
            if (orderList[0].Patient.PVisit.PatientLocation.Bed.ID != null)
            {
                this.neuSpread1_Sheet1.Cells[3, 9].Value = orderList[0].Patient.PVisit.PatientLocation.Bed.ID.ToString();//床号
            }
            Neusoft.HISFC.Models.Fee.Item.Undrug undrug = new Neusoft.HISFC.Models.Fee.Item.Undrug();

            Neusoft.HISFC.BizLogic.Fee.Item item = new Neusoft.HISFC.BizLogic.Fee.Item();

            undrug = item.GetValidItemByUndrugCode(orderList[0].Item.ID.ToString());

            if (undrug.CheckRequest != null)
            {
                this.neuSpread1_Sheet1.Cells[4, 1].Value = undrug.CheckRequest.ToString();//检查部位/要求
            }
            #region  诊断(代码摘自ucDiagnosis FillList())
            Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBaseMC diagnoseMgrMc = new Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBaseMC();
            Neusoft.HISFC.BizProcess.Integrate.Manager managerIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Manager();

            Neusoft.HISFC.Models.HealthRecord.Diagnose diagns = null;
            Neusoft.HISFC.Models.Base.Spell            dsType = null;
            Neusoft.HISFC.Models.Base.Employee         emp    = null;

            //ArrayList diagnoseList = diagnoseMgrMc.QueryDiagnoseBoth(orderList[0].Patient.PVisit.PatientLocation.Bed.InpatientNO.ToString());
            ArrayList diagnoseList = diagnoseMgrMc.QueryDiagnoseBoth(orderList[0].Patient.ID);
            ArrayList dsTypeList   = Neusoft.HISFC.Models.HealthRecord.DiagnoseType.SpellList();
            ArrayList drList       = managerIntegrate.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
            String    strDsType    = "";
            String    strDrName    = "";
            string    diag         = string.Empty;
            if (diagnoseList != null)
            {
                for (int i = 0; i < diagnoseList.Count; i++)
                {
                    diagns = (Neusoft.HISFC.Models.HealthRecord.Diagnose)diagnoseList[i];
                    for (int j = 0; j < dsTypeList.Count; j++)
                    {
                        dsType = (Neusoft.HISFC.Models.Base.Spell)dsTypeList[j];
                        if (dsType.ID.ToString() == diagns.DiagInfo.DiagType.ID)
                        {
                            strDsType = dsType.Name;//诊断类型
                            break;
                        }
                    }
                    //填入诊断医生姓名
                    for (int j = 0; j < drList.Count; j++)
                    {
                        emp = (Neusoft.HISFC.Models.Base.Employee)drList[j];
                        if (emp.ID.ToString() == diagns.DiagInfo.Doctor.ID)
                        {
                            strDrName = emp.Name;
                            break;
                        }
                    }
                    if (i == 0)
                    {
                        diag = "[" + strDsType + "-" + diagns.DiagInfo.ICD10.Name.ToString() + "-" + strDrName + "]";
                    }
                    else
                    {
                        diag = diag + "[" + strDsType + "-" + diagns.DiagInfo.ICD10.Name.ToString() + "-" + strDrName + "]";
                    }
                }
            }
            this.neuSpread1_Sheet1.Cells[9, 1].Value = diag;
            #endregion

            if (orderList[0].ReciptDoctor.Name != null)
            {
                this.neuSpread1_Sheet1.Cells[19, 1].Value = orderList[0].Memo.ToString();//备注
            }
            if (orderList[0].Memo != null)
            {
                this.neuSpread1_Sheet1.Cells[25, 9].Value = orderList[0].ReciptDoctor.Name.ToString();//医师
            }
            if (undrug.Notice != null)
            {
                this.neuSpread1_Sheet1.Cells[22, 1].Value = undrug.Notice.ToString();//注意事项
            }
        }