Inquiry and inpatient medical business data warehouse modeling practical case

1. Real-world case of data warehouse modeling

(1) Preface
Medical business systems are relatively complex, including HIS: Hospital Information System, CIS: Clinical Information System, LIS: Laboratory Information Management System, EMR: Electronic Medical Record (EMR, Electronic Medical Record), PACS: Image Archiving and Communication System, RIS: Radiology Information System, GMIS: Regional Information System, HRP: Hospital Resource Planning, etc., each A module contains many other subsystems.
insert image description here
When building a data warehouse model, first divide the business modules from the overall point of view, then divide the small business modules according to the large business modules, and then divide according to the business system to sort out the entire business division, and then sort out each The division and dependencies of a system.
(2) Introduction to this modeling
In this modeling, data warehouse modeling is only carried out for the consultation and hospitalization business modules.
1. The system and table structure involved in the consultation and hospitalization
system In a business system, there are not only business tables, but also some data statistics tables. We need to distinguish which business tables, and when we do indicator calculation later, we also need to We can verify whether our indicator system design is correct and reasonable according to the business data statistics table.
This model design uses the data structure of the outpatient system of a HIS system manufacturer in Tianjin. Among them, there are 324 tables in the system. From the perspective of business and the understanding of table information, they are roughly divided into appointment, registration, calling, diagnosis, prescription, payment, inspection, inspection, prescribing medicine, decocting medicine, taking medicine, follow-up consultation, There are 14 business processes for refund and evaluation.
The dimensions involved include hospitals, doctors, departments, medicines, consumables, diagnosis and treatment, time, region, patients, diseases, operations, and inspection and testing items.
Please chat privately about the table structure of his system. Since the his system involves confidentiality, it cannot be displayed externally. However, the business of the hospital is basically the same, and the dimensions involved are basically the same, (add if there is none), so it does not affect the application of the final model. (Any business operation of the business system should design a time field)
insert image description here

2. Data domain division
The data warehouse data domain is a collection of closely related data subjects in the company's business, which can generally be divided according to business processes, business departments, and business systems (such as medical service domain, expense domain, and user domain). A data domain contains multiple topics.
Data domains are usually divided into data domains according to business departments, business systems, and business processes. Under normal circumstances, the division of each company may be different, and the business department will be divided when the company adjusts the structure, but the business process will not be particularly different, and the department adjustment will not affect the business process. Therefore, this time the subject area is divided according to the business process to divide.
It should be noted that a business process can only belong to one data domain.
The division of data domains should be carefully divided. Once determined, frequent changes are avoided. Although the construction of data warehouses is iterative and cannot be guaranteed to be initialized at one time, our division of data domains and topics should cover all businesses of the enterprise as much as possible. And when new business comes in, it can be included and expand the data domain without any impact.

data field business process
registered domain Appointment, registration, number pick-up, call number, refund number, pass number
Medical Process Domain (Medical Services Domain) Diagnosis, prescribing, examination, testing, surgery, anesthesia, blood transfusion, nursing
fee field payment, refund
user domain register log in
interactive domain evaluation, collection
tool field Coupon collection, coupon use (order), coupon use (payment)

Business bus matrix
The business bus matrix contains all the facts (business processes) and dimensions required by the dimensional model, as well as the relationship between each business process and each dimension. The rows of the matrix are each business process, the columns of the matrix are each dimension, and the intersection of the rows and columns represents the relationship between the business process and the dimension.
insert image description here

3. Subject division
The subject domain is a logical grouping of entities. We look at the business system of the enterprise from the perspective of God, sort out the business entities of the enterprise, the relationship between entities and entities, and logically divide the data in the enterprise. The data in the same subject domain are closely related, and the data in different subject domains are independent of each other. Therefore, the division of subject domains does not have any technical meaning, but is just a concept, a classification method that can help data users quickly find data. Just like the book classification of the library, the book classification is divided into 22 categories: military, literature, art, etc. For example, literature also includes: novels, prose, poetry, drama, etc. These are the subject fields of the book.
The data warehouse theme is a scope that integrates, summarizes, and analyzes the data of a certain analysis object in various systems in the production of the enterprise at a high level (such as doctor theme, drug theme, patient theme), and a theme is an entity. object.
For example, the user topic domain includes doctor topics, nurse topics, administrator topics, and patient topics.
The medicine theme domain includes western medicine theme, traditional Chinese medicine theme, Chinese herbal medicine theme, and Chinese herbal medicine theme.

subject domain theme
user subject domain Doctors, nurses, administrators, patients
Three directory subject domain Medicines, diagnostic items, medical materials
location subject field Hospital, department, province, city, home address
time subject field date, time
source subject domain Number source

insert image description here

4. Business table sorting

  1. The business table involved in the registration domain
    app_register_record: reservation business table
    outp_Register: registration business table
    outp_RegLock: registration lock number table
    sys_QueueNo: calling number sequence list
    call_queue_list: calling number queue list
    call_screen_config: calling number terminal screen configuration table

  2. The business table involved in the medical process domain
    outp_OutpatientDiag: outpatient information - diagnosis
    outp_OutPatientDrug: outpatient information - medication
    outp_OutPatientSymp: outpatient information - symptoms
    outp_OutPatientTest: outpatient information - check and test
    outp_OperRecord: surgical records

  3. The business table outp_OutPatientFee involved in the fee field
    : outpatient information - fee

  4. The business table yb_user involved in the user domain
    : medical insurance user table

  5. The business table involved in the interactive domain
    ys_evaluate: doctor evaluation table
    ys_holdings: doctor collection table

  6. The business table ts_coupon involved in the tool domain
    : special coupon usage table

4. Dimension extraction
The design of the dimensional model can refer to the business bus matrix obtained above. Fact tables are stored in the DWD layer, and dimension tables are stored in the DIM layer.
Dimension tables include: time: time, field: hospital, department, people: doctors, nurses, patients, administrators, goods: number source, three categories (drugs, diagnosis and treatment, medical materials), disease, operation, nursing information table (infusion , enema, disinfection, etc.), coupons.

5. Fact table extraction (business carding extraction)
insert image description here

6. Dimension table design
insert image description here
cannot be fully displayed, please consult the attachment if necessary.

7. Fact table design
Registration domain-detailed fact table
insert image description here
Medical process domain-detailed fact table
insert image description here
Expense domain-detailed fact table

insert image description here
User Domain - Detail Fact Table
insert image description here

Interaction Domain - Detail Fact Table

insert image description here
Tool Field - Detail Fact Table

insert image description here

Guess you like

Origin blog.csdn.net/qq_44696532/article/details/130742692