Need Help (Hospital Database in Java)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smileskhan
    New Member
    • Apr 2007
    • 2

    #1

    Need Help (Hospital Database in Java)

    Hay Friends...
    Here I started a new and interested thread. I hope you also enjoy it. I got a task to creat a Hospital Database in Java. But I don´t have any good clues abouts it. So I also try my best to do it well. But here I posted it for friends too. If you have any perfect idea or correct code about it, so Please send it. I shall wait for your nice comments and help.

    Here I also explain about my task..........H ospital Database

    Hay friends....I don´t have any good idea about interesting pictures here because I also want to interest some dialogue box pictures.

    Objects of Programming
    Course Project

    Scenario

    You are working for a bio-informatics company called unCode GeneTicks. Your project manager has a small hospital database storing information about patients and how severe they are experiencing skin and circulation problems on the arms, legs and head on a scale of 0..3(See addendum Patients.txt) This database also has information about candidate genes responsible for the illnesses. Patients are labelled as having one of gene 1, 2 or 3 (g1, g2, g3) in the hospital database. As your first task for unCode GeneTicks you have been asked to write an analyser program to analyse the data, and to write a report on your findings.

    Program Requirements

    Program should:
    • Produce histogram plots showing patient counts in six divisions, each gene group being separately considered for skin and circulation problem. See the example dialogue in the addenda.

    • Allow the user the choice of threshold level (>=0, >=1, >=2, >=3) from a combo box when counting patients e.g. count is registered if the threshold value is equalled or higher for every skin measure (or every circulation measure)

    • Define a Patient class in which all data are kept private and readable only through ‘get’ methods. This class must:
    o Implement the provided HospitalPatient interface
    o Define a toString() method
    o Define an equals() method

    • Define a Patients class which has a LinkedList of Patients along with necessary methods to create that list and retrieve relevant information from it.

    • Define a PatientPanel class which inherits from the JPanel class, and contains the paintComponent method for drawing the histograms.
    o Frames with this panel should be able to be closed by the end user without quitting the application.

    • Define a ControlPanel class which inherits from the JPanel class. This is the main graphical user interface of the program. It should include the following components:
    o A label for instructions to the end user
    o A combo box for selecting the threshold level
    o A pair of radio buttons for selecting whether head data is to be included
    o A button to create a new window with the chosen histogram

    • Defina a PatientAnaliser class which is the start point of the program. This class should:
    o Create an object of Patients
    o Have that object open and read the text file Patients.txt
    o If that was successful it should display the main GUI of the program
    o If the file was not found it should show a dialog box stating this information
    o If there was any problems with reading the file it should show a dialog box stating this information.


    Addenda
    HospitalPatient .java

    public interface HospitalPatient
    {
    public String getGeneID();
    public int getArmsSkin();
    public int getArmsCirc();
    public int getLegsSkin();
    public int getLegsCirc();
    public int getHeadSkin();
    public int getHeadCirc();
    }



    Patients.txt

    <geneID><arms skin><arms circ><legs skin><legs circ><head skin><head circ>

    g1 1 0 1 0 0 0
    g1 0 1 0 1 0 1
    g1 0 1 0 0 1 1
    g1 0 0 0 1 1 1
    g1 0 0 1 1 1 1
    g1 0 1 1 1 1 1
    g1 1 0 1 1 1 1
    g1 1 1 1 0 0 0
    g1 1 1 0 1 0 0
    g1 1 1 1 0 0 0
    g1 1 1 1 1 0 0
    g1 0 1 1 1 1 0
    g1 1 0 1 0 1 0
    g1 0 1 0 1 0 1
    g2 1 2 1 2 1 1
    g2 1 2 1 2 1 2
    g2 1 1 1 1 2 2
    g2 1 1 1 2 2 2
    g2 1 1 2 2 2 2
    g2 1 2 2 2 2 2
    g2 2 2 2 2 2 2
    g2 2 1 1 1 1 1
    g2 2 2 1 1 1 1
    g2 2 2 2 1 1 1
    g2 2 2 2 2 2 1
    g2 2 2 2 1 2 2
    g2 1 2 1 2 1 2
    g2 2 1 2 1 2 1
    g3 2 3 3 3 1 1
    g3 2 2 2 2 2 3
    g3 2 3 2 3 2 2
    g3 2 3 2 3 3 2
    g3 2 2 2 3 3 3
    g3 3 3 2 3 3 2
    g3 2 3 3 3 3 3
    g3 3 3 2 3 2 2
    g3 3 3 2 3 2 2
    g3 3 3 2 3 2 2
    g3 3 3 2 3 2 2
    g3 2 3 3 3 3 2
    g3 2 3 3 3 3 2
    g3 2 3 3 3 3 2
  • rickumali
    New Member
    • Dec 2006
    • 19

    #2
    Boy, that question sounds pretty "heavy". Check out this post about the type of question you have. Perhaps if you focused on a smaller part of this problem, and a specific issue you have it, thescripts could help out.

    Comment

    • horace1
      Recognized Expert Top Contributor
      • Nov 2006
      • 1510

      #3
      build the program component by component,, e.g.
      1. design, implement and test a Patient class, when it is working
      2. design, implement a Patients class
      etc etc

      in this way you build up to a complete system - by thorough testing as you go along the components should work correctly when they are put together.

      Comment

      • smileskhan
        New Member
        • Apr 2007
        • 2

        #4
        Thanks rickumali and horace1 bro............ .Thanks alot.......But today i started my practice about my this Hospital Database since from morning........ ..and Thanks God i succeeded alot but the problem which still have a headache for me is that, that how i make a histogram by reading data from text file........... ..

        I also succeeded in reading data from text file but making is a histogram according to the data in the text file is much difficult...... ........

        If someone have any idea about this stupid histogram...... ......so I shall wait for ur kind replies........ ....

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by smileskhan
          Thanks rickumali and horace1 bro............ .Thanks alot.......But today i started my practice about my this Hospital Database since from morning........ ..and Thanks God i succeeded alot but the problem which still have a headache for me is that, that how i make a histogram by reading data from text file........... ..

          I also succeeded in reading data from text file but making is a histogram according to the data in the text file is much difficult...... ........

          If someone have any idea about this stupid histogram...... ......so I shall wait for ur kind replies........ ....
          As you would do it manually on a piece of paper. Once you get the data nicely scaled you can use swing to draw the histogram or make some representation of it on the console

          Comment

          • tkyass
            New Member
            • Dec 2007
            • 1

            #6
            hello
            i have a project now about doing a db in java for a hospital
            so plz if u completed ur project successfuly plz can u send it 2 me it will really be alot of help for me
            my email is <removed>
            thanx alot
            Last edited by r035198x; Dec 18 '07, 09:26 AM. Reason: posting emails is against site rules

            Comment

            Working...