In this Task you will build a database to support the needs of The Central Hospital, England who are working with local doctorsâ surgeries to keep accurate data about the Coronavirus pandemic. Â The National Health Service (NHS) want to improve the digitization of the data files and be able to run queries easily and efficiently and report statistics to the UK government.
A doctor will see a patient, the consultation is recorded [for the purpose of this assessment scenario any other illness unrelated to the virus infections are excluded from the scope of the task]. Â Patients are tested for the virus in the case of a positive result they will be either sent to hospital, advised to quarantine and/or asked to repeat the test in 7 days time. Â
The doctor will note symptoms, indicate higher risk patients, the diagnosis, the medication, personal patient details, testing details. Â Typically, symptoms could include: a new continuous cough, a high temperature, a loss of or change to sense of smell or taste. Â You may assume other symptoms. Â You may assume medication types, and could be commonly used medicine: paracetamol, cough linctus, high dose asprin, naproxen, etoricoxib, diclofenac, indomethacin.
The hospital admits patients referred by family doctor surgery. Â The hospital doctors pick up the data from the surgeries, starting with referring surgery details, diagnosis, above patient information, PPE guidance for staff. Â Hospital staff will give an evaluation of the PPE, evaluation is a number from 1 to 5. Â The Hospital record the evaluations from all staff.
The research and development (R&D) department at the hospital will use the computer database to monitor the infections, collate statistics and analyse the data. Â They may also run reports for the government.
Produce a design for this system. This should include an ER diagram and a set of tables with suitably defined columns and constraints to support this scenario. State any assumptions made.
20 marks
1. Create a database using Oracle SQL. Â Populate the tables with appropriate test data, bearing in mind the following:
2. Develop a set of queries as follows:
Devise 3Â further queries that test your design. Think about what sort of queries would be generated by doctors and R&D staff for the above scenario.
Credit will be given to queries that are not trivial, for example, âSELECT * FROM Tablenameâ is unlikely to gain more than one mark.
3. The live system will quickly contain a large amount of data. From your design, pick one table that you think will be queried regularly to generate statistical data (e.g., counts or averages) and would contain a large amount of data in a real system.
7 Marks
4. Create triggers that enforce the following business rules:
a. Ensure that quarantine of less than seven days duration cannot be allowed
b. If a hospital staff gives a poor evaluation of 2 or less , the details of their job role (department name, staff name, job title and date of the evaluation, supervisor or manager name and evaluation) must be placed in an audit table.