コード例 #1
0
        /// <summary>
        /// 克隆
        /// </summary>
        /// <returns></returns>
        public new Diagnose Clone()
        {
            Diagnose diagnose = base.Clone() as Diagnose;

            diagnose.Type    = Type.Clone();
            diagnose.Dept    = Dept.Clone();
            diagnose.Doctor  = Doctor.Clone();
            diagnose.Patient = Patient.Clone();
            diagnose.ICD10   = ICD10.Clone();
            return(diagnose);
        }
コード例 #2
0
ファイル: AddDiagnosis.cs プロジェクト: WereDouglas/ARM
        private void button3_Click(object sender, EventArgs e)
        {
            string id = Guid.NewGuid().ToString();

            string less    = lessChk.Checked ? "Yes" : "No";
            string greater = greaterChk.Checked ? "Yes" : "No";
            ICD10  t       = new ICD10(id, No, codeTxt.Text, nameTxt.Text, diagnosisTxt.Text, less, greater, Convert.ToDateTime(dateTxt.Text).ToString("dd-MM-yyyy"), DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "false", Helper.CompanyID);

            GenericCollection.icd10.Add(t);
            this.DialogResult = DialogResult.OK;
            this.Dispose();
        }
コード例 #3
0
        private static List <ICD10> DataTableToIcd10(DataTable dtIcd10)
        {
            var icd10List = new List <ICD10>();

            for (var index = 0; index < dtIcd10.Rows.Count; index++)
            {
                var rowIcd10 = dtIcd10.Rows[index];
                var icd10    = new ICD10()
                {
                    MRCID_Code = rowIcd10["MRCID_Code"].ToString(),
                    MRCID_Desc = rowIcd10["MRCID_Desc"].ToString()
                };
                icd10List.Add(icd10);
            }
            return(icd10List);
        }
コード例 #4
0
        //私有函数,查询患者基本信息
        private ArrayList myICD10Query(string SQLPatient)
        {
            ArrayList al = new ArrayList();

            neusoft.HISFC.Object.RADT.ICD10 objICD;
            this.ProgressBarText  = "正在查询ICD10诊断...";
            this.ProgressBarValue = 0;

            this.ExecQuery(SQLPatient);
            try
            {
                while (this.Reader.Read())
                {
                    objICD = new ICD10();
                    #region "接口说明"
                    ///接口名称 RADT.Diagnose.CreatePatientDiagnose.1
                    // 0  --ICD10码      1   --副诊断码     2   --拼音码         3   --五笔码  ,    4   --中文疾病名称
                    // 5  --疾病名称1,   6   --疾病名称2   ,7   --疾病死亡原因  ,8   --疾病分类码 , 9   --标准住院日
                    // 10 --住院等级    11   --操作员      12   --操作时间
                    #endregion
                    try
                    {
                        objICD.ID = this.Reader[0].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.SICD10 = this.Reader[1].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.SpellCode.Spell_Code = this.Reader[2].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.SpellCode.WB_Code = this.Reader[3].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.Name = this.Reader[4].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.User01 = this.Reader[5].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.User02 = this.Reader[6].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.DeadReason = this.Reader[7].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.DiseaseCode = this.Reader[8].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.InDays = int.Parse(this.Reader[9].ToString());
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.Memo = this.Reader[10].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }
                    try
                    {
                        objICD.User03 = this.Reader[11].ToString();
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }

                    try
                    {
                        objICD.OperDate = neusoft.neuFC.Function.NConvert.ToDateTime(this.Reader[12]);
                    }
                    catch (Exception ex)
                    {
                        this.Err = ex.Message;
                        this.WriteErr();
                    }

                    al.Add(objICD);
                }
            }
            catch (Exception ex)
            {
                this.Err     = "获得ICD10诊断信息出错!" + ex.Message;
                this.ErrCode = "-1";
                this.WriteErr();
                return(al);
            }
            this.Reader.Close();

            this.ProgressBarValue = -1;
            return(al);
        }
コード例 #5
0
        private void LoadEdit(string id)
        {
            btnSubmit.Visible = false;
            CaseID            = id;
            Cases o = new Cases();//.Select(UsersID);

            o = Cases.Select(id);

            CustomerID       = o.CustomerID;
            customerCbx.Text = CustomerDictionary.First(e => e.Value == o.CustomerID).Key;
            customerCbx_SelectedIndexChanged(null, null);
            try
            {
                practitionerCbx.Text = PractitionerDictionary.First(e => e.Value == o.PractitionerID).Key;
                practitionerCbx_SelectedIndexChanged(null, null);
            }
            catch (Exception r)
            {
                Helper.Exceptions(r.Message, "No practitioner is defined  on loading existing case " + CaseID);
            }
            reqStart.Text             = Convert.ToDateTime(o.ReqStart).ToString();
            practictionerTypeCbx.Text = o.PractitionerType;
            reqEnd.Text         = Convert.ToDateTime(o.ReqEnd).ToString();
            roleTypeCbx.Text    = o.RoleType;
            providerNoTxt.Text  = o.ProvideNo;
            informationTxt.Text = o.Information;
            try
            {
                coverageCbx.Text = CoverDictionary.First(e => e.Value == o.CoverageID).Key;
            }
            catch (Exception r)
            {
                Helper.Exceptions(r.Message, "edit case loading Coverage Cbx" + r.Message);
            }
            coverageID = o.CoverageID;
            coverageCbx_SelectedIndexChanged(null, null);

            Dictionary <string, bool> typeValues = JsonConvert.DeserializeObject <Dictionary <string, bool> >(o.Type);
            string type = "";

            typeListBx.Items.Clear();
            foreach (var t in typeValues)
            {
                typeListBx.Items.Add(t.Key, t.Value);
            }

            Dictionary <string, bool> placeValues = JsonConvert.DeserializeObject <Dictionary <string, bool> >(o.Place);

            placeListBx.Items.Clear();
            foreach (var t in placeValues)
            {
                placeListBx.Items.Add(t.Key, t.Value);
            }


            string Q = "SELECT * FROM ICD10 WHERE caseID = '" + o.Id + "' ";

            GenericCollection.icd10 = ICD10.List(Q);
            string Q2 = "SELECT * FROM casetransaction WHERE caseID = '" + o.Id + "' ";

            foreach (CaseTransaction j in CaseTransaction.List(Q2))
            {
                CaseTransaction t = new CaseTransaction(j.Id, j.Date, j.No, j.ItemID, j.CaseID, "", Convert.ToDouble(j.Qty), Convert.ToDouble(j.Cost), j.Units, j.Total, j.Tax, j.Coverage, j.Self, j.Payable, j.Limits, j.Setting, j.Period, j.Height, j.Weight, j.Instruction, j.Created, j.Sync, Helper.CompanyID);
                GenericCollection.caseTransactions.Add(t);
            }

            LoadDiagnosis();
            LoadCaseTransactions();
        }
コード例 #6
0
        private void LoadOrder(string no)
        {
            updateBtn.Visible = false;
            Orders o;

            GenericCollection.caseTransactions = new List <CaseTransaction>();
            No                    = no;
            noTxt.Text            = no;
            o                     = new Orders();//.Select(UsersID);
            o                     = Orders.SelectNo(no);
            CustomerID            = o.CustomerID;
            PractitionerID        = o.PractitionerID;
            No                    = o.No;
            providerIDTxt.Text    = Helper.NPI;
            providerNameTxt.Text  = Helper.CompanyName;
            providerUserTxt.Text  = Helper.UserName;
            providerPhoneTxt.Text = Helper.CompanyContact;
            UserID                = o.UserID;

            try
            {
                //CustomerID = CustomerDictionary[customerCbx.Text];
                c = new Customer();                //.Select(ItemID);
                c = Customer.Select(CustomerID);
                subscriberInfoTxt.Text = "Name: " + c.Name + "\t DOB: " + c.Dob + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t Soc.Sec.#: " + c.Ssn;

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                cusPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                cusPbx.Region       = new Region(gp);
                cusPbx.SizeMode     = PictureBoxSizeMode.StretchImage;
                patientNameTxt.Text = c.Name;
                idTxt.Text          = c.No;
                dobTxt.Text         = c.Dob;
                contactTxt.Text     = c.Contact;
            }
            catch { }

            try
            {
                PractitionerID = o.PractitionerID;
                Practitioner c = new Practitioner();                //.Select(ItemID);
                c = Practitioner.Select(PractitionerID);
                physicianTxt.Text = "Name: " + c.Name + "\t Speciality" + c.Speciality + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t";

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                userPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                userPbx.Region       = new Region(gp);
                userPbx.SizeMode     = PictureBoxSizeMode.StretchImage;
                pracIDTxt.Text       = c.ProviderID;
                practitionerTxt.Text = c.Name;
                signatureTxt.Text    = "";
                dateTxt.Text         = Convert.ToDateTime(DateTime.Now).ToString("MM/dd/yyyy");
                phoneTxt.Text        = c.Contact;
            }
            catch { }
            GenericCollection.caseTransactions.Clear();
            GenericCollection.icd10.Clear();
            string Q = "SELECT * FROM casetransaction WHERE no = '" + noTxt.Text + "'";

            foreach (CaseTransaction j in CaseTransaction.List(Q))
            {
                //try
                //{

                CaseTransaction t = new CaseTransaction(j.Id, j.Date, j.No, j.ItemID, j.CaseID, j.DeliveryID, j.Qty, j.Cost, j.Units, j.Total, j.Tax, j.Coverage, j.Self, j.Payable, j.Limits, j.Setting, j.Period, j.Height, j.Weight, j.Instruction, j.Created, "false", Helper.CompanyID);
                GenericCollection.caseTransactions.Add(t);
                //}
                //catch { }
            }
            LoadCaseTransactions();
            dateTxt.Text = Convert.ToDateTime(DateTime.Now).ToString("MM/dd/yyyy");
            dayTxt.Text  = Convert.ToDateTime(DateTime.Now).ToString("MM/dd/yyyy");

            GenericCollection.icd10.Clear();
            string Qs = "SELECT * FROM icd10 WHERE no = '" + noTxt.Text + "'";

            GenericCollection.icd10 = ICD10.List(Qs);
            LoadDiagnosis();
            string exists = "";

            try
            {
                exists = MySQL.value("SELECT no FROM certificate WHERE no  = '" + noTxt.Text + "'");
            }
            catch (Exception y)
            {
                exists = "";
            }
            if (!string.IsNullOrEmpty(exists))
            {
                LoadEdit(noTxt.Text);
            }
        }
コード例 #7
0
        private void button3_Click(object sender, EventArgs e)
        {
            string mobility    = mobYesBn.Checked ? "true" : "false";
            string endurance   = enduranceBn.Checked ? "true": "false";
            string activity    = activityBn.Checked ? "true": "false";
            string skin        = skinBn.Checked ? "true" : "false";
            string respiration = respirationBn.Checked ? "true" : "false";
            string adl         = adlBn.Checked ? "true" : "false";
            string speech      = speechBn.Checked ? "true" : "false";
            string nutritional = nutritionBn.Checked ? "true" : "false";
            string source      = sourceSoleBn.Checked ? "sole" : "primary";
            string suitable    = suitableBn.Checked ? "true" : "false";

            string face = "";

            if (faceYesBn.Checked)
            {
                face = "Yes";
            }
            else if (faceNoBn.Checked)
            {
                face = "No";
            }
            else if (faceNaBn.Checked)
            {
                face = "N/A";
            }
            if (string.IsNullOrEmpty(face))
            {
                MessageBox.Show("Is face to face completed ?");
                return;
            }
            //appropriate =

            string id = Guid.NewGuid().ToString();

            if (MessageBox.Show("YES or NO?", "Submit Order? ", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
            {
                double weight = 0;
                double height = 0;
                try
                {
                    height = Convert.ToDouble(heightTxt.Text);
                }
                catch
                {
                }
                try
                {
                    weight = Convert.ToDouble(weightTxt.Text);
                }
                catch
                {
                }
                Certificate i    = new Certificate(id, noTxt.Text, CustomerID, patientNameTxt.Text, dobTxt.Text, phoneTxt.Text, providerIDTxt.Text, providerNameTxt.Text, providerPhoneTxt.Text, mobility, endurance, activity, skin, respiration, adl, speech, nutritional, source, weight, height, suitable, dayTxt.Text, practitionerTxt.Text, signatureTxt.Text, dateTxt.Text, pracIDTxt.Text, phoneTxt.Text, DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "false", Helper.CompanyID, poTxt.Text, saturationTxt.Text, additionalTxt.Text, face, completedTxt.Text, Convert.ToDateTime(dateFaceTxt.Text).ToString("dd-MM-yyyy"), idTxt.Text);
                string      save = MySQL.Insert(i);
                if (save != "")
                {
                    Queries q = new Queries(Guid.NewGuid().ToString(), Helper.UserName, Helper.CleanString(save), "false", DateTime.Now.ToString("dd-MM-yyyy H:m:s"), Helper.CompanyID);
                    MySQL.Insert(q);
                    foreach (ICD10 t in GenericCollection.icd10)
                    {
                        ICD10  c     = new ICD10(t.Id, noTxt.Text, t.Code, t.Name, t.Diagnosis, t.Less6, t.Greater6, t.Onset, t.Created, "false", Helper.CompanyID);
                        string doing = MySQL.Insert(c);
                        if (doing != "")
                        {
                            Queries qs = new Queries(Guid.NewGuid().ToString(), Helper.UserName, Helper.CleanString(doing), "false", DateTime.Now.ToString("dd-MM-yyyy H:m:s"), Helper.CompanyID);
                            MySQL.Insert(qs);
                        }
                    }


                    MessageBox.Show("Information Saved");
                    this.Close();
                }
            }
        }
コード例 #8
0
ファイル: us_dmICD10.cs プロジェクト: khanhlive/VSSOFT.HIS
        private void btnLuuKb_Click_1(object sender, EventArgs e)
        {
            if (KTLuu())
            {
                switch (TTLuu)
                {
                case 1:
                    _MaICD = txtMaICD.Text.Trim();
                    var ma = dataContext.ICD10.Where(p => p.MaICD == (_MaICD)).ToList();
                    if (ma.Count > 0)
                    {
                        MessageBox.Show("Mã ICD đã có, vui lòng nhập mã khác");
                    }
                    else
                    {
                        ICD10 icd = new ICD10();
                        icd.MaICD  = txtMaICD.Text;
                        icd.TenICD = txtTenICD.Text;
                        icd.MSCB   = txtMSCB.Text;
                        icd.TenCB  = txtTenCB.Text;
                        if (cboStatus.SelectedIndex == 0)
                        {
                            icd.Status = 1;
                        }
                        else
                        {
                            if (cboStatus.SelectedIndex == 1)
                            {
                                icd.Status = 0;
                            }
                        }
                        //bp.Status = cboStatus.Text.ToString();
                        dataContext.ICD10.Add(icd);
                        dataContext.SaveChanges();
                        enableControl(false);
                        MessageBox.Show("Lưu thành công!");
                    }
                    break;

                case 2:
                    if (!string.IsNullOrEmpty(txtMaICD.Text))
                    {
                        string maICD  = txtMaICD.Text;
                        ICD10  icdsua = dataContext.ICD10.Single(p => p.MaICD == (maICD));
                        icdsua.TenICD = txtTenICD.Text;
                        icdsua.MSCB   = txtMSCB.Text;
                        icdsua.TenCB  = txtTenCB.Text;
                        if (cboStatus.SelectedIndex == 0)
                        {
                            icdsua.Status = 1;
                        }
                        else
                        {
                            if (cboStatus.SelectedIndex == 1)
                            {
                                icdsua.Status = 0;
                            }
                        }
                        dataContext.SaveChanges();
                        MessageBox.Show("Lưu thành công!");
                        enableControl(false);
                    }
                    break;
                }
                _lICD             = dataContext.ICD10.OrderBy(p => p.MaICD).ToList();
                grcICD.DataSource = _lICD.ToList();
                //var icd = (from icd10 in dataContext.ICD10 select new { icd10.MaICD, icd10.TenICD, icd10.TenCB }).ToList();
                //grcICD.DataSource = icd;
            }
        }