Question

In: Computer Science

A Private Poly Clinic in City wish to develop software to automate their Patient Monitoring system...

A Private Poly Clinic in City wish to develop software to automate their Patient Monitoring system for storing the details of the patients visited the clinic. Develop a system to meet the following requirements:

  1. Develop an algorithm, flow chart and write a C program to read the gender of

patients and fees to be paid by them as shown in the below table. Calculate the

total fees paid by the female and male patients separately and display them

with appropriate statements.

  

Patient Id

Fees in (OMR)

      Gender

P001

15

M

P002

10

F

P003

20

M

P004

8

F

P005

12

M

  1. Read the fees paid by ‘N’ patients into a one dimensional array in random order. Develop an algorithm, flow chart and write a C program to arrange the fees read in ascending order. Display the result with appropriate statements.

  1. Develop an algorithm, flow chart and write a C program to read the name of a patient which has a multi word and display it and the acromatic string of the name.

Sample Output : Name : Khamis Al Araimi

                           Acromatic String: AKAA

  1. The clinic wish to give 15% discount on the fees to be paid by the patients whose age is above 60. Develop an algorithm, flow chart and write a C program to read age of the patient and calculate the fees after the discount by writing a function with argument. Display the result with appropriate statements.

Solutions

Expert Solution

Hello student in above stated question we have 4 parts as mentioned and i am going to solve one by one each. If you have any query please let me know and rate the answer

1). Displaying total fees paid by male and female patients along with there gender

Flow chart

Algorithm

read number of patients

nop=n

for i=1 to nop

{

read patients gender

read patients fee

if gender equals to male

fee_of_male increment by 1

else

fee_of_female increment by 1

}

display male patients fee

display female patients fee

C Program

#include <stdio.h>

int main()
{ char gender;
float fee=0,total_fee_male=0,total_fee_female=0;
int nop; // total number of patients
printf("enter a number of patients \n");
scanf("%d",&nop);

  
for (int i=0;i<nop;i++)
{
printf("Enter patients gender\n");
scanf("%c",&gender);

printf("Enter of patients fee\n");
scanf("%f",&f);

if ((gender=='m')||(gender=='M'))
{

total_fee_male= total_fee_male + fee;   
}
  
else
{
total_fee_female = total_fee_female + fee;
}
}
printf("fees paid by male %f /n", total_fee_male);
printf("fees paid by female %f /n", total_fee_male);


return 0;
}

2) Fees in ascending order

Flow chart

Algorithm

read number of patients

nop =n

for i =1 to nop

{

read patients fees

}

for i=1 to nop

{

for j=i+1 to nop

{ temp= fee[i]

fee[i]= fee[j]

fee[j] = fee[i]

}

}

display fees in ascending order

C Program

#include <stdio.h>

int main ()
{int n,i,j;
printf ("enter a no.of patients \n");
scanf ("%d", &n);
float f[n],t;
for (i = 0; i < n; i++)
{
printf("enter a fee patients \n");
scanf("%f",&f[i]);
}


for (i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{
if(f[i]>f[j])
{
t=f[i];
f[i]=f[j];
f[j]=t;
}
}
}

printf("fees are arranged in ascending order \n");
for ( i = 0; i < n; i++)
{
  
printf("%f \n",f[i]);
}
  
return 0;
}

3)  Acromatic string


Flowchart

Algorithm

var i=0

read name of patient

display name [0]

while name[i] not equal to null

{

if name[i] equals to white space

display name[i]

increment i by 1

}

C program

#include <stdio.h>

int main()
{
char name[100];
int i=0;
printf("Enter name of a patient \n");
gets(name);

printf("%c",name[0]);
while (name [i]!='\0')
{
if(name[i]==' ')
{
i++;
printf("%c",name[i]);
}
i++;
}
getch();

return 0;
}

4) 15% discount

Flow chart

C program

#include <stdio.h>

void discount (int a, float f)
{
if (a>60)
{ float d;
d=f * 0.15;
f=f-d;
printf("fees to be paid after discount \n");
printf("%f",f);
}

else
{
printf("fees to be paid %f \n", f);
printf("%f",f);
}
}   
  


int main()
{ void discount(int a,float f);
int age;
float fee;
printf("Enter a patients age \n");
scanf("%d",&age);
  
printf("Enter a patients fee \n");
scanf("%f",&fee);
  
void discount(age,fee);




return 0;
}


Related Solutions

A Private Poly Clinic in Oman wish to develop software to automate their Patient Monitoring system...
A Private Poly Clinic in Oman wish to develop software to automate their Patient Monitoring system for storing the details of the patients visited the clinic. Develop a system to meet the following requirements: Develop an algorithm, flow chart and write a Looping in C program to read the gender of patients and fees to be paid by them as shown in the below table. Calculate the total fees paid by the female and male patients separately and display them...
Question: You are hired to develop an automatic patient monitoring system for a home-bound patient. The...
Question: You are hired to develop an automatic patient monitoring system for a home-bound patient. The system is required to read out the patient’s heart rate and blood pressure and compare them against specified safe ranges. The system also has activity sensors to detect when the patient is exercising and adjust the safe ranges. In case an abnormality is detected, the system must alert a remote hospital. (Note that the measurements cannot be taken continuously, since heart rate is measured...
A private neighborhood health clinic wants to automate management of their operations by implementing an interactive...
A private neighborhood health clinic wants to automate management of their operations by implementing an interactive web-based software system using the html5 standard, which should make the system run on tablets and smart phones as well as desktop and laptop machines. The Clinic Management System (CMS) is to be used by both patients and the clinic personnel (doctors, nurses, and administrative staff). A patient will be able to make on-line appointments for an examination, cancel an existing appointment, inspect lab...
A programmer plans to develop a new software system. In planning for the operating system that...
A programmer plans to develop a new software system. In planning for the operating system that he will? use, he needs to estimate the percentage of computers that use a new operating system. How many computers must be surveyed in order to be 90?% confident that his estimate is in error by no more than four percentage points? B) Assume that a recent survey suggests that about 91?% of computers use a new operating system
A programmer plans to develop a new software system. In planning for the operating system that...
A programmer plans to develop a new software system. In planning for the operating system that he will​ use, he needs to estimate the percentage of computers that use a new operating system. How many computers must be surveyed in order to be 95​% confident that his estimate is in error by no more than five percentage points question marks? Complete parts​ (a) through​ (c) below. Round to nearest integer. Assume that nothing is known about the percentage of computers...
A programmer plans to develop a new software system. In planning for the operating system that...
A programmer plans to develop a new software system. In planning for the operating system that he will​ use, he needs to estimate the percentage of computers that use a new operating system. How many computers must be surveyed in order to be 9595​% confident that his estimate is in error by no more than fivefive percentage points question mark s? Complete parts​ (a) through​ (c) below. ​a) Assume that nothing is known about the percentage of computers with new...
A programmer plans to develop a new software system. In planning for the operating system that...
A programmer plans to develop a new software system. In planning for the operating system that he will​ use, he needs to estimate the percentage of computers that use a new operating system. How many computers must be surveyed in order to be 99​% confident that his estimate is in error by no more than three percentage points question marks? ​a) Assume that nothing is known about the percentage of computers with new operating systems. n=___ ​b) Assume that a...
A programmer plans to develop a new software system. In planning for the operating system that...
A programmer plans to develop a new software system. In planning for the operating system that he will​ use, he needs to estimate the percentage of computers that use a new operating system. How many computers must be surveyed in order to be 95​% confident that his estimate is in error by no more than five percentage points question marks? Complete parts​ (a) through​ (c) below. ​a) Assume that nothing is known about the percentage of computers with new operating...
java program You are required to implement a Patient Information System for a clinic according to...
java program You are required to implement a Patient Information System for a clinic according to the following specifications: Class #1 PatientRecords (Tester class with main): This class contains a full list of patients (array list) and it provides the following functionalities: Add patient by ID-Number Print all records Print the number of patients based on specific attributes such as: disease name, gender. ***** See examples below for the input format (use console) Class #2 Patient: This class contains personal...
How the current Electronic health record (EHR) system is used for remote patient monitoring process to...
How the current Electronic health record (EHR) system is used for remote patient monitoring process to enhance or detract from team collaboration during workflow?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT