CS348 Project 3 ( Part 2 )

                                                                               Hospital Information System

This part of the project is based on the concepts of data management for XML data using java.

Part 2 Outline
In this part of the project, you will be designing JAVA based API (Application Programming Interface) to query an XML-based Health Care Record database. The database consists of XML documents for patients and policies which are described in Part 1. 

Part 2 Documents
Your XML documents should be the same three schemas provided with Part 1

Prerequisites
In this part, you will need to have knowledge of the following:

 

Database Setup
Your database tables will be the same ones used in Part 1

Instructions
The API will comprise of a set of methods written in Java. Each java method will send  SQL query involving an XPath syntax to query XML data to database.  The XPath expressions will be designed to act on XML documents conforming to the XML schemas provided to you. Therefore your queries will be evaluated against any set of XML instances conforming to these schemas. Your output should be written as an html file, which your code should be able to generate at run time. Name this as p3output.html. For your practice and reference information is available in "Resources" section below. You must, however, test your queries on the various instances possible for the given schemas.

Deliverables
    Your job is to implement following methods(Part1 explains which policy document is required for which method.) in JAVA. These methods should generate exactly same outputs of Part 1.

    1.     JGetNumAuthorizedRecords(p_id):Prints the number of records that a physician with an id p_id is authorized to view.

    2.   JGetMostAuthorizedPhysician():Prints the id of the physician(s) authorized to view the most number of records.

    3.   JGetPermittedPhysician(p_id):Prints the id of the physician(s) permitted to view the records of a patient with an id p_id.

    4.   JGetAllowedRecords(p_id,d_id):Prints the id of the record(s) of a patient with an id p_id that a physician with an id d_id is both authorized and permitted to view.

NOTE: You have to implement these methods using JAVA.

 

Resources
patients, privacy policy and authorization policy documents are provided in Part 1. A sample java code is provided to create and populate database.

·         Sample code to create and populate your data base using java can be found here

 

You will need a JDBC driver to connect to the database. It can be found HERE .Oracle XDK can be Found HERE . You have to include these jar files to your project.

 

Submission
You will submit following files.

 

When you are ready to submit part 2 of your project, you should have a directory PRJ3P2 where your files are. Go to the directory which contains the directory PRJ3P2, run the following UNIX command

·        turnin -c cs348 -p proj3p2 PRJ3P2

Your whole directory will be submitted for grading. You can check the submitted files with

·        turnin -c cs348 -p proj3p2 -v 

 

 

 

GOOD LUCK !