C#oop体检套餐管理系统

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace HealthCheck
{
    //检查项目
    class HealthCheckItem
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }


        private string bewrite;
        public string Bewrite
        {
            get { return bewrite; }
            set { bewrite = value; }
        }


        private int price;
        public int Price
        {
            get { return price; }
            set { price = value; }
        }


        public HealthCheckItem()
        {}
        
        public HealthCheckItem(string name,int price,string bewrite)
        {
            this.name = name;
            this.price = price;
            this.bewrite = bewrite;
        }


        public static Dictionary<string, HealthCheckItem> ItemDic = new Dictionary<string, HealthCheckItem>()
        {
            {"身高",new HealthCheckItem("身高",5,"用于测量身高")},
            {"体重",new HealthCheckItem("体重",5,"用于测量体重")},
            {"视力",new HealthCheckItem("视力",5,"用于检查视力")},
            {"听力",new HealthCheckItem("听力",5,"用于检查听力")},
            {"肝功能",new HealthCheckItem("肝功能",200,"用于检测肝功能")},
            {"B超",new HealthCheckItem("B超",60,"用于B超检查")},
            {"心电图",new HealthCheckItem("心电图",100,"用于检查心电图")},
            {"肺活量",new HealthCheckItem("肺活量",8,"用于测量肺活量")}
        };
        
    }

}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace HealthCheck
{
    //套餐
    class HealthCheckSet
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }


        public List<HealthCheckItem> ItemList=new List<HealthCheckItem>();
        public static Dictionary<string, List<HealthCheckItem>> SetDic = new Dictionary<string, List<HealthCheckItem>>();
        public HealthCheckSet()
        {
            this.ItemList = new List<HealthCheckItem>();
            ItemList.Add(HealthCheckItem.ItemDic["身高"]);
            ItemList.Add(HealthCheckItem.ItemDic["体重"]);
            ItemList.Add(HealthCheckItem.ItemDic["视力"]);
            ItemList.Add(HealthCheckItem.ItemDic["听力"]);
            ItemList.Add(HealthCheckItem.ItemDic["肺活量"]);
            SetDic.Add("入学体检",this.ItemList);
        }
        public HealthCheckSet(string name)
        {
            SetDic.Add(name,this.ItemList);
        }
            
        /// <summary>
        /// Dic_Values 添加
        /// </summary>
        /// <param name="str"></param>
        public static void DicAdd(List<HealthCheckItem> list,string str)
        {
           list.Add(HealthCheckItem.ItemDic[str]);
        }
    }
}

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace HealthCheck
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
        }


        private void FrmMain_Load(object sender, EventArgs e)
        {
            cboItem.Items.Add("请选择");
            cboItem.SelectedIndex = 0;
            RenovateItem();
            HealthCheckSet set = new HealthCheckSet();
            RenovateList();
            cboList.SelectedIndex = 0;
            cboItem.Enabled = false;
            btnAddItem.Enabled = false;
            btnDeleteItem.Enabled = false;
        }
        //更新检查项目列表
        private void RenovateItem()
        {
            foreach (KeyValuePair<string, HealthCheckItem> item in HealthCheckItem.ItemDic)
            {
                cboItem.Items.Add(item.Key);
            }
        }
        //更新套餐列表
        private void RenovateList()
        {
            cboList.Items.Clear();
            cboList.Items.Add("请选择");
            foreach (KeyValuePair<string, List<HealthCheckItem>> item in HealthCheckSet.SetDic)
            {
                cboList.Items.Add(item.Key);
            }
            if (cboList.Items.Count>2)
            {
                cboList.SelectedIndex = cboList.Items.Count - 1;   
            }
        }
        //套餐列表
        private void cboList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboList.SelectedIndex>0)
            {
                lblChooseName.Text = cboList.Text;
                cboItem.Enabled = true;
                RenovateDGV();
            }
            else
            {
                cboItem.Enabled = false;
            }
        }
        /// <summary>
        /// 刷新DGV列表
        /// </summary>
        private void RenovateDGV()
        {
            dgvHealthCheckInfo.DataSource = new BindingList<HealthCheckItem>(HealthCheckSet.SetDic[cboList.Text]);
            lblChoosePrice.Text = PriceSum(cboList.Text).ToString();
        }
        /// <summary>
        /// 检查总金额
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        private int PriceSum(string key)
        {
            int sum = 0;
            foreach (HealthCheckItem item in HealthCheckSet.SetDic[key])
            {
                sum += item.Price;
            }
            return sum;
        }
        //项目列表
        private void cboItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboItem.SelectedIndex>0)
            {
                btnAddItem.Enabled = true;
            }
            else
            {
                btnAddItem.Enabled = false;
                btnDeleteItem.Enabled = false;
            }
        }
        //DGV单击事件
        private void dgvHealthCheckInfo_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!btnDeleteItem.Enabled)
            {
                btnDeleteItem.Enabled = true;   
            }
        }
        //删除检查项目
        private void btnDeleteItem_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("您确定要删除吗?","警告!",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
            if (result == DialogResult.OK)
            {
                if (dgvHealthCheckInfo.SelectedRows[0] != null && dgvHealthCheckInfo.SelectedRows[0].Cells[0] != null && dgvHealthCheckInfo.SelectedRows[0].Cells[0].Value != null)
                {
                    //删除 套餐中所选的与内置检查项目相匹配的项
                    HealthCheckSet.SetDic[cboList.Text].Remove(HealthCheckItem.ItemDic[dgvHealthCheckInfo.SelectedRows[0].Cells["clmItemName"].Value.ToString()]);
                    RenovateDGV();
                }
            }
        }
        //添加检查项目
        private void btnAddItem_Click(object sender, EventArgs e)
        {
            if (HealthCheckSet.SetDic[cboList.Text].Contains(HealthCheckItem.ItemDic[cboItem.Text]))
            {
                MessageBox.Show(cboList.Text+"套餐中已存在该检查项目!","错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
            else
            {
                HealthCheckSet.DicAdd(HealthCheckSet.SetDic[cboList.Text],cboItem.Text);
                RenovateDGV();
            }
        }
        //套餐添加
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (txtName.Text!="")
            {
                foreach (string item in HealthCheckSet.SetDic.Keys)
                {
                    if (txtName.Text.Equals(item))
                    {
                        MessageBox.Show("已经存在"+txtName.Text+"套餐!");
                        return;
                    }
                }
                HealthCheckSet dic = new HealthCheckSet(txtName.Text);
                RenovateList();
            }
        }
    }
}

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
健康体检管理软件 是一套完整的数字化健康体检中心管理软件 , 该系 统本着从体检中心检查的实际应用出发,根据体检人员相对集中进行,人员分布 不均,体检过程相对程序化,重点解决了体检流程化问题,把体检信息采集源放 在各体检科室的医生工作台上,各种设备检查信息全部来源与相关医疗设备,使 体检人员的全部检查信息贯穿在系统工作流的全过程,使其真正成为从采集体检 人员的基本信息-相关科室体检信息-设备采集信息-体检信息综合分析-个人 / 集体综合统计分析及健康状况总结分析等,完全的计算机综合管理过程。 <<健康体检管理软件 >>是如何产生的呢 ? 健康已成为现代社会人们日益关 心的问题 , 如何知道自己是否有健康的体魄 ? 用人单位如何知道所雇佣的人是 否健康 ? 学生入学 , 工厂招工 , 接触有害物质人员的定期检查等等 , 都离不 开医院的体检 . 因此 , 目前专门的体检医院或化出一个部门用于体检的医院 , 象雨后的春笋越来越多,那么 , 一个体检医院 , 如何有效的利用现有资源 , 如 何面对大批量人员的体检 , 如何给被检人员准确 , 快捷做出检查结果 , 如何建 立并有效的管理自己日益庞大的体检档案 , 将是医院面邻的越来越严峻的问题。 完成一个单位的体检后,系统根据体检结果,综合做出该单位的体检分析,健康 建议分析,职业病分布状况分析等。体检结果可通过 INTERNET 方便的传递给相 关单位。长期的档案的管理体检信息的综合查询,为长期跟踪观察某单位员工 健康状况提供一手资料。 功能特点 采用B/S和C/S相结合的网络模式:内网实现体检中心的业务管理;外网实现体检客 户网上预约,网上查询等。 采用体检条码或磁卡的管理技术:对体检号采用条形码或磁卡的管理。由于体检 号贯穿于系统始终,可通过对条码或磁卡的扫描读取,大大减少了人工输入的出 错率,同时也方便了结果的录入和数据的查询。 强大的自定义功能:一个好的软件,要最大限度满足最多用户的需求,要求软件 的通用性足够强大。体检管理软件采用大量自定义设置,可以通过简单的应用前 初始化设置。达到适用不同规模、流程与要求的体检中心的业务需求,从而实现 软件的高性价比。这样的软件也具有容易升级,易维护的特点。 软件具有智能化:由于体检业务是一项工作量烦重的业务。从检前准备,检中检 查,检后服务,每一过程都有大量工作要作。这就要求体检管理软件智能化。开 发人员深入工作现场,了解体检医生的工作情况,在软件的各个部分都有智能化 的表现,如:可以自动判断阳性结果;自动生成小结;自动生成总结;自动生成 建议;批量导入人员名单,批量登记,批量报告打印等等,总之,你会发现无处 不为您所想。 与检验系统、检查仪器的对接:对于每天大量的检查结果,凭人工录入,是一件 非常头痛的工作,而且非常容易出错,<>实现500人检验数据(约 合3万条记录),不足30秒,可以全部录入完成。 灵活独立的计价收费系统系统自身具有独立的计价收费功能,专们针对散检和

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值