Skip to content

a #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

a #3

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ mongoose
useCreateIndex: true,
})
.then((result) =>
app.listen(9000, () => {
console.log("running on port 9000");
app.listen(3030, () => {
console.log("running on port 3030");
})
)
.catch((err) => console.log("yash", err));
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ejs": "^3.1.3",
"express": "^4.18.2",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.9.23",
"mongoose": "^5.13.15",
"nodemailer": "^6.8.0",
"nodemon": "^2.0.20",
"validator": "^13.7.0"
Expand All @@ -29,8 +29,8 @@
"url": "https://github.com/iamshaunjp/node-express-jwt-auth/issues"
},
"homepage": "https://github.com/iamshaunjp/node-express-jwt-auth#readme",
"description": "",
"devDependencies": {
"kill-port": "^2.0.1"
}
},
"description": ""
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,40 @@ html {

body {

font-size: 20px;
font-size: 25px;
background: #fff;

}

input[type="text"], input[type="email"], input[type="tel"], input[type="password"] {
width: 80%;
padding: 5px;
padding: 10px;
margin: 20px 0;
border: 2px solid #000 ;
border: 3px solid #99ddd0 ;
border-radius: 5px;
font: 0.75em sans-serif;
}

select[id='hospitals']{
width: fit-content;
padding: 10px;
margin: 20px 0;
border: 3px solid #99ddd0 ;
border-radius: 5px;
font: 0.75em sans-serif;
}

input[type='radio'], input[name="Blood Group"] {

padding: 5px;
padding: 10px;
margin: 20px 0;
border: 2px solid #000 ;
border: 3px solid #99ddd0;
border-radius: 5px;
font: 0.75em sans-serif;
}



input[type=submit] {
width: 70%;
border-radius: 12px;
Expand All @@ -64,9 +77,6 @@ input[type=submit]:hover {
background-color: #35d7b9;
}




.column {
float: left;
width: 50%;
Expand Down Expand Up @@ -145,14 +155,10 @@ input[type=submit]:hover {
display: none;
}

#results{
border: 3px solid #444;
border-radius: 5px ;
display: none;
margin-left: 5px;

}
#results h3{
color: #16a085;

#hospitals{
padding: 5px;
margin: 20px 0;
border: 2px solid #000 ;
border-radius: 5px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
form label[for=address]
{
align-self: flex-start;
margin-left: 20%;
margin-left: 37%;
}

#dob{
Expand Down Expand Up @@ -211,8 +211,14 @@
align-items: center;
flex-wrap: wrap;
gap: 2rem;

}
.column {
float: left;
width: 50%;
}




.book .row form {
Expand Down Expand Up @@ -254,4 +260,22 @@
#appointment-type{
width: 90%;
}

.image{
width: 50%;



}

.container{
width: 50%;
margin-top: -30px;
}
.row {
margin: 50px;
padding-top: 40px;
padding-left: 50px;

}

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ const result = document.getElementById("results");
const button= document.getElementById("submitButton");
const sendEmail = require('../js/sendEmail');
const Sendmail=require('../js/sendEmail')


const hospitals= document.getElementById("hospitals");
var Hospital = $("input[type='radio'][name='hospital']:checked").val();
let selectedHospital;
var hospital = {};

function fetchBedData() {

Expand All @@ -19,27 +21,74 @@ function fetchBedData() {
fetch(url).then((response) => response.json()).then((json) => {
console.log(json);
let bedcount;
let noOfHospitals =0;


let Hospitals=[];
bedcount=0;
for (let x of json.data.medicalColleges) {
if (x.city === city) {

noOfHospitals+=1;

bedcount=bedcount+ x.hospitalBeds;
console.log(bedcount);
console.log(noOfHospitals);
console.log(x.name);
Hospitals+=x.name;


}

}

if(bedcount===0){
swal("Sorry, No bed found");
} else {

if (confirm("Confirm booking") == true) {
swal("You will recieve a confirmation mail");
swal(selectedHospital);
// sendEmail()
} else {
swal("You canceled!");
}
}

});
}
}

function setHospitals() {
const form = document.getElementById("register").elements;
const url = "https://api.rootnet.in/covid19-in/hospitals/medical-colleges";
const prefCity = form.city.value;
const recvEmail = form.email.value.replace(/(^\w{1})|(\s+\w{1})/g, letter => letter.toLowerCase());
const city = prefCity.replace(/(^\w{1})|(\s+\w{1})/g, letter => letter.toUpperCase());
const hospitals= document.getElementById("hospitals");


fetch(url).then((response) => response.json()).then((json) => {
console.log(json);
for (let x of json.data.medicalColleges) {
if (x.city === city) {

console.log(x.name);
var opt = document.createElement('option');
opt.text = x.name+" :- "+x.hospitalBeds;
hospitals.appendChild(opt)

}


};
});
req.send();
}

function selectedhospital() {
const form = document.getElementById("register").elements;
const hospitals= document.getElementById("hospitals");
let selectedHospital;

selectedHospital=hospitals.value;
console.log(selectedHospital);
}


Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var date = document.getElementById('date');
var results = document.getElementById('results');
var state = document.getElementById('state');
var selected_district = document.getElementById('district');
var pincode= $("pincode");
var pincode= $("pincode");

var DISTRICT = $("input[type='radio'][name='district']:checked").val();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<!-- <%- include('partials/header'); -%> -->
<!DOCTYPE html>
<html>
<html>

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js"></script>
<link rel="stylesheet" href="/css/bed.css">
<link
rel="stylesheet"
Expand Down Expand Up @@ -58,7 +59,8 @@

<div class="row">
<div class="column">
<img id="bed-img" src="/assets/Sick patient in bed vector.jpg" alt=""><br />
<iframe width="600px" height="450px" src="https://momento360.com/e/u/6ea426948126445da6b8224c479bdfa9?utm_campaign=embed&utm_source=other&heading=0&pitch=0&field-of-view=75&size=medium&display-plan=true"
frameborder="0"></iframe>
</div>

<div class="column">
Expand All @@ -73,11 +75,24 @@
<input type="email" name="email" id="email" placeholder="[email protected]" required>
<br>
<label for="">Phone Number :</label><br>
<input type="String" name="phone_number" id="phone" placeholder="Enter your phone number" required>
<input type="text" name="phone_number" id="phone" placeholder="Enter your phone number" required>
<br>
<label for="">City :</label><br>
<input type="text" name="city" id="city" placeholder="Enter your preferred city (e.g. Indore)" required>
<input type="text" name="city" id="city" placeholder="Enter your preferred city (e.g. Indore)" required onchange="setHospitals();" onchange= "clearhospitals();">

<br>


<br>

<label for="hospitals" class="form-label"> Select Hospital :</label>
<select onchange="selectedhospital()" id="hospitals" class="form-select" name="Hospitals">
<option value="All" selected>All</option>
</select>

<br>



<label for="">Gender :</label><br>
<input name="Gender" id="gender" type="radio" value="Male" > Male <input name="Gender" type="radio"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@


<div class="row">
<div class="image">
<img class="book-img" src="/animatedfile/book-img.svg" alt="" />
<div class="column image">
<iframe width="800px" height="750px" src="https://momento360.com/e/u/6ea426948126445da6b8224c479bdfa9?utm_campaign=embed&utm_source=other&heading=0&pitch=0&field-of-view=75&size=medium&display-plan=true"
frameborder="0"></iframe>
</div>


<div class="container">
<div class="column container">
<form action="/doctor" id="appointmentForm" method="POST">
<h2>Doctor's Appointment Form</h2> <br><br><br><br>
<h3> <u>Patient Information</u> </h3><br>
Expand Down Expand Up @@ -119,7 +120,7 @@
<input type="tel" name="phone" id="phone" placeholder="### ### ####" required>
</div>
</div>
<label for="address">Patient Address </label> <br>
<label for="address" id="address">Patient Address </label> <br>
<input type="text" name="street" id="street" placeholder="Street Address" required>
<div class="box">
<input type="text" name="city" id="city" placeholder="City" required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@
</a>
</div>

<div class="box">
<i class="fa-solid fa-file-prescription"></i>
<h3>Disease Predictor</h3>
<p>
Symptoms gives probability of possible disease based on data by users.
</p>
<a href="http://localhost:3000/" class="btn">
Visit site <span class="fas fa-chevron-right"></span>
</a>
</div>

<div class="box">
<i class="fas fa-procedures"></i>
<h3>bed facility</h3>
Expand Down