Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

EE-563 Micro-Electromechanical Systems (MEMS

ASSIGNMENT

Submitted to: Dr. Farooq Ahmad

Submitted by: Amin Akhtar

Reg# 2022-PhD-EE-02

Department of Electrical Engineering


University of Engineering & Technology Lahore, Pakistan
Code that make decision of medicine for a patient after taking some
symptoms
Medical decision-making is a complex task that requires a high degree of expertise and
knowledge of medical conditions, symptoms, and treatments. It is important that medical
decisions are made by licensed medical professionals who are qualified to make such
decisions. Any software or code designed to assist in medical decision-making must be
carefully designed, thoroughly tested, and comply with all relevant regulations and ethical
guidelines.

C++ Code:
#include <iostream>

#include <string>

using namespace std;

int main() {

// Declare variables to hold patient symptoms

name, age, temp, headache, cough, BP, heartbeat;

// Ask patient for Data

cout << "Name of Patient ";

cin >> name;

cout << "Age of Patient ";

cin >> age;

// Ask patient for symptoms

cout << "Enter Temperature of the Patient ";

cin >> temp;

cout << "Do you have headache? ";

cin >> headache;

cout << "Do you have a cough? ";


cin >> cough;

cout << "Enter Blood Pressure of the Patient ";

cin >> BP;

cout << "Enter Heart Beat of the Patient ";

cin >> heartbeat;

// Make decision based on symptoms

if (temp >= 99 && headache == 1 && cough == 1&& BP >= 150 && heartbeat >= 80)
{
cout << "medicine Name 1 ";
}
else if(temp >= 100 && headache == 0 && cough == 1&& BP >= 160 && heartbeat >=
90)
{
cout << "medicine Name 2 ";
{
else if(temp >= 101 && headache == 1 && cough == 0&& BP >= 140 && heartbeat >=
100)
{
cout << "medicine Name 3 ";
{
else if(temp >= 96 && headache == 0 && cough == 1 && BP >= 170 && heartbeat >= 90)
{
cout << "medicine Name 4 ";
{
else if(temp >= 90 && headache == 1 && cough == 0 && BP >= 120 && heartbeat >= 60)
{
cout << "medicine Name 5 ";

}
else {
cout<< "No medicine can be prescribed";
}

return 0;

You might also like