Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

CASE FILE MANAGEMENT SYSTEM

BY

NAJMA HUSSEIN ABDI


18ZAD103478

SUPERVISOR: MR. DAVID KIROP

A PROJECT SUBMITTED IN PARTIAL FULFILLMENT OF THE

REQUIREMENTS FOR THE DEGREE OF COMPUTER

SCIENCE, SCHOOL OF COMPUTING SCIENCES RIARA UNIVERSITY,

NAIROBI, KENYA

JUNE, 2021
DECLARATION

I declare that this or any other University has not previously submitted this work for the
awarding of the course marks. To the best of my knowledge and belief, this work contains no
material previously published or written by another person except where due reference is
made.

Student Name:

…Najma Hussein Abdi……

Signature:

……………

Date:

……………………………

APPROVAL

The project proposal of student name was reviewed and approved by the following:

Supervisor Name:

………………………………………….

Signature:

………………………………………….

i
DEDICATION

I dedicate this research project to my father Mr. Hussein Abdi Farah for his encouragement,
financial support and moral support. May God accord him good health and long life and
joyful days ahead?

ii
ACKNOWLEDGEMENT

I first thank the Almighty God for giving me the strength and ability to do my project and
reached this far. Secondly, I sincerely express my gratitude to my supervisor Mr. David
Kirop for his continued support, guidance and encouragements. I offer my sincere
appreciation for the learning opportunities provided by the university.

iii
ABSTRACT

Access to justice is an important issue in many international justice systems. Increasingly,


technology is seen as a potential catalyst for access to justice, especially in terms of
improving the justice sector. Major tasks associated with court functions are registration,
identification and tracking of cases. A file system that is the key to success in a judgment
system. A systematic, efficient and effective case management system provides
comprehensive information to the courts to ensure impartial decisions as well as a transparent
system that prevents abuse of power or corruption, postponement and delays in decision-
making. The general purpose of this study will be to establish the implementation of a file
management system in Kenyan courts. The study sought to address the following objectives;
to establish the requirements, policies and procedures for the management of the electronic
case file system, to establish framework and guidelines for the process of evaluation of a
legally maintained computerized case file system and to establish a database for archiving,
managing and maintaining case records. The study also looks at the adoption of a case
management system as an important part of service delivery to their clients.
A case study approach was adopted to ensure greater data reliability. Both standardized and
standardized methods have been used to analyze, present and interpret data. To achieve the
above objectives, data were collected using observations, questionnaires, documentary
reviews, and discussions of Kenyan judicial systems. This approach has been used because
the project needs to deal directly with customers and users so that we engineers will know
what they really want and how they want the system to work in their feedback after each
duplication. The study will outline the requirements, policies, and framework and evaluation
process for implementing a file management system. To achieve this from the study we can
conclude that more needs to be done to improve the file management system in Kenyan
courts through various means of harmonization that will lead to user satisfaction. The system
will record new crimes, ownership and existing investigations, which will reduce the judge's
work and save time, during court proceedings. A variety of criminal records, major crimes,
car crimes, burglary, and drug abuse were kept. Basically, this project will be about applying
for a new web application where judges can record new files. In this project I have used the
agile model in building my plan because it helps product teams deal with many of the most
common project pitfalls (such as cost, schedule forecasting and navigation) in a highly
controlled manner.

iv
Table of Contents

DECLARATION ........................................................................................................................ i
DEDICATION ...........................................................................................................................ii
ACKNOWLEDGEMENT ....................................................................................................... iii
ABSTRACT .............................................................................................................................. iv
LIST OF FIGURES ............................................................................................................... viii
LIST OF TABLES .................................................................................................................... ix
CHAPTER ONE: INTRODUCTION ........................................................................................ 1
1.1 Background Information ............................................................................................. 1
1.2 Problem Statement ........................................................................................................... 3
1.3 Project Justification .......................................................................................................... 3
1.4 Project Objectives ............................................................................................................ 3
1.4.1 Main Objective .......................................................................................................... 3
1.4.2 Specific objectives ............................................................................................... 4
1.5 Research Questions .......................................................................................................... 4
1.6 Project Scope .................................................................................................................... 4
1.7 Limitation of proposed system ......................................................................................... 4
CHAPTER TWO: LITERATURE REVIEW ............................................................................ 6
2.3 The Role of Case File Management System .................................................................... 8
2.4.2 Advantages of having a database............................................................................... 9
2.4.3 The Database Management System for the CFMS ................................................... 9
2.4.4 Unique features of the SQL Lite................................................................................ 9
CHAPTER THREE: METHODOLOGY ................................................................................ 11
3.1 Research Design ............................................................................................................. 11
3.3 System Modeling............................................................................................................ 12
3.3.3 Importance of Object Orientation in Large Scale .............................................. 14
Application in Business .................................................................................................... 14
3.3.4 Modeling the System Architecture .......................................................................... 15
3.3.5 UML Diagrams in Brief .......................................................................................... 15
3.4 Diagrams Used ............................................................................................................... 16
3.4.1 Use Case .................................................................................................................. 16
3.4.2 Class Diagram.......................................................................................................... 19
3.4.3 Entity Relationship Diagram ................................................................................... 20
3.4.4 Sequence Diagram ................................................................................................... 21
3.6 How the system works ....................................................................................................... 25
v
3.8 BUDGET FOR THE PROJECT ................................................................................... 25
3.9 GANTT CHART ............................................................................................................... 26
CHAPTER FOUR: SYSTEM IMPLEMENTATION ............................................................. 27
4.1 Introduction ........................................................................................................................ 27
4.2 Interaction Methods ........................................................................................................... 27
4.2.1 sign-in pages ................................................................................................................... 27
4.2.2 Admin login ............................................................................................................. 28
4.2.3 Registering a case .................................................................................................... 28
4.2.4 View Cases .............................................................................................................. 29
4.2.5 The update and delete function ................................................................................ 30
4.2.6 Admin dashboard ..................................................................................................... 30
4.3 Testing ....................................................................................................................... 31
4.3.5 Integrating Testing ............................................................................................. 32
References ................................................................................................................................ 37

vi
KEYWORDS
Program: instructions executed by computer to perform specific task.
Procedure: series of action conducted in specific order.
Investigation: formal inquiry.
Case: general sense of dispute between opposing parties.
Crime: an action which constitutes offence and is punishable by law.
Burglary: illegal entry of house with intent to commit theft.
Web system: an application designed to be used via the web.

vii
LIST OF FIGURES

Figure 1: the figure shows how the web ap. .............................................................................. 8


Figure 2: Conceptual framework……………………………………………………………12
Figure 3: Clerk use case diagram ............................................. Error! Bookmark not defined.
Figure 4: Judge use diagram .................................................... Error! Bookmark not defined.
Figure 5: Admin use diagram .................................................. Error! Bookmark not defined.
Figure 6: Client use diagram .................................................... Error! Bookmark not defined.
Figure 7: Class diagram ........................................................................................................... 20
Figure 8: ERD diagram ............................................................ Error! Bookmark not defined.
Figure 9: Sequence diagram..................................................... Error! Bookmark not defined.
Figure 10: Block diagram ........................................................................................................ 22
Figure 11: Gantt chart for the project ...................................................................................... 26
Figure 12: Home/login page .................................................................................................... 27
Figure 13: Admin login page ................................................................................................... 28
Figure 14: Registering case page ............................................. Error! Bookmark not defined.
Figure 15: View case dashboard .............................................................................................. 30
Figure 16: Admin dashboard ................................................................................................... 31
Figure 17: Modification on admin dashboard………………………………………………..33
Figure 18: Deletion on admin dashboard…………………………………………………….34

viii
LIST OF TABLES

Table 1: Budget for the project ............................................................................................... 25

ix
LIST OF ABBREVIATION, ACRONMYS MEANING

WEB/WWW- World Wide Web, is a collection of website or web pages stored on web
servers and connected to local computers through the internet

APPLICATION- software program that runs on computer

DBMS- database management system

SQL LITE- is a data engine that contains its own, no feeds, no zero, is the world’s most
widely distributed database with more application

LAN- local area network

CCMS- computing center management system

CFMS- case file management system

PROGRAM- set of instruction that can be executed by a computer to perform a specific task

SYSTEM- collection of elements or components that are organized for a common purpose

OOAD- object oriented analysis and design, a software engineering approach that models a
system as a group of interacting objects

UML- unified modeling language, consists of an integrated set of diagrams, develop to help
system and software developers for specifying, visualizing, constructing and documenting the
artifacts of software system

FRONTEND- is everything with which the user interacts in software program or a website

BACKEND- part of a website or software program that users don’t see

FRAMEWORK- platforms for developing software application

MODEL- is a translation of objects or phenomena from the real world into mathematical
equation

ERD- entity relationship program, is a chart that visually represents the relationship between
database entities

BROWSER- software program used to view website or files

URL- Uniform resource locator

x
WEB PAGE- is a document written in HTML, which is viewed in an Internet browser, it can
be accessed by entering a URL address into browser’s address bar. Web page contains
graphics, text and hyperlinks to the other web pages and files. Provides information to
viewers

INTEGRATION- bringing together the component of sub-systems into one system in order
to work together as a system

DATA- information/ raw material collected together for reference or analysis

HOMEPAGE– introduction page of a website, serving as table of contents for the site.

xi
CHAPTER ONE: INTRODUCTION

1.1 Background Information


In any given country, the Judiciary is one of the various arms of government. The arm
contains a system of judicial courts responsible for the administration of justice. In carrying
out its duties, the Judge is independent of other spheres of government to ensure that it
operates in accordance with the law on defense and to ensure that the constitution is upheld
by all citizens and all organs in the country as provided for by the constitution of Kenya. The
arm works to ensure the protection of various human rights and freedoms as enshrined in the
2010 constitution of Kenya. The structure of the judiciary is made up of the highest courts
and the lower courts. The High Courts of the Judges consist of the Supreme Court, the Court
of Appeal and the Supreme Court. The lower courts have district courts, district courts and
children's courts.

With the advent of Information Communication Technology (ICT), new opportunities and
challenges have emerged to promote the efficient delivery of justice services. Opportunities
and challenges have arisen with the potential to focus on the technological advancement of
citizens who are aware of their rights and responsibilities and the high level of literacy in
Information Technology (IT). In an effort to ensure that the government remains efficient and
effective in performing its functions, the use and integration of IT will be the most
appropriate step due to its environmental benefits namely the introduction of an E-citizen
speaker where the foreign citizen can easily access his services in accordance with existing
government rules and regulations. In the various actions in the constitution and existing
policies.

1
Records management is an important function in any organization because records serve as
memory aids, evidence, point of view and serve as an important component in ensuring the
efficiency and effectiveness of institutions to ensure an effective public service delivery tool
(Halsey & Bettany, 2018). ("Gaps in the use of electronic trial file (eTF): Research in the
organization case," 2019). In view of the current problems associated with records
management systems, the recent advances in the field of Information Communication
Technology in the 21st century have been enormous and have provided the greatest potential
for solving these problems to enhance efficiency in service delivery. One of the areas where
records management is most important and forms the basis on which activities are
strengthened by the justice system. It has been observed that the judiciary faces a major
challenge of imposition due to improper placement, loss, injury among other challenges.
Given this problem, it has been difficult to find justice in this important government arm or
else there has been a significant delay in the process of obtaining forms due to the challenges
associated with the manual systems. This is the basis on which important interest should be
developed in the automation of the judicial process as the saying goes "justice is abolished,
justice is denied". This automated machine will ensure that a small increase in pressure is
legal as this technology will help ensure timely and efficient service delivery as well as build
transparency in performance, build public trust and confidence in adjudication processes.

My first major experience was on the third of July 2018 where I went to trial for the
continuation of a nearby post in Garissa. The first thing I noticed was the large files the
judges kept a record in. This gave me the idea to make a plan that would slow down this
process. My mind then developed after some research and information on large file storage
that was not allowed in most police posts. I thought I would create a system that would record
new crimes, and then detect and investigate, that would reduce the judge's work and save
time during the trial. A variety of criminal records, serious crime, motor vehicle crime,
burglary, sometimes drugs and robbery were kept, basically the project will be about new
places where judges can record new files. Any existing file management system was
researched to find a clue to design the appropriate web process system.

2
1.2 Problem Statement
Records and information management in the past has gained increasing support and attention
in the public sector around the world as governments adopt information and communication
technology in the management of their corporate records.

Recently, Kenyan courts have observed a high level of public complaints and mistrust that
has resulted from the problems they face in relation to the restrictions associated with court
records management systems. Major complaints have been linked to the improper placement
of files to harm their cases as missing files lead to unfair court proceedings. Storage
challenges that lead to the loss of various files or special documents have led to a high level
of inconsistency among other challenges in performance and court procedures. Having
appropriate and sound file management systems in place will ensure a high level of efficiency
and effectiveness in the provision of services and ensure justice in the courts (Great Britain:
Her Majness's Courts & Tribunals Service, 2019). Ministries manage processes and
functions. Apart from that, there was not yet a clear file management system in the judiciary.
These issues highlight a potential study to investigate the implementation of the Electronic
Case Management System in Kenya's judicial system.

1.3 Project Justification


The reason I decided to set up a case management system is because of the growing
corruption in the country, especially from politicians. The system will benefit judges,
especially in the case of historical cases where references are needed as the historical
judgments of other judges will be recorded. The study will benefit court staff and
administrators by highlighting weaknesses in the use of the manual system for users. For
some researchers, this program will help to add to the existing literature in the field of
research. Future scholars and researchers will therefore be able to pass on and apply the
findings of this project in their course studies. The system continues to reduce the reporting
of crime at police stations and they will not have to spend more time reporting crime as
before. In addition, the project will equip other researchers with sufficient information to
develop more relevant or advanced programs or improvements.
1.4 Project Objectives
1.4.1 Main Objective
The main objective is to discover the implementation of electronic case file management
system in Kenyan Courts.

3
1.4.2 Specific objectives
1. To provide means for court to publicize and advertise court cases in details.
2. To generate reports of court cases for all parties involved in the case
3. To create database to store, manage and backup case records.
4. To generate proper schedules for court cases.
1.5 Research Questions
1. How does the court documents recorded and stored in file management systems?
2. How can the certification be implemented in the filing system?
3. How can the new developed system be tested?
4. What are the different ways of testing the system?
1.6 Project Scope
This project is based on developing an electronic web application to automate the case
management systems in different law courts. The website will first get to Limuru law court,
due to many cases recorded day in day out. This will help the judges in simplicity of their
operations.
1.7 Limitation of proposed system
The proposed systems have some disadvantages due to the change made from operating from
manual to computerized system.
These include:
1. Unemployment: some of the workers expressed fear that they will be laid off due to
introduction of computerized system.
2. Training cost: the employees will be trained on the effective use of the voting system
which will cost the judiciary both time and finances.
3. Maintenance cost: the system will require modification due to new user
requirements, upgrades and installations. However, the information system for the
judiciary is worth undertaking as the benefits it will introduce are immense.

4
1.8 Gaps

Security
The above theory proves that the system used in courts lacks security. My endeavor when
creating this system is to enhance maximum security on court systems.
Time
Too much time is taken in processing court documents. My system will help reduce the
overall time taken to produce these documents.
Cost
The amount of money that goes in paper work as illustrated by the literature above is too
much. The aim of my system is to cut down these costs.

5
CHAPTER TWO: LITERATURE REVIEW

2.1 Introduction
Major steps in the transformation of electronic installation have been seen in the past.
Numerous studies conducted on judicial systems and procedures have shown that the use of
electronic filing systems provides greater efficiency in the provision of court services.
According to Lei Zhang et. (2019), “Legal authorities around the world are shifting their
focus from the adoption of electronic complementary programs to the public administration
of justice. They also point out that processes and programs are ongoing in an effort to ensure
the use of the computer in all their aspects in the management of documents in court filling
programs.

With regard to the principle of service delivery, there are standards set for the provision of
the country's best services including accountability, transparency, confidentiality,
accountability and more. With effective records management especially in the justice system,
these principles and standards can be achieved (Lemley, 2019). A reliable and legitimate file
management system is the basis for the effective implementation of judicial and decision-
making processes with impartiality. It also promotes punctuality and integrity in the use of
court cases which is the policy of the service delivery document. With the advent of the
electronic file management system the boundaries that lead to duplication of records will be
overcome and ensure that information is within the scope of the information where the
information can be used by the relevant staff for operational purposes. The biggest problem
or problem in making CFMS is security, accessibility and collaboration. Collaboration here
means the ability of computer programs or software to exchange and use data and data
(Rogers et al., 2020).

With regard to court performance, they ensure efficiency in file management purposes not
only to promote compliance but also to ensure that the balance is maintained between the
efficiency of service requirements and to ensure reduced credit levels arising from
maintaining customer confidentiality (Lunney, Jr., 2018). Various researchers not only agree
that computer file management systems can improve case management and information but
also see it as a viable and effective information management and resource management
solution that can arise.

6
This project will be web-based and will require a database for archiving and storing user
information. The system gives the administrator the right to enter new case records and
maintain, update existing case records in a fully searched database. Alternatively, attorneys
can file electronic documents, reduce the burden on the court system, open cases and ensure
that all documents are properly completed. The chief executive can view the program and
know when and by whom the case file has been changed.
2.2 Web application
Web application is an application software or a computer program that runs on a web server
and perform tasks over the internet. They are accessed by the users through a web browser
such as Google chrome or Firefox with an active internet connection. They are programmed
using a client-server-based structure. Commonly used web applications include: Gmail and
Google map.
2.2.1 How web applications work
Coding for web applications is usually done in browser-supported languages such as
JavaScript, PHP, Perl and Python because these languages rely on the browser to make the
program work. These applications are divided into two powerful models that require server-
side and static processing without the need for a processing server. A web application
requires a web server to manage customer requests. A web server is software and hardware
that uses or directs access to the same sources (web addresses) and the Hypertext Transfer
Protocol to respond to customer requests made via the World Wide Web (www). The main
role of the web server is to store data, process data and deliver web pages to users by
displaying website content. User access a web application through either a web browser or a
mobile application by making a request to the web server over the Internet.
1. The web server forwards the user’s request to the web application server. The web
application server is to perform the user’s request task such as processing the data and
then generates the output of the requested data
2. The web application server forwards the results back to web server.
3. The web server delivers the requested data or information to the appropriate client and
appears on its display.

7
Web application architecture
Figure 1: Web application architecture

As shown in figure 1 on how the web application architecture works and interacts with user
by collecting data from the user and bringing output as a display result.
2.3 The Role of Case File Management System
1. To enhance time saving which ensures that shorter period essential for managerial
function is attained
2. To develop a system which ensures abstraction of data through use of hand-held
mobile devices.
3. To reduce costs associated with manual files management systems
4. To enhance security of data
5. To enhance flexibility in the operations involving case management.
6. To enhance timeliness in the operations and save unnecessary inconveniencies
associated with the inability to access the files.

8
2.4 Modeling the Data Base for CFMS
2.4.1 Database & the Database Management System
Database related information that has been transcribed and managed under data management
systems. The role played by the DBMS is to control data security, data recovery, fundraising
and providing backups and recovery methods.

2.4.2 Advantages of having a database


Compared to the legacy data storing techniques, the Database systems are much more reliable
than ever before with the following features:
1. Security & access control of the system for different users on different information.
2. Data Integrity & Integration
3. Reliability & Scalability.
2.4.3 The Database Management System for the CFMS
The project will be an online-based program where data will be obtained from anywhere
within the organization through the Local Area Network (LAN). In this case, the DBMS
should be able to manage multiple connections simultaneously in a network location.
Additionally, in this program, the database will be able to deal with a wide range of details
regarding cases, attorneys and more. To do this effectively, based on a variety of factors, the
SQL lite database management system has been selected.
2.4.4 Unique features of the SQL Lite
The Computing Center Management System (CCMS) uses SQL Lite as DBMS for the
following reasons:
SQL Lite is a SQL data engine that contains its own, no feeds, no zero. SQLite code is public
and therefore free to use for any purpose, commercial or confidential. SQLite is the world's
most widely distributed database with more applications than we can count, including many
top-notch projects.

SQLite is a SQL data engine installed. Unlike many other SQL details, SQLite does not have
a separate server process. SQLite reads and writes directly to standard disk files. A complete
SQL website with multiple tables, indices, triggers, and views, is contained in a single disk
file. Cross-platform data file format - you can freely copy the database between 32-bit and
64-bit systems or between big-endian and little-endian architectures. These features make
SQLite a popular option as an application format. SQLite data files are a storage format
recommended by the US Library of Congress. SQLite is an integrated library. With all

9
features allowed, the library size can be less than 600KiB, depending on the specified
platform and compiler settings.

2.5 Security of court data in e-CFMS (e-Case File Management System)


Sheper and Yeo (2013), have chosen that the records management policy should be approved
by senior management and made easily accessible to employees at all levels of the
organization. In addition, research suggests that it should work in conjunction with other
policies on how best to achieve those outcomes in achieving the desired goals of the
organization.
It has been observed in the judiciary and in other spheres of government that there is a high
level of manipulation of paper-based records in an attempt to promote greedy human
aspirations such as delaying administrative justice processes, lying, and duplication of others
to promote ill health benefits. Additionally, with the advent of technology, the production of
counterfeit documents, stamps have, among other things, been made more dangerous than
ever on paper records.
To overcome the challenges listed above, BiH CFMS is primarily involved in the acquisition
of documents. BiH CFMS uses a combination of database capturing and word processing
software to create notifications, decisions and other documents. In this case, the clerk needs
to include the case in a system that can be automatically generated when the attorney is ready
to work in the case. When this decision is made, the system automatically saves the document
type and uploads it to the subscriber list. Thereafter, the clerk prints the required number of
documents to stamp and send to the recipients. In addition, the system allows for additional
copies to be printed on demand. BiH CFMS is the world's first automated national court
system where the construction and maintenance of courts producing documents is a
mandatory part of their operations. This means that court documents do not work unless they
are created and stored by the Computer Center Management System.

10
CHAPTER THREE: METHODOLOGY

Introduction
In this chapter we will be looking at the research methods that were employed in the study in
order to achieve the objectives of the study. This chapter will cover the research design to be
adopted, system modeling and methodology used in the system.
3.1 Research Design
The research design describes a program that the researcher will undertake to develop
problem-solving strategies and provide guidance on various research steps. This study uses
the structure of descriptive research because it has an interest in defining satiety as it exists
during learning without resorting to deception. It provides the researcher with the opportunity
to obtain detailed information on the subject under consideration.

Robson (2018) argues that descriptive study reflects a more precise picture of people, events,
or situations. Chandran (2019) also states that descriptive research describes existing
conditions and attitudes using observation and interpretation techniques. In current research,
this design is very popular because it helps in a deeper understanding of the current situation
as it exists. Enables access to information and course content as a result of the use of the
questionnaire and discussion guidelines.

3.2 Conceptual framework


According to (Toy et al., 2020), the conceptual framework is based on a set of broad ideas
and concepts that help the researcher to identify the problem he or she is looking at, organize
his or her questions and obtain relevant literature. The conceptual framework assists the
researcher to clarify the question and its research objectives. According to the study
independent variables are the costs of CFMS, Security of Court Information and Job
Satisfaction. CFMS costs are important as they help to determine the total cost of the
Program and therefore their value. The security of court information also helps in monitoring
who accesses cases to avoid loss of cases and bribery. It is also important to ensure that legal
matters are followed up for example when developing a final schedule and keeping records
and information taken from the system.
Independent variations are what may affect the implementation of CFMS. It includes a lack
of management support.

11
Training and awareness of the organization's culture. Appropriate training and awareness
should be done before installing the program and finally (User training and acceptance). This
is important as it prepares users psychologically thus preventing resistance to change between
them.

Conceptual Framework
Figure 2: Conceptual framework

Cost of CFMS
 Information capture,
storage and retrieval
 Speed of report generation
 Presence of case statistics

Court Data Security Effective service delivery


 File construction  Registry court/judicial
 Number of lost cases services

3.3 System Modeling

Job Satisfaction
 Confidence at work
 Knowledge of court
process

As shown in figure 2 the conceptual framework of the system which shows a breakdown of
how a CFMS works to reduce the workload in an easier way in order to bring the final output
effectively.

12
3.3.1 Importance of Modeling
The software development and implementation of the organization is aimed at ensuring that
the needs and preferences of the organization's client are met with the highest level of
satisfaction available. This can be achieved if the software works to improve quality, cost
control and improve the timeline (three-dimensional rule of any project) among other
problems that can be caused by the failure of other systems especially manually. A program
that includes software should promote efficiency and effectiveness in the use of human and
physical resources. What is most important in this message is that the main product of the
development team should not be well documented. It should be a software product that can
meet the changing needs of customers. Everything else should be considered secondary.

To incorporate and maintain a proper modeling process and a real model, the collection of
sufficient data by the project development team is essential. The model should be designed in
such a way that it uses social media that provides information about the system as well as
visualizing and controlling the structure of the system. The model provides a better
understanding of the system and simplicity and improves integrated reuse.

3.3.2 Introduction to Object-Oriented Modeling


Object-Oriented Modeling refer to the modeling language in which an object is defined as an
abstract of something in a problem domain reflecting the capabilities of the system to
maintain information about it and or interact with it.

OOAD involves application of object modeling techniques in analyzing the requirements for
a context which may for example involves set of system modules for a business organization
in designing the solution. Object oriented analysis and design (OOAD) is a part of the
development of large-scale systems and programs often using the Unified Modeling
Language (UML).

In modern analysis of object-oriented designs, they use common practices, requirements,


implementation and testing. Object-oriented analysis (OOA) is a targeted program. UML
diagrams are used in the process of displaying statements in which source analysis is
recorded for use cases.

In this regard, the analytical model will consider the challenges of implementing in particular
the distribution, consolidated funding and system development. A program model can be

13
built on different domains that are analyzed differently depending on different interests
especially business interests, technical interests and intellectual interests. The use of object-
oriented analysis results in the definition of what is to be formed, the concepts and their
relationships made by us through a conceptual model.

In the analysis phase, the inclusion of any other texts that can make a performance
description and program performance is done to help create a humorous text interface. During
object design (OOD), there are also possible design designs that are possible.3.2.3 Project
Documentation – Court-Case Management System

Object Oriented Design refer to the process in which system designers uses objects to
generate logical solution in solving a problem. It involves taking of the conceptual design
model which results from object-oriented analysis coupled with implementation constraints
resulting from the environment, programming language and the tools selection in recognition
of the assumptions made in regard to the design basis. It ensures availability of various
interfaces and their implementation on stability and reusability of the system services. The
basis for policy classes is made in regard to the concepts identified as unstable. The result of
the object-oriented design is a detailed description of how the system can be built, using
objects.
3.3.3 Importance of Object Orientation in Large Scale
Application in Business
There are visible applications of the software in the current business operations where it has
been evident that it provides myriad benefits among others increased productivity and better
performance. There are various challenges that are faced in development of large-scale
business applications of systems as stipulated by IEEE computing services which are outlined
as follows.
1. Existence of high volumes of application data maintained in relational data base.
2. Existence or large amount of the user interface codes which offer diverse set of user’s
accesses to services and data in a variety of ways.
3. Existence of large number of users from diverse environment who require high level
of scaling of the systems to fit their diverse needs.
4. Need for integration of large number of the analyst teams, testers, and programmers
etc. who need effective management.

14
3.3.4 Modeling the System Architecture
The system architecture is of great significance given that the system requires satisfying
various stakeholders ranging from the system end-users, managerial team and system
development team among others where their viewpoints need to integrate into the system.
This takes place at different levels of the project phases in its lifecycle. This system
architecture is of great significance because it aids in various decisions among them;
1. Decisions concerning selection of structural elements with inherent interfaces in
which system is made of
2. Decisions concerning the behavior of elements of the system and their collaborations.
3. The composition of these behavioral and structural elements into the progressively
larger sub-systems.
4. Decisions concerning the dynamic and the static elements of the system with the
inherent interfaces as well as their collaborations and compositions.
It also deals with the system performance features in terms of their functionality, re-usability,
constraints, feasibility and other performance related elements.

3.3.5 UML Diagrams in Brief

Class Diagram
This is describing the type of static structure diagram which provides a description of a
system through indicating the various classes in the system, describes their attributes and the
inter-class relationships.
Use Case Diagram
This provides a brief description of the functionality of the system from the viewpoint of the
user. It provides a description of how the user will be communicating with the system to
execute its functionality.
Activity Diagram
An activity diagram presents the workflow of the system and its components. It indicates how
the activities flow and the overall control that can be made.
Sequence Diagram
It indicates the interactions that occur between the system objects in a sequential manner over
specified period of time. The sequence diagram is applied commonly to represent interactions
between objects that occur from one operation to another.

15
3.4 Diagrams Used
3.4.1 Use Case
The system will comprise of four use case diagrams each containing one actor.
Clerk
The clerk who is in charge at the working desk of a particular polling station, as the system
user will enter the criminal details that is their name, age, gender, location and the date and
time the recording are being done. The further go ahead and enter the case details of the case
that the alleged criminal is being accused of. Finally, they set a hearing date for the case. The
clerk will need a password and only after authentication can he/she fill in any details.
Figure 3: Clerk use case diagram

CLERK
Log In

Enter Criminal
Details

Enter case
Details

Set hearing
Date

View verdict

In this figure 3 shows the main work of the clerk in the system like logging in, entering
criminal details, case and setting the hearing.

16
Judge
The system will ensure that a court judge is linked to police stations where various pending
cases can be reached by a judge opposing his or her murder. In addition, the system will
provide the judge with all the information regarding the parties involved in the case i.e.
details relating to the respondent and the plaintiff and the positions or allegations leveled
against the criminal. The decision will be generated and entered into the system and all
processes as well. The judge will need to create an account for this process.
Judge Use Case Diagram
Figure 4: Judge Use case diagram.

Log in

Judge
View criminal
Details

View case
Details

Enter verdict

In this figure 4 which shows what the judge does in the system, he/she views the criminal
details, case details and enter verdict of the case he/she handled.

Admin Profile
A manager is a program administrator who ensures the system performs various commands.
You can access all the data within the system more, the administrator can perform other
functions in the system such as various data verification, verification, add case details among
others. The supervisor is liaised with the judge and the clerk. The supervisor will be helpful
in the event of the entry of a new judge or new clerk in charge of updating the system.

17
Admin Use Case Diagram
Figure 5: Admin use case diagram

Admin
Log In

Enter judge
Details

Enter police
Details

In this figure 5 which shows that the admin is the controller and ensure that the system
performs well, he adds the users and enter police details (case details).

Client Profile
Client refers to the end user of a product in this state of the system. Depending on the system,
the client will be able to search and find attorneys where attorney details and performance
profiles can be viewed. Other responsibilities that will be offered in this program include the
appointment of a lawyer, making payments and other follow-up activities in relation to
ongoing cases.

18
Client Use Case Diagram
Figure 6: Client use case diagram

Log in

Client
Search for advocate

View advocate
profile

Pays for the


service

In this figure 6 which shows the client is the end user of the system and he/she can
view/search advocate and can make payment.

3.4.2 Class Diagram


The classroom drawing shows the clerk's relationship with the judge. In the clerk database
will include; fist, surname, phone number, Id. The clerk will be able to enter details of the
crime, set dates for hearings and enter details of the case. On the other hand the judge will
enter the name, enter the phone no. email address, job ID and password. The judge will be
able to view the details of the case and the details of the crime and update the case details.

19
Class Diagram
Figure 7: Class diagram

In this figure 7 which shows the detail breakdown of the clerk and the judge and how they
involve in the system and what they basically do.
3.4.3 Entity Relationship Diagram
The entity relationship diagram shows the different relationships between the
different entities. The clerk relates to his phone no, area of allocation work id and
his name. The judge will relate to his name phone, email address, phone no, and
work.

20
ERD Diagram
Figure 8: ERD diagram

Work ID
First name Last name

Clerk

View
Phone no
Verdict

Last name
First name

Judge

Enter Work ID
Phone no
Verdict

In this figure 8 which shows the different relationships between the different entities (clerk
and the judge).

3.4.4 Sequence Diagram


This indicates the order in which the system will perform its functions. It starts from the clerk
towards the system. The user logs in, enters the criminal details followed by the details of the
case by the clerk in charge and sets the dates for the hearing to be received by the judge. The
judge then considered the case and the details of the crime and its progress.

21
Sequence Diagram
Figure 9: Sequence diagram

Clerk System Judge

User log in User log in

Enter criminal details View case details

Set hearing date Enter case update

View verdict

In this figure 9 which shows how the system will perform its function, it starts from the clerk
towards the system. So, the clerk log in, enter criminal details, set hearing date, then the
judge logs in, view the case details, enter the verdict and finally the clerk views the verdict.
System Block diagram
Figure 10: Block diagram.

22
In this figure 10 which shows that the system is controlled or managed by the
admin, the admin manages authentications and general surveying of how users are
using the system.

3.5 Development Methodology


3.5.1 Importance of a Methodology
These knowledge-enhancing strategies are most effective in any program
development process. Below is a summary of the benefits from the road.
1. Enables the development of improved product quality in accordance with various
standards set around the world to improve system performance, acceptance, accuracy
and compliance.
2. Enables the integration of user needs in system development which improves the level
of customer satisfaction.
3. It develops better control by the management team with accuracy in estimating the
cost, quality and time required in project construction and in the same line enhances
the reduction of various different heads.

3.5.2 Agile Methodology


Refers to the practice of promoting simultaneous interaction between software
development and testing throughout the life cycle of the software. Four basic values
are emphasized in this method.
1. Individual and group interactions with processes and tools.
2. Software that works in addition to complete scripts.
3. Customer interaction through contract negotiations.
4. Respond to change according to plan.
This approach requires the development and integration of software divided into different
models. It enables the customer to have the opportunity to look at the product and suggest
what they like when they are in the product development process.

Additionally, in this way, once the iteration is done, the customer is given the opportunity
when the available product features are available for customer review and make any
adjustments.

The assessment and development work is carried out simultaneously in each phase where the
level of user acceptance is assessed. Regular communication is done with the developers to
find out the requirements and to plan the necessary planning.

3.6 The Discovery of Facts


The program is expected to promote and fulfill customer needs by engaging in the production
process. A business environment is very important and designers need to have accurate
details about it. Gathering information about what people are doing in the organization and
also explaining their roles.

23
To address the needs of the existing system and those of the new system, the following
methods will be used.
1. Background Reading
Here, the analysis team will engage with the organization for the purpose of carrying out
mining operations. They will be able to obtain the same clear information through
institutional reports, organization charts and other relevant documents from the organization.
2. Negotiation
The Inn negotiation process, the parties involved namely the development team and the staff
of the organizations will make an appointment and meet. This will be followed by asking
interview questions in the discussion guide regarding the organization's background.
Discussions will improve the available research data.
3. Awareness
The viewing method will be used by the analytical team where they will be looking at the
employees of the organizations in their natural environment and planning for a pre-
determined period. This method will involve the observation of standard tea as it is made
without any kind of investigation.
4. Sample Documentation
In this regard, various documents and dairies kept by staff in their normal operation will be
considered. Various findings will be drawn from the suspected records in those documents
used.

3.7 Requirements Specification


It refers to the document which describes the functional and non-functional requirements of
the end-users. It specifies various expectations potentially about the proposed system to be
developed and what it aims to attain. In essence, it works as the agreement set between the
development team and the end-users on the various requirements that has been specified or
need to be included.
According to the IEEE 830 standards for software requirements, the following are benefits
that arise from requirements specifications.
1. It establishes the basic agreement between the software development team and the
end-users
2. Helps in saving time and energy needed in development because it provides
clarifications needed in the initial stages of development and in addition it ensure
future safety from adverse effects of errors that could be committed
3. It gives the bases for cost estimation before development
4. Requirements specification promotes validation of the subsequent phases through
verification of the deliverables of these stages in reference to the initial stages.
The properties of good requirements specification include:
1. Accurate.
2. Unambiguous.
3. Complete & Consistent.
4. Verifiable & Traceable.

24
3.8 How the system works
Admin is the manager of the system who controls the system and adds the clerk, judges and
the end-users like the plaintiff, advocate and other clients. The clerk duties are to manage the
case details, set hearing schedules and confirm the verdict
After the clerk enters the case details into system, it will reflect on the plaintiff, the judge and
other parties involved in which the judge reviews the case and all parties involved will attend
the set date and the hearing is conducted then the outcome of the case is filed by the clerk and
system updates the parties involved and generates necessary documents.

3.9 BUDGET FOR THE PROJECT

Table 1: Budget for the project

SERVER EXPENSE COST (KSH)

Computer (quad core, 1TB HDD, 12GB RAM) 74,000

Gateway 50,000

Net Connection 12,000

Database Server 25,000

Printer/ Photocopier 15,000

Toner 15,000

Uninterruptable Power Supplier (UPS) 8,000

Printing Rims 3,500

Total 202,500

CLIENT EXPENSE COST (KSH)

Computer (Dual core, 500GB HDD,4gb RAM) 35,000

Uninterruptable Power Supplier (UPS) 8,000

Webcam 5,000

Internet Connection 3,500

25
Total 51,500

GRAND TOTAL 253 500

Table 1 shows the budget cost incurred for the whole project.

3.10 GANTT CHART

Figure 11: Gantt chart for the project

Gantt Chart
8-Jun 18-Jun 28-Jun 8-Jul 18-Jul 28-Jul 7-Aug 17-Aug 27-Aug 6-Sep 16-Sep

Requirements

Design System

Prototype

Development and Programming

Test

Deployment

Maintenance

In this figure 11 shows the estimate time it took me to complete this project, which starts
officially on 8th June 2020 and ends on 16th September 2020, systematically down from the
requirements to maintenance of the project and which is the final one.

26
CHAPTER FOUR: SYSTEM IMPLEMENTATION, TESTING AND ANALYSIS

4.1 Introduction
This chapter focuses on the use of an improved web-based case file system that displays a list
of causes for clients in which case the case will be prosecuted, the plaintiff and the defendant,
the judge assigned to the case and the court case.
4.2 Interaction Methods
The user interface is usually a point of personal communication with a computer and a
connection to a device, webpage, or application. The interface is an important feature that
requires extra attention. Another function of the project plan is this
Shown below with the user interface.
4.2.1 sign-in pages
A login page is an advanced web login page that requires user identification and
authentication, meaning a combination of username and password to ensure that only
authorized users have access to a system that provides a security measure to protect sensitive
information. The system consists of two login pages, one for the Chief Registrar known as
the administrator and the other for the court Registrar, who are users.
Home /login page
Figure 12: Home/login page

In this figure 12 which shows the system page where the credentials used to authenticate a
user such username and password are displayed.

27
4.2.2 Admin login
After a successful login by the admin the home page of the application shows up, were the
admin clicks on the button labelled Click here to proceed. From there the admin can have
access to view cases, register cases, updates cases, print cases and delete cases.
Admin login
Figure 13: Admin login page

In this figure 13 is admin login page which shows the admin page and how-to login with
his/her credentials.

4.2.3 Registering a case


The application has a feature that makes it possible for new case to be registered. After a
successful registration a case is added to the case list also called the cause list.

28
Registering case
Figure 14: Registering case page

In this figure 14 which shows a registering case page where you insert the criminal name, the
defendant name, describing the crime he did, judge who is going to handle, hearing of.

4.2.4 View Cases


The application also has a feature that makes it possible for registrar to view the cases which
enable them to search, update and delete a case after registering a case. The search function
for registrar gives the registrar the ease of looking for a case in the system. Since the database
has stored the record of cases. It makes their work easier and faster than going through the
whole list of registered cases, since they get the results displayed immediate

29
View Case dashboard
Figure 15: View case dashboard

In this figure 15 which shows clerk side where he/she can view the cases and sort out if there
is any problem in delaying the case hearing.
4.2.5 The update and delete function
The program also contains a function that allows the registrar to renew the case after
registering the case. Some of the factors that can lead to a case review are incorrect sit-in, suit
number, name of plaintiff and defendant, type of case and category of case. However, the app
enables the author to clear a case. Some cases are removed when they have already been
arrested and given a decision or if they have been postponed. Before the registrar cancel the
case, he is quick to determine if he is sure that he wants to clear the case.
4.2.6 Admin dashboard
After a successful login by the admin the dashboard of the application shows up. The admin
can have access to the application to view the name of registrars and the judge in each court,
the number of cases in each court which have not yet been held, the time and date the
registrar login and logout, and the time they spent. The application also shows the total
number of a case type in each court such as trespassing, defrauding, robbery, data breach etc.

30
Admin dashboard
Figure 16: Admin dashboard

In this figure 16 which shows the admin dashboard, can have access to the application to
view the name of registrars and the judge in each court, the number of cases in each court
which have not yet been held, the time and date the registrar login and logout, and the time
they spent.
4.3 Testing
System testing is the process of testing a system to check if has met the system requirements.
I have applied five types of testing, and luckily my first tests were all successful and gave
system worked as it should have.
4.3.1 Functionality Testing
This is type of testing where the system is tested to check if it has met its functional
requirements. The main function of my system was to reduce the paper work and upgrade
into advanced one where the documentation of the files was digitalized. This includes a series
of feature-testing tests for behavioral factor validation, using a wide range of standard input
data and error. This may include testing the product interface, database management,
security, installation, communication; etc. Tests can be done automatically or manually using
a black box or white box methods. Below are some of the tests that are being done:
1. Ensure that no dead page or redirect is invalid to the system.
2. First check all confirmation in each course.
3. Testing the wrong input to perform a negative test.
4. Ensure the workflow of the system.

31
5. Ensure data integrity.
And with the above few remarks my system hence passed the functionality test as it met its
functional requirements.
4.3.2 Usability Testing
This type of testing mainly focuses on the user’s ease in using the system, controlling and
handling the system. The system does not require to do anything rather than users to put their
credentials and if they have forgotten their passwords admin is there to assist them apart from
that after their successful logging in to the system, it is ease to surf in it. I tested the system
with a colleague of mine as the user and she said it was easy to use. Hence my system is easy
to be used by the user and has simple functionalities and it is easy to handle as it isn’t a
complicated one.
4.3.3 Compatibility Testing
This testing is done to ensure the compatibility of an application’s operating system, and
hardware platforms. Compatibility testing can be performed manually or can be driven by an
automated functional or regression test suite. Compatibility testing is performed based on the
context of the application.
For my case I used browser compatibility testing to test the system whether the web
application is performing and ensuring that the software can run with the combination of
different browser and operating system. This type of testing also validates whether web
application runs on all versions of all browsers or not. I tested the system with Microsoft edge
and Chrome. In all the browsers the system was operational.

4.3.4 Validation Testing


This testing runs the system in a live environment using real data. This will test for system
performance (throughput and response time) peak work load performance, methods and
procedures, backup and recovery. Anyone can’t just log in into the system they need their
credentials and for them to get one they need admin’s permission for that.
4.3.5 Integrating Testing
Integration testing is a form of testing in which software components, hardware components
or both are combines and tested to evaluate the interaction between them. This testing
determines that applications involved are functioning well with each other. Integration testing
including user interface testing and usability testing.
Luckily, I was able to test all the components of the system, and the first test was the
registration of a user as a normal user and administrator user.

32
Once a registration was made it reflected in the database and in the back-end where the admin
can add or remove a user. The second test was adding a case details, and I could both review
it on the front end and back end as well.
4.4 ANALYSIS
In analysis of the design admin is the one who add user to the system since he/she is the
manager or controller of the system. Once a client is registered the client can access the
system by entering using their username/email and password to log in. They interact with the
system as they look up for the case details and the set of hearing plus who’s the judge to
handle the case. They also can check for advocates. But when a user has no more business in
the system they’re deleted from the system by the admin or if a judge or clerk resign from the
job they’re remove from the system, only the admin has that power. No one in the system has
more power than the admin so no one can do any changes in the system.
Modification
Figure 17 admin dashboard

In this figure 17 which shows the clerk was trying to log into the admin dashboard with
her/his credentials, but the system rejected because it didn’t verify the clerk credentials’ since
this isn’t the write login page for the clerk.

33
Deletion
Figure 18 admin dashboard

In this figure 18 which shows the delete option, it has the editing part if incase the admin
input wrong data in the first place it gives the option of rectifying and saving again the data.
So when the admin clicks on the delete option it opens on a new page where it asks if the
admin is sure of deleting that user and when the admin clicks on yes it automatically deletes
that user from the system.

34
CHAPTER FIVE: CONCLUSION AND RECCOMENDATIONS
5.1 Introduction
In this chapter I will highlight all the achievements that l made in my project, the challenges
that I faced and the solutions I would recommend to these challenges, the observation that I
made and recommendations on how this program can be improved in future.
5.2 Findings
During execution of my project several findings were arrived at which are important to note
in the use and future updates of this project.
1. The public which heard about the new system has no trust in the judges getting to
view criminal details prior the court date as they trust they would be biased.
2. Criminals have no trust in the portal as they think judges can give a ruling even before
having them defend themselves in court.
3. The court system today presents a lot of biasness and having a system that will give
more light brought some resistance among the police officers and the judges.
5.3 Achievements
The project was able to meet all the objectives that detailed in the project proposal which
include:
1. Reducing the cost of operation by reducing officials and paper work.
2. Increasing efficiency and reduce the total time of processing suspect details.
3. Increasing data and information security by ensuring only authorized personnel have
access by using administrator panel.
4. Providing backup information in case of data loss.
5. Creating a system with room for technological advancement.
5.4 Challenges
The biggest challenge to the project was the timing of project completion as outlined in the
project plan. The delay occurred during the analysis phase as most police officers were
unwilling to provide details on how things were going and many judges did not help them
answer questions. Another challenge was funding, police stations were poorly maintained and
had to be repaired before setting up resources to make the project work.

35
5.5 Conclusion
As in any technology project, the “devil” is in implementation and acceptance of the new
system by the judges and court staff. E-filing affects every part of the court operation since it
transforms the filing system and the documents used to make court decisions.
Case File Management Systems (CFMS) have traditionally automated the registry/docket
(historical event record), participants, and scheduling /task control and has left the document
filing system for separate image document management programs. This has primarily been
done because of cost and the lack of workflow and task control capabilities in traditional
CFMS.
But I believe that this is also a remnant of the courts traditional organizational division
between the registry function and the document filing system. Separate staff and separate
processes are a common organizational structure in many clerk's offices.
Even today a great majority of courts still maintain physical case files. And workflow in
manual file systems has meant physically moving the file folder from person to person and
office to office. In many courts the file folder also serves as the case event registry. This
function is addressed by a printed registry form grid on the folder cover the list of documents
contained within. The advantage for this approach is that when one works on the contents of
the folder, the data is captured and presentation is literally in one’s hands since the data is
stored in EDMS in this where the court is able to conduct better schedule for court cases and
able to share the information with all involved parties and generate reports about the case.
5.6 Recommendations
The system should have a module in which the public can view the decision given to related
criminals differently if they are unable to take it to court. It should also have a help module
that can guide any new user judge or police officer with the type of input data required for
login procedures and the next steps a user can take after successful login and registration.
Ultimately the security of the system should be enhanced with greater capacity to ensure that
no one can access the system and use the information.

36
References

"KSAM: A B + -tree-based keyed sequential-access method". ResearchGate. (Retrieved 29


April 2016).
"Storage, IT Technology and Markets, Status and Evolution" (PDF). September 20, 2018.
(September 20, 2018).
Caravaca, M. M. (May 2017). "Elements and Relationships within a records classification
scheme". JLIS.it. 8 (2): 19–33.
Carrier, B. (2005). File System Forensic Analysis. Addison-Wesley. ISBN 0-321-26817-2.
Cornick, M. S. ((2014)). Using computers in the law office. Cengage Learning.
Desai, M. ( (2019)). Rights-based integrated child protection service delivery systems:
Secondary and tertiary prevention. Springer Nature.
Ford, G. S. ( (2014)). What is the effect of file sharing on the creation of new music? A
critical review of 'A case study of file sharing and music output'. SSRN Electronic
Journal. https://doi.org/10.2139/ssrn.2407145.
Gaps in electronic trial master file (eTMF) implementation: A study in the organization case.
3(3). https://doi.org/10.20474/japs-3.3.2. ((2017)). Journal of Applied and Physical
Sciences, .
Halsey, M. &. (2015). Troubleshooting the windows file system. Windows File System
Troubleshooting, 97-108. https://doi.org/10.1007/978-1-4842-1016-1_6.
journal of the Association for information Science and Technology 71(1), E1-E32. (2020).
Julien Gori, H. L.-L. (2020). User Interface Software and Technology used in case
management, 22-34.
Lei Zhang, L. Z. (2012). Tiered replica consistency techniques for cluster file system. 2012
4th Electronic System-Integration Technology Conference.
https://doi.org/10.1109/estc.2012.6485825.
Lunney, J. G. (2013). Empirical copyright: A case study of file sharing and music output.
SSRN Electronic Journal. https://doi.org/10.2139/ssrn.2372630.
Lutz, M. (2013). Learning Python: Powerful Object-Oriented Programming.
Rogers, P. H. (2012). Z/OS distributed file service zSeries file system implementation Z/OS
V1R13. IBM Redbooks.

37
APPENDIX

Code

from django.db import models


# import datetime
# from django.utils import timezone

# Create your models here.


class Staff(models.Model):
STAFF_ROLE = [
("JUDGE",'Judge'),
("CLERK","Clerk")
]
firstname = models.CharField('First Name',max_length=50)
middlename = models.CharField("Middle Name",max_length=50)
lastname = models.CharField("Last Name", max_length=50)
email = models.EmailField("Email", max_length=250,unique=True)
phone = models.CharField("Phone Number",max_length=20,unique=True)
role = models.CharField("Role",
choices=STAFF_ROLE,default="CLERK",max_length=10)
password = models.CharField("Password",max_length=50)
posted = models.DateTimeField("Posted",auto_now_add=True)
modified = models.DateTimeField("Modified",auto_now=True)

def __str__(self):
return self.firstname + " " + self.middlename + " " + self.lastname

class Client(models.Model):
STAFF_ROLE = [
("ADVOCATE",'Advocate'),
("DEFENDANT",'Defendant'),
("PLAINTIFF","PLAINTIFF")
]
firstname = models.CharField('First Name',max_length=50)

38
middlename = models.CharField("Middle Name",max_length=50)
lastname = models.CharField("Last Name", max_length=50)
email = models.EmailField("Email", max_length=250,unique=True)
phone = models.CharField("Phone Number",max_length=20,unique=True)
role = models.CharField("Role",
choices=STAFF_ROLE,default="PLAINTIFF",max_length=10)
password = models.CharField("Password",max_length=50)
entity = models.CharField("Entity",max_length=50,default="Person")
posted = models.DateTimeField("Posted",auto_now_add=True)
modifieded = models.DateTimeField("Modified",auto_now=True)

def __str__(self):
return self.firstname + " " + self.middlename + " " + self.lastname

class CriminalRecord(models.Model):
criminal = models.ForeignKey(Client,on_delete=models.CASCADE,
limit_choices_to={'role':'PLAINTIFF'})
description = models.TextField('Description')
posted = models.DateTimeField("Posted",auto_now_add=True)
modified = models.DateTimeField("Modified",auto_now=True)

def __str__(self):
return self.criminal.firstname + ' ' +self.criminal.middlename + ' ' + self.criminal.lastname

class Case(models.Model):

client = models.ForeignKey(Client, on_delete=models.CASCADE)


prosecutor = models.ForeignKey(Client,
on_delete=models.CASCADE,related_name="ActualPlaintiff")
description = models.TextField('Case Description')
judge = models.ForeignKey(Staff,blank=True,null=True,on_delete=models.CASCADE)
hearing = models.DateTimeField("Hearing Date")
verdict = models.TextField('Judge Verdict',blank=True,null=True,default="Verdict not set")

39
advocate =
models.ForeignKey(Client,blank=True,null=True,on_delete=models.CASCADE,
related_name="CaseLawyer",limit_choices_to={'role':'ADVOCATE'})
created = models.DateTimeField("Created",auto_now_add=True)

def __str__(self):
return self.client.firstname + " VS " + self.client.firstname

class Payment(models.Model):
amount = models.IntegerField("Amount")
method = models.CharField("Payment Method", max_length=20)
purpose = models.CharField("Purpose", max_length=20)
transaction = models.CharField("Transaction Number", max_length=20, default = "Cash")
client = models.ForeignKey(Client, on_delete=models.CASCADE)
posted = models.DateTimeField("Posted",auto_now_add=True)
def __str__(self):
return self.purpose + " " + str(self.amount)

40

You might also like