Skip to content

Branchtwo #1

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: main
Choose a base branch
from
Open
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
8 changes: 3 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<java.version>17</java.version>
<azure.version>3.13.0</azure.version>
</properties>


<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -41,11 +43,7 @@
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/example/demo/MedishopApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;


@Controller
@SpringBootApplication
public class MedishopApplication {

public static void main(String[] args) {
SpringApplication.run(MedishopApplication.class, args);
}
@GetMapping("/booking")
public String form(){
return "form.html";
}

}
10 changes: 5 additions & 5 deletions src/main/java/com/example/demo/clinic.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ public class clinic {
public clinic() {

}
public clinic(String firstname,String surname,int phone,String mail,int age) {
public clinic(String firstname,String surname,String phone,String mail,int age) {
this.firstname=firstname;
this.surname=surname;
this.phone=phone;
this.phone= phone;
this.mail=mail;
this.age=age;
}
@Id
private int id;
private String firstname;
private String surname;
private int phone;
private String phone;
private String mail;
private int age;
public int getId() {
Expand All @@ -39,10 +39,10 @@ public String getSurname() {
public void setSurname(String surname) {
this.surname = surname;
}
public int getPhone() {
public String getPhone() {
return phone;
}
public void setPhone(int phone) {
public void setPhone(String phone) {
this.phone = phone;
}
public String getMail() {
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/example/demo/cliniccontrols.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
import java.util.Optional;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;

@RequestMapping("/details")
public class cliniccontrols implements inter {

@Override
Expand Down Expand Up @@ -86,11 +89,15 @@ public void inter (inter obj) {
this.obj=obj;
}




@PostMapping("/")
@ResponseStatus(HttpStatus.CREATED)
public clinic createclinic(@RequestBody clinic clini) {
return obj.save(clini);
}
@GetMapping("/")
public Iterable<clinic> getclinic(){
return obj.findAll();
}
Expand Down
179 changes: 179 additions & 0 deletions src/main/java/com/example/demo/form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">

<title>Wellme appointment service</title>
<style>
.headname{
font-family:Arial, Helvetica, sans-serif;
text-align:center;
background-color:blue;
color:pink
}
.headname.padding{
padding-top:25px;
padding-bottom:25px;
padding-left:300px;
padding: right 300px;
}
.details{
background-color:rgb(43, 204, 43);
color:black;
text-align:center;
}
hr{
border:1px solid red;
}
.message{
background-color:cyan;
color:tomato
}
.reason{
background-color:yellow;
color:rgb(117, 16, 117);
text-align:center;
}
.grid{
display:grid;
justify-content: space-evenly;
grid-template-columns: 50px 50px 50px;
grid-gap: 10px;
background-color: #2196F3;
padding: 10px;
font-size:20px
}
.b{
background-color:lightblue;
font-size:15px;
color:crimson;
border-color: red;
width:100px;
}
.final{
background-color:orange;
display:grid;
justify-content:space-evenly;
grid-template-columns: 75px 75px;
grid-gap: 20px;
padding:10px;
font-size:20px
}
.slots{
background-color:palevioletred;
color:purple;
text-align:center;
}
.fil{
background-color:paleturquoise;

}


</style>
</head>
<body>
<div class="headname">
<h1> WELL ME CLINIC :) </h1>
</div>

<form class="fil">

<div class="message">
<marquee>WELCOME TO WELL ME CLINIC:)--PLEASE ENTER YOUR DETAILS TO GET AN APPOINMENT</marquee>
</div>
<div class="details">
<hr>
<label for="firstname">
FIRSTNAME :
</label>
<input type="text" name="firstname" id="firstname" placeholder="Enter your firstname" size="20" required/>
<hr>
<label for="surname">
SURNAM :
</label>
<input type="text" id="surname" name="lastname" placeholder="Enter your surname" size="20" required/>
<hr>
<label for="initial">
INITIAL :
</label>
<input type="text" id="initial" name="initial" placeholder="initial" size="3" required/>
<hr>
<label for="gender">
GENDER :
</label>
<br>
<input type="radio" id="gender" name="gender" value="MALE" />MALE
<br>
<input type="radio" id="gender" name="gender" value="FEMALE"/>FEMALE
<br>
<input type="radio" id="gender" name="gender" value="OTHER"/>OTHER
<hr>
<label for="phone">
PHONE NO :
</label>
<input type="text" id="phone" placeholder="Country Code" value="91" size="2"/>
<input type="text" name="phone" id="phone" placeholder="phone no" size="10" required/>
<hr>

</div>
<div class="message">
<marquee>NOTE: Appointments could be booked only before 24 hours the day you want the appointment. No prior booking is allowed. Please ensure your presence
only on the slot you have booked.If there is any change in the slot timings our receptionist would contact you. </marquee>

</div>
<div class="reason">
<label for="problems">PLEASE SELECT THE REASON FOR YOUR DOCTOR'S APPOINTMENT</label>
<br>
<input type="checkbox" id="problems" name="problems" value="fever or cold" checked/>
<label>fever or cold</label> <br>
<input type="checkbox" id="problems" name="problems" value="headaches or bodyaches"/>
<label>headaches or bodyaches</label> <br>
<input type="checkbox" id="problems" name="problems" value="sprain or fractures"/>
<label>sprain or fractures</label> <br>
<input type="checkbox" id="problems" name="problems" value="infections"/>
<label>infections</label> <br>
<input type="checkbox" id="problems" name="problems" value="digestion problems"/>
<label>digestion problems</label> <br>
<input type="checkbox" id="problems" name="problems" value="others"/>
<label>others</label> <br>
</div>
<div class="slots">
<label>
SELECT YOUR SLOTS:
</label>
<br>
<input type="radio" id="slot" name="slot" value="8AM to 11AM" onclick="changea()"/>8AM to 11AM<br>
<input type="radio" id="slot" name="slot" value="1PM to 4PM" onclick="changeb()"/>1PM to 4PM<br>
<input type="radio" id="slot" name="slot" value="6PM to 9PM" onclick="changec()"/>6PM to 9PM
<hr>
<script>
function changea(){
alert("Your slot is 8AM to 11AM");
}
function changeb(){
alert("Your slot is 1PM to 4PM");
}
function changec(){
alert("Your slot is 6PM to 9PM");
}
</script>

</div>
<div class="final">
<button class="submis" onclick="submis()">SUBMIT</button>
<button class="res" type="reset" onclick="res()">RESET</button>
<script>
function submis(){
alert("Your form has been succesfully submitted");
}
function reset(){
alert("Your form has been reseted");
}
</script>
</div>
</form>


</body>
</html>
2 changes: 2 additions & 0 deletions src/main/java/com/example/demo/inter.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@

public interface inter extends CrudRepository<clinic,Integer>{




}
2 changes: 2 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
logging.level.org.springframework.jdbc.core=DEBUG


spring.datasource.url=jdbc:sqlserver://welldataserve.database.windows.net:1433;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
spring.datasource.username=Shanmugapriya@welldataserve
spring.datasource.password=servy@2002