The SQL code provided creates several tables for managing medical data. Here is a breakdown of each table and its columns:

  1. 药品资料: This table stores information about drugs.

    • 药品编号: Primary key, unique identifier for the drug.
    • 名称: Name of the drug.
    • 规格: Specifications of the drug.
    • 整量单位: Unit of measurement for the whole drug.
    • 散量单位: Unit of measurement for the divided drug.
    • 入库单位: Unit of measurement for stock intake.
    • 出库单位: Unit of measurement for stock outtake.
    • 批发价: Wholesale price of the drug.
    • 整散比: Ratio between the whole and divided units.
    • 分类: Classification of the drug.
    • 费用归类: Classification of the drug's expenses.
    • 拼音码: Pinyin code for the drug's name.
    • 效期: Expiration date of the drug.
    • 上限: Upper limit of the drug's stock quantity.
    • 下限: Lower limit of the drug's stock quantity.
  2. 病人信息库: This table stores information about patients.

    • 病人编号: Primary key, unique identifier for the patient.
    • 姓名: Name of the patient.
    • 性别: Gender of the patient.
    • 年龄: Age of the patient.
    • 民族: Ethnicity of the patient.
    • 费用类型: Type of medical expenses for the patient.
    • 电话: Phone number of the patient.
    • 拼音码: Pinyin code for the patient's name.
  3. 门诊挂号: This table stores information about outpatient registrations.

    • 挂号编号: Primary key, unique identifier for the registration.
    • 病人编号: Foreign key referencing the patient's identifier.
    • 姓名: Name of the patient.
    • 性别: Gender of the patient.
    • 挂号科室: Department for the registration.
    • 费用类型: Type of medical expenses for the registration.
    • 挂号类型: Type of registration.
    • 挂号费用: Registration fee.
    • 医生: Doctor responsible for the registration.
    • 时间: Date and time of the registration.
    • 是否已划价: Flag indicating if charges have been applied to the registration.
  4. 门诊划价: This table stores information about outpatient charges.

    • 划价编号: Primary key, unique identifier for the charge.
    • 科室: Department for the charge.
    • 挂号编号: Foreign key referencing the registration identifier.
    • 医生: Doctor responsible for the charge.
    • 划价时间: Date and time of the charge.
    • 划价员: Staff member responsible for the charge.
    • 是否收费: Flag indicating if payment has been made for the charge.
    • 收费员: Staff member responsible for collecting the payment.
    • 收费时间: Date and time of the payment.
    • 划价金额: Amount charged.
    • 是否发药: Flag indicating if medication has been dispensed.
    • 发药时间: Date and time of medication dispensing.
    • 发药员: Staff member responsible for dispensing medication.
  5. 门诊划价明细: This table stores detailed information about outpatient charges.

    • 划价编号: Foreign key referencing the charge identifier.
    • 药品编号: Foreign key referencing the drug identifier.
    • 单价: Price per unit of the drug.
    • 数量: Quantity of the drug.
    • 金额: Total amount for the drug.
  6. 门诊挂号类型: This table stores information about outpatient registration types.

    • 挂号类型编号: Primary key, unique identifier for the registration type.
    • 挂号类型: Description of the registration type.
    • 挂号费: Fee for the registration type.
  7. 门诊收费项目: This table stores information about outpatient billing items.

    • 收费项目编号: Primary key, unique identifier for the billing item.
    • 名称: Name of the billing item.
    • 拼音码: Pinyin code for the billing item's name.
    • 费用: Cost of the billing item.
    • 费用种类: Type of expense for the billing item.
    • 病种分类: Classification of the illness for the billing item.
    • 备注: Additional notes or comments about the billing item.
  8. 科室: This table stores information about departments.

    • 科室编号: Primary key, unique identifier for the department.
    • 名称: Name of the department.
    • 病区: Ward associated with the department.
  9. 医生: This table stores information about doctors.

    • 医生编号: Primary key, unique identifier for the doctor.
    • 姓名: Name of the doctor.
    • 性别: Gender of the doctor.
    • 年龄: Age of the doctor.
    • 民族: Ethnicity of the doctor.
    • 科室: Department where the doctor works.
    • 电话: Phone number of the doctor.
    • 拼音码: Pinyin code for the doctor's name.
    • 职务: Position or title of the doctor.
  10. 药品库: This table stores information about drug inventory.

    • 药品编号: Primary key, unique identifier for the drug.
    • 库存数量: Quantity of the drug in stock.
    • 规格: Specifications of the drug.

Note: The data types used in the tables (e.g., Varchar, Int, decimal, money, datetime) represent the data type of each column in the table.

create table 药品资料药品编号 Varchar20 primary key not null名称 Varchar150 null规格 Varchar100 null整量单位 Varchar50 null散量单位 Varchar50 null入库单位 decimal122 null出库单位 decimal122 null批发价 decimal122 null整散比 decimal122

原文地址: https://www.cveoy.top/t/topic/jgOF 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录