| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1060 人关注过本帖
标题:又是一个头痛的作业。。。哎。
只看楼主 加入收藏
fantasysonic
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2011-9-29
结帖率:0
收藏
已结贴  问题点数:20 回复次数:4 
又是一个头痛的作业。。。哎。
LABORATORY EXERCISE (Lab-III)
Lab-III: Database Creation & Search
In this Project you will create a database using structures and write several
functions to search different types of data on this database.
The application data is text data comprising all the clinical information about
patients and drugs. In other words, you are going to create a library that is
useful for a medical practitioner!!
Create a global database for at least 15 patients– array of structures with
the following information.
- Name of the patient (format: Firstname X. lastname);
- Patient’s ID (random generated 4 digit number with the first two
letters as the first two characters of first and middle or last names);
- Separate structure identifying patient’s contact information;
- Doctor’s name who is attending this patient name (format: Firstname
X. lastname)
- Age of the patient (dd/mm/yyyy format)
- Separate structure to identify patient’s weight during the last three
consultations;
- Blood Group
Special structure capturing the following two items: - Allergic drugs
listing, regular drugs list and any Major disease(s) treated recently in
the last three years;
- Nature of complaint during the last visit to the hospital;
- Last visited date to the hospital;
Create a separate Structure for recording the current visit details of a
patient: Date of visit; weight of the patient, temperature; nature of the
complaint for this current visit; decision made (string input by the
doctor); drugs administered; next appointment date; Any other special
comments
2
With the above attributes, implement the following search functions. In
all these functions, a NIL must be displayed if no result is found.
(I) (a) A simple function to search by using Patient’s name; Display
the full record of the patient as stored; (b) Update the patient’s
record and display the particulars of the current visit;
(II) A simple function to search by disease and list the names of the
patients; Then allow the user to choose one patient from the
displayed list and display that patient’s record;
(III) A simple function to list all the patients attended by a specific
doctor;
Allow the user to interact with the system by looping continuously.
He/She will see his/her search results and then must be allowed to search
further again. Finally, he/she must be asked to confirm an “exit” to stop
interacting with the system.
You may choose to read in all the data to create the database from a text
file or manually enter.
只能用C 语言, VISUAL C。
搜索更多相关主题的帖子: different following clinical database library 
2011-10-26 22:59
fantasysonic
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2011-9-29
收藏
得分:0 
只能用C 啊。。。。。。。。。
发一个上次的作业答案,我做的。。。。 这次的又头痛了。
      
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <malloc.h>
 
 
void main(){
 
FILE *myFile;
FILE *myFile2;
FILE *fp;
int i,j,n=1,N,a[20][20],num;
int temp;
int k=0,count=0;
 
 
printf("Lab-II A: File reading and writing \n");
 
printf("*******Programed By Xu Jian********\n\n");
 
printf("Enter the value for N\n");
scanf("%d", &N);
 
 
 
  myFile = fopen("MatixA.txt", "w");
if ( myFile )
{
 
for(i=0;i<=N;i++)
  for(j=0;j<N;j++)
   a[i][j]=rand()%100;
  for(i=0;i<N;i++)
  {
for(j=0;j<N;j++)
{
printf("%5d", a[i][j]);
fprintf(myFile,"%5d", a[i][j]);
 
}
printf("\n");
fprintf(myFile, "\n");
 
}
printf("\============ \n");
printf("\ MatrixA and OutputMatrix from MatrixA.txt and OutputMatrix.txt files \n\n");
 
fclose(myFile);
 
 
fp=fopen("MatixA.txt","r");
 
if(fp==NULL)
{
printf("Open File error!");
}
else
{
 
num=a[0][0];
temp=2;
fscanf(fp,"%d", &temp);
while(temp<=num/2)
{
if(num%temp==0)
break;
temp++;
}
if (temp>=num/2,temp=0)
printf("The number is prime");
 
else
printf("The number is not prime");;
 
getch();
}
fclose(fp);
myFile2 = fopen("OutputMatrix.txt", "w");
    if ( myFile2 )
  {
 
fprintf(myFile2,"%5d",temp);
 
 
}
fclose(myFile2);
 
}
 
 
}

[ 本帖最后由 fantasysonic 于 2011-10-26 23:02 编辑 ]
2011-10-26 23:00
Y_Jo_1
Rank: 4
等 级:业余侠客
帖 子:59
专家分:215
注 册:2011-10-20
收藏
得分:7 
我看的也头疼了
2011-10-26 23:12
我不是大虾
Rank: 2
等 级:论坛游民
帖 子:38
专家分:29
注 册:2011-10-26
收藏
得分:7 
科班出身就是牛啊,布置个作业还纯英文。
2011-10-26 23:12
laznrbfe
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
帖 子:482
专家分:1599
注 册:2011-5-22
收藏
得分:7 
楼主翻译一下。
2011-10-27 15:07
快速回复:又是一个头痛的作业。。。哎。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.039990 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved