Abstract
With the popularity of computer technology. TCM enterprises gradually perfecting the use of computer technology to medicine and to improve their work efficiency, market competition in order to win the victory. Medical Management Information System has become the medical and pharmaceutical enterprises, network management and information technology as a hedge, Management is the medical management of the scale one of the indispensable components. Meanwhile, a highly integrated software development environment and database technology greatly reduce the increasing maturity of the system development costs. System Development Tool intelligent, humane, making the system fully developed to meet the medical needs of business enterprises, Enterprises from all aspects of the flow of medicine, logistics, capital flow, information flow unified system management.
The topic is based on Visual Basic 6.0 and database access technology, Design of a "drug inventory management system." Information is the basic purpose of medical inventory management manual records from the ills trying to make the system fully developed to meet the needs of pharmaceutical enterprises. Small pharmacies and clinics in the small inventory management. Mainly in the following modules : (1) entry module system to achieve download system. (2) daily times module, the storage management of pharmaceutical sales. (3) inventory management module, the realization of inventory inquiries, stock inventory and price management. Alarm low storage capacity (4) on the management module, check to see all the medicines, sales of basic information. (5) basic information management module provides customers, suppliers, warehouses, the basic sales management. (6) install the module, users can set up the basic passwords, system initialization, and data protection. (7) other modules to the system to further the development of sustainability, realize the drugs in the pharmaceutical distribution and circulation costs of reported losses. Only on paper (2) (3) (4) modules are described in detail.
The system uses modular programming principles to improve the reliability of the system, module size and, in itself relatively independent.
Key words : pharmaceutical inventory management, database, Visual Basic, Access
表3.1 库存表(kc)
列名 数据类型 可否为空 说明
商品名称 文本 Not null
简称 文本 Not null
批号 文本 Not null
产地 文本 Not null
规格 文本 Not null
包装 文本 Not null
单位 数字 Not null
进价 数字 Not null
库存 数字 Not null
库存金额 数字 Not null
库存表是此系统数据库中基本的表,新入库的药品除保存在入库单外也将被保存到此表中,当系统运行查询时务时向系统提供数据。
表3.2 入库单表(rkd)
列名 数据类型 可否为空 说明
商品名称 文本 Not null
简称 文本 Not null
批号 文本 Not null
产地 文本 Not null
规格 文本 Not null
包装 文本 Not null
单位 数字 Not null
数量 数字 Not null
进价 数字 Not null
金额 货币 Not null
备注 文本 null
入库单表将新入库的药品保存在此表中,当要查询新入库药品是向系统提供查询数据。
表3.3 入库退单表(rktd)
列名 数据类型 可否为空 说明
商品名称 文本 Not null
批号 文本 Not null
产地 文本 Not null
规格 文本 Not null
包装 文本 Not null
单位 文本 Not null
数量 数字 Not null
进价 数字 Not null
金额 货币 Not null
备注 文本 Not null
供应商 文本 Not null
日期 日期/时间 Not null
经手人 数字 Not null
票号 数字 Not null
药品入库时会有一些不合格药品,入库退单就是将这些不合格药品记录在表中从而用户也可以从表中了解供应商的供货质量。当查询入库退货药品时向系统提供数据。
表3.4 销售单(xsd)
列名 数据类型 可否为空 说明
商品名称 文本 Not null
批号 文本 Not null
产地 文本 Not null
规格 文本 Not null
包装 文本 Not null
单位 文本 Not null
数量 数字 Not null
进价 数字 Not null
金额 货币 Not null
备注 文本 Not null
客户 文本 Not null
日期 日期/时间 Not null
经手人 数字 Not null
票号 数字 Not null
销售单将向客户出售的药品记录在此表中,当系统查询某段时间内销售的药品时为系统提供数据。
表3.5 销售退单(xstd)
列名 数据类型 可否为空 说明
商品名称 文本 Not null
批号 文本 Not null
产地 文本 Not null
规格 文本 Not null
包装 文本 Not null
单位 文本 Not null
数量 数字 Not null
进价 数字 Not null
金额 货币 Not null
备注 文本 Not null
客户 文本 Not null
日期 日期/时间 Not null
经手人 数字 Not null
票号 数字 Not null
用户向客户销售药品可能有不完全符合客户要求的药品,那么这些药品将被记录在销售退单中以备查询退货药品时向系统提供数据。
第四章 系统各模块的编码与实现
4.1日常时务模块
日常时务是该系统的基本模块,其中包括四个小的分支:入库单操作界面,入库退单操作界面,销售单操作界面,销售退单操作界面。四个分支所设计的操作界面相似。
4.1.1入库单操作界面
图4-1 入库单
说明:药品入库时首先单击“登记”命令件,录入相应的信息后单击“保存”新购药品就被添加到入库(rk)数据库表中。票号与入库日期自动生成。任务拦中入库品种、合计数量、合计金额项自动生成。
其中主要代码如下:
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\yyjxc.mdb"
Data2.DatabaseName = App.Path & "\yyjxc.mdb"
Data3.DatabaseName = App.Path & "\yyjxc.mdb"
以上代码为数据控件指定数据库名使其能自动识别数据库路径。
Data2.RecordSource = "select 供应商全称 from gys where ((gys.供应商全称 like " + Chr(34) + gys.Text + "*" + Chr(34) + ")or (gys.简称 like " + Chr(34) + gys.Text + "*" + Chr(34) + "))group by 供应商全称"
Data2.Refresh
以上代码利用查询语句为Dblist控件指定数据源,以便Dblist控件能够显示供应商信息。
DBList1.Visible = False
mf1.Text = text1.Text
If mf1.Col = 1 Then
按简称或商品名称查询库存商品信息
Data1.RecordSource = "select * from kc where ((kc.简称 like " + Chr(34)
+ text1.Text + "*" + Chr(34) + ")or(kc.商品名称 like " + Chr(34)
text1.Text + "*" + Chr(34) + "))"
Data1.Refresh
If text1.Text = "" Then
grid1.Visible = False
If Data1.Recordset.RecordCount > 0 Then
grid1.Visible = True
以上代码表示当在text1的文本框中输入药品名称时,Data控件会利用一查询语句来查询库存药品当符合条件的药品存在时会自动的显示。