From 0daf7d7149d9086abeade980cac442fa9fa434fb Mon Sep 17 00:00:00 2001 From: Shriya Deshpande <91329086+Shriya0731@users.noreply.github.com> Date: Sun, 15 May 2022 22:21:21 +0530 Subject: [PATCH 1/7] Create README.md --- Team 20 Beyond Infinity/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Team 20 Beyond Infinity/README.md diff --git a/Team 20 Beyond Infinity/README.md b/Team 20 Beyond Infinity/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Team 20 Beyond Infinity/README.md @@ -0,0 +1 @@ + From 64e1c6b64f51efd677ec2f699c389d9a7803cc7a Mon Sep 17 00:00:00 2001 From: Shriya Deshpande <91329086+Shriya0731@users.noreply.github.com> Date: Sun, 15 May 2022 23:28:32 +0530 Subject: [PATCH 2/7] Update README.md --- Team 20 Beyond Infinity/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Team 20 Beyond Infinity/README.md b/Team 20 Beyond Infinity/README.md index 8b13789..16cc52d 100644 --- a/Team 20 Beyond Infinity/README.md +++ b/Team 20 Beyond Infinity/README.md @@ -1 +1,7 @@ - +For implementation run Dashboard.java file. +Our project implenments priority queue. +We have used MySql database to save information about receivers, hospitals. +Receivers are registered in hospitals and their blood group and organ requirement are also fed in the database. +When a donor registers , we search a suitable receiver in hospitals in the area of donor. +Each hospital has a priority queue of receivers depending on the emergency status of the receiver prescribed by the doctor. +Donor is matched with the Receiever prioritywise and by matching blood group and organ requirement. From 688905ae9fd14f44034731797b19d353829cfef9 Mon Sep 17 00:00:00 2001 From: Shriya Deshpande <91329086+Shriya0731@users.noreply.github.com> Date: Sun, 15 May 2022 23:29:51 +0530 Subject: [PATCH 3/7] Delete Team 20 Beyond Infinity directory --- Team 20 Beyond Infinity/README.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 Team 20 Beyond Infinity/README.md diff --git a/Team 20 Beyond Infinity/README.md b/Team 20 Beyond Infinity/README.md deleted file mode 100644 index 16cc52d..0000000 --- a/Team 20 Beyond Infinity/README.md +++ /dev/null @@ -1,7 +0,0 @@ -For implementation run Dashboard.java file. -Our project implenments priority queue. -We have used MySql database to save information about receivers, hospitals. -Receivers are registered in hospitals and their blood group and organ requirement are also fed in the database. -When a donor registers , we search a suitable receiver in hospitals in the area of donor. -Each hospital has a priority queue of receivers depending on the emergency status of the receiver prescribed by the doctor. -Donor is matched with the Receiever prioritywise and by matching blood group and organ requirement. From 3889b6c887108881498b0a51f07573205bade24c Mon Sep 17 00:00:00 2001 From: Shriya Deshpande <91329086+Shriya0731@users.noreply.github.com> Date: Sun, 15 May 2022 23:31:55 +0530 Subject: [PATCH 4/7] Create README.md --- Beyond Infinity : Organ Donation/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Beyond Infinity : Organ Donation/README.md diff --git a/Beyond Infinity : Organ Donation/README.md b/Beyond Infinity : Organ Donation/README.md new file mode 100644 index 0000000..4bbecfc --- /dev/null +++ b/Beyond Infinity : Organ Donation/README.md @@ -0,0 +1,7 @@ +For implementation run Dashboard.java file. Our project implenments priority queue. We have used MySql database to save information about receivers, hospitals. Receivers are registered in hospitals and their blood group and organ requirement are also fed in the database. When a donor registers , we search a suitable receiver in hospitals in the area of donor. Each hospital has a priority queue of receivers depending on the emergency status of the receiver prescribed by the doctor. Donor is matched with the Receiever prioritywise and by matching blood group and organ requirement. +Project Contributors: +1. Spoorti Aparanji +2. Shriya Deshpande +3. Disha Bhoje +4. Komal Vhanmane +5. Karuna Kadam From a8b9c19a5ce99ddd03a9754e396c0f734e11d861 Mon Sep 17 00:00:00 2001 From: Shriya Deshpande <91329086+Shriya0731@users.noreply.github.com> Date: Sun, 15 May 2022 23:33:05 +0530 Subject: [PATCH 5/7] Add files via upload --- Beyond Infinity : Organ Donation/Area.java | 21 ++ Beyond Infinity : Organ Donation/City.java | 25 ++ .../DashBoard.java | 51 +++ Beyond Infinity : Organ Donation/Donor.java | 120 ++++++ .../Donor_info.java | 346 ++++++++++++++++++ .../General_info.java | 246 +++++++++++++ .../Hospital.java | 74 ++++ .../Receiver.java | 128 +++++++ .../Receiver_info.java | 321 ++++++++++++++++ 9 files changed, 1332 insertions(+) create mode 100644 Beyond Infinity : Organ Donation/Area.java create mode 100644 Beyond Infinity : Organ Donation/City.java create mode 100644 Beyond Infinity : Organ Donation/DashBoard.java create mode 100644 Beyond Infinity : Organ Donation/Donor.java create mode 100644 Beyond Infinity : Organ Donation/Donor_info.java create mode 100644 Beyond Infinity : Organ Donation/General_info.java create mode 100644 Beyond Infinity : Organ Donation/Hospital.java create mode 100644 Beyond Infinity : Organ Donation/Receiver.java create mode 100644 Beyond Infinity : Organ Donation/Receiver_info.java diff --git a/Beyond Infinity : Organ Donation/Area.java b/Beyond Infinity : Organ Donation/Area.java new file mode 100644 index 0000000..63e80fa --- /dev/null +++ b/Beyond Infinity : Organ Donation/Area.java @@ -0,0 +1,21 @@ + +public class Area { + private String areaName; + private int areaCode; + public Area(String areaName, int areaCode) { + this.areaName = areaName; + this.areaCode = areaCode; + } + public String getAreaName() { + return areaName; + } + public void setAreaName(String areaName) { + this.areaName = areaName; + } + public int getAreaCode() { + return areaCode; + } + public void setAreaCode(int areaCode) { + this.areaCode = areaCode; + } +} diff --git a/Beyond Infinity : Organ Donation/City.java b/Beyond Infinity : Organ Donation/City.java new file mode 100644 index 0000000..63844d5 --- /dev/null +++ b/Beyond Infinity : Organ Donation/City.java @@ -0,0 +1,25 @@ +import java.util.*; +public class City { + private String cityname; + private int cityCode; + ArrayList lst; + public City(String cityname, int cityCode) { + + this.cityname = cityname; + this.cityCode = cityCode; + lst = new ArrayList<>(); + } + public String getCityname() { + return cityname; + } + public void setCityname(String cityname) { + this.cityname = cityname; + } + public int getCityCode() { + return cityCode; + } + public void setCityCode(int cityCode) { + this.cityCode = cityCode; + } + +} diff --git a/Beyond Infinity : Organ Donation/DashBoard.java b/Beyond Infinity : Organ Donation/DashBoard.java new file mode 100644 index 0000000..b8464bb --- /dev/null +++ b/Beyond Infinity : Organ Donation/DashBoard.java @@ -0,0 +1,51 @@ +import java.util.Scanner; + + +//Main class +public class DashBoard { + + public static void main(String[] args) { + // TODO Auto-generated method stub + Scanner sc=new Scanner(System.in); + boolean exit = false; + while(!exit) { + System.out.println("\n----------WELCOME TO ORGAN TRANSPLANT CENTER----------"); + System.out.println("1-Register as a donor"); + System.out.println("2-Register as a receiver"); + System.out.println("3-Login as a receiver"); + int ch=sc.nextInt(); + switch(ch){ + case 1: + //take input info + //insert donor into db + //show nearest hospitals + Donor_info d1 = new Donor_info(); + d1.AcceptInfo(); + + break; + case 2: + // Menu 1.See status + Receiver_info r1 = new Receiver_info(); + r1.AcceptInfo(); + + break; + case 3: + System.out.println("\nEnter your name: "); + sc.nextLine(); + String name = sc.nextLine(); + System.out.println("Enter Your Mobile No.:"); + long mob = sc.nextLong(); + Receiver_info r = new Receiver_info(); + r.Login(name, mob); + //display data of receiver + break; + default: + exit = true; + break; + + } + } + + + } +} \ No newline at end of file diff --git a/Beyond Infinity : Organ Donation/Donor.java b/Beyond Infinity : Organ Donation/Donor.java new file mode 100644 index 0000000..7e9fedf --- /dev/null +++ b/Beyond Infinity : Organ Donation/Donor.java @@ -0,0 +1,120 @@ +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.*; +public class Donor { + + + static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver"; + static final String DB_URL = "jdbc:mysql://localhost:3306/OrganDonation"; + static final String USER = "root"; + static final String PASS = "priyanka2240"; + Connection con; + + + private String donorName; + private String donorBloodGroup; + private String birthDate; + private char gender; + private double weight; + private Area areaOfDonor; + private String organ; + private long contactNo; + ArrayList areawise_hospitals = new ArrayList(); + public Donor(String donorName, String donorBloodGroup, String birthDate, char gender, double weight, String org, + Area areaOfDonor, long contactNo) { + this.donorName = donorName; + this.donorBloodGroup = donorBloodGroup; + this.birthDate = birthDate; + this.gender = gender; + this.weight = weight; + this.organ = org; + this.areaOfDonor = areaOfDonor; + this.contactNo = contactNo; + + + } + void area_hospitals(Donor d) { //pass donor area to this function + try { + /*String q = "select areaCode from Area where areaName = (?)"; + PreparedStatement preparedStmt1; + preparedStmt1 = con.prepareStatement(q); + preparedStmt1.setString(1, d.getAreaOfDonor().getAreaName()); + */ + con=DriverManager.getConnection(DB_URL,USER,PASS); + String query = "select * from Hospital where areaCode = ?;"; + PreparedStatement preparedStmt1; + preparedStmt1 = con.prepareStatement(query); + preparedStmt1.setInt(1, d.getAreaOfDonor().getAreaCode()); + + ResultSet rs = preparedStmt1.executeQuery(); + + while(rs.next()) { + int h_code = rs.getInt("hospitalCode"); + String h_name = rs.getString("hospitalName"); + int area_code = rs.getInt("areaCode"); + int city_code = rs.getInt("cityCode"); + Hospital h = new Hospital(h_code,h_name,area_code,city_code); + d.areawise_hospitals.add(h); + } + + } + catch(SQLException e) { + System.out.println("Not found"); + e.printStackTrace(); + } + } + + public String getDonorName() { + return donorName; + } + public void setDonorName(String donorName) { + this.donorName = donorName; + } + public String getDonorBloodGroup() { + return donorBloodGroup; + } + public void setDonorBloodGroup(String donorBloodGroup) { + this.donorBloodGroup = donorBloodGroup; + } + public String getBirthDate() { + return birthDate; + } + public void setBirthDate(String birthDate) { + this.birthDate = birthDate; + } + public char getGender() { + return gender; + } + public void setGender(char gender) { + this.gender = gender; + } + public double getWeight() { + return weight; + } + public void setWeight(double weight) { + this.weight = weight; + } + public Area getAreaOfDonor() { + return areaOfDonor; + } + public String getorgan() { + return this.organ; + } + public void setAreaOfDonor(Area areaOfDonor) { + this.areaOfDonor = areaOfDonor; + } + public long getContactNo() { + return contactNo; + } + public void setContactNo(long contactNo) { + this.contactNo = contactNo; + } + + + +} \ No newline at end of file diff --git a/Beyond Infinity : Organ Donation/Donor_info.java b/Beyond Infinity : Organ Donation/Donor_info.java new file mode 100644 index 0000000..e9350d4 --- /dev/null +++ b/Beyond Infinity : Organ Donation/Donor_info.java @@ -0,0 +1,346 @@ +import java.sql.Connection; +import java.util.*; +class User_exception extends Exception{ + public User_exception(String s) + { + super(s); + } +} +public class Donor_info { + + + String donarName; + String donarBloodGroup; + String birthDate; + char gender; + double weight; + String organ; + String addr; + long contactNum; + Scanner sc=new Scanner(System.in); + Area user_a ; + Donor d; + boolean valid_w = false; + boolean valid_age = false; + void AcceptInfo() + { + System.out.println("\n----------DONOR DETAILS-----------"); + boolean correct = false; + while(!correct) { + try { + System.out.println("\nEnter your name :"); + donarName=sc.nextLine(); + if(donarName.isEmpty()) { + throw new User_exception("Please enter valid name"); + } + else { + correct = true; + } + + } catch (User_exception e) { + System.out.println(e.getMessage()); + } + } + correct = false; + while(!correct) { + try { + System.out.println("Enter Blood Group :\n1.A+\n2.A-\n3.B+\n4.AB+\n5.B-\n6.O+\n7.AB-\n8.O-"); + int ch = sc.nextInt(); + switch(ch) { + case 1: + donarBloodGroup = "A+"; + break; + case 2: + donarBloodGroup = "A-"; + break; + case 3: + donarBloodGroup = "B+"; + break; + case 4: + donarBloodGroup = "AB+"; + break; + case 5: + donarBloodGroup = "B-"; + break; + case 6: + donarBloodGroup = "O+"; + break; + case 7: + donarBloodGroup = "AB-"; + break; + case 8: + donarBloodGroup = "O-"; + break; + } + + if(donarBloodGroup.isEmpty()) + { + throw new User_exception("Please Enter valid Blood Group"); + } + else { + correct = true; + } + + } catch (User_exception e1) { + System.out.println(e1.getMessage()); + } + } + correct = false; + while(!correct) { + try { + System.out.println("Enter Birth year :"); + birthDate=sc.next(); + int date=Integer.parseInt(birthDate); + if(2022-date<18) + { + valid_age = false; + break; + } + else if (2022-date<0) { + throw new User_exception("Enter valid age "); + } + else { + valid_age = true; + correct = true; + } + } catch (User_exception e2) { + System.out.println(e2.getMessage()); + } + } + if (valid_age) { + correct = false; + while(!correct) { + try { + System.out.println("Enter Gender (M) or (F) :"); + gender=sc.next().charAt(0); + + if(gender == 'F' || gender=='M') + { + correct = true; + + } + else { + + throw new User_exception("Enter valid Gender"); + } + } catch (User_exception e3) { + System.out.println(e3.getMessage()); + } + } + + + correct = false; + while(!correct) { + try { + System.out.println("Enter Weight :"); + weight=sc.nextDouble(); + if(weight<0) + { + throw new User_exception("You are Under Weight, Not eligible to donate"); + } + else if(weight<50 || weight>100) { + break; + } + else { + valid_w = true; + correct = true; + } + } catch (User_exception e4) { + System.out.println(e4.getMessage()); + } + } + + if(valid_w) { + correct = false; + while(!correct) { + try { + System.out.println("Enter organ :\n1.Kidney\n2.Liver"); + int ch = sc.nextInt(); + switch(ch) { + case 1: + organ = "Kidney"; + break; + case 2: + organ = "Liver"; + break; + + } + if(organ.isEmpty()) + { + throw new User_exception("Please enter a valid option."); + } + else { + correct = true; + } + } catch (User_exception e5) { + System.out.println(e5.getMessage()); + } + } + + correct = false; + while(!correct) { + try { + System.out.println("Enter Area:\n1.Kothrud\n2.Katraj\n3.Hadapsar\n4.Kondhwa\n5.Swargate"); + + int ch = sc.nextInt(); + switch(ch) { + case 1: + user_a = new Area("Kothrud",104); + break; + case 2: + user_a = new Area("Katraj",101); + break; + + case 3: + user_a = new Area("Hadapsar",102); + break; + case 4: + user_a = new Area("Kondhwa",103); + break; + case 5: + user_a = new Area("Swargate",105); + break; + } + if(user_a==null) + { + throw new User_exception("Enter valid option"); + } + else { + correct = true; + } + } catch (User_exception e6) { + System.out.println(e6.getMessage()); + } + } + + correct = false; + while(!correct) { + try { + System.out.println("Enter Contact number :"); + contactNum=sc.nextLong(); + if(Long.toString(contactNum).length()<10 || Long.toString(contactNum).length()>10 ) + { + throw new User_exception("Please enter correct phone no."); + } + else { + correct = true; + } + } catch (User_exception e7) { + System.out.println(e7.getMessage()); + } + } + + /* + * Donor(String donorName, String donorBloodGroup, String birthDate, char gender, double weight, String org, + Area areaOfDonor, long contactNo) + */ + d = new Donor(donarName, donarBloodGroup ,birthDate,gender, weight,organ,user_a,contactNum); + d.area_hospitals(d); + + Matching(d); + + } + } + + if (!valid_age || !valid_w) { + System.out.println("Sorry you are not elligible for organ donation"); + } + + + } + public void Matching(Donor d) { + General_info g = new General_info(); + g.establish_connection(); + boolean flag = false; + + for(int i=0;i hospitals = new HashSet(); + public ArrayList all_hospitals = new ArrayList(); + + ArrayList elligible_hospitals = new ArrayList(); //list of hospital codes having at least one receiver + int[][] adjMat; + int n; + Hospital ref []; //Array to remember index numbers + ArrayList head = new ArrayList(); + + + public Connection establish_connection(){ + try { + Class.forName(JDBC_DRIVER); + con=DriverManager.getConnection(DB_URL,USER,PASS); + } + catch(ClassNotFoundException e) { + e.printStackTrace(); + } + catch(SQLException e) { + System.out.println("Not found"); + e.printStackTrace(); + } + return con; + } + public void insert_into_receiever(Receiver r, int hosp_code) { + try { + PreparedStatement p; + String query = "insert into Receiver(receiverName,receiverBloodGroup, gender, weight, organName, mobileNo,hospital_reg,emergency)"+"values(?,?,?,?,?,?,?,?);"; + p = con.prepareStatement(query); + + p.setString(1, r.getReceiverName()); + p.setString(2, r.getReceiverBloodGroup()); + p.setString(3, Character.toString(r.getGender())); + p.setFloat(4, r.getWeight()); + p.setString(5, r.getorganName()); + p.setLong(6, r.getContactNum()); + p.setInt(7, hosp_code); + p.setInt(8,r.getEmergency()); + p.executeUpdate(); + + + } + catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + public void updateReceiver(Receiver r) { + try { + this.establish_connection(); + PreparedStatement p; + String query = "update Receiver set allotmentStatus=?,donorAlloted=? where receiverName=?;"; + p = con.prepareStatement(query); + p.setString(1, r.getAllotmentStatus()); + p.setString(2, r.getDonarAlloted()); + p.setString(3, r.getReceiverName()); + p.executeUpdate(); + + + } + catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + + void extract_allhospital() { + try { + String query = "select * from Hospital"; + PreparedStatement preparedStmt1; + preparedStmt1 = con.prepareStatement(query); + ResultSet rs = preparedStmt1.executeQuery(query); + + while(rs.next()) { + int h_code = rs.getInt("hospitalCode"); + String h_name = rs.getString("hospitalName"); + int area_code = rs.getInt("areaCode"); + int city_code = rs.getInt("cityCode"); + Hospital h = new Hospital(h_code,h_name,area_code,city_code); + all_hospitals.add(h); + } + + + + } + catch(SQLException e) { + System.out.println("Not found"); + e.printStackTrace(); + } + } + + void area_hospitals(Donor d) { //pass donor area to this function + try { + /*String q = "select areaCode from Area where areaName = (?)"; + PreparedStatement preparedStmt1; + preparedStmt1 = con.prepareStatement(q); + preparedStmt1.setString(1, d.getAreaOfDonor().getAreaName()); + */ + String query = "select * from Hospital where areaCode = ?"; + PreparedStatement preparedStmt1; + preparedStmt1 = con.prepareStatement(query); + preparedStmt1.setInt(1, d.getAreaOfDonor().getAreaCode()); + + ResultSet rs = preparedStmt1.executeQuery(query); + + while(rs.next()) { + int h_code = rs.getInt("hospitalCode"); + String h_name = rs.getString("hospitalName"); + int area_code = rs.getInt("areaCode"); + int city_code = rs.getInt("cityCode"); + Hospital h = new Hospital(h_code,h_name,area_code,city_code); + d.areawise_hospitals.add(h); + } + + } + catch(SQLException e) { + System.out.println("Not found"); + e.printStackTrace(); + } + } + //for + + void arraylist_receivers(Hospital h) { + try { + PreparedStatement preparedStmt1; + String hosp_name = h.getHospitalName(); + int hosp_code = h.getHospitalCode(); + + String query = "select * from Receiver where hospital_reg = ?"; + preparedStmt1 = con.prepareStatement(query); + preparedStmt1.setInt(1, hosp_code); + ResultSet rs = preparedStmt1.executeQuery(); + //receiverUserID | receiverName | receiverBloodGroup | birthDate | gender | weight | organName | receiverAddress | mobileNo | approvalStaus | hospital_reg | + while(rs.next()) { + Receiver r = new Receiver(); + r.setReceiverName(rs.getString("receiverName")); + r.setReceiverBloodGroup(rs.getString("receiverBloodGroup")); + r.setGender(rs.getString("gender").charAt(0)); + r.setWeight(rs.getFloat("weight")); + r.setorganName(rs.getString("organName")); + r.setContactNum(rs.getLong("mobileNo")); + r.setEmergency(rs.getInt("emergency")); + r.sethospital(hosp_name); + r.setAllotmentStatus(rs.getString("allotmentStatus")); + r.setDonarAlloted(rs.getString("donorAlloted")); + h.all_receivers.add(r); + + } + } + catch(SQLException e) { + e.printStackTrace(); + } + } + void elligible_hospitals() { //hospitals having at least one receiver + try { + String query = "select count(Hospital_reg),hospital_reg from Receiver group by Hospital_reg"; + PreparedStatement preparedStmt1; + preparedStmt1 = con.prepareStatement(query); + ResultSet rs = preparedStmt1.executeQuery(query); + + while(rs.next()) { + int h_code = rs.getInt("Hospital_reg"); + elligible_hospitals.add(h_code); + } + + } + catch(SQLException e) { + e.printStackTrace(); + } + } + int[] nearestHospitalList(Hospital h){ + int[] distance = new int[n]; + for (int i = 0; i < n; i++) { + distance[i] = Integer.MAX_VALUE; + } + PriorityQueue pq = new PriorityQueue<>( + (v1, v2) -> v1.dist - v2.dist); + pq.add(new hospital_node(0,h)); + while (pq.size() > 0) { + hospital_node current = pq.poll(); + + for (int n = 0; n< head.size(); n++) { + if (distance[current.reference] + + head.get(n).dist + < distance[head.get(n).reference]) { + distance[head.get(n).reference] + = head.get(n).dist + + distance[current.reference]; + pq.add(new hospital_node( + head.get(n).reference, + head.get(n).h)); + } + } + + } + return distance; + } + public static void main(String[] args) { + General_info g = new General_info(); + g.establish_connection(); + g.extract_allhospital(); + Hospital h; + int i = 0; + for(i=0;i all_receivers = new ArrayList(); + PriorityQueue pq; + Hospital (int code ,String hospitalName,int a_code,int c_code){ + this.hospitalcode = code; + this.hospitalName = hospitalName; + this.areacode = a_code; + this.citycode = c_code; + } + public Hospital(String hospitalName, Area loc) { + super(); + this.hospitalName = hospitalName; + this.loc = loc; + this.pq = pq; + } + public String getHospitalName() { + return hospitalName; + } + public int getHospitalCode() { + return hospitalcode; + } + public void setHospitalName(String hospitalName) { + this.hospitalName = hospitalName; + } + public Area getLoc() { + return loc; + } + public void setLoc(Area loc) { + this.loc = loc; + } + public PriorityQueue getPq() { + return pq; + } + public void setPq(PriorityQueue pq) { + this.pq = pq; + } + + public PriorityQueue addToQueue(){ + ListIterator ReceiverIterator = this.all_receivers.listIterator(); + this.pq = new PriorityQueue(Collections.reverseOrder(new ReceiverComparator())); + // Traversing elements + while (ReceiverIterator.hasNext()) { + Receiver r = ReceiverIterator.next(); + //System.out.println("Priority queue: "+r.getEmergency()); + + pq.add(r); + + } + return this.pq; + } + + + class ReceiverComparator implements Comparator{ + @Override + public int compare(Receiver s1, Receiver s2) { + + if (s1.getEmergency() > s2.getEmergency()) + return 1; + else + return -1; + + } + + } + } + diff --git a/Beyond Infinity : Organ Donation/Receiver.java b/Beyond Infinity : Organ Donation/Receiver.java new file mode 100644 index 0000000..5546506 --- /dev/null +++ b/Beyond Infinity : Organ Donation/Receiver.java @@ -0,0 +1,128 @@ +import java.util.ArrayList; + +public class Receiver { + + //add matched donor name + private String ReceiverName; + private String ReceiverBloodGroup; + private String birthDate; + private char gender; + private float weight; + private Area areaOfReceiver; + private long contactNum; + private int Emergency; + private boolean approvedReceiver; + private String Organ; + private String enrolled_hosp; + private int hosp_code; + private String allotmentStatus; + private String donarAlloted; + long donorphno; + + public Receiver(String receiverName, String receiverBloodGroup, String birthDate, char gender, float weight, + String hosp, long contactNum, int emergency,String Org) { + super(); + ReceiverName = receiverName; + ReceiverBloodGroup = receiverBloodGroup; + this.birthDate = birthDate; + this.gender = gender; + this.weight = weight; + this.enrolled_hosp = hosp; + this.contactNum = contactNum; + Emergency = emergency; + this.Organ = Org; + //this.allotmentStatus="not alloted"; + + } + public Receiver() { + + } + public String getorganName() { + return Organ; + } + public void setorganName(String organName) { + this.Organ = organName; + } + public void sethospital(String name) { + this.enrolled_hosp= name; + } + public void sethospitalcode(int code) { + this.hosp_code= code; + } + public int gethospitalcode() { + return this.hosp_code; + } + public String gethospitalName() { + return enrolled_hosp; + } + public String getReceiverName() { + return ReceiverName; + } + + public void setReceiverName(String receiverName) { + ReceiverName = receiverName; + } + public String getReceiverBloodGroup() { + return ReceiverBloodGroup; + } + public void setReceiverBloodGroup(String receiverBloodGroup) { + ReceiverBloodGroup = receiverBloodGroup; + } + public String getBirthDate() { + return birthDate; + } + public void setBirthDate(String birthDate) { + this.birthDate = birthDate; + } + public char getGender() { + return gender; + } + public void setGender(char gender) { + this.gender = gender; + } + public float getWeight() { + return weight; + } + public void setWeight(float weight) { + this.weight = weight; + } + public Area getAreaOfReceiver() { + return areaOfReceiver; + } + public void setAreaOfReceiver(Area areaOfReceiver) { + this.areaOfReceiver = areaOfReceiver; + } + public long getContactNum() { + return contactNum; + } + public void setContactNum(long contactNum) { + this.contactNum = contactNum; + } + public int getEmergency() { + return Emergency; + } + public void setEmergency(int emergency) { + Emergency = emergency; + } + public boolean isApprovedReceiver() { + return approvedReceiver; + } + public void setApprovedReceiver(boolean approvedReceiver) { + this.approvedReceiver = approvedReceiver; + } + public String getAllotmentStatus() { + return allotmentStatus; + } + public void setAllotmentStatus(String allotmentStatus) { + this.allotmentStatus = allotmentStatus; + } + public String getDonarAlloted() { + return donarAlloted; + } + public void setDonarAlloted(String donarAlloted) { + this.donarAlloted = donarAlloted; + } + + + +} \ No newline at end of file diff --git a/Beyond Infinity : Organ Donation/Receiver_info.java b/Beyond Infinity : Organ Donation/Receiver_info.java new file mode 100644 index 0000000..47e3060 --- /dev/null +++ b/Beyond Infinity : Organ Donation/Receiver_info.java @@ -0,0 +1,321 @@ +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Scanner; + +public class Receiver_info { + + String receiverName; + String receiverBloodGroup; + String birthDate; + char gender; + float weight; + String organ; + String addr; + long contactNum; + int emergency; + boolean correct; + Scanner sc=new Scanner(System.in); + Area user_r ; + String hosp_name; + int hosp_code; + boolean valid_w = false; + boolean valid_age = false; + General_info g = new General_info(); + void AcceptInfo() + { + boolean correct = false; + while(!correct) { + try { + System.out.println("Enter your Name :"); + receiverName=sc.nextLine(); + if(receiverName.isEmpty()) { + throw new User_exception("Please enter valid name"); + } + else { + correct = true; + } + + } catch (User_exception e) { + System.out.println(e.getMessage()); + } + } + correct = false; + while(!correct) { + try { + System.out.println("Enter Blood Group :\n1.A+\n2.A-\n3.B+\n4.AB+\n5.B-\n6.O+\n7.AB-\n8.O-"); + int ch = sc.nextInt(); + switch(ch) { + case 1: + receiverBloodGroup = "A+"; + break; + case 2: + receiverBloodGroup = "A-"; + break; + case 3: + receiverBloodGroup = "B+"; + break; + case 4: + receiverBloodGroup = "AB+"; + break; + case 5: + receiverBloodGroup = "B-"; + break; + case 6: + receiverBloodGroup = "O+"; + break; + case 7: + receiverBloodGroup = "AB-"; + break; + case 8: + receiverBloodGroup = "O-"; + break; + default: + throw new User_exception("Please Enter valid Blood Group"); + } + + + + correct = true; + + + } catch (User_exception e1) { + System.out.println(e1.getMessage()); + correct = false; + } + } + correct = false; + while(!correct) { + try { + System.out.println("Enter Birth year :"); + birthDate=sc.next(); + int date=Integer.parseInt(birthDate); + if(2022-date<18) + { + valid_age = false; + break; + } + else if (2022-date<0) { + throw new User_exception("Enter valid age "); + } + else { + valid_age = true; + correct = true; + } + } catch (User_exception e2) { + System.out.println(e2.getMessage()); + } + } + if (valid_age) { + correct = false; + while(!correct) { + try { + System.out.println("Enter Gender (M) or (F) :"); + gender=sc.next().charAt(0); + //System.out.println(gender=='F'); + if(gender == 'F' || gender=='M') + { + correct = true; + + } + else { + + throw new User_exception("Enter valid Gender"); + } + } catch (User_exception e3) { + System.out.println(e3.getMessage()); + } + } + + + correct = false; + while(!correct) { + try { + System.out.println("Enter Weight :"); + weight=sc.nextFloat(); + if(weight<0) + { + throw new User_exception("You are Under Weight"); + } + else if(weight<50 || weight>100) { + break; + } + else { + valid_w = true; + correct = true; + } + } catch (User_exception e4) { + System.out.println(e4.getMessage()); + } + } + + if(valid_w) { + correct = false; + while(!correct) { + try { + System.out.println("Enter organ :\n1.Kidney\n2.Liver"); + int ch = sc.nextInt(); + switch(ch) { + case 1: + organ = "Kidney"; + break; + case 2: + organ = "Liver"; + break; + + } + if(organ.isEmpty()) + { + throw new User_exception("Please enter a valid option."); + } + else { + correct = true; + } + } catch (User_exception e5) { + System.out.println(e5.getMessage()); + } + } + + correct = false; + while(!correct) { + try { + g.establish_connection(); + g.extract_allhospital(); + System.out.println("Enter Hospital name where you are registered:"); + int i =0; + for(i=0;i0 && ch<=i) { + correct = true; + hosp_name = g.all_hospitals.get(ch-1).getHospitalName(); + hosp_code = g.all_hospitals.get(ch-1).getHospitalCode(); + } + else + { + throw new User_exception("Enter valid option"); + } + } catch (User_exception e6) { + System.out.println(e6.getMessage()); + } + } + + correct = false; + while(!correct) { + try { + System.out.println("Enter Contact number :"); + contactNum=sc.nextLong(); + if(Long.toString(contactNum).length()<10 || Long.toString(contactNum).length()>10 ) + { + throw new User_exception("Please enter correct phone no."); + } + else { + correct = true; + } + } catch (User_exception e7) { + System.out.println(e7.getMessage()); + } + } + + try { + System.out.println("Emergency (1 to 10):"); + emergency=sc.nextInt(); + if(emergency>10 || emergency<1) + { + throw new User_exception("Please Enter valid Emergency bit"); + } + + }catch(User_exception e8) + { + System.out.println(e8.getMessage()); + } + + /* + *public Receiver(String receiverName, String receiverBloodGroup, String birthDate, char gender, double weight, + String hosp, long contactNum, int emergency) { + */ + + Receiver user=new Receiver(receiverName, receiverBloodGroup, birthDate, gender, weight, hosp_name, contactNum,emergency,organ); + g.insert_into_receiever(user, hosp_code); + System.out.println("Thank you for registering!"); + } + } + + if (!valid_age || !valid_w) { + System.out.println("Sorry you are not elligible "); + } + } + /*private String ReceiverName; 2 + private String ReceiverBloodGroup; 3 + private String birthDate; 4 + private char gender; 5 + private float weight; 6 + private Area areaOfReceiver; 8 + private long contactNum; 9 + private int Emergency;12 + private boolean approvedReceiver; 10 + private String Organ;7 + private String enrolled_hosp; 11*/ + + /*public Receiver(String receiverName, String receiverBloodGroup, String birthDate, char gender, float weight, + String hosp, long contactNum, int emergency,String Org) {*/ + + public static void showData(Receiver r) { + System.out.println("-----------------------------RECEIVER DETAILS-----------------------------------"); + System.out.println("Name :: "+r.getReceiverName()); + System.out.println("Hospital :: "+r.gethospitalName()); + System.out.println("Blood group :: "+r.getReceiverBloodGroup()); + System.out.println("Contact Number :: "+r.getContactNum()); + System.out.println("Allotted status :: "+r.getAllotmentStatus()); + System.out.println("Donor Name :: "+r.getDonarAlloted()); + //add only donor name + } + public Receiver Login(String name,long mobno) { + General_info g=new General_info(); + Connection con=g.establish_connection(); + Receiver r=null; + try { + PreparedStatement ps=con.prepareStatement("select * from Receiver where receiverName=?"); + ps.setString(1, name); + ResultSet rs=ps.executeQuery(); + while(rs.next()) { + if(rs.getLong(9)==mobno) { + Area a=new Area(rs.getString(8),1); + r=new Receiver(); + r.setReceiverName(rs.getString("receiverName")); + r.setAllotmentStatus(rs.getString("allotmentStatus")); + r.setDonarAlloted(rs.getString("donorAlloted")); + r.sethospitalcode(rs.getInt("hospital_reg")); + r.setReceiverBloodGroup(rs.getString("receiverBloodGroup")); + r.setContactNum(rs.getLong("mobileNo")); + + break; + } + } + if(r!=null) { + PreparedStatement ps1=con.prepareStatement("select hospitalName from Hospital where hospitalCode =?"); + ps1.setInt(1,r.gethospitalcode() ); + ResultSet rs1=ps1.executeQuery(); + while(rs1.next()) { + r.sethospital(rs1.getString("hospitalName")); + } + showData(r); + } + if(r==null) { + System.out.println("Enter Correct Login credentials"); + } + } + catch(Exception e) { + System.out.println("Exception "+e); + } + return r; + } + public static void main(String[] args) { + + Receiver_info di = new Receiver_info(); + di.AcceptInfo(); + } +} + From 364ab84b58a95b234e035fa477d14903093efc20 Mon Sep 17 00:00:00 2001 From: Shriya Deshpande <91329086+Shriya0731@users.noreply.github.com> Date: Sun, 15 May 2022 23:39:10 +0530 Subject: [PATCH 6/7] Add files via upload Database for project --- .../OrganDonation.sql | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 Beyond Infinity : Organ Donation/OrganDonation.sql diff --git a/Beyond Infinity : Organ Donation/OrganDonation.sql b/Beyond Infinity : Organ Donation/OrganDonation.sql new file mode 100644 index 0000000..06cf231 --- /dev/null +++ b/Beyond Infinity : Organ Donation/OrganDonation.sql @@ -0,0 +1,201 @@ +-- MySQL dump 10.13 Distrib 5.7.20, for Win32 (AMD64) +-- +-- Host: localhost Database: OrganDonation +-- ------------------------------------------------------ +-- Server version 5.7.20-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `area` +-- + +DROP TABLE IF EXISTS `area`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `area` ( + `areaCode` int(11) NOT NULL, + `areaName` varchar(10) DEFAULT NULL, + PRIMARY KEY (`areaCode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `area` +-- + +LOCK TABLES `area` WRITE; +/*!40000 ALTER TABLE `area` DISABLE KEYS */; +INSERT INTO `area` VALUES (101,'Katraj'),(102,'Hadapsar'),(103,'Kondhwa'),(104,'Kothrud'),(105,'Swargate'); +/*!40000 ALTER TABLE `area` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `city` +-- + +DROP TABLE IF EXISTS `city`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `city` ( + `citycode` int(11) NOT NULL, + `cityName` varchar(10) DEFAULT NULL, + PRIMARY KEY (`citycode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `city` +-- + +LOCK TABLES `city` WRITE; +/*!40000 ALTER TABLE `city` DISABLE KEYS */; +INSERT INTO `city` VALUES (400,'Mumbai'),(401,'Pune'),(402,'Nagpur'),(403,'Kolhapur'),(404,'Nashik'),(405,'Dhule'); +/*!40000 ALTER TABLE `city` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `donor` +-- + +DROP TABLE IF EXISTS `donor`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `donor` ( + `donorUserID` int(11) NOT NULL, + `donorName` varchar(10) DEFAULT NULL, + `donorBloodGroup` varchar(3) DEFAULT NULL, + `birthDate` varchar(20) DEFAULT NULL, + `gender` varchar(1) DEFAULT NULL, + `weight` float DEFAULT NULL, + `organName` varchar(30) DEFAULT NULL, + `donorAddress` varchar(30) DEFAULT NULL, + `mobileNo` decimal(10,0) DEFAULT NULL, + PRIMARY KEY (`donorUserID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `donor` +-- + +LOCK TABLES `donor` WRITE; +/*!40000 ALTER TABLE `donor` DISABLE KEYS */; +/*!40000 ALTER TABLE `donor` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hospital` +-- + +DROP TABLE IF EXISTS `hospital`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `hospital` ( + `hospitalCode` int(11) NOT NULL, + `hospitalName` varchar(20) DEFAULT NULL, + `areaCode` int(11) DEFAULT NULL, + `cityCode` int(11) DEFAULT NULL, + PRIMARY KEY (`hospitalCode`), + KEY `areaCode` (`areaCode`), + KEY `cityCode` (`cityCode`), + CONSTRAINT `hospital_ibfk_1` FOREIGN KEY (`areaCode`) REFERENCES `area` (`areaCode`), + CONSTRAINT `hospital_ibfk_2` FOREIGN KEY (`cityCode`) REFERENCES `city` (`citycode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hospital` +-- + +LOCK TABLES `hospital` WRITE; +/*!40000 ALTER TABLE `hospital` DISABLE KEYS */; +INSERT INTO `hospital` VALUES (9001,'Sahyadri Hospital',103,401),(9002,'Kaveri Hospital',103,401),(9003,'Nawale Hospital',101,401),(9004,'Suyog Hospital',102,402),(9005,'Sasoon Hospital',104,401),(9006,'Poona Hospital',104,401),(9007,'City Hospital',104,401); +/*!40000 ALTER TABLE `hospital` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `hospital_edges` +-- + +DROP TABLE IF EXISTS `hospital_edges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `hospital_edges` ( + `hospital1_code` int(11) NOT NULL, + `hospital2_code` int(11) NOT NULL, + `distance` int(11) DEFAULT NULL, + PRIMARY KEY (`hospital1_code`,`hospital2_code`), + KEY `hospital2_code` (`hospital2_code`), + CONSTRAINT `hospital_edges_ibfk_1` FOREIGN KEY (`hospital1_code`) REFERENCES `hospital` (`hospitalCode`), + CONSTRAINT `hospital_edges_ibfk_2` FOREIGN KEY (`hospital2_code`) REFERENCES `hospital` (`hospitalCode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `hospital_edges` +-- + +LOCK TABLES `hospital_edges` WRITE; +/*!40000 ALTER TABLE `hospital_edges` DISABLE KEYS */; +INSERT INTO `hospital_edges` VALUES (9001,9002,4),(9001,9003,12),(9001,9005,18),(9002,9003,5),(9002,9004,10),(9003,9004,15),(9004,9005,3); +/*!40000 ALTER TABLE `hospital_edges` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `receiver` +-- + +DROP TABLE IF EXISTS `receiver`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `receiver` ( + `receiverUserID` int(11) NOT NULL AUTO_INCREMENT, + `receiverName` varchar(50) DEFAULT NULL, + `receiverBloodGroup` varchar(3) DEFAULT NULL, + `birthDate` varchar(20) DEFAULT NULL, + `gender` varchar(1) DEFAULT NULL, + `weight` float DEFAULT NULL, + `organName` varchar(30) DEFAULT NULL, + `receiverAddress` varchar(30) DEFAULT NULL, + `mobileNo` decimal(10,0) DEFAULT NULL, + `approvalStaus` int(11) DEFAULT NULL, + `hospital_reg` int(11) DEFAULT NULL, + `emergency` int(11) DEFAULT NULL, + `allotmentStatus` varchar(20) DEFAULT 'not alloted', + `donorAlloted` varchar(20) DEFAULT NULL, + PRIMARY KEY (`receiverUserID`), + KEY `hospital_reg` (`hospital_reg`), + CONSTRAINT `receiver_ibfk_1` FOREIGN KEY (`hospital_reg`) REFERENCES `hospital` (`hospitalCode`) +) ENGINE=InnoDB AUTO_INCREMENT=2020 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `receiver` +-- + +LOCK TABLES `receiver` WRITE; +/*!40000 ALTER TABLE `receiver` DISABLE KEYS */; +INSERT INTO `receiver` VALUES (2001,'Sonali Kendale','O-','01-02-1995','F',70,'Brain','Pune',9848334188,1,9005,7,'not alloted',NULL),(2003,'Samir Gore','AB-','12-04-2001','M',75.5,'Kidney','Katraj',9823337050,1,9001,5,'not alloted',NULL),(2009,'Shruti','A+',NULL,'F',65,'Kidney',NULL,9921447403,NULL,9004,10,'alloted','Shalini'),(2010,'Shriya','A+',NULL,'F',60,'Kidney',NULL,7776059484,NULL,9003,10,'alloted','Supriya'),(2011,'Jenifer','A+',NULL,'F',70,'Liver',NULL,9921445568,NULL,9001,8,'alloted','Shalini Vaidya'),(2012,'Swati Modak','O+',NULL,'F',56,'Kidney',NULL,8990567831,NULL,9004,6,'alloted','Shalini Vaidya'),(2013,'Suresh Bhat','B+',NULL,'M',78,'Liver',NULL,7895679992,NULL,9006,4,'not alloted','asadfghj'),(2014,'Ram Sharma','AB+',NULL,'M',90,'Kidney',NULL,9876704477,NULL,9006,9,'not alloted',NULL),(2015,'Priya Marathe','O-',NULL,'F',56,'Liver',NULL,8769995768,NULL,9006,10,'not alloted',NULL),(2016,'Shriya Mhetre','B+',NULL,'F',67,'Kidney',NULL,9921447403,NULL,9004,6,'not alloted',NULL),(2017,'Swara Bhaskar','A-',NULL,'F',78,'Liver',NULL,9921445689,NULL,9005,8,'not alloted',NULL),(2018,'Kumar Verma','B+',NULL,'M',88,'Liver',NULL,9897867545,NULL,9006,8,'alloted','Shalini Vaidya'),(2019,'Sachin Belsare','A-',NULL,'M',67,'Kidney',NULL,9898675689,NULL,9004,8,'not alloted',NULL); +/*!40000 ALTER TABLE `receiver` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2022-05-15 23:37:12 From be1f0883903e46d3e27b09af12516787d66790f1 Mon Sep 17 00:00:00 2001 From: Shriya Deshpande <91329086+Shriya0731@users.noreply.github.com> Date: Sun, 15 May 2022 23:41:45 +0530 Subject: [PATCH 7/7] Update README.md --- Beyond Infinity : Organ Donation/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Beyond Infinity : Organ Donation/README.md b/Beyond Infinity : Organ Donation/README.md index 4bbecfc..5d198fb 100644 --- a/Beyond Infinity : Organ Donation/README.md +++ b/Beyond Infinity : Organ Donation/README.md @@ -1,7 +1,14 @@ -For implementation run Dashboard.java file. Our project implenments priority queue. We have used MySql database to save information about receivers, hospitals. Receivers are registered in hospitals and their blood group and organ requirement are also fed in the database. When a donor registers , we search a suitable receiver in hospitals in the area of donor. Each hospital has a priority queue of receivers depending on the emergency status of the receiver prescribed by the doctor. Donor is matched with the Receiever prioritywise and by matching blood group and organ requirement. +For implementation run Dashboard.java file. +Our project implenments priority queue. +We have used MySql database to save information about receivers, hospitals. Receivers are registered in hospitals and their blood group and organ requirement are also fed in the database. +When a donor registers , we search a suitable receiver in hospitals in the area of donor. Each hospital has a priority queue of receivers depending on the emergency status of the receiver prescribed by the doctor. Donor is matched with the Receiever prioritywise and by matching blood group and organ requirement. + Project Contributors: 1. Spoorti Aparanji 2. Shriya Deshpande 3. Disha Bhoje 4. Komal Vhanmane 5. Karuna Kadam + +Video Link: +https://drive.google.com/file/d/1EQXlB_dh6whG7wjqg6-TTovCAsvhg6Q1/view?usp=sharing