Professional Documents
Culture Documents
By
1|Page
DSC-PROJECT
SECTION-B(BATCH-)
CONTENTS Pg.no
1. ABSTRACT 3-4
5-6
2. PROJECT REQUIRMENTS
7-8
3. PROJECT DOCUMENTATION
4. CODE 9-16
5. OUTPUTS 17-19
2|Page
ABSTRACT:
ENTER
ADD CUSTOMER
BILL
DISPLAY BILL
3|Page
This code provides simplest and the best way to print
PROJECT REQUIREMENTS:
4|Page
Delphi. It is bundled with, and uses, the MinGW or TDM-
GCC 64bit port of the GCC as its compiler.
5|Page
Project Documentation:
In CASE 1:
We are reading the details of the items (i.e, ITEM NAME,
COMPANY NAME, MRP, NET WEIGHT, UNITS)Of a store.
In CASE 2:
We are adding the details of customer (i.e, customer name,
customer mobile no, customer address).
In CASE 3:
We are billing the items using customer id i.e, “strcmpr”
In case 4:
We are displaying the bill.
6|Page
PRINTING THE DETAILS OF PATIENT
FEE IN
HOSPITAL
Code:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node
{
int type,age,room;
char name[50],no[50];
int time,stime;
int bills,dd,mm,yy,etime,mmm,yyy,ddd,d=1;
int tot,j;
struct node *link;
char
father_name[10],blood_group[10],disease[20];
int roomno,registration_no,days,d1,m1,y1;
float room_charges,test_fees,total;
};
typedef struct node node1;
node1 *f=NULL,*s=NULL;
int k=1,z;
char x[20];
7|Page
node1 *enter()
{
node1 *t;
t=(node1*)malloc(sizeof(node1));
printf("Enter the name of the patient ");
scanf("%s",&t->name);
printf("\n Enter age of the patient :");
scanf("%d",&t->age);
printf("Enter Room no. :");
scanf("%d",&t->room);
printf("Enter Registration no. :");
scanf("%s",&t->no);
printf("Enter the date of joining in 'DATE'in
(dd/mm/yy) format : ");
scanf("%d%d%d",&t->dd,&t->mm,&t->yy);
printf("\n enter bloodgroup");
scanf("\n %s",&t->blood_group);
printf("\n enter disease");
scanf("\n %s",&t->disease);
t->link=NULL;
if(f==NULL)
f=t;
else
s->link=t;
s=t;
return f;
}
void bill(node1 *t)
{
8|Page
node1 *r;
printf("\n enter discharging patient registration no :");
scanf("%s",&x);
r=f;
while(r!=NULL)
{
z=strcmp(r->no,x);
if(z==0)
{
else
printf("\n'NO PATIENT FOUND'
\n");
r=r->link;
}
}
void display(node1 *t)
{
node1 *p;
p=t;
printf("\n");
while(p!=NULL)
{
printf("\n-----------------------------------");
printf("\n\t\tBILL\n");
printf(" \t APOLLO\n");
printf(" \t HASANPARTHY");
10 | P a g e
printf("\n-----------------------------------");
printf("\n APOLLO hospital");
printf("\nsecunderabad.");
printf("\n\t\t\t\t date:%d %d %d",p-
>dd,p->mm,p->yy);
printf("\n-------------------------------------
--------------");
printf("\n patient name :%s",p-
>name);
printf("\n\n no of days stayed :%d",p-
>days);
printf("\n room charges :%f",p-
>room_charges);
printf("\n test charges :%f",p-
>test_fees);
printf("\n __________________");
printf("\n total charges :%f",p-
>total);
printf("\n __________________");
}
p=p->link;
}
int main()
{
int ch;
while(1)
{
11 | P a g e
printf(" \tWELCOME TO 'APOLLO HOSPITAL'\t\n");
printf("\n 1-ENTER\n2-BILL\n3-DETAILS OF
PATIENT\n0-EXIT");
printf("\n enter your choice");
scanf("%d",&ch);
switch(ch)
{
case 1:f=enter();
break;
case 3:display(f);
break;
case 2:bill(f);
break;
case 0:exit(0);
break;
}
}
}
12 | P a g e
OUTPUT:
Entering the details:
Printing:
13 | P a g e
Searching the item:
Deleting an item :
14 | P a g e
15 | P a g e