Пример #1
0
 private void RejectApply()
 {
     if (_applyData != null)
     {
         ApplyHISDB.RejectApply(_applyData.申请关联ID);
     }
 }
Пример #2
0
        /// <summary>
        /// 显示一个检查申请
        /// </summary>
        /// <param name="strOrderID">HIS的医嘱ID</param>
        private void ShowOneApply(string strOrderID)
        {
            SetButtonState(ButtonState.bsNormal);
            DataRow[] drs1 = _dtHIS.Select("医嘱ID = " + strOrderID);

            if (drs1.Length >= 1)
            {
                //将医嘱的其他信息,附加到datarow中
                DataTable dt = ApplyHISDB.GetOrderInfo(strOrderID);
                drs1[0]["附加内容"] = dt.Rows[0]["附加内容"];
                drs1[0]["临床诊断"] = dt.Rows[0]["临床诊断"];
                GetHISDataFromDataRow(drs1[0], out _applyData, out _patData);
                applyControl.RefreshApplyData(_applyData, _patData, null, Apply.ApplyControl.ApplyAction.aaReceive);
            }
        }
Пример #3
0
 private bool ReceiveHisApply(string strOrderID)
 {
     try
     {
         //将数据提取到PACS表中
         if (applyControl.SaveApply(Apply.ApplyControl.ApplyAction.aaReceive) == true)
         {
             //通知HIS
             ApplyHISDB.ReceiveApply(strOrderID);
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         MsgBox.ShowException(ex, this);
         return(false);
     }
 }
Пример #4
0
        private bool NewApply()
        {
            Dictionary <string, string> applyInfo   = new Dictionary <string, string>();
            Dictionary <string, string> patientInfo = new Dictionary <string, string>();

            try
            {
                frmNewStudy newStudyForm = new frmNewStudy(_dbQuery);

                newStudyForm.ShowDialog();
                if (newStudyForm.DialogResult == DialogResult.OK)
                {
                    //从界面提取申请信息


                    //添加检查项目信息
                    string         strItemID       = newStudyForm.ItemID;
                    string         strOrderContent = newStudyForm.OrderContent;
                    JApplyExamItem oneExamItem     = newStudyForm.oneExamItem;
                    string         strBodyparts    = newStudyForm.Bodyparts;
                    string         strModality     = newStudyForm.Modality;
                    ApplyData      appExamItem     = new ApplyData();

                    appExamItem.影像类别           = strModality;
                    appExamItem.申请项目ID         = strItemID;
                    appExamItem.申请信息.检查项目      = new JApplyExamItem();
                    appExamItem.申请信息.检查项目.项目名称 = strOrderContent;
                    appExamItem.申请信息.检查项目      = oneExamItem;
                    applyControl.SetNewExamItem(appExamItem);

                    ApplyPACSDB.NewApply(_applyData);

                    //设置传给HIS的信息
                    applyInfo.Add("Order_ID", "0");       //传空
                    applyInfo.Add("Patient_ID", "0");
                    applyInfo.Add("Patient_Source", "3"); //外诊
                    applyInfo.Add("Page_ID", "0");
                    applyInfo.Add("Reg_NO", "");
                    applyInfo.Add("App_Dept_ID", "0");      //必填
                    applyInfo.Add("App_Doctor", "Doc");     //必填
                    applyInfo.Add("App_Date", DateTime.Now.ToString());
                    applyInfo.Add("Clinic_Item_ID", "758"); //strItemID
                    applyInfo.Add("Body_Part_Method", strBodyparts);
                    applyInfo.Add("Order_Content", strOrderContent);
                    applyInfo.Add("Emergency", "0");

                    patientInfo.Add("Patient_ID", "0");//传空
                    patientInfo.Add("Patient_Name", _patData.姓名);
                    patientInfo.Add("Patient_Sex", _patData.患者信息.性别);
                    patientInfo.Add("Birthday", _patData.患者信息.出生日期);
                    patientInfo.Add("Patient_Age", "");
                    patientInfo.Add("Patient_Race", _patData.患者信息.民族);
                    patientInfo.Add("Marital_Status", _patData.患者信息.婚姻状况);
                    patientInfo.Add("Patient_Career", _patData.患者信息.职业);
                    patientInfo.Add("ID_Card", _patData.身份证号);
                    patientInfo.Add("Address", _patData.患者信息.OftenContact.地址);
                    patientInfo.Add("Phone_Num", _patData.患者信息.OftenContact.电话);
                    patientInfo.Add("Zip_Code", _patData.患者信息.OftenContact.邮编);
                    patientInfo.Add("Fee_Type", "");     //费别
                    patientInfo.Add("Payment_Type", ""); //医疗付款方式
                    patientInfo.Add("Patient_Nation", _patData.患者信息.国家);

                    ApplyHISDB.NewApply(applyInfo, patientInfo);
                }
                return(true);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
                return(false);
            }
        }
Пример #5
0
        /// <summary>
        /// 从HIS数据库查询申请信息
        /// </summary>
        /// <returns></returns>
        private DataTable GetHisApply()
        {
            DataTable dt = null;
            Dictionary <string, object> dicKeys = new Dictionary <string, object>();
            string strOrderIDs;
            string strOutOrderIDs = "";

            try
            {
                if (txtNumber.Text != "")
                {
                    dicKeys.Add(cboNumber.Text, txtNumber.Text);
                }
                if (txtName.Text != "")
                {
                    dicKeys.Add("姓名", txtName.Text);
                }
                if (dtDate.Text != "")
                {
                    dicKeys.Add("开嘱时间", Convert.ToDateTime(dtDate.Text));
                }
                if (dicKeys.Count == 0)
                {
                    MessageBox.Show("请先选择一个查询条件后,再点击“查询”按钮。");
                    return(null);
                }

                dt = ApplyHISDB.GetApply(dicKeys);

                if (chkRev.Checked == false && dt != null)
                {
                    //获取到HIS返回的数据集后,需要跟PACS的数据比对,只显示PACS没有接收的数据
                    //每次查询的记录数量在1000条以下,oracle in()的限制
                    //循环dt,获取医嘱ID串
                    strOrderIDs = "";
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        strOrderIDs = strOrderIDs + "," + dt.Rows[i]["医嘱ID"].ToString();
                        if (i % 1000 == 0 && i != 0)
                        {
                            //查询一次PACS数据库
                            strOrderIDs    = strOrderIDs.Substring(2);
                            strOutOrderIDs = strOutOrderIDs + "," + ApplyPACSDB.GetPacsApplyByOrderID(strOrderIDs);
                            strOrderIDs    = "";
                        }
                    }
                    if (strOrderIDs.Length > 0)
                    {
                        //再查询一次数据库
                        strOrderIDs    = strOrderIDs.Substring(2);
                        strOutOrderIDs = strOutOrderIDs + "," + ApplyPACSDB.GetPacsApplyByOrderID(strOrderIDs);
                    }
                    if (strOutOrderIDs.Length > 1)
                    {
                        foreach (DataRow dtRow in dt.Rows)
                        {
                            if (strOutOrderIDs.IndexOf("," + dtRow["医嘱ID"].ToString()) > 0)
                            {
                                dt.Rows.Remove(dtRow);
                            }
                        }
                    }
                }
                return(dt);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
                return(null);
            }
        }