Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners hospital patient

Have Programming Question? Ask it here!
 
 
 


Devang
hospital patient
0 Answer(s)      2 years and 3 months ago
Posted in : Java Beginners


import java.util.ArrayList;

import java.util.Calendar;

import java.util.Date;

import java.util.Scanner;

public class PatientFunction 
{

    Scanner s=new Scanner(System.in);

    public Patient updatePatient(Patient p)
{

        int ctr=0;

        try
{


do 
{

System.out.println("::::Update Customer::::\n1.Name 2.Address 3.Age 4.Sex 5.Illness 6.Amount");

ctr=s.nextInt();s.nextLine();

switch(ctr)
{

case 1:

System.out.println("Current Name:: "+p.getName());
                    p.setName(s.nextLine());

break;

case 2:

System.out.println("Current Address:: "+p.getAddress());
                    p.setAddress(s.nextLine());

break;

case 3:

System.out.println("Current Age:: "+p.getAge());
                    p.setAge(Integer.parseInt(s.nextLine());

break;

case 4:

System.out.println("Current Sex:: "+p.getSex());
                    p.setSex(s.nextLine());

break;

case 5:

System.out.println("Current Illness:: "+p.getIllness());
                    p.setIllness(s.nextLine());

break;

case 6:

System.out.println("Current Amount:: "+p.getName());
                    p.setAmount(Float.parseFloat(s.nextLine()));

break;

}

Calendar c=Calendar.getInstance();

c.setTime(new Date());

p.setLastAppointment(c);

System.out.println("Update other details? Enter y or n");

if(s.nextLine().toLowerCase().equals("y"))

ctr=999;


}
while(ctr==999);

        }
catch(Exception e)
{

return null;

}



return p;

}

public Patient addPatient()
{


Patient p=new Patient();

try
{

System.out.println("Enter Name:: ");

p.setName(s.nextLine());


System.out.println("Enter Address:: ");

p.setAddress(s.nextLine());


System.out.println("Enter Age:: ");

p.setAge(Integer.parseInt(s.nextLine()));


System.out.println("Enter Sex:: ");

p.setSex(s.nextLine());


System.out.println("Enter Illness:: ");

p.setIllness(s.nextLine());


System.out.println("Enter Amount:: ");

p.setAmount(Float.parseFloat(s.nextLine()));

}

catch(Exception e)
{


return null;

}

return p;

}

public void displayPatientDetails(Patient p)
{

System.out.println(":::Customer Details:");

System.out.println("Customer ID:"+p.getPatientId());

System.out.println("Customer Name:"+p.getName());

System.out.println("Customer Age:"+p.getAge());

System.out.println("Customer Address:"+p.getAddress());

System.out.println("Customer Illness:"+p.getIllness());

System.out.println("Customer Amount:"+p.getAmount());

p.getLastAppointment().add(Calendar.DAY_OF_MONTH, 15);      

if(p.getLastAppointment().getTime().compareTo(new Date())>0)
System.out.println("Customer Status: Active");

else

System.out.println("Customer Status: InActive");

p.getLastAppointment().add(Calendar.DAY_OF_MONTH, -15);

}   

public void displayAll(ArrayList<Patient> pl)
{

for(int i=0;i<pl.size();i++)
{

Patient p=pl.get(i);

p.getLastAppointment().add(Calendar.DAY_OF_MONTH, 15);      

if(p.getLastAppointment().getTime().compareTo(new Date())>0)        
            System.out.println("Customer ID:: "+p.getPatientId()+"\t Name:"+p.getName()+"\tCustomer Status: Active");

else

System.out.println("Customer ID:: "+p.getPatientId()+"\t Name:"+p.getName()+"\tCustomer Status: InActive");

p.getLastAppointment().add(Calendar.DAY_OF_MONTH, -15);

    }

}

}

Advertisement
View Answers

Related Tutorials/Questions & Answers:
Hospital Patient
{ System.out.println("::::::::Hospital::::::::"); System.out.println("Enter 1.Add a patient...Hospital Patient  import java.util.ArrayList; import... java.util.Map; import java.util.Scanner; public class Hospital
hospital patient
hospital patient  import java.util.ArrayList; import... PatientFunction { Scanner s=new Scanner(System.in); public Patient updatePatient(Patient p) { int ctr=0; try { do
Advertisements
Hospital project
Hospital project  hello sir i want hospital management system Source code in C # swing Back-end sql sever 2005. i want these type of model 1. Username and password 2. staff details i. Doctor details ii. nurse details iii
hospital management bill
hospital management bill  bill preperation
hospital management bill
hospital management bill  bill preperation
hospital management bill
hospital management bill  bill preperation
GPS Patient Tracking System
by the hospital administration or the kin of the patients. The GPS Patient...GPS Patient Tracking System The patients with Alzheimer?s disease or dementia... of any mishap that can create further problems for the hospitals. The hospital
Code to register a new patient in a clinic
Code to register a new patient in a clinic  Hi, How do i write a code that allows a user to enter someone's name and then search for that name from... the patient, but if the name is available in the text file, it just updates
hospital Management System
hospital Management System  hello sir i want hospital management system Source code in java swing Back-end Oracle 9i. i want these type of model 1. Username and password 2. staff details i. Doctor details ii. nurse
Java Hospital management system
Java Hospital management system  hospital management    <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="java.sql.*" %> <!DOCTYPE html> <html> <body>
hospital management bill
hospital management bill  bill preperation    <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="java.sql.*" %> <!DOCTYPE html> <html> <head> <meta
JSP Servlet update patient data - JSP-Servlet
JSP Servlet update patient data  Hi Friend, I'm attaching my inserting patient data servlet as requested. I tried your posted code, its... it is clearer. 1. I am doing a search on a patient visit table which has a FK
SEVERE: Context [/hospital] startup failed due to previous errors
SEVERE: Context [/hospital] startup failed due to previous errors  Hi my application is hospital i am facing this problem my build.xml file... org.apache.catalina.core.StandardContext start SEVERE: Context [/hospital] startup failed due to previous errors Jan
GPS for Alzheimer's Patients
of dementia that gets worse with time and finally leads to death of the patient... to the caretakers of the patient using e-mail, if the patient wanders out of a pre... able to give you the exact location of the patient. The initial cost of the shoes
Current Running Projects on roseindia.net
Current Running Projects on roseindia.net       Project Title College Alumini Registration and Display System Patient Registration and appointment booking system SS7 real message
How to add value from sql server in dropdownlist
a hospital management project using jsp servlet, where one form name is patient registration, in that form i have taken id, name, and i want to retrieve a patient id from other table like out patient, and this id will be stored dynamically
Top 10 Health Applications for iPhone
and fitness, medicine directory and drug reference, patient education, medical... a critical case or on the way home can get in touch to the patient's medical record to come to a conclusion on medical aspect or a patient or his relatives can
Java help - Java Beginners
the outpatient pharamacy at University Hospital. At the entrance of the pharmacy, the patient gives his prescriptions to the pharmacist who then gives him a receipt paper which has a number for each prescription submitted. The patient
Java Stacks - Java Beginners
Assignment: A) Consider the outpatient pharamacy at University Hospital. At the entrance of the pharmacy, the patient gives his prescriptions... prescription submitted. The patient then waits until his name is called, he then receives
Java code problem
("::::::::Hospital::::::::"); System.out.println("Enter 1.Add a patient 2.Update...; import java.util.Scanner; public class Hospital...(); Patient p1=new Patient(); Calendar c=Calendar.getInstance(); Date d=new Date
GPS services in mobile phones
the nearest hotel or hospital. Now finally those kinds of services are finally
kgisl
Hospital management project  hospital management
mmm project
Hospital management project  Hospital management
Business Intelligence in Healthcare
information about patient treatment. Here, in case of hospital Business... it so in the case of hospital management or health sector. In Hospitals Healthcare industry whether hospital or any pharmaceutical companies face a lot
HMS
HMS  what are the reqirements of the hospital management
javaprograms
javaprograms  wrire a hospital program in java
Object with different data types
Object with different data types  Hello, I need to build a "patient... linked list. The problem is I don't know how to create patient object. Can...; import java.util.List; public class Patient { String name; String id
Java Class Diagram
of buying glasses from the viewpoint of the patient. The first step is to see an eye doctor who will give the patient a prescription. Once the patient has... and a lense. and place the order for patient glasses. Once the glasses have been made
Java Dynamic Array - Java Beginners
[] projects={"University", "School", "Hospital"}; I want to print with a loop: (Greece, University), (Greece, School), (Greece, Hospital) (Germany, University), ... (Greece, University, School), (Greece, School, Hospital), (Greece
project
project  sir i want module and source code on my project hospital management system
Best Practices for Health Care Management
of the organization. By maintaining steady and smooth access to the patient and all... of health care service in any hospital or clinic is considered to have far
Lose Weight Surgery
hospital. Wight Loss Surgery types: You should contact to your doctor...% of the patient is experiencing one or more problem due to surgery
database
database  hi i want to develop one patient database can any one provide me the guide
PHP
PHP  I would love to do PHP project with the title of "Hospital Management System". I want to know how to make validation using jquery
How to retrieve single row from MSSQL
had created the table in MSSQL,the fields with patient name,pid,Dname(doctor name... the patient name and doc name and search button in GUI window.What i want is after giving the name of both patient & doctor,after clicking the search button.It
How to retrieve single row from MSSQL
had created the table in MSSQL,the fields with patient name,pid,Dname(doctor name... the patient name and doc name and search button in GUI window.What i want is after giving the name of both patient & doctor,after clicking the search button.It
How to retrieve single row from MSSQL
had created the table in MSSQL,the fields with patient name,pid,Dname(doctor name... the patient name and doc name and search button in GUI window.What i want is after giving the name of both patient & doctor,after clicking the search button.It
SQL
patient; For (15/03/2011) format: SELECT DATE_FORMAT(dob, '%d/%m/%Y') FROM patient; where patient is our table name and dob is a field of date type
SQL date query
%Y') FROM patient; For (15/03/2011) format: SELECT DATE_FORMAT(dob, '%d/%m/%Y') FROM patient; where patient is our table name and dob is a field of date
output using SQL
%M %Y') FROM patient; For (15/03/2011) format: SELECT DATE_FORMAT(dob, '%d/%m/%Y') FROM patient; where patient is our table name and dob is a field of date
SQL fetch value
%Y') FROM patient; For (15/03/2011) format: SELECT DATE_FORMAT(dob, '%d/%m/%Y') FROM patient; where patient is our table name and dob is a field of date
java - Java Beginners
(" Nakasero Hospital [Employee Maintenance Module]"); setDefaultCloseOperation...")); { lbl=new JLabel("Patient ID:"); txt=new JTextField(12); lbl1=new JLabel...("Phone Number:"); txt5=new JTextField(12); lbl7=new JLabel("Patient
jsp - Java Beginners
jsp  hello i want to medical records information project code.my project is admin send the patient details to doctor.doctor check the mail and visit that patients patients only and update the detils also
jsp - Java Beginners
jsp  hello i want to medical records information project code.my project is admin send the patient details to doctor.doctor check the mail and visit that patients patients only and update the detils also
the JDBC Driver has been forcibly unregistered
name is hospital i can build successfully but in the tomcat console showing... org.apache.catalina.core.StandardContext start SEVERE: Context [/hospital] startup failed due to previous... clearRefere ncesJdbc SEVERE: The web application [/hospital] registered the JBDC
SQL
patient; For (15/03/2011) format: SELECT DATE_FORMAT(dob, '%d/%m/%Y') FROM patient
SEVERE: Error listenerStart
( named: hospital) in Tomcat 6.0.29, I am getting the following issue and I am...:07 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/hospital... [/hospital] appears to have started a thread named [ Thread-3] but has failed
want help regarding a project
want help regarding a project  hiii this is hemangi and I want guidance that I am working on a project of hospital management system so I want guidance that how can i implement that in swings or with other frame work? and any
java project
java project  i would like to get an idea of how to do a project by doing a project(hospital management) in java.so could you please provide me with tips,UML,source code,or links of already completed project with documentation
Gui - Java Beginners
("Nakasero Hospital Managment System [ Inpatient Maintance Module]"); setSize(650,500); l1=new JLabel("Patient ID"); l2=new JLabel("First Name"); l3=new JLabel
 

 

 

DMCA.com