当前位置:网站首页>A hospital call system based on C language
A hospital call system based on C language
2022-07-24 04:30:00 【biyezuopin】
be based on C Language design a call system
Comprehensive application design description
The general outpatient department of a hospital has a department 15 individual , Doctors on duty in each department 3 people ;B Super room 1 individual , Yes 3 platform B Supermachine . Now we need to design a call system , By registration order , Arrange the calling order of each department , After diagnosing patients, all departments , According to whether it is issued B Exceed the inspection requirements , arrange B Call order of super room , And in all processes , Record the patients each doctor sees and the auscultation time .
- Need to realize the registration process , Doctor's treatment process .
- Display each department 、B The current queuing situation of super room .
- Check all patients treated by doctors .
software function
- The patient chooses the Department for registration , Automatically assign patient numbers
- Show each department and B The number of people in the super room who are still waiting in line
- Show each doctor (B Super room ) The current patient still has the remaining diagnosis and treatment ( Check ) Time
- Displays the number of minutes that have passed that day
- According to the doctor's number, query the records of the doctor's diagnosis and treatment of the patient on that day
- Refresh according to time , Automatically assign patients to the corresponding doctors (B Super room ) treatment ( Check )
- Save all visit records in file , The program can be saved after running ( Corresponding to the end of the hospital's business day )
- The query of medical records is realized by reading and comparing data files , When a doctor treats a patient , Write data files . The patient registration system and the automatic allocation of consulting rooms are achieved by establishing a patient queue , When time refreshes , The situation of each consulting room will be updated , So as to realize registration 、 See a doctor 、 The process of inspection . And all departments 、B The queue condition of the super room can be obtained by checking the queue length of patients .
design idea
The key point of this question is how to deal with the patient's treatment process . In the theory class of the first semester of sophomore year , We discussed the realization of this problem in the first seminar . The patient queue in this question is completely consistent with the queue structure in the data structure , When the patient is registered , Check whether there are any doctors available in the Department , If you have any , Then enter directly for treatment . If there is no , Then enter the diagnosis and treatment queue of the Department . The queuing situation of each department can be known by querying the length of each queue . When time refreshes , There is a change in the doctor's treatment time of patients , When it becomes 0 when , Assign the patient B Overtime . For needs B Super patient , Get into B Super waiting queue , Enter each B Super room . alike , After time refresh B The examination time of patients in the super room changes to 0 when , The patient's treatment process is over .B Super room will start from B Look for new patients in the waiting queue . It is also a normal idea to associate queue structure with queue structure in reality .
The elements of the queue are patient nodes , The node itself has various information of the patient , Follow the patient class for transmission . Every department ( Include B Super room ) There is a patient queue , Represents the waiting queue . Changes in the treatment of patients will cause the entry and exit of patient nodes .
The doctor node is related to B The patient number and remaining time should be recorded at the super room node , The storage of these two nodes adopts the structure of sequential table ( It's an array ).
ui The part of the interface that needs to be displayed , By reading the queue and the doctor array 、B The data of super chamber array can be solved . The query part needs to query the information in the file by line .
The algorithm flow chart is as follows :

Logical structure and physical structure
The logical structure is linear , In physical structure , The sequence of patient storage or chain structure can be ( Sequential queue or chain queue ). Doctors and B Super chambers use sequential structures .

Development platform
CPU:i7-8750H
Memory :16GB
operating system :Windows10 pro ver1909
Main development language :C++( Support C++11)
Development framework :Qt
development environment :Qt 5.14.2
Editor :Qt Creator 4.11.1( Main code writing )&&VS Code( View text data file 、resource Directory editing and some code writing )
compiler :MinGW 32bit
Running environment : The code version can be compiled and run normally by using the above integrated environment , Use windeployqt The executable file version generated by integration can be found in windows Normal operation under the model of environment .
Analysis and description of the operation results of the system
The process of debugging and development
The debugging stage is not much different from the first algorithm . Because this topic adds the operation of documents , adopt VSCode You can observe the real-time content of the file , It is easy to find errors in code logic .
When developing , Because I have a clear and comprehensive understanding of the function of this topic , In the design UI At the same time , I have envisaged various interface settings for functions and classes . During the filling of classes and interfaces , Some small mistakes that I didn't think much about before were corrected , Finally, the software development was successfully completed .
The result of developing software
correctness : The software can run normally in different input and output environments , Successfully completed all the black box and white box tests of the design .
stability : The program can run stably in various environments , For those involved, such as file path , The longest treatment time , The number of departments, etc. are presented in the header file using macro definitions , Convenient for subsequent code modification . No errors that could cause the system to crash were found .
Fault tolerance : The fault tolerance of this program is very perfect .1、 The results of the search are displayed in the form of scroll bars , The search results can be displayed completely .2、 Restrict the input field of the Department ASCII Code range , Only accept digital input ( Negative signs are not accepted ), At the same time, there are error reminders for wrong input .3、 When the code of the search doctor is wrong , Empty results will be displayed , In line with expectations . All possible error conditions are handled accordingly .
Running results
Register

Automatically assign doctors , Follow up patients line up in turn

Time to refresh , Update consulting rooms and B Superroom state 
Search the diagnosis and treatment records of a doctor

Operation instructions
Qt Compile operation ( Note that the code path cannot contain Chinese , Otherwise, it cannot be compiled and run normally )
Double click the project file to open the project

Click the run button in the lower left corner to run the program ( The next steps are the same as the running version )

Running version
You need two folders in the same path ( If you are not in the same path, you need to modify the macro definition in the header file , Cancel the comment and replace , Put it directly in a folder for convenience )(hospital There is doctor_information.txt file )

stay exe Found in the directory folder exe file , Double click to run the program

(Qt The steps after compiling and running are the same as those after directly clicking the running version ) Enter the patient's registered department number , Click to register , The system automatically assigns patient numbers and doctors

Interface with a certain number of people ( Display the queuing situation of each department , Currently assigned patient number , The remaining treatment time of each doctor )

Click the next minute button to refresh the time , The situation of each consulting room and B Update the situation of super room

Then press the next minute every time to refresh the time

Refresh time until all patients are treated 、 Check it out

Enter the doctor's number in the search box , Click OK search to find the search results ( The following figure shows the search results , The doctor's number will be displayed 、 Patient number 、 Time of treatment )

The following figure shows the situation that has not been searched

All functions of the system have been shown , You can choose to register 、 Refresh time and search order and times , Illegal behaviors have been rejected at the code level , Users don't have to worry about .
After closing the software, you can hospital Find the doctor's diagnosis and treatment records in the folder , It can be copied by itself ( Be careful : You cannot delete this file manually , The contents of the file will be emptied automatically every time the program is run , Therefore, the contents of the document are the contents of this program run ).
Users can experience the system by themselves according to the above steps .
边栏推荐
- Game improvement of smart people: Lesson 2 of Chapter 3: number of factors
- LeetCode 46 全排列
- Game improvement of smart people: Chapter 3 Lesson 3: find game
- 仿今日头条实时新闻微信小程序项目源码
- Oracle的并行技术
- Send data 1010_ 1. The number of bytes passed by the sender
- er系统,在 Lin应答位时,数,成功开r Com更
- Write a search box with search tips
- Shell syntax (1)
- Smart people's game improvement: Chapter 3 Lesson 3 example: the secret of prime
猜你喜欢

Live classroom system 04 create service module

Basic learning notes of C language

C语言基础学习笔记

Design and implementation of data analysis platform for intelligent commerce

《论文复现》BiDAF代码实现过程(3)模型建立

postgresql源码学习(32)—— 检查点④-核心函数CreateCheckPoint

一次 svchost.exe 进程占用大量网络带宽的排查

Qt5.14_ Realize the free drag and drop combination function of vs2019 panel under mingw/msvc

仿今日头条实时新闻微信小程序项目源码

基于GL Pipeline与光线追踪技术的融合实现的台球模拟器
随机推荐
Determined by hardware (see official 2 and
C语言经典习题之编写一个程序,找出1000以内所有的完数。
Write a search box with search tips
PMIX ERROR: ERROR in file gds_ds12_lock_pthread.c
J9 number theory: what is Web3.0? What are the characteristics of Web3.0?
基于GL Pipeline与光线追踪技术的融合实现的台球模拟器
高频小信号谐振放大器设计-课程设计Multisim仿真
LAN SDN hard core technology insider 20 Kang long regrets -- Specifications and restrictions (Part 1)
May be a little useful cold knowledge
Particle Designer: particle effect maker, which generates plist files and can be used normally in projects
IP second experiment mGRE OSPF
Good performance and reliability. The parameter that initiates writing IIC co type code and is -4
Basic syntax of MySQL DDL and DML and DQL
[C language] program environment and preprocessing operation
Smart contract: release an erc20 token
Insider of LAN SDN hard core technology 22 Kang long regrets -- Specifications and restrictions (Part 2)
Teacher qiniu said is the VIP account opened for you safe?
短视频本地生活版块,有哪些新的机会存在?
Live classroom system 04 create service module
Application scenarios and schemes of common mechanical equipment safety virtual simulation system