Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Assignment 2 - Developing a Grails Application using MVC

This is an Individual Assignment


Task: The following is a class diagram for modelling an application which will enable
doctor's appointments to be made online. This application will be for a company that
runs several surgeries in and around Sheffield

Before you start the assignment please go through the whole assignment brief. If
there are any parts of the assignment you need clarified please consult the Tutor.

Develop a Grails application which delivers a web interface and demonstrates


several aspects of the Systems Architectures module, including the appropriate use
of the Model-View-Controller design pattern and use of GIT as a code repository
(including use of branches to hold development stages and exploratory work). The
system must also demonstrate the use of access to a MySQL database. The
application should enable receptionists to login to make doctor's appointments at
various surgeries. During the appointment for a given patient the doctor can be
assigned one or more nurses. A patient can only be registered at one surgery, but a
doctor can have appointments at different surgeries. The nurses on the other hand
can only work at one surgery. The application also enables doctors to create
prescriptions and then allocate them to patients. This application is to be wholly
developed on the Virtual Machine (VM) you set up in your working area on VMStore.
You do not have to create a new VM for this assignment. You can use the VM you
used for the first coursework assignment.

You are also required to submit a reflective report on how successful you were in
implementing tasks which involved use of knowledge/skills other than that acquired
in class and your overall performance through the whole project

You are to first create a directory named assignment2 on your VM and then create a
repository named sheffSurgeries on Github. You will then clone this repository
sheffSurgeries in the directory assignment2. The Grails application, which you will
name appintmentSystem is to be created inside the repository sheffSurgeries. Make
sure Chromium is set as default browser as it supports HTML5 well

The application has got to be developed from the normal user account and not the
root account. A mark of zero(0) will be awarded for an application developed from
the root account
The following are the suggested attributes for each domain class. Please feel free to
add more attributes to each domain class as long as the additional attributes do not
alter domain class relationships. You are not to remove any of the prescribed
attributes

Surgery
Name Description Example
name Name of surgery City Health Centre
21 Marble Street,
address Make up some address
Sheffield
postcode Make up a post code S11 5TY
Make up some valid-looking
telephone 0114 555 555
phone number
Maximum number of patients
numberOfPatients 50
that can be registered
Use placeholder
description Brief description of surgery
text
openingTime The time the surgery is open 09:00-17:00hrs

Doctor
Name Description Example
fullName First and last names Dr Sarah Macdonald
qualification Qualifications of doctor MBChB(Sheffield)
position Position of doctor GP, Surgeon
s.macdonald@myemail.co
doctorEmail Makeup an email
m
password Make up password secret222
doctorOffice Room number D-9888
doctorPhon Make up some valid-
01111777
e looking telephone number
bio Biography of doctor Use placeholder text

Patient
Name Description Example
patientName First and last names Tom Rivers
Make up address for 2 One Way Street,
patientAddress
patient Eckington
patientResidenc Name of village, town, city Sheffield, Barnsley,
e where patient resides Doncaster
patientDob Date of birth for patient 20/09/1988
patientID Makeup a patient ID E25555
Date employee was
dateRegistered 26/02/2018
registered at surgery
Make up a patient telephone
patientPhone 0114 222 4444
number

Receptionsit
Name Description Example
recepName Full name of receptionist Rob Kingston
r.kingston@email.co
recepEmail Make up email of receptionist
m
recepUsername Make up a username rking
recepPassword Make up a password secret2019
recepPhone Telephone number 0114 222 4445

Nurse
Name Description Example
nurseName Full name of nurse Susan Peters
qualification
Nurse qualifications Registered General Nurse
s
nurseEmail Make up email for nurse s.peters@myemail.com
nurseOffice Office number B-455
nursePhone Telephone number 0114 222 4433

Appointment
Name Description Example
appDate Date for appointment 11/04/2019
appTime Time 3:00pm
appDuration Duration of appointment in minutes 30, 45, 60
roomNumbe
Make up a room number A-1111
r
Prescription

Name Description Example


City Centre
pharmacyName Make up name of a pharmacy
Pharmacy
prescripNumbe
Prescription number 56788
r
medicine Name of medicine Paracetomol
totalCost Total cost £5.90
Date when prescription was
dateIssued 25/05/2019
issued
To indicate whether or not patient yes or no, true or
patientPaying
will pay for the medicine false
Note that the focus of this assignment is to demonstrate your understanding of the
experience of creating an MVC application using modern web architectures and web
development processes. Marks will be given for the following:

 Correctly translating the class diagram into domain classes as well as creating
relationships between the classes
 Implementing functionalities as described in the tasks
 Documenting the progress through GIT commits
 The understanding you demonstrate (including clear explanations of problems met, even
if you have not successfully resolved the problems).

You are very strongly advised to make your work largely self-documenting as you
progress, though regular

GIT commits that have good explanatory human readable comments explaining the
work as it is progressed.

It is very unlikely that this assignment can be completed without regular, step-by-
step work towards the end-product.
Please make sure you name repositories, directories and files as suggested in the
assignment brief. This will enable the marker to find the evidence easily. Failure by
the marker to find the expected evidence will be taken as non-submission and will
lead to loss of marks.

Any evidence showing that the VM instance and/or the Grails application submitted
might have been created by someone else other than you will be regarded as
plagiarism. All VM files should be submitted including the log files. VMs with any files
missing including log files will not be accepted and a mark of 0(zero) will be awarded
for the task. The log files could be examined to make sure you are the originator of
the VM and the Grails application

GIT commits
You are required to provide credentials for your GitHub account in the User Guide
section of the report to enable markers to access the account to obtain evidence
about Git commits. Therefore, you need to ensure that you do not have content you
do not want to be seen by anyone else on your GitHub account. Failure to provide
correct credentials will lead to loss of marks for the task

Basic [40 marks]

The target tasks to be achieved are:

 Set up a new repository on GitHub named sheffSurgeries. Set Chromium as default


browser
 Create a directory on your VM named assignment2
 Clone the repository sheffSurgeries you created on GitHub in the directory assignment2
 Create a clean empty Grails application called appointmentSystem [Good GIT commit
point] inside the repository sheffSurgeries on your VM

 Apply your knowledge of domain modelling in MVC architectures by converting the


above class diagram into a set of concrete domain classes realised as Grails domain
classes. The domain classes will have to be created under the package
com.your_initial+your_lastname (without the plus sign)e.g. if full name is Peter Smith
then the package should be com.psmith . [7 marks]

[2 marks will be lost if application package is not defined as prescribed in this brief. 0
marks will be awarded for the whole task if any of the files has a package which
contains someone else's name]

 Define class attributes and constraints [This is a good GIT commit point]. [14 marks]
[For each class 1 mark awarded for correctly defining all attributes with appropriate
data types and 1 mark for correctly defining the constraints. No marks awarded if
some or all attributes, constraints are not correctly defined or if data type assigned
to an attribute is not appropriate e.g. define a date as String. The list on pages 2 and
3 of this briefs presents the attributes to be defined as a minimum]

 Define all domain class relationships as shown in class diagram. You can define additional
attributes so that the domain class relationships become more appropriate [9 marks] [No
marks are awarded if application is not running]

 Demonstrate the basic scaffold workflow by creating all scaffolds (Controller and View)
for relevant classes [Good GIT commit point] [7 marks]

[No marks are awarded if application is not running]

 Git commits carried out and transferred to GitHub account. [2 marks] o Additional 1
mark awarded for correctly using branches

[Only 1 mark awarded if at least three quarters of prescribed commits are done, 2
marks if more than three quarters of all prescribed commits are carried out. There
are about 14 prescribed commits in total. This includes commits from the Basic,
Intermediate, Advanced and Advanced++ tasks. No marks will be awarded for this
task if the credentials for your GitHub account are not supplied or incorrect.]

Intermediate [25 marks]


 Add test data into BootStrap.groovy. Create at least 2 instances of each of the domain
classes in BootStrap.groovy. [This is a good GIT commit point] [14 marks]
 mark is awarded for each instance of each domain class with all domain class
relationships reflected in the test data as well. No marks are awarded for this task if
there are 1 or more syntax errors in BootStrap.groovy or if the instances have been
commented out]

• Create 3 separate databases, one for each environment. Database configuration


for production environment should eventually be set to none. The databases for the
development and test environments should be eventually be set to update

[3 marks]
[No marks are awarded for just creating the database. All databases have to be
created and then configured correctly. 1 mark awarded for creating and correctly
configuring database. No marks are awarded if application is not running]
 Records/data are added to database to demonstrate that all relationships have been
defined correctly. Instances should be represented by identifiable information e.g.
patientName, doctorName, etc and not by default text e.g. com.enrol.Patient: 1. [This is
a good GIT commit point] [4 marks].

[All domain class relationships should be clearly reflected through records/data


entered e.g. link a doctor to an appointment, patient, prescription. The default text
representing objects should be replaced by identifiable information to be awarded
all marks (2 marks). At least 3 records entered into database entered for each class
(2 marks). No marks are awarded if application is not running]

 Change the look and feel of home page so that it represents a page for a company that
runs surgeries. Links to controllers are to be removed from home page ONLY if you are
going to implement the login/logout facility whose tasks are described in the next
section. If you are not planning to implement the login/logout facility or were not
successful then you are not to remove the links to controllers from application home
page but would re-organise them on the application home page. You are to replace the
text links with buttons which will be accompanied by some descriptive text. [This is a
good GIT commit point] - [4 marks]

[Marks will be awarded for removing links to controllers from home page and for
adding appropriate content 2 marks) and styling of page 2 marks) if you are going to
implement login/logout facility.

If you are not going to implement login/logout facility 1 mark will be awarded for
styling page, 1 mark for reorganising links and adding own content. Only 2 marks
overall if page/s have same style as the ones created in class. No marks are awarded
if application is not running]

Advanced [20 marks]


• Set up a fully functional login/logout facilities for Receptionists. The Receptionists
should be able to login using the username and password When Receptionist has
successfully logged in they should be directed to an appropriately styled page with
functional links to the following screens:

o Add/Create/Register Patients,
Doctors, Nurses, Receptionists o
Assign Nurses to Doctors
o Assign Patients to Doctors [Good GIT Commit Point] [4 marks]

[Marks awarded only for a fully functional login/logout facility including page to
which Receptionists are directed to when they are successfully logged in. No marks
are awarded if application is not running or if username and password (for
Receptionist) are not supplied to test the login]

• Set up a fully functional login/logout facilities for Doctors which is independent of


the one you set up for Receptionists. When Doctors successfully log in using their
email address and password they should be directed to an appropriately styled page
with functional links to the following screens:

o Create Prescriptions o
Display/List Prescriptions o
Display/List Patients
o Display/List Appointments [Good GIT Commit Point] [4 marks]

[Marks awarded only for a fully functional login/logout facility including page to
which Doctors are directed to when they are successfully logged in. No marks are
awarded if application is not running or if email address and password (for Doctor)
are not supplied to test the login]

 Additional 2 marks are awarded for setting up the login/logout for the Receptionists and
the one for Doctors that are independent of each other. When a Receptionist logs in
successfully they should not see the login or logout links for Doctors. The same applies to
Doctors, when they successfully login they should not see the login or logout link for
Receptionists
 Create a fully functional search facility to enable Receptionists to search for patients by
their full name, patient ID and/or by residence and then display matching records. Add a
link to the search form on the page Receptionists are directed to when they login [This is
a good GIT commit point] [5 marks]

[Marks only awarded for a fully functional search facility as described above. After a
search the results should be displayed on the appropriately styled results page. 2
marks will be lost if there are not at least 5 records to test the search facility. No
marks are awarded if application is not running]

 Create a fully functional search facility to enable Doctors to search for prescriptions by
medicine, days of supply, and total cost required and then display matching records. Add
a link to the search form on the page Doctors are directed to when they login. [This is a
good GIT commit point] [5 marks]

[Marks only awarded for a fully functional search facility as described above. After a
search the results should be displayed on the appropriately styled results page. 2
marks will be lost if there are not at least 5 records to test the search facility. No
marks are awarded if application is not running]

Advanced ++ [10 marks]


 Create a custom tag which is not in any way or form similar to the custom tag you
created for login/logout. [This is a good GIT commit point] [5 marks]

[Marks awarded according to complexity of construction of tag and the relevance of


the functionality that it offers to the application. The custom tag should be of similar
complexity as the one we created in class for login/logout facility. It should be built
using such structures as control/branch, loops and be made up of at least 5 HTML or
GSP tags. No marks are awarded for creating custom tag similar to the loginToggle
tag created in class or if application is not running]

 Implement a technology or technique which was never taught in class. This technology
or technique should provide a functionality to the application [This is a good GIT commit
point] [5 marks] [No marks are awarded if application is not running]

The Report (minimum 500 word and


maximum 1800 words)
A short report written in the template Appointments_Report.docx which you can
download from Blackboard in the section Assessment (body: minimum 500 words)
containing:

1. User Guide
You are required to provide detailed instructions on how to and where to find your
Grails application. There is no need to include screenshots in the instructions, just
the names of directories/folders and login credentials. If you have more than one
VM in your work area you will need to provide the name of folder where the VM files
are located. You are also to include the username and password required to login to
the VM.
If you have successfully implemented the login/logout provide username and
password, you set up for one of the Receptionists and Doctors. Add to the User
Guide credentials (username and password) to access your GitHub, Database Server
(for both root and the user) accounts. If you have not installed

phpMyAdmin provide password for the user account. Make sure these details are
available and correct as the Tutor will use them to access your GitHub account, the
application files and test the application. Failure by the marker to find the expected
evidence/files will be taken as non-submission and a mark of 0 will be awarded for
the affected tasks

2. Reflective Report
As part of the assignment you have been asked to apply knowledge and skills other
than acquired in class particularly to do the following:

 create own custom tag which is not similar in any way to the one created in class
 implement a technology and/or technique which you did not learn in class

Explain how you executed the above tasks and how you resolved any problems you
might have encountered.

You can use screenshots if necessary

If you were not able carry out the above tasks explain how you would have
implemented them in your application. You can use screenshots if necessary

Conclude with a brief self-review of your performance on the whole project, how
well you expected to perform against the final outcome

[5 marks]

[Only reports submitted via Blackboard submission point will be accepted]

Hand-in instructions Submit the


report through the 002 Portfolio
– Submission Point
in the section Assessments on Blackboard by 15:00hrs on Thursday 22 April, 2021. A
working Virtual Machine (VM) with all the application files should be available via
Azure Lab by 3:00pm on Thursday 22 April, 2021.
Viva – present your work

You will be asked to demonstrate your application functionality in a


viva/walkthrough session. It will be a 20-30-minute session for each student. The
schedule for the viva/walkthrough will be published closer to the submission
deadline. Also, you will be asked to do peer assessment of two other projects.

END

Powered by Beeline Reader

You might also like