资源简介
通过十字交叉链表实现一个病例管理系统,可以查找、删除、更新信息
代码片段和文件信息
#include“stdio.h“
#include“stdlib.h“
#include“string.h“
typedef struct hospital_info{
char dise_num[10]; /*病历编号*/
char ke[10]; /*门诊科别*/
char date[11]; /*门诊时间*/
char symptom[60]; /*症状*/
char diagnosis[60]; /*诊断*/
char treatment[60]; /*治疗意见*/
char doctor[10]; /*医师姓名*/
struct hospital_info *next;
}hospitals;
typedef struct disease_info{
char dise_num[10]; /*病历编号*/
char employee[10]; /*姓名*/
char sex; /*性别*/
char unit[30]; /*工作单位*/
char date[11]; /*出生日期*/
char drug_allergy[30]; /*药物过敏史*/
char phone[12]; /*联系电话*/
char addr[30]; /*住址*/
hospitals *head_hosp;
struct disease_info *next;
}diseases;
typedef struct unit_info{
char unit_num[10]; /*单位编号*/
char unit[30]; /*单位名称*/
char manager[20]; /*负责人*/
char phone[12]; /*联系电话*/
int total;
diseases *head_disease;
struct unit_info *next;
}units;
void create_cross_list(units**head);
void save_cross_list(units*head);
void traverse_cross_list(units*head);
void load_cross_list(units **head);
void Revise_unit(units *head);
void Revise_dise(units *head);
void Revise_hosp(units *head);
void Insert_unit(units *head);
void Insert_dise(units *head);
void Insert_hosp(units *head);
void Delete_unit(units *head);
void Delete_dise(units *head);
void Delete_hosp(units *head);
void Search_unit(units *head);
void Search_dise(units *head);
void Search_hosp(units *head);
void Display_no_hosp(units *head);
void Sortmonth(units *head);
void SortTotal(units *head);
void Sortpeople(units *head);
void main(void)
{
units *head=NULL;
short choice;
printf(“-----the unit information manage system!------\n“);
printf(“< 1----------create the cross list >\n“);
printf(“< 2----------save the cross list >\n“);
printf(“< 3----------traverse the cross list >\n“);
printf(“< 4----------load the cross list >\n“);
printf(“< 5-----------Revise information >\n“);
printf(“< 6-----------Insert information >\n“);
printf(“< 7-----------Delete information >\n“);
printf(“< 8-----------Search information >\n“);
printf(“< 9--------------- tong ji >\n“);
printf(“< 10---------------退出 >\n“);
printf(“--------------------------------------------->\n“);
f: while(1){
printf(“请选择要进行的操作:(1-10)“);
scanf(“%hd“&choice);
getchar(); /*用于吸收换行符*/
switch(choice)
{
case 1:create_cross_list(&head);
break;
case 2:save_cross_list(head);break;
case 3:traverse_cross_list(head);
break;
case 4:load_cross_list(&head);break;
case 5:
{
printf(“ <<<<<<<<<<<<<<<<
- 上一篇:一个简单的vs c++ socket通讯程序
- 下一篇:随机生成汉字的小程序
相关资源
- 操作系统c语言模拟文件管理系统844
- C语言开发实战宝典
- C++中头文件与源文件的作用详解
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- 个人日常财务管理系统(C语言)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- C语言实现的一个内存泄漏检测程序
- DES加密算法C语言实现
- LINUX下命令行界面的C语言细胞游戏
- 用单片机控制蜂鸣器播放旋律程序(
- 学校超市选址问题(数据结构C语言版
- 电子时钟 有C语言程序,PROTEUS仿真图
- 尚观培训linux许巍老师关于c语言的课
评论
共有 条评论