diff --git a/G24/G24.docx b/G24/G24.docx new file mode 100644 index 0000000..6738139 Binary files /dev/null and b/G24/G24.docx differ diff --git a/G24/G24.pptx b/G24/G24.pptx new file mode 100644 index 0000000..f721f14 Binary files /dev/null and b/G24/G24.pptx differ diff --git a/HealthCard.pro b/HealthCard.pro new file mode 100644 index 0000000..bda2706 --- /dev/null +++ b/HealthCard.pro @@ -0,0 +1,35 @@ +QT += core gui sql + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + databaseconnection.cpp \ + docpatop.cpp \ + doctorreg.cpp \ + main.cpp \ + healthc.cpp + +HEADERS += \ + databaseconnection.h \ + docpatop.h \ + doctorreg.h \ + healthc.h + +FORMS += \ + docpatop.ui \ + doctorreg.ui \ + healthc.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + resources.qrc diff --git a/HealthCard.pro.user b/HealthCard.pro.user new file mode 100644 index 0000000..9f45601 --- /dev/null +++ b/HealthCard.pro.user @@ -0,0 +1,321 @@ + + + + + + EnvironmentId + {c8c578e6-0b16-40b4-8507-f4e58c790cd9} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + -fno-delayed-template-parsing + + true + Builtin.BuildSystem + + true + true + Builtin.DefaultTidyAndClazy + 4 + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop Qt 6.1.0 MinGW 64-bit + Desktop Qt 6.1.0 MinGW 64-bit + qt.qt6.610.win64_mingw81_kit + 0 + 0 + 0 + + 0 + C:\Users\harsh\Documents\build-HealthCard-Desktop_Qt_6_1_0_MinGW_64_bit-Debug + C:/Users/harsh/Documents/build-HealthCard-Desktop_Qt_6_1_0_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + C:\Users\harsh\Documents\build-HealthCard-Desktop_Qt_6_1_0_MinGW_64_bit-Release + C:/Users/harsh/Documents/build-HealthCard-Desktop_Qt_6_1_0_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + C:\Users\harsh\Documents\build-HealthCard-Desktop_Qt_6_1_0_MinGW_64_bit-Profile + C:/Users/harsh/Documents/build-HealthCard-Desktop_Qt_6_1_0_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + + 25 + + 1 + true + false + true + + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/harsh/Documents/HealthCard/HealthCard.pro + C:/Users/harsh/Documents/HealthCard/HealthCard.pro + false + true + true + false + true + C:/Users/harsh/Documents/build-HealthCard-Desktop_Qt_6_1_0_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/databaseconnection.cpp b/databaseconnection.cpp new file mode 100644 index 0000000..df0a81b --- /dev/null +++ b/databaseconnection.cpp @@ -0,0 +1,18 @@ +#include "databaseconnection.h" +#include +DatabaseConnection::DatabaseConnection() +{ + dataBase = QSqlDatabase::addDatabase("QSQLITE"); + dataBase.setDatabaseName(":/img/registration.db"); +} +bool DatabaseConnection::Connect() +{ + if(dataBase.open()) + return true; + else return false; + +} +void DatabaseConnection::Disconnect() +{ + dataBase.close(); +} diff --git a/databaseconnection.h b/databaseconnection.h new file mode 100644 index 0000000..0487d0c --- /dev/null +++ b/databaseconnection.h @@ -0,0 +1,16 @@ +#ifndef DATABASECONNECTION_H +#define DATABASECONNECTION_H +#include + +class DatabaseConnection +{ +private: + QSqlDatabase dataBase; + +public: + DatabaseConnection(); + bool Connect(); + void Disconnect(); +}; + +#endif // DATABASECONNECTION_H diff --git a/docpatop.cpp b/docpatop.cpp new file mode 100644 index 0000000..9e1d53a --- /dev/null +++ b/docpatop.cpp @@ -0,0 +1,64 @@ +#include "docpatop.h" +#include "ui_docpatop.h" +#include "doctorreg.h" +#include +#include "databaseconnection.h" +#include +#include +#include + +docpatop::docpatop(QWidget *parent) : + QDialog(parent), + ui(new Ui::docpatop) +{ + ui->setupUi(this); + QPixmap pix(":/img/goll.png"); + int width = ui->label_regis->width(); + int height = ui->label_regis->height(); + ui->label_regis->setPixmap(pix.scaled(width,height,Qt::KeepAspectRatio)); + + ui->comboBox_gender->addItem(QIcon(":/img/male.png"),"Male"); + ui->comboBox_gender->addItem(QIcon(":/img/female.png"),"Female"); +} + +docpatop::~docpatop() +{ + delete ui; +} + +void docpatop::on_pushButton_clicked() +{ +} + + +void docpatop::on_pushButton_sumit_clicked() +{ + QString name = ui->lineEdit_name->text(); + QString phone = ui->lineEdit_phone->text(); + QString gender = ui->comboBox_gender->currentText(); + QString email = ui->lineEdit_email->text(); + QString state = ui->lineEdit_state->text(); + QString city = ui->lineEdit_city->text(); + QString aadhar = ui->lineEdit_aadhar->text(); + QString allergies = ui->lineEdit_mjrdis->text(); + QString reginum = ui->lineEdit_regnum->text(); + QString specila = ui->comboBox_spec->currentText(); + QString docornot = "YES"; + + + + DatabaseConnection connection; + + if(connection.Connect()) + { + qDebug()<<"Connected"; + } + + QSqlQuery query; + if(query.exec("INSERT INTO registration_table VALUES ('"+name+"',+'"+phone+"','"+gender+"','"+email+"','"+state+"','"+city+"','"+aadhar+"','"+allergies+"','"+docornot+"','"+reginum+"','"+specila+"')")) + { + qDebug()<<"Query Executed"; + } + +} + diff --git a/docpatop.h b/docpatop.h new file mode 100644 index 0000000..cddfbdb --- /dev/null +++ b/docpatop.h @@ -0,0 +1,27 @@ +#ifndef DOCPATOP_H +#define DOCPATOP_H + +#include +namespace Ui { +class docpatop; +} + +class docpatop : public QDialog +{ + Q_OBJECT + +public: + explicit docpatop(QWidget *parent = nullptr); + ~docpatop(); + +private slots: + void on_pushButton_clicked(); + + void on_pushButton_sumit_clicked(); + +private: + Ui::docpatop *ui; + +}; + +#endif // DOCPATOP_H diff --git a/docpatop.ui b/docpatop.ui new file mode 100644 index 0000000..912e780 --- /dev/null +++ b/docpatop.ui @@ -0,0 +1,336 @@ + + + docpatop + + + + 0 + 0 + 1038 + 548 + + + + Dialog + + + + + 610 + 430 + 191 + 81 + + + + background-color: rgb(170, 255, 255); + + + Submit + + + + + + 420 + 30 + 561 + 361 + + + + + + + Please fill your details + + + + + + + + + Full Name + + + lineEdit_name + + + + + + + + + + Phone Number + + + lineEdit_phone + + + + + + + + + + Gender + + + comboBox_gender + + + + + + + + + + Email Id + + + lineEdit_email + + + + + + + + + + State + + + lineEdit_state + + + + + + + + + + City + + + lineEdit_city + + + + + + + + + + Aadhar Card Number + + + lineEdit_aadhar + + + + + + + + + + Allergies/Major Diseases + + + lineEdit_mjrdis + + + + + + + + + + + + + + + + + + + + Specialisation + + + + + + + + Ayurveda + + + + + Cardiology + + + + + Cosmetology + + + + + Dental + + + + + Dermatology + + + + + Endocrinology + + + + + ENT + + + + + Family Medicine + + + + + General Medicine + + + + + General Physician + + + + + General Surgery + + + + + Geriatrics + + + + + Gynaecology + + + + + Hepatology + + + + + Homeopathy + + + + + Nephrology + + + + + Neurology + + + + + Ophthalmology + + + + + Orthopedics + + + + + Pathology + + + + + Physiotherapy + + + + + Plastic & Cosmetic Surgery + + + + + Rheumatology + + + + + Trichology + + + + + Urology + + + + + Urosurgery + + + + + + + + Registration Number + + + + + + + + + + + + + + 20 + 10 + 371 + 561 + + + + + + + + + + diff --git a/doctorreg.cpp b/doctorreg.cpp new file mode 100644 index 0000000..2c10dbf --- /dev/null +++ b/doctorreg.cpp @@ -0,0 +1,86 @@ +#include "doctorreg.h" +#include "ui_doctorreg.h" +#include +#include "databaseconnection.h" +#include +#include +#include +doctorreg::doctorreg(QWidget *parent) : + QDialog(parent), + ui(new Ui::doctorreg) +{ + ui->setupUi(this); + QPixmap pix(":/img/goll.png"); + int width = ui->label_regis->width(); + int height = ui->label_regis->height(); + ui->label_regis->setPixmap(pix.scaled(width,height,Qt::KeepAspectRatio)); + + ui->comboBox_gender->addItem(QIcon(":/img/male.png"),"Male"); + ui->comboBox_gender->addItem(QIcon(":/img/female.png"),"Female"); + +// DatabaseConnection con; + +// if(con.Connect()){ +// qDebug() <<"Connected"; +// //ui->statusLabel->setText("Connected"); +// } +// //else ui->statusLabel->setText("Cannot Connect"); + + +// con.Disconnect(); + + +} + +doctorreg::~doctorreg() +{ + delete ui; +} + + + + + + + +void doctorreg::on_pushButton_sumit_clicked() +{ + QString name = ui->lineEdit_name->text(); + QString phone = ui->lineEdit_phone->text(); + QString gender = ui->comboBox_gender->currentText(); + QString email = ui->lineEdit_email->text(); + QString state = ui->lineEdit_state->text(); + QString city = ui->lineEdit_city->text(); + QString aadhar = ui->lineEdit_aadhar->text(); + QString allergies = ui->lineEdit_mjrdis->text(); + + + + + DatabaseConnection connection; + + if(connection.Connect()) + { + qDebug()<<"Connected"; + } + + QSqlQuery query; + if(query.exec("INSERT INTO registration_table VALUES ('"+name+"',+'"+phone+"','"+gender+"','"+email+"','"+state+"','"+city+"','"+aadhar+"','"+allergies+"','NULL','NULL','NULL')")) + { + qDebug()<<"Query Executed"; + } + + + connection.Disconnect(); + +} + + + +void doctorreg::on_pushButton_docyes_clicked() +{ + + + +} + diff --git a/doctorreg.h b/doctorreg.h new file mode 100644 index 0000000..ced8962 --- /dev/null +++ b/doctorreg.h @@ -0,0 +1,29 @@ +#ifndef DOCTORREG_H +#define DOCTORREG_H + +#include +#include "docpatop.h" +namespace Ui { +class doctorreg; +} + +class doctorreg : public QDialog +{ + Q_OBJECT + +public: + explicit doctorreg(QWidget *parent = nullptr); + ~doctorreg(); + +private slots: + + void on_pushButton_sumit_clicked(); + + void on_pushButton_docyes_clicked(); + +private: + Ui::doctorreg *ui; + +}; + +#endif // DOCTORREG_H diff --git a/doctorreg.ui b/doctorreg.ui new file mode 100644 index 0000000..df58257 --- /dev/null +++ b/doctorreg.ui @@ -0,0 +1,249 @@ + + + doctorreg + + + + 0 + 0 + 1018 + 583 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + + Dialog + + + + + 10 + 10 + 371 + 561 + + + + + + + + + + 600 + 430 + 191 + 81 + + + + background-color: rgb(170, 255, 255); + + + Submit + + + + + + 410 + 30 + 561 + 361 + + + + + + + Please fill your details + + + + + + + + + Full Name + + + lineEdit_name + + + + + + + + + + Phone Number + + + lineEdit_phone + + + + + + + + + + Gender + + + comboBox_gender + + + + + + + + + + Email Id + + + lineEdit_email + + + + + + + + + + State + + + lineEdit_state + + + + + + + + + + City + + + lineEdit_city + + + + + + + + + + Aadhar Card Number + + + lineEdit_aadhar + + + + + + + + + + + + + + + + + Allergies/Major Diseases + + + lineEdit_mjrdis + + + + + + + + + + + + + + + + + diff --git a/female.png b/female.png new file mode 100644 index 0000000..2035bdd Binary files /dev/null and b/female.png differ diff --git a/goll.png b/goll.png new file mode 100644 index 0000000..737455c Binary files /dev/null and b/goll.png differ diff --git a/healthc.cpp b/healthc.cpp new file mode 100644 index 0000000..98bc998 --- /dev/null +++ b/healthc.cpp @@ -0,0 +1,40 @@ +#include "healthc.h" +#include "ui_healthc.h" +#include +healthc::healthc(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::healthc) +{ + ui->setupUi(this); + //ui->statusbar->setStyleSheet("background-color: rgb(171, 235, 198);"); +} + +healthc::~healthc() +{ + delete ui; +} + + + + + + +void healthc::on_pushButton_clicked() +{ + + + QMessageBox::StandardButton reply = QMessageBox::question(this, "Query?", "Are you a doctor?",QMessageBox::Yes | QMessageBox::No); + if(reply== QMessageBox::Yes) + { + hide(); + reg2 = new docpatop(this); + reg2->show(); + } + else + { + hide(); + reg1 = new doctorreg(this); + reg1->show(); + } +} + diff --git a/healthc.h b/healthc.h new file mode 100644 index 0000000..fc6b0ba --- /dev/null +++ b/healthc.h @@ -0,0 +1,31 @@ +#ifndef HEALTHC_H +#define HEALTHC_H + +#include +#include "doctorreg.h" +#include "docpatop.h" + +QT_BEGIN_NAMESPACE +namespace Ui { class healthc; } +QT_END_NAMESPACE + +class healthc : public QMainWindow +{ + Q_OBJECT + +public: + healthc(QWidget *parent = nullptr); + ~healthc(); + +private slots: + + + void on_pushButton_clicked(); + +private: + Ui::healthc *ui; + doctorreg *reg1; + docpatop *reg2; + +}; +#endif // HEALTHC_H diff --git a/healthc.ui b/healthc.ui new file mode 100644 index 0000000..56723bf --- /dev/null +++ b/healthc.ui @@ -0,0 +1,776 @@ + + + healthc + + + + 0 + 0 + 989 + 530 + + + + + + + + + 170 + 255 + 255 + + + + + + + 171 + 235 + 198 + + + + + + + 171 + 235 + 198 + + + + + + + + + 170 + 255 + 255 + + + + + + + 171 + 235 + 198 + + + + + + + 171 + 235 + 198 + + + + + + + + + 170 + 255 + 255 + + + + + + + 171 + 235 + 198 + + + + + + + 171 + 235 + 198 + + + + + + + + healthc + + + 5.000000000000000 + + + + + + 170 + 40 + 821 + 101 + + + + <html><head/><body><p><span style=" font-size:40pt; font-weight:800; color:#ffffff;">Welcome to Health Card</span></p></body></html> + + + + + + 134 + 263 + 380 + 45 + + + + <html><head/><body><p><span style=" font-size:22pt; font-weight:600; color:#ffffff;">New to health Card?</span></p></body></html> + + + + + + 541 + 272 + 321 + 35 + + + + + + + + + 170 + 255 + 255 + + + + + + + 255 + 255 + 127 + + + + + + + 170 + 255 + 255 + + + + + + + 170 + 255 + 255 + + + + + + + 255 + 255 + 127 + + + + + + + + + 170 + 255 + 255 + + + + + + + 255 + 255 + 127 + + + + + + + 170 + 255 + 255 + + + + + + + 170 + 255 + 255 + + + + + + + 255 + 255 + 127 + + + + + + + + + 170 + 255 + 255 + + + + + + + 255 + 255 + 127 + + + + + + + 170 + 255 + 255 + + + + + + + 170 + 255 + 255 + + + + + + + 255 + 255 + 127 + + + + + + + + + 12 + 50 + false + + + + background-color: rgb(170, 255, 255); + + + Register + + + + + + 134 + 209 + 379 + 45 + + + + <html><head/><body><p><span style=" font-size:22pt; font-weight:600; color:#ffffff;">Health Card Number</span></p></body></html> + + + + + + 540 + 220 + 321 + 31 + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + 171 + 235 + 198 + + + + + + + 255 + 255 + 255 + + + + + + + 213 + 245 + 226 + + + + + + + 85 + 117 + 99 + + + + + + + 114 + 157 + 132 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 171 + 235 + 198 + + + + + + + 0 + 0 + 0 + + + + + + + 213 + 245 + 226 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 171 + 235 + 198 + + + + + + + 255 + 255 + 255 + + + + + + + 213 + 245 + 226 + + + + + + + 85 + 117 + 99 + + + + + + + 114 + 157 + 132 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 171 + 235 + 198 + + + + + + + 0 + 0 + 0 + + + + + + + 213 + 245 + 226 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + 85 + 117 + 99 + + + + + + + 171 + 235 + 198 + + + + + + + 255 + 255 + 255 + + + + + + + 213 + 245 + 226 + + + + + + + 85 + 117 + 99 + + + + + + + 114 + 157 + 132 + + + + + + + 85 + 117 + 99 + + + + + + + 255 + 255 + 255 + + + + + + + 85 + 117 + 99 + + + + + + + 171 + 235 + 198 + + + + + + + 171 + 235 + 198 + + + + + + + 0 + 0 + 0 + + + + + + + 171 + 235 + 198 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + + + + + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..189a419 --- /dev/null +++ b/main.cpp @@ -0,0 +1,11 @@ +#include "healthc.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + healthc w; + w.show(); + return a.exec(); +} diff --git a/male.png b/male.png new file mode 100644 index 0000000..f9ff4c1 Binary files /dev/null and b/male.png differ diff --git a/registration.db b/registration.db new file mode 100644 index 0000000..d99ef40 Binary files /dev/null and b/registration.db differ diff --git a/resources.qrc b/resources.qrc new file mode 100644 index 0000000..dc33d6b --- /dev/null +++ b/resources.qrc @@ -0,0 +1,8 @@ + + + female.png + goll.png + male.png + registration.db + +