public void UpdateInpatient(Inpatient patientToUpdate)
        {
            var inpatient = _context.Inpatients.Find(patientToUpdate.PersonId);

            inpatient.FirstName              = patientToUpdate.FirstName;
            inpatient.MiddleInitial          = patientToUpdate.MiddleInitial;
            inpatient.LastName               = patientToUpdate.LastName;
            inpatient.Address                = patientToUpdate.Address;
            inpatient.City                   = patientToUpdate.City;
            inpatient.State                  = patientToUpdate.State;
            inpatient.Zip                    = patientToUpdate.Zip;
            inpatient.Email                  = patientToUpdate.Email;
            inpatient.PhoneNumber            = patientToUpdate.PhoneNumber;
            inpatient.BirthDate              = patientToUpdate.BirthDate;
            inpatient.MedicalRecordNumber    = patientToUpdate.MedicalRecordNumber;
            inpatient.ContactPersonId        = patientToUpdate.ContactPersonId;
            inpatient.ContactRelationship    = patientToUpdate.ContactRelationship;
            inpatient.SubscriberPersonId     = patientToUpdate.SubscriberPersonId;
            inpatient.SubscriberRelationship = patientToUpdate.SubscriberRelationship;
            inpatient.DateOfContact          = patientToUpdate.DateOfContact;
            inpatient.InsuranceCompanyName   = patientToUpdate.InsuranceCompanyName;
            inpatient.InsurancePhoneNumber   = patientToUpdate.InsurancePhoneNumber;
            inpatient.PolicyNumber           = patientToUpdate.PolicyNumber;
            inpatient.GroupNumber            = patientToUpdate.GroupNumber;
            inpatient.BedId                  = patientToUpdate.BedId;
            inpatient.DateAdmitted           = patientToUpdate.DateAdmitted;
            inpatient.DischargeDate          = patientToUpdate.DischargeDate;
            inpatient.WardId                 = patientToUpdate.WardId;
            _context.SaveChanges();
        }
Exemple #2
0
 /// <summary>
 /// .ctor
 /// </summary>
 public ChangeMacroFrom(IEmrHost app, PadForm padForm, Inpatient inpatient)
 {
     InitializeComponent();
     m_App              = app;
     m_CurrentPadForm   = padForm;
     m_CurrentInpatient = inpatient;
 }
Exemple #3
0
        /// <summary>
        /// dll调用方式
        /// </summary>
        public static void PacsDll(Inpatient m_CurrentInpatient)
        {
            try
            {
                int nPatientType = 2; //患者类型(1.门诊号 2.住院号)
                int LookType     = 1; //类型(1.图像 2.报告)

                if (CheckPackIsExist())
                {
                    try
                    {
                        if (PacsView(nPatientType, m_CurrentInpatient.NoOfHisFirstPage, LookType) != 1)
                        {
                            MessageBox.Show("调用失败");
                        }
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
 /// <summary>
 /// 对外PACS调用方法
 /// </summary>
 /// <param name="currinpatient"></param>
 public static void PacsAll(Inpatient m_CurrentInpatient)
 {
     try
     {
         string valuestr = DrectSoft.Service.DS_SqlService.GetConfigValueByKey("PACSRevision");
         valuestr = valuestr.ToLower();
         if (valuestr == "dll")  //dll调用方式
         {
             PacsDll(m_CurrentInpatient);
         }
         else if (valuestr == "exe") //exe调用方式
         {
             PacsExe(m_CurrentInpatient);
         }
         else if (valuestr == "url") //url浏览方式
         {
             PacsUrl(m_CurrentInpatient);
         }
         else
         {
             MessageBox.Show("没有对接PSCS接口!");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #5
0
 public HistoryEMRBLL(IEmrHost host, Inpatient currentPatient, RecordDal recordDal, string sortid)
 {
     m_Host           = host;
     m_CurrentPatient = currentPatient;
     m_RecordDal      = recordDal;
     m_SortID         = sortid;
 }
Exemple #6
0
        public new void Load(IEmrHost app)
        {
            try
            {
                _app = app;

                if (!string.IsNullOrEmpty(CurrentNoofinpat))
                {
                    CurrentInpatient = new Inpatient(Convert.ToDecimal(CurrentNoofinpat));
                }
                else if (_app.CurrentPatientInfo != null)
                {
                    CurrentInpatient = _app.CurrentPatientInfo;
                }
                else
                {
                    return;
                }

                CurrentInpatient.ReInitializeAllProperties();

                this.dateBegin.DateTime = DateTime.Now.AddMonths(-1);
                this.dateEnd.DateTime   = DateTime.Now;
                string begintime        = dateBegin.DateTime.ToString("yyyy-MM-dd");
                string endtime          = dateEnd.DateTime.ToString("yyyy-MM-dd");
                string NoOfHisFirstPage = CurrentInpatient.NoOfHisFirstPage.ToString();
                GetInpatientSouce(begintime, endtime, NoOfHisFirstPage);
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Exemple #7
0
        /// <summary>
        /// .ctor
        /// </summary>
        //public ChangeMacroFrom(IEmrHost app, PadForm padForm, Inpatient inpatient)
        //{
        //    InitializeComponent();
        //    m_App = app;
        //    m_CurrentPadForm = padForm;
        //    m_CurrentInpatient = inpatient;
        //}

        /// <summary>
        /// 适用新版
        /// edit by ywk 2013年9月5日 09:15:31
        /// </summary>
        /// <param name="app"></param>
        /// <param name="padForm"></param>
        /// <param name="inpatient"></param>
        public ChangeMacroFrom(IEmrHost app, EditorForm editForm, Inpatient inpatient)
        {
            InitializeComponent();
            m_App              = app;
            m_CurEditForm      = editForm;
            m_CurrentInpatient = inpatient;
        }
Exemple #8
0
        /// <summary>
        /// 确定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_OK_Click(object sender, EventArgs e)
        {
            try
            {
                //设置当前病人(修复m_App病人丢失问题)
                if (null == m_App || null == m_App.CurrentPatientInfo || m_App.CurrentPatientInfo.NoOfFirstPage.ToString() != m_IemInfo.IemBasicInfo.NoOfInpat)
                {
                    CurrentInpatient = DS_SqlService.GetPatientInfo(m_IemInfo.IemBasicInfo.NoOfInpat);
                }
                else
                {
                    CurrentInpatient = m_App.CurrentPatientInfo;
                }

                GetUI();
                if (null != CurrentInpatient)
                {
                    CurrentInpatient.ReInitializeAllProperties();
                }
                IemMainPageManger manger = new IemMainPageManger(m_App, CurrentInpatient);
                manger.SaveData(m_IemInfo);

                //add by cyq 2012-12-05 病案室人员编辑后状态改为已归档
                if (editFlag)
                {
                    DS_BaseService.SetRecordsRebacked(int.Parse(CurrentInpatient.NoOfFirstPage.ToString().Trim()));
                }
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Exemple #9
0
        public new void Load(IEmrHost app)
        {
            m_Host = app;
            if (!string.IsNullOrEmpty(CurrentNoofinpat))
            {
                CurrentInpatient = new Common.Eop.Inpatient(Convert.ToDecimal(CurrentNoofinpat));
            }
            else if (m_Host.CurrentPatientInfo != null)
            {
                CurrentInpatient = m_Host.CurrentPatientInfo;
            }
            else
            {
                return;
            }
            CurrentInpatient.ReInitializeAllProperties();

            manger = new IemMainPageManger(m_Host, CurrentInpatient);
            info   = manger.GetIemInfo();

            LoadForm();

            //病案室人员拥有编辑病案首页的权限(未归档病历)
            InitFirstPageEditFlag(null == CurrentInpatient ? "" : CurrentInpatient.NoOfFirstPage.ToString());
            if (editFlag)
            {
                SetButtonsEditState(true);
            }
        }
Exemple #10
0
        public new void Load(IYidanEmrHost app)
        {
            DataAccess.App = app;
            m_app = app;
            if (!string.IsNullOrEmpty(CurrentNoofinpat))
            {
                CurrentInpatient = new Common.Eop.Inpatient(Convert.ToDecimal(CurrentNoofinpat));
            }
            else if (m_app.CurrentPatientInfo != null)
            {
                CurrentInpatient = m_app.CurrentPatientInfo;
            }
            else
            {
                return;
            }
            CurrentInpatient.ReInitializeAllProperties();

            GetConsultationEntity();
            if (m_ConsultationID == "")
                return;
            ////一般会诊
            //if (m_ConsultTypeID == "6501")
            //{
            //    BindData();
            //    FillUI();
            //}
            ////多科会诊
            //else
            //{
                ShowConsultationMultiply();
            //}
            PanelControlInit();
        }
Exemple #11
0
 public HistoryEmrBatchInForm(IEmrHost app, RecordDal recordDal, Inpatient currentInpatient, PatRecUtil patUtil)
 {
     InitializeComponent();
     m_App              = app;
     m_RecordDal        = recordDal;
     m_CurrentInpatient = currentInpatient;
     m_patUtil          = patUtil;
 }
Exemple #12
0
 /// <summary>
 /// 非NursingDocuments工程调用该窗体,用该构造函数
 /// </summary>
 /// <param name="App">应用程序对象接口</param>
 public NursingRecord(IEmrHost App, Inpatient currInpatient)
 {
     m_currInpatient = currInpatient;
     InitializeComponent();
     ucNursingRecordTable1.currInpatient = m_currInpatient;
     m_DaysAfterSurgery = null;
     MethodSet.App      = App;
 }
Exemple #13
0
 /// <summary>
 /// .ctor
 /// </summary>
 /// <param name="noOfInpat"></param>
 public HistoryEmrBatchIn(string noOfInpat, Inpatient currentInpatient, IEmrHost app, RecordDal recordDal, PatRecUtil patUtil)
 {
     m_NoOfInpat        = noOfInpat;
     m_App              = app;
     m_RecordDal        = recordDal;
     m_CurrentInpatient = currentInpatient;
     m_patUtil          = patUtil;
 }
Exemple #14
0
        public void MyLoadNurseDocument(IWin32Window wind, IEmrHost m_app, DataRow drInpatient, out DevExpress.XtraEditors.XtraUserControl MymainNursingMeasure)
        {
            try
            {
                Form form = null;
                //获取病人对象
                Inpatient m_NewPat = new Inpatient();
                m_app.ChoosePatient(Convert.ToDecimal((drInpatient["NOOFINPAT"])).ToString(), out m_NewPat);
                DrectSoft.Core.NurseDocument.MainNursingMeasure mainNursingMeasure = new DrectSoft.Core.NurseDocument.MainNursingMeasure(drInpatient["NOOFINPAT"].ToString());
                string version = DrectSoft.Core.NurseDocument.ConfigInfo.GetNurseMeasureVersion(decimal.Parse(drInpatient["NOOFINPAT"].ToString()));
                mainNursingMeasure.CurrentPat         = drInpatient["NOOFINPAT"].ToString();
                mainNursingMeasure.eventHandlerXieRu += delegate(object sender1, EventArgs e1)
                {
                    if (form == null)
                    {
                        Assembly a    = Assembly.Load("DrectSoft.Core.NurseDocument");
                        Type     type = a.GetType(version);
                        form             = (Form)Activator.CreateInstance(type, new object[] { m_app, drInpatient["NOOFINPAT"].ToString() });
                        form.Height      = DrectSoft.Core.NurseDocument.ConfigInfo.GetNurseRecordSize(decimal.Parse(drInpatient["NOOFINPAT"].ToString()));
                        form.FormClosed += delegate(object sender2, FormClosedEventArgs e2)
                        {
                            form = null;
                            mainNursingMeasure.LoadDataImage(decimal.Parse(drInpatient["NOOFINPAT"].ToString()));
                        };
                        form.Show(wind);
                    }
                    mainNursingMeasure.LoadDataImage(decimal.Parse(drInpatient["NOOFINPAT"].ToString()));
                };
                mainNursingMeasure.Load(m_app, m_NewPat);
                mainNursingMeasure.ReadOnlyControl = true;
                if (form != null)
                {
                    switch (version.Trim())
                    {
                    case "DrectSoft.Core.NurseDocument.Controls.NursingRecordNew":
                        (form as DrectSoft.Core.NurseDocument.Controls.NursingRecordNew).RefreshDate(drInpatient["NOOFINPAT"].ToString());
                        (form as DrectSoft.Core.NurseDocument.Controls.NursingRecordNew).dateEdit_DateTimeChanged(null, null);

                        break;

                    case "DrectSoft.Core.NurseDocument.Controls.NursingRecord":
                        (form as DrectSoft.Core.NurseDocument.Controls.NursingRecord).RefreshDate(drInpatient["NOOFINPAT"].ToString());
                        (form as DrectSoft.Core.NurseDocument.Controls.NursingRecord).dateEdit_DateTimeChanged(null, null);

                        break;
                    }
                    form.FormClosed += delegate(object sender2, FormClosedEventArgs e2)
                    {
                        mainNursingMeasure.LoadDataImage(decimal.Parse(drInpatient["NOOFINPAT"].ToString()));
                    };
                }
                MymainNursingMeasure = mainNursingMeasure;
            }
            catch (Exception ex)
            {
                MymainNursingMeasure = null;
            }
        }
Exemple #15
0
        public DaLianYiBaoForm(Inpatient currentInpatient)
        {
            InitializeComponent();
            m_currentInpatient = currentInpatient;

            DS_SqlHelper.CreateSqlHelperByDBName("HISDB");
            string    sql = string.Format("select patnoofhis,yybh,bxbh,zlxh from YD_DLYBSC where patnoofhis='{0}'", m_currentInpatient.NoOfHisFirstPage);
            DataTable dt  = DS_SqlHelper.ExecuteDataTable(sql, CommandType.Text);
        }
Exemple #16
0
 private void DoPrintPatientOrder(Inpatient patient)
 {
     //if (m_PrintForm == null)
     //{
     //   m_PrintForm = new PrintOrderForm();
     //   m_PrintForm.InitializePrintSettings(m_App);
     //}
     //m_PrintForm.CallOrderPrint(patient, m_AdviceEditor.IsTempOrder);
 }
Exemple #17
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sqlExecutor"></param>
        /// <param name="inpatient"></param>
        public OrderInterfaceLogic(IDataAccess sqlExecutor, string macAddress, Inpatient inpatient)
            : this(sqlExecutor, macAddress)
        {
            if (inpatient == null)
            {
                throw new ArgumentNullException("空病人");
            }

            CurrentPatient = inpatient;
        }
Exemple #18
0
        private Inpatient CurrentInpatient;//add by ywk
        private void btn_OK_Click(object sender, EventArgs e)
        {
            ((ShowUC)this.Parent).Close(true, m_IemInfo);
            //点击确认按钮就将数据更新到数据库
            CurrentInpatient = m_App.CurrentPatientInfo;
            CurrentInpatient.ReInitializeAllProperties();
            IemMainPageManger manger = new IemMainPageManger(m_App, CurrentInpatient);

            manger.SaveData(m_IemInfo);
        }
Exemple #19
0
        private Inpatient CreatePatientByFirstpageNoOfHis(string firstpageNoOfHis)
        {
            decimal firstpageNo = (decimal)m_SqlExecutor.ExecuteScalar(
                String.Format("select syxh from BL_BRSYK where hissyxh = {0}", firstpageNoOfHis));

            Inpatient inpatient = new Inpatient(firstpageNo);

            inpatient.NoOfHisFirstPage = firstpageNoOfHis;

            return(inpatient);
        }
Exemple #20
0
        private Inpatient CurrentInpatient;//add by ywk
        private void btn_OK_Click(object sender, EventArgs e)
        {
            GetUI();
            ((ShowUC)this.Parent).Close(true, m_IemInfo);
            //病案首页费用,确认后加到电子病历的表中 add by ywk 2012年10月16日 18:41:57
            CurrentInpatient = m_App.CurrentPatientInfo;
            CurrentInpatient.ReInitializeAllProperties();
            IemMainPageManger manger = new IemMainPageManger(m_App, CurrentInpatient);

            manger.SaveData(m_IemInfo);
        }
Exemple #21
0
        private void btPat_Click(object sender, EventArgs e)
        {
            Guid inpatientId = Inpatient.GetInpatientID();

            if (inpatientId != null && inpatientId != Guid.Empty)
            {
                try
                {
                    string ssql = " select a.inpatient_id,a.baby_id,a.ward_id,a.dept_id,0 dept_ly,flag, " +
                                  " CAST(A.INPATIENT_ID AS CHAR(40)) + CAST(A.BABY_id AS CHAR(10)) + CAST(0 AS CHAR(10)) + CAST(A.dept_id AS CHAR(10)) + CAST(A.WARD_ID AS CHAR(10)) AS STAG " +
                                  "from VI_ZY_VINPATIENT_all a " +
                                  " where a.baby_id=0 and a.inpatient_id='" + inpatientId + "' ";
                    DataTable tbmx = InstanceForm.BDatabase.GetDataTable(ssql);
                    if (tbmx.Rows.Count == 0)
                    {
                        return;
                    }

                    int _flag = Convert.ToInt32(tbmx.Rows[0]["flag"]);
                    if (_flag == 2 || _flag == 4 || _flag == 5 || _flag == 6)
                    {
                        MessageBox.Show("该病人已经出院,不能进行医嘱录入!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                    object[] communicateValue = new object[9];
                    //病人ID
                    communicateValue[0] = tbmx.Rows[0]["inpatient_id"].ToString();
                    //病区
                    communicateValue[1] = tbmx.Rows[0]["ward_id"].ToString();
                    //病人所在科室
                    communicateValue[2] = tbmx.Rows[0]["dept_id"].ToString();
                    //TAG
                    communicateValue[3] = tbmx.Rows[0]["stag"].ToString();
                    //是否出院
                    communicateValue[4] = false;
                    //医生权限
                    communicateValue[5] = 1;
                    //病区所在科室
                    communicateValue[6] = 0;
                    //是否开单科室领药
                    communicateValue[7] = 1;
                    //是否特殊治疗
                    communicateValue[8] = 1;

                    //Modify By Tany 2016-11-01  原来传的employee_id,应该传userid
                    GetForm("Ts_zyys_yzgl", "Fun_Ts_zyys_yzgl", "医嘱管理", InstanceForm.BCurrentUser.UserID, InstanceForm.BCurrentDept.DeptId, communicateValue, true);
                }
                catch (System.Exception err)
                {
                    MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemple #22
0
        public UCInpatientReport(IEmrHost app)
        {
            InitializeComponent();
            _app = app;

            if (_app.CurrentPatientInfo != null)
            {
                CurrentInpatient = _app.CurrentPatientInfo;
            }

            m_DataAccessEmrly = _app.SqlHelper;
        }
Exemple #23
0
 /// <summary>
 /// 重载构造
 /// </summary>
 /// <param name="host"></param>
 /// <param name="currentPatient"></param>
 /// <param name="recordDal"></param>
 public HistoryEMRBLLNew(IEmrHost host, Inpatient inpatient)
 {
     try
     {
         m_Host      = host;
         m_Inpatient = inpatient;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #24
0
 private void IniializeCoreLogic(Inpatient patient)
 {
     if (patient != null)
     {
         m_CoreLogic = new CoreBusinessLogic(m_SqlExecutor, EditorCallModel.EditOrder);
         m_CoreLogic.CurrentPatient = patient;
     }
     else
     {
         throw new ArgumentNullException("患者未赋值");
     }
 }
Exemple #25
0
 public CatalogForm(DataTable template, DataTable templatePerson, RecordDal recordDal, Employee doctorEmployee, IEmrHost app, string sortID, Inpatient currentInpatient)
 {
     InitializeComponent();
     SetShowType();
     Bind(template, templatePerson);
     m_RecordDal      = recordDal;
     m_DoctorEmployee = doctorEmployee;
     m_app            = app;
     CurrentInpatient = currentInpatient;
     m_HistoryEMRBLL  = new HistoryEMRBLL(app, currentInpatient, recordDal, sortID);
     xtraTabPageHistoryEMR.PageVisible = false;
 }
Exemple #26
0
 /// <summary>
 /// url调用pacs方式
 /// </summary>
 /// <param name="noofhis"></param>
 private static void PacsUrl(Inpatient m_CurrentInpatient)
 {
     try
     {
         string temppacsUrl = DrectSoft.Service.DS_SqlService.GetConfigValueByKey("PacsUrl");
         string pacsUrl     = string.Format(temppacsUrl, m_CurrentInpatient.NoOfHisFirstPage);
         System.Diagnostics.Process.Start("IEXPLORE.EXE", pacsUrl);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #27
0
 /// <summary>
 /// 重载构造
 /// xlb 2013-01-14
 /// </summary>
 /// <param name="host"></param>
 /// <param name="currentPatient"></param>
 /// <param name="recordDal"></param>
 public HistoryEMRBLL(IEmrHost host, Inpatient currentPatient, RecordDal recordDal)
 {
     try
     {
         m_Host           = host;
         m_CurrentPatient = currentPatient;
         m_RecordDal      = recordDal;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #28
0
        private void btnserch_Click(object sender, EventArgs e)
        {
            string iptid = Inpatient.GetInpatientNO();

            if (iptid == "" || iptid == Guid.Empty.ToString())
            {
                return;
            }
            else
            {
                this.txtPatID.Text = iptid.Trim();
            }
        }
Exemple #29
0
 public UCEmrInputTabPages(Inpatient inpatient, IEmrHost app)
 {
     try
     {
         InitializeComponent();
         m_CurrentInpatient = inpatient;
         m_App = app;
         SelectedPages.Add(xtraTabPageIEMMainPage);
     }
     catch (Exception ex)
     {
         MyMessageBox.Show(1, ex);
     }
 }
 /// <summary>
 /// xll 2013-01-10
 /// </summary>
 /// <param name="app"></param>
 /// <param name="CurrentPatientInfo"></param>
 public void Load(IEmrHost app, Inpatient CurrentPatientInfo)
 {
     try
     {
         m_app = app;
         PublicSet.MethodSet.App = app;
         CurrentPat = CurrentPatientInfo;
         InitForm();
     }
     catch (Exception ex)
     {
         DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
     }
 }