Example #1
0
        private void cms_Add_Equ_Click(object sender, EventArgs e)
        {
            if (Now_Add_NodeID != "")
            {
                MessageBoxEx.Show("有新增项未保存!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            Now_Add_NodeID = ID.GetSeqValue().ToString();
            TreeNode TR = trv_ReportTempDict.SelectedNode;

            if (TR == null)
            {
                trv_ReportTempDict.Nodes.Insert(0, Now_Add_NodeID, "双击进行修改");
            }
            else
            {
                switch (TR.Level)
                {
                case 0:
                    trv_ReportTempDict.Nodes.Insert(0, Now_Add_NodeID, "双击进行修改");
                    break;

                case 1:
                    TR.Parent.Nodes.Insert(TR.Index - 1, Now_Add_NodeID, "双击进行修改");
                    break;

                case 2:
                    TR.Parent.Nodes.Insert(TR.Index - 1, Now_Add_NodeID, "双击进行修改");
                    break;
                }
            }
            trv_ReportTempDict.SelectedNode = trv_ReportTempDict.Nodes.Find(Now_Add_NodeID, true)[0];
        }
Example #2
0
        public void InitForm(string sPATIENT_ID, string sEXAM_ACCESSION_NUM)
        {
            mip.NOTE_ID            = Convert.ToInt32(ID.GetSeqValue());
            mip.PATIENT_ID         = sPATIENT_ID;
            mip.EXAM_ACCESSION_NUM = sEXAM_ACCESSION_NUM;
            MUser user = (MUser)frmMainForm.iUser;

            NowDoctorID   = user.DOCTOR_ID;
            mip.DOCTOR_ID = NowDoctorID;
        }
Example #3
0
        /// <summary>
        /// 搜索根结点
        /// </summary>
        public void RootSearch()
        {
            this.isInit = true;
            this.tree_Template.Nodes.Clear();
            NewMReporttemp           = null;
            CopyMReporttemp          = null;
            this.cmb_Part.DataSource = null;
            GetTreeNode gettreenode = new GetTreeNode(addTreeNode);
            //string sql = "select * from report_template_dict where EXAM_CLASS  = '" + GetConfig.RS_TempExamClass + "' " +
            //    "and (IS_PRIVATE = 0 or (IS_PRIVATE =1 and DOCTOR_ID = '" + ((SIS_Model.MUser)frmMainForm.iUser).DOCTOR_ID + "')) order by SORT_FLAG asc,NODE_ID asc";
            string sql = "select * from report_template_dict where(EXAM_CLASS  = '" + GetConfig.RS_TempExamClass + "' " +
                         " and IS_PRIVATE=0) or (IS_PRIVATE =1 and DOCTOR_ID = '" + ((SIS_Model.MUser)frmMainForm.iUser).DOCTOR_ID + "') order by SORT_FLAG asc,NODE_ID asc"; //可实现跨科显示个人模板

            rootDs = BReportTemp.GetTable(sql);                                                                                                                               // this.operate.getDataSet(, this.conn);

            DataRow[] dr     = rootDs.Tables[0].Select("NODE_PARENT_ID = 0 ");
            DataSet   dsRoot = new DataSet();

            dsRoot.Merge(dr);
            if (dsRoot.Tables.Count > 0)
            {
                TreeNode[] RootTree = new TreeNode[dsRoot.Tables[0].Rows.Count];
                for (int i = 0; i < dsRoot.Tables[0].Rows.Count; i++)
                {
                    RootTree[i]      = new TreeNode(dsRoot.Tables[0].Rows[i]["NODE_NAME"].ToString().Trim());
                    RootTree[i].Name = dsRoot.Tables[0].Rows[i]["NODE_ID"].ToString().Trim();
                    this.searchNode(dsRoot.Tables[0].Rows[i]["NODE_ID"].ToString().Trim(), RootTree[i]);
                }
                this.tree_Template.BeginInvoke(gettreenode, new object[] { RootTree, false });
                DataRow newdr = dsRoot.Tables[0].NewRow();
                dsRoot.Tables[0].Rows.InsertAt(newdr, 0);
                this.cmb_Part.DataSource    = dsRoot.Tables[0];
                this.cmb_Part.DisplayMember = "NODE_NAME";
                this.cmb_Part.ValueMember   = "NODE_ID";
            }
            else
            {
                TreeNode[] RootTree = new TreeNode[1];
                MReporttemp                = new MReportTempDict();
                MReporttemp.EXAM_CLASS     = GetConfig.RS_TempExamClass;
                MReporttemp.IS_PRIVATE     = 0;
                MReporttemp.NODE_DEPICT    = "";
                MReporttemp.NODE_ID        = Convert.ToInt32(ID.GetSeqValue());
                MReporttemp.NODE_NAME      = "新增部位分类";
                MReporttemp.NODE_PARENT_ID = 0;
                MReporttemp.NODE_SIGN      = "P";
                BReportTemp.Add(MReporttemp);
                RootTree[0]      = new TreeNode(MReporttemp.NODE_NAME);
                RootTree[0].Name = MReporttemp.NODE_ID.ToString();
                this.tree_Template.BeginInvoke(gettreenode, new object[] { RootTree, false });
            }
            this.isInit = false;
        }
Example #4
0
        /// <summary>
        /// 获取检查申请号
        /// </summary>
        /// <returns></returns>
        public string GetAccessionNo()
        {
            //生成ACCESSION_NO,EXAM_ACCESSION_NO,STUDY_INSTANCE_UID
            BGetSeqValue bGetSeqValue = new BGetSeqValue("PACS", "exam_accession_num_seq");

            return(bGetSeqValue.GetSeqValue());
        }
Example #5
0
        /// <summary>
        /// 生成新PATIENT_ID
        /// </summary>
        public string NewPatientID()
        {
            string       NewPatientID = "";
            BGetSeqValue bGetSeqValue = new BGetSeqValue("PACS", "patient_id_seq");
            string       P_seq_no     = bGetSeqValue.GetSeqValue();

            NewPatientID = GetConfig.RM_PatientIdHeader + P_seq_no;
            return(NewPatientID);
        }
Example #6
0
        /// <summary>
        /// 插入PATIENT_INF_LOCAL_ID新记录
        /// </summary>
        /// <param name="exam_times"></param>
        /// <returns></returns>
        public string InsertPatientInfLocalId(bool exam_times)
        {
            string P_local_id = "";

            if (GetConfig.LM_IsLocalMode != 2)
            {
                string seq = "EXAM_" + LocalIdClass + "_SEQ";
                //switch (GetConfig.DALAndModel)
                //{
                //    case "SIS":
                //        seq = "SEQ_EXAM_" + LocalIdClass;
                //        break;
                //    case "PACS":
                //        seq = "EXAM_" + LocalIdClass + "_SEQ";
                //        break;
                //}
                BGetSeqValue bGetAnyId = new BGetSeqValue(GetConfig.DALAndModel, seq);
                P_local_id = bGetAnyId.GetSeqValue();
            }
            if (exam_times)//确认收费时,检查次数为1,否则为0
            {
                this.ExamTimes = 1;
            }
            else
            {
                this.ExamTimes = 0;
            }
            iPatientInfLocalId = DALFactory.Model.CreateMPatientInfLocalId();
            switch (GetConfig.DALAndModel)
            {
            case "SIS":
                SIS_Model.MPatientInfLocalId smPatientInfLocalId = (SIS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                smPatientInfLocalId.PATIENT_ID       = this.patientId;
                smPatientInfLocalId.LOCAL_ID_CLASS   = this.LocalIdClass;
                smPatientInfLocalId.PATIENT_LOCAL_ID = P_local_id;
                smPatientInfLocalId.EXAM_TIMES       = this.ExamTimes;
                break;

            case "PACS":
                PACS_Model.MPatientInfLocalId pmPatientInfLocalId = (PACS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                pmPatientInfLocalId.PATIENT_ID       = this.patientId;
                pmPatientInfLocalId.LOCAL_ID_CLASS   = this.LocalIdClass;
                pmPatientInfLocalId.PATIENT_LOCAL_ID = P_local_id;
                pmPatientInfLocalId.EXAM_TIMES       = this.ExamTimes;
                break;
            }
            if (!this.bPatientInfLocalId.Exists(iPatientInfLocalId))
            {
                this.bPatientInfLocalId.Add(iPatientInfLocalId);
            }
            if (GetConfig.LM_IsLocalMode == 2)
            {
                return("");
            }
            return(P_local_id);
        }
Example #7
0
 private void cms_Add_Equ_Click(object sender, EventArgs e)
 {
     if (Now_Add_NodeID != "")
     {
         MessageBoxEx.Show("有新增项未保存!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     TreeNode treenode = null;
     Now_Add_NodeID = ID.GetSeqValue().ToString();
     TreeNode TR = trv_InterestPatient.SelectedNode;
     if (TR == null)
     {
         trv_InterestPatient.Nodes.Insert(0, Now_Add_NodeID, "双击进行修改");
     }
     else
     {
         if (TR.Level == 0)
             treenode = trv_InterestPatient.Nodes.Insert(0, Now_Add_NodeID, "双击进行修改");
         else
             treenode = TR.Parent.Nodes.Insert(TR.Index - 1, Now_Add_NodeID, "双击进行修改");
     }
     trv_InterestPatient.SelectedNode = treenode;
 }
Example #8
0
        private MReportTempDict NewTem(string NodeSign, int ParentId)
        {
            MReportTempDict tem = new MReportTempDict();
            BGetSeqValue    ID  = new BGetSeqValue("SIS", "SEQ_REPORT_TEMPLATE_NODE_ID");

            tem.NODE_ID        = Convert.ToInt32(ID.GetSeqValue());
            tem.NODE_SIGN      = NodeSign;
            tem.NODE_PARENT_ID = ParentId;
            if (this.txt_SortFlag.Text != "")
            {
                tem.SORT_FLAG = Convert.ToInt32(this.txt_SortFlag.Text);
            }
            tem.ICD10_CODE = this.txt_Icdcode.Text;
            tem.IS_PRIVATE = this.cmb_IsPrivate.SelectedIndex;
            tem.EXAM_CLASS = this.ClinicOfficeCode;
            if (tem.IS_PRIVATE == 1)
            {
                tem.DOCTOR_ID = ((SIS_Model.MUser)frmMainForm.iUser).DOCTOR_ID;
            }
            switch (NodeSign)
            {
            case "Y":
                tem.NODE_NAME   = this.txt_YNodeName.Text.ToString().Trim();
                tem.NODE_DEPICT = "";
                break;

            case "1":
                tem.NODE_NAME   = "检查所见";
                tem.NODE_DEPICT = this.txt_Description.Text;
                break;

            case "2":
                tem.NODE_NAME   = "诊断意见";
                tem.NODE_DEPICT = this.txt_Impression.Text;
                break;

            case "3":
                tem.NODE_NAME   = "检查内容";
                tem.NODE_DEPICT = this.txt_ExamPara.Text;
                break;

            case "4":
                tem.NODE_NAME   = "附注";
                tem.NODE_DEPICT = this.txt_Recommendation.Text;
                break;
            }
            return(tem);
        }
Example #9
0
        /// <summary>
        /// 生成新的检查号(不与病人绑定)
        /// </summary>
        /// <param name="isExit"></param>
        /// <returns></returns>
        public string NewPatietnLocalId(bool isExit)
        {
            string localId = "";

            if (GetConfig.LM_IsLocalMode == 0) //若是网络版(流水号断号)
            {
                if (!isExit)                   //PATIENT_INF_LOCAL_ID表中不存在该病人对该类检查类别和检查子类的记录,即为病人新做的检查。
                {
                    localId = this.InsertPatientInfLocalId(true);
                }
                else
                {
                    string seq = "EXAM_" + LocalIdClass + "_SEQ";
                    //switch (GetConfig.DALAndModel)
                    //{
                    //    case "SIS":
                    //        seq = "SEQ_EXAM_" + LocalIdClass;
                    //        break;
                    //    case "PACS":
                    //        seq = "EXAM_" + LocalIdClass + "_SEQ";
                    //        break;
                    //}
                    BGetSeqValue bGetAnyId = new BGetSeqValue(GetConfig.DALAndModel, seq);
                    localId = bGetAnyId.GetSeqValue();//取出相应序列的值
                }
                localId = this.CreateLocalId(localId, true);
            }
            else if (GetConfig.LM_IsLocalMode == 2)//不生成号
            {
                return("");
            }
            else
            {
                if (!isExit)
                {
                    this.InsertPatientInfLocalId(true);
                }
                localId = this.CreateLocalId("", false);
            }
            return(localId);
        }
Example #10
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            GvDept.Visible        = true;
            gb_PromptInfo.Visible = false;

            DataTable dt = (DataTable)GvDept.DataSource;

            if (dt == null)
            {
                GvDept.Rows.Add();
            }
            else
            {
                DataRow dr = dt.NewRow();
                dt.Rows.Add(dr);
                GvDept.DataSource = dt;
            }
            GvDept.Rows[GvDept.Rows.Count - 1].Cells["CLINIC_OFFICE_ID"].Value = ID.GetSeqValue();
            GvDept.CurrentCell = GvDept.Rows[GvDept.Rows.Count - 1].Cells["CLINIC_OFFICE_ID"];
            GvDept.Rows[GvDept.Rows.Count - 1].DefaultCellStyle.BackColor = Color.Linen;
            SetDataGridViewRowEditModel(GvDept.Rows.Count - 1);
        }
Example #11
0
        private void btn_Add_Click(object sender, EventArgs e)
        {
            dgv_Doctor.Visible         = true;
            this.gb_PromptInfo.Visible = false;
            DataTable dt = (DataTable)dgv_Doctor.DataSource;

            if (dt == null)
            {
                dgv_Doctor.Rows.Add();
            }
            else
            {
                DataRow dr = dt.NewRow();
                dt.Rows.Add(dr);
                dgv_Doctor.DataSource = dt;
            }

            dgv_Doctor.Rows[dgv_Doctor.Rows.Count - 1].Cells["CLINIC_DOCTOR_ID"].Value = ID.GetSeqValue();;

            this.dgv_Doctor.CurrentCell = dgv_Doctor.Rows[dgv_Doctor.Rows.Count - 1].Cells["CLINIC_DOCTOR"];
            dgv_Doctor.Rows[dgv_Doctor.Rows.Count - 1].DefaultCellStyle.BackColor = Color.Linen;
            SetDataGridViewRowEditModel(dgv_Doctor.Rows.Count - 1);
        }
Example #12
0
        private void CreateNewRow()
        {
            this.dgv_ImgEquipment.Visible = true;
            this.gb_PromptInfo.Visible    = false;
            DataTable dt = (DataTable)dgv_ImgEquipment.DataSource;

            if (dt == null)
            {
                dgv_ImgEquipment.Rows.Add();
            }
            else
            {
                DataRow dr = dt.NewRow();
                dt.Rows.Add(dr);
                dgv_ImgEquipment.DataSource = dt;
            }
            dgv_ImgEquipment.Rows[dgv_ImgEquipment.Rows.Count - 1].Cells["IMG_EQUIPMENT_ID"].Value = ID.GetSeqValue();
            this.dgv_ImgEquipment.CurrentCell = dgv_ImgEquipment.Rows[dgv_ImgEquipment.Rows.Count - 1].Cells["IMG_EQUIPMENT_NAME"];
            dgv_ImgEquipment.Rows[dgv_ImgEquipment.Rows.Count - 1].DefaultCellStyle.BackColor = Color.Linen;
            SetDataGridViewRowEditModel(dgv_ImgEquipment.Rows.Count - 1);
        }
Example #13
0
        public string GetExamNo()
        {
            BGetSeqValue bGetSeqValue = new BGetSeqValue("HIS", "exam_no_seq");

            return(bGetSeqValue.GetSeqValue());
        }
Example #14
0
 private void dgv_PatientSour_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
 {
     e.Row.Cells["PATIENT_SOURCE_ID"].Value = Convert.ToInt32(ID.GetSeqValue());
 }
Example #15
0
 private void GvFunClassOne_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
 {
     e.Row.Cells["MODEL_ID"].Value = Convert.ToInt16(ID.GetSeqValue());
 }
Example #16
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            MQcDeptManDict mqcMan = new MQcDeptManDict();
            DataRow        dr     = dtMan.Rows[0];

            mqcMan.QC_DATE = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-01"));
            BGetSeqValue ID = new BGetSeqValue("PACS", "SEQ_DEPT_MAN_KEY");

            mqcMan.DEPT_MAN_KEY = ID.GetSeqValue();

            mqcMan.RY_LICENCE = N_RY_LICENCE.Value;
            if (txt_DEDU_GIST_RY_LICENCE.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_RY_LICENCE = txt_DEDU_GIST_RY_LICENCE.Text.Trim();
            }
            mqcMan.TITLES = N_TITLES.Value;
            if (txt_DEDU_GIST_TITLES.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_TITLES = txt_DEDU_GIST_TITLES.Text.Trim();
            }
            mqcMan.POST_TRAIN = N_POST_TRAIN.Value;
            if (txt_DEDU_GIST_POST_TRAIN.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_POST_TRAIN = txt_DEDU_GIST_POST_TRAIN.Text.Trim();
            }

            mqcMan.CRITERION_INTEGRALITY = N_CRITERION_INTEGRALITY.Value;
            if (txt_DEDU_GIST_CRI_INT.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_CRI_INT = txt_DEDU_GIST_CRI_INT.Text.Trim();
            }
            mqcMan.MANAGEMENT_SYSTEM = N_MANAGEMENT_SYSTEM.Value;
            if (txt_DEDU_GIST_MAN_SYS.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_MAN_SYS = txt_DEDU_GIST_MAN_SYS.Text.Trim();
            }
            mqcMan.IMAGE_SYSTEM = N_IMAGE_SYSTEM.Value;
            if (txt_DEDU_GIST_IMAGE_SYS.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_IMAGE_SYS = txt_DEDU_GIST_IMAGE_SYS.Text.Trim();
            }
            mqcMan.PREVENTIVE_MEASURE = N_PREVENTIVE_MEASURE.Value;
            if (txt_DEDU_GIST_PRE_MEA.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_PRE_MEA = txt_DEDU_GIST_PRE_MEA.Text.Trim();
            }

            mqcMan.SERVICES_ITEMS = N_SERVICES_ITEMS.Value;
            if (txt_DEDU_GIST_SER_ITEMS.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_SER_ITEMS = txt_DEDU_GIST_SER_ITEMS.Text.Trim();
            }
            mqcMan.EMERGENCY_EXAM = N_EMERGENCY_EXAM.Value;
            if (txt_DEDU_GIST_EME_EXAM.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_EME_EXAM = txt_DEDU_GIST_EME_EXAM.Text.Trim();
            }
            mqcMan.DIAG_REPORT = N_DIAG_REPORT.Value;
            if (txt_DEDU_GIST_DIAG_RPT.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_DIAG_RPT = txt_DEDU_GIST_DIAG_RPT.Text.Trim();
            }

            mqcMan.MANAGEMENT = N_MANAGEMENT.Value;
            if (txt_DEDU_GIST_MANAGEMENT.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_MANAGEMENT = txt_DEDU_GIST_MANAGEMENT.Text.Trim();
            }
            mqcMan.REGISTER_STAT = N_REGISTER_STAT.Value;
            if (txt_DEDU_GIST_REG_STAT.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_REG_STAT = txt_DEDU_GIST_REG_STAT.Text.Trim();
            }
            mqcMan.OVERSEE_RESULT = N_OVERSEE_RESULT.Value;
            if (txt_DEDU_GIST_OS_RES.Text.Trim() != "")
            {
                mqcMan.DEDU_GIST_OS_RES = txt_DEDU_GIST_OS_RES.Text.Trim();
            }

            bool bl = bMan.Exists(mqcMan);

            if (bl)
            {
                int i = bMan.Update(mqcMan, " where  QC_DATE = to_date('" + this.DT_QCDate.Value.ToShortDateString() + "','yyyy-mm-dd')");
                if (i > 0)
                {
                    MessageBoxEx.Show("修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBoxEx.Show("修改失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                int j = bMan.Add(mqcMan);
                if (j > 0)
                {
                    MessageBoxEx.Show("添加成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBoxEx.Show("添加失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Example #17
0
        private void btn_Add_Click(object sender, EventArgs e)
        {
            this.dgv_GroupManage.Visible = true;
            this.gb_PromptInfo.Visible   = false;

            DataTable dt = (DataTable)dgv_GroupManage.DataSource;

            if (dt == null)
            {
                dgv_GroupManage.Rows.Add();
            }
            else
            {
                DataRow dr = dt.NewRow();
                dt.Rows.Add(dr);
                dgv_GroupManage.DataSource = dt;
            }
            this.dgv_GroupManage.CurrentCell = dgv_GroupManage.Rows[dgv_GroupManage.Rows.Count - 1].Cells["ROLE_NAME"];
            dgv_GroupManage.Rows[dgv_GroupManage.Rows.Count - 1].DefaultCellStyle.BackColor = Color.Linen;
            dgv_GroupManage.Rows[dgv_GroupManage.Rows.Count - 1].Cells["ROLE_ID"].Value     = ID.GetSeqValue();

            SetDataGridViewRowEditModel(dgv_GroupManage.Rows.Count - 1);
            dgv_GroupManage.BeginEdit(false);
        }
Example #18
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            this.GvFunClassThree.Visible = true;
            this.gb_PromptInfo.Visible   = false;
            DataTable dt = (DataTable)GvFunClassThree.DataSource;

            if (dt == null)
            {
                GvFunClassThree.Rows.Add();
            }
            else
            {
                DataRow dr = dt.NewRow();
                dt.Rows.Add(dr);
                GvFunClassThree.DataSource = dt;
            }
            GvFunClassThree.Rows[GvFunClassThree.Rows.Count - 1].Cells["MODEL_ID"].Value = Convert.ToInt32(ID.GetSeqValue());
            GvFunClassThree.CurrentCell = GvFunClassThree.Rows[GvFunClassThree.Rows.Count - 1].Cells["UP_MODEL_NAME"];
            GvFunClassThree.Rows[GvFunClassThree.Rows.Count - 1].DefaultCellStyle.BackColor = Color.Linen;
            SetDataGridViewRowEditModel(GvFunClassThree.Rows.Count - 1);
        }