Application Java sur le système de gestion d’hôpital


Télécharger Application Java sur le système de gestion d’hôpital

★★★★★★★★★★3.5 étoiles sur 5 basé sur 1 votes.
Votez ce document:

Télécharger aussi :


Application Java sur le système de gestion d’hôpital

Ce système de gestion a été développé pour former un système de gestion complet comprenant les employés, les médecins (consultants), les infirmières, les patients, les factures et les réclamations, etc. Ce système conserve également les enregistrements des actifs matériels en plus des logiciels de cette organisation. Le système proposé gardera une trace des employés, des médecins, des patients, des comptes et une génération de rapport concernant le statut actuel. Ce projet a un logiciel basé sur une interface graphique qui aidera à stocker, mettre à jour et récupérer les informations à travers divers modules conviviaux pilotés par menus.

OBJECTIFS DU PROJET

Le projet «Système de gestion hospitalière» vise à maintenir au quotidien l'état d'admission / de sortie des patients, la liste des médecins (consultants), la liste des médicaments, les factures, etc.

Les principaux objectifs de l’hôpital sont les suivants:

Tenir des dossiers d'admission du patient.

Garder les soins aux patients comme une priorité absolue.

Planifier le rendez-vous du patient avec le médecin (consultant) pour le rendre pratique pour les deux.

Planification des services du médecin spécialisé (consultant) et des services d'urgence de manière à ce que les installations fournies par l'hôpital soient pleinement utilisées de manière efficace et efficiente.

Garder les dossiers du département de médecine dans un ordre méticuleusement arrangé pour que le traitement du patient devienne rapide et satisfaisant.

Garder des détails sur les consultants, leurs ordonnances et traitements, les rapports de chirurgie, etc.

Conserver les meilleures installations de laboratoire et les meilleurs outils de diagnostic pour permettre un diagnostic précoce et clair de la maladie, ainsi qu'une guérison et une élimination rapides du patient.

Conserver des détails explicites sur les maladies du patient, le diagnostic et la gestion pour une recherche approfondie.

Tenir les dossiers de la structure salariale des employés de l'hôpital par méthode de facturation.

Aperçu de quelque codage de l’application :

Page d’accueil « Home.jsp »:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

   pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>WELCOME TO HOSPITAL MANAGEMENT SYSTEM</title>

<link rel="stylesheet" href="dropdown.css" type="text/css" />

<script src = "dropdown.js" language="JavaScript"></script>

<style>

a.notr:link { color:#666666; }

a.notr:visited {color:#666666;}

a.notr:hover {color:#666666; }

</style>

</head>

<body background ="1.jpg">

<center>

<table width=1000 border=5 >

<TR BGCOLOR="#99CCCC">

<TD><h1>HOSPITAL MANAGEMENT SYSTEM</h1>

</TD>

</TR>

<TR >

<TD>

<pre>

<dl class="dropdown" style="left:135;" >

<dt id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)">DOCTOR</dt>

<dd id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)">

   <ul>

     <li><a href="addoc.jsp" class="underline">ADD DOCTOR</a></li>

     <li><a href="addoc.jsp" class="underline">UPDATE DOCTOR DETAILS</a></li>

     <li><a href="addoc.jsp" class="underline">DELETE DOCTOR</a></li>

   </ul>

</dd>

</dl>

<dl style="position:absolute;left:400px;top:75px;width:150px" class="dropdown">

<dt id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)">PATIENT</dt>

<dd id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)">

   <ul>

     <li><a href="addpt.jsp" class="underline">ADD PATIENT</a></li>

     <li><a href="addpt.jsp" class="underline">UPDATE PATIENT DETAILS</a></li>

     <li><a href="dischrg.jsp" class="underline">DISCHARGE PATIENT</a></li>

   </ul>

</dd>

</dl>

<dl style="position:absolute;left:650px;top:75px;width:100px" class="dropdown">

<dt id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)">NURSE</dt>

<dd id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)">

   <ul>

     <li><a href="adnurse.jsp" class="underline">ADD NURSE</a></li>

     <li><a href="adnurse.jsp" class="underline">UPDATE NURSE</a></li>

     <li><a href="adnurse.jsp" class="underline">DELETE NURSE</a></li>

   </ul>

</dd>

</dl>

<dl style="position:absolute;left:920px;top:75px;width:150px" class="dropdown">

<dt id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)">WORK TIME</dt>

<dd id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)">

   <ul>

     <li><a href="empattn.jsp" class="underline">EMPLOYEE WORKTIME</a></li>

   </ul>

</dd>

</dl>

<BR><BR><BR>

<dl class="dropdown">

<dt id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)">DEPARTMENT</dt>

<dd id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)">

   <ul>

     <li><a href="DEPT.jsp" class="underline">DEPARTMENT DETAILS</a></li>

   </ul>

</dd>

</dl>

<dl class="dropdown">

<dt id="six-ddheader" onmouseover="ddMenu('six',1)" onmouseout="ddMenu('six',-1)">MEDICINE</dt>

<dd id="six-ddcontent" onmouseover="cancelHide('six')" onmouseout="ddMenu('six',-1)">

   <ul>

     <li><a href="addmed.jsp" class="underline">ADD NEW MEDICINE</a></li>

     <li><a href="addmed.jsp" class="underline">UPDATE MEDICINE DETAILS</a></li>

     <li><a href="addmed.jsp" class="underline">DELETE EXPIRED MEDICINE</a></li>

   </ul>

</dd>

</dl>

<dl class="dropdown">

<dt id="seven-ddheader" onmouseover="ddMenu('seven',1)" onmouseout="ddMenu('seven',-1)">REPORT</dt>

<dd id="seven-ddcontent" onmouseover="cancelHide('seven')" onmouseout="ddMenu('seven',-1)">

   <ul>

     <li><a href="docrep.jsp" class="underline">DOCTOR</a></li>

     <li><a href="patrep.jsp" class="underline">PATIENT</a></li>

     <li><a href="medrep.jsp" class="underline">MEDICINE</a></li>

   </ul>

</dd>

</dl>

</pre>

</td>

</tr>

</table>

</center>

</body>

</html>

Page Ajout medecin :

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

   pageEncoding="ISO-8859-1" import="java.sql.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>MEDICINE WINDOW</title>

</head>

<body bgcolor="lightblue">

<form action="addmed.jsp" method=post>

<center>

<table border=3 width=500>

<tr><td>

<h1>MEDICINE DATABASE</h1>

</td></tr>

</table>

<br><br><br>

<table border=5 width=800>

<tr>

<td>

<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %>

<table BORDER=3 >

<br><br><br>

<tr><td>MEDICINE ID<input type="text" name="t1" maxlength=10 size=20 value=<%=j%>><BR>

</td>

<td><h4>MEDICINE DETAILS</h4>

</td>

</tr>

<tr>

<td>

<input type="submit" name="Button1" value="ADD MEDICINE PROFILE"><br><br>

<input type="submit" name="Button1" value="SEARCH MEDICINE PROFILE"><br><br>

<input type="submit" name="Button1" value="DELETE MEDICINE PROFILE"><br><br>

<input type="submit" name="Button1" value="EDIT MEDICINE PROFILE"><br><br>

<%

try

{          a=request.getParameter("Button1");

            if(a.equals("SEARCH MEDICINE PROFILE"))

            {

            String str1= request.getParameter("t1");

            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

            Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data");

            Statement s= c.createStatement();

            if(str1!="")

            {         

                        String sql2="select * from medicine where med_code='"+str1+"'";

                        ResultSet r=s.executeQuery(sql2);

                        if(r.next())

                        {

                                   j=r.getString(1);

                                   b=r.getString(2);        

                                   d=r.getString(3);

                                   e=r.getString(4);

                                   f=r.getString(5);

                                   g=r.getString(6);

                                   h=r.getString(7);

                        }

                        else

                        {         

                                   %><script language="javascript">

                                   alert("MEDICINE ID=<%=str1%>does not exist in database..!!!");

                                   </script>



                                   <%                             

                        }         

                       

            }

            else

            {

                        %><script language="javascript">

                        alert("ENTER MEDICINE ID TO SEARCH..!!!");

                        </script>

                        <%                 

            }

            }

}catch(Exception e) {}

%>

</td>

<td>

<br>

<br>

MEDICINE NAME<input type="text" name="t2" maxlength=10 size=20 value=<%=b%>><BR>

MANUFACTURER<input type="text" name="t3" maxlength=10 size=20 value=<%=d%>><BR>

DATE OF MANUFACTURE<input type="text" name="t4" maxlength=10 size=20 value=<%=e%>><BR>

MEDICINE TYPE<input type="text" name="t5" maxlength=10 size=20 value=<%=f%>><BR>

EXPIRY DATE<input type="text" name="t6" maxlength=10 size=20 value=<%=g%>><BR>

BATCH NO<input type="text" name="t7" maxlength=10 size=20 value=<%=h%>><BR>

</td>

</tr>

<%

try{

           

            a=request.getParameter("Button1");

            String str1= request.getParameter("t1");

            String str2= request.getParameter("t2");

            String str3= request.getParameter("t3");

            String str4= request.getParameter("t4");

            String str5= request.getParameter("t5");

            String str6= request.getParameter("t6");

            String str7= request.getParameter("t7");

            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

            Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data");

            Statement s= c.createStatement();

            if(a.equals("ADD MEDICINE PROFILE"))

            {         

            if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!=""&&str6!=""&&str7!="")

            {         

                        String sql="insert into medicine values("+str1+",'"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str6+"',"+str7+")";

                        out.println(sql);

                        s.execute(sql);

                        %><script language="javascript">

                        alert("INSERT SUCESSFUL");

                        </script>

                        <%

            }

            else

            {

                        %><script language="javascript">

                        alert("ENTER COMPLETE DETAILS..!!!");

                        </script>

                        <%                 

            }

            }

            else if(a.equals("DELETE MEDICINE PROFILE"))

            {

                        if(str1!="")

                        {

                                   String sq="select * from medicine where med_code="+str1+"";

                                   ResultSet rs1=s.executeQuery(sq);

                                   if(rs1.next())

                                   {         

                                              

                                               String sql="delete from medicine where med_code="+str1+"";

                                               s.execute(sql);

                                               %><script language="javascript">

                                               alert("PROFILE OF MEDICINE WITH ID <%=str1%>DELETED");

                                               </script>

                                               <%

                                   }

                                   else

                                   {

                                               %><script language="javascript">

                                               alert("INVALID MEDICINE ID <%=str1%>..!!!");

                                               </script>

                                               <%

                                   }

                        }

                        else

                        {

                                   %><script language="javascript">

                                   alert("ENTER MEDICINE'S ID TO DELETE..!!!");

                                   </script>

                                   <%     

                        }

            }

            else if(a.equals("EDIT MEDICINE PROFILE"))

            {

                        if(str1!="")

                        {

                                   String sq="select * from medicine where med_code="+str1+"";

                                   ResultSet rs1=s.executeQuery(sq);



                                   if(rs1.next())

                                   {         

                                               String sql="delete from medicine where med_code="+str1+"";

                                               s.execute(sql);

                                               String sql1="insert into medicine values("+str1+",'"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str6+"',"+str7+")";

                                               s.execute(sql1);

                                               %><script language="javascript">

                                               alert("PROFILE OF MEDICINE WITH ID <%=str1%>EDITED");

                                               </script>

                                               <%

                                   }

                                   else

                                   {

                                               %><script language="javascript">

                                               alert("INVALID MEDICINE ID <%=str1%>..!!!");

                                               </script>

                                               <%

                                   }

                        }

                        else

                        {

                                   %><script language="javascript">

                                   alert("ENTER MEDICINE'S ID TO EDIT..!!!");

                                   </script>

                                   <%     

                        }

            }

            }catch(Exception e) {}

%>

</table>

<input type="button" name="bttn" value="HOME" onclick="location.href='home.jsp'">

</td>

</tr>

</table>

<h4>DEPARTMENT PROFILE TABLE</h4>

<table cellspacing=3 cellpadding=5 border="2" >

<th colspan=1 align=center>MEDICINE ID</th>

<th colspan=1 align=center>MEDICINE NAME</th>

<th colspan=1 align=center>MANUFACTURER</th>

<th colspan=1 align=center>DATE OF MANUFACTURE</th>

<th colspan=1 align=center>MEDICINE TYPE</th>

<th colspan=1 align=center>EXPIRY DATE</th>

<th colspan=1 align=center>BATCH NO</th>

<%

try

{         

            String str1= request.getParameter("t1");

            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

            Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data");

            Statement s= c.createStatement();

            String q="select * from medicine";

            ResultSet rs9=s.executeQuery(q);

            while(rs9.next())

            {%><tr>

           

            <%

                        for (int i=1; i<=7; i++)

                        {

                                   out.println( "<td > " + rs9.getString (i) );

                                  

                        }

            }%></tr><%

}catch(Exception e) {}

%>

</table>

</center>

</form>

</body>

</html>

Classe de connexion

import java.io.IOException;

import java.sql.Connection;

import java.sql.DriverManager;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

/**

* Servlet implementation class for Servlet: as

*

*/

public class as extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {

   static final long serialVersionUID = 1L;

   /* (non-Java-doc)

            * @see javax.servlet.http.HttpServlet#HttpServlet()

            */

            public as() {

                        super();

            }                     

            /* (non-Java-doc)

            * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)

            */

            protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

                        // TODO Auto-generated method stub

            }        

           

            /* (non-Java-doc)

            * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)

            */

            protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

                        try{

Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c= DriverManager.getConnection ("jdbc:odbc:abc", "root", "root");

Statement s= c.createStatement();

String sql="insert into student values("+roll+",'"+str2+"')";

s.execute (sql);

out.println ("Insert Successful");

}catch(Exception e) { }

                        // TODO Auto-generated method stub

            }



49