You are on page 1of 5

SIF8035

1/29/03 AMS example 1 - 1 -


Animal Management System:
A local veterinarian clinic is currently working on developing a computerised system to help
manage their practice. The existing manual system urgently needs updating as the volume of
animals that the clinic treats each year increases. The practice has also expanded to take on three
new vets to help with the increased volume of animals requiring treatment.
You have been assigned the task of creating a data flow diagram for the proposed veterinary
system. The system will capture information about animals and their owners, animal treatment
details, payment details and drug inventory levels. As part of the requirements definition stage of
the systems development life cycle you have undertaken a number of interviews with the staff at
the clinic. The following are notes you have transcribed from an interview with one of the
senior veterinarians.
Analyst Q: Could you please explain the procedure for treating animals?
Vet A: Certainly, it works like this. An animal is brought to the clinic for a number of reasons; usually
for treatment due to an illness or an accident, or the animal is brought in for a vaccination, or a spay/neuter
and sometimes for general grooming, clipping etc. If the animal is here for treatment due to a condition, myself
or one of the staff examine the animal (there are eight vets currently working here). The examination usually
results in a diagnosis of a condition. Depending on the type of condition, and the animals history, we may
prescribe a drug treatment. Of course the animal may require a procedure, so we may also schedule an
operation for the animal.
Analyst Q: Does an animal have to be diagnosed with a condition to receive an operation?
Vet A: Good question - the answer is no - for example a female cat may be visiting the clinic for a spay,
and that is not a condition as such.
Analyst Q: Do you keep a record of the vaccinations for each animal?
Vet A: Yes, we currently fill out a vaccination certificate. We are required to do this so that we can send
out reminder notices to the owners.
Analyst A: You would need to know some details about the owners then?
Vet A: Yes, the owners contact details are required for both generating reminder notices and billing.
Analyst Q: Is a drug treatment specific to a particular condition?
Vet A: Usually, most conditions require specific drugs. Some antibiotics are general but most of the drugs
we prescribe are for specific conditions or for combating specific bacteria.
Exercise
1) Create an ER diagram for the Animal Management System (AMS). The model may be more
complicated than you think! You will need to provide a way to record appointment, treatment,
procedure, condition and drug details.
2) Create a Context diagram for the AMS. The context diagram should show the objects
external to the system with which it interacts and their interfaces to the system.
3) What do you think the main subsystems will be for the Animal Management System?
4) Create a list of all the events that expect a response from the AMS:
5) Create a first cut hierarchy chart (functional decomposition) chart for the AMS.
6) Create a first cut data flow diagram (DFD).
SIF8035
1/29/03 AMS example 1 - 2 -
Animal Appointment
Animal_Diagnosis
Staff
Drug
Drug_Dosage
Drug_Prescribed
Procedure
Owner
performs
Condition_Type
may result in
packaged as [1:M]
may require
may require
administered
Condition_Regime
for a
Animal_Vaccination
Vaccination_Type
is administered
requires
may require
has
may require
Figure 1: First cut Data Model
But we have a redundancy problem of recording the regime AND the individual drugs.
Commentary from GCS:
Depends on the degree of sophistication that you want to incorporate into the data structure (in
teaching terms, how many rules you tell the student, and how many you choose to ignore for the
purposes of modelling).
For example, can a drug "regime" specify multiple drugs? In multiple doses? In sequence? In
combination? With alternative paths (decision points etc)?
Are some drugs associated with procedures?
More importantly for the redundancy issue: Do we always treat a condition with a regime?
Do we sometimes use a combination of a regime and additional drugs?
Do we sometimes not treat at all?
For a given condition can there be more than one regime to choose from?
Leaving out the detail of how we handle sequencing etc!
Then our key entities and relationships could be:
"Static" - the standard regime:
CONDITION TYPE with a many to many relationship with DRUG DOSAGE, specifying what
drugs are used in the standard regime.
Resolution entity could be called STANDARD DOSAGE FOR CONDITION and would carry
attributes such as number of doses, possibly sequencing etc.
If there were multiple possible regimes for a given CONDITION TYPE, you'd need to include a
REGIME entity.
SIF8035
1/29/03 AMS example 1 - 3 -
"Dynamic" - resulting from an individual appointment
DIAGNOSIS (from one APPOINTMENT) which be may of one or more CONDITION
TYPES (M-M - you have 1-M on your diagram)
DRUG PRESCRIBED (I think this is a better name than DRUG ITEM) (from one
APPOINTMENT) tying into DRUG DOSAGE as per your diagram. This covers the case of
individually prescribed drugs, outside a regime. Note that if you always used a regime and never
prescribed drugs outside that, then you wouldn't need this entity.
We also need a relationship between DIAGNOSIS and CONDITION, to handle the case of a
regime of drugs being prescribed. It's Many to Many to cater for the case of multiple conditions
(call the resolution entity REGIME PRESCRIBED). Again if we had a REGIME entity (see
above), then the relationship would be from DIAGNOSIS to REGIME. Finally, if we always
used a standard regime for each condition, then you wouldn't need this relationship at all,
because diagnosis of the condition would imply use of the regime.
There's another way of playing this, depending on how you see the regime concept. If you saw it
more as a list of drugs dosages that "should (could) be adimistered if a certain condition exists",
and wanted to limit prescription to those drugs only, then you could hang DRUG
PRESCRIBED off STANDARD DOSAGE FOR CONDITION (1-m). This is a pretty
standard modelling structure, but I don't like it in this context, as it limits flexibility to prescribe
outside the rules... The underlying issue as usual is the business rules and until we pin them
down, the model will be fluid.
SIF8035
1/29/03 AMS example 1 - 4 -
Context Diagram
Animal Management
System
Veterinarian
Drug Supplier
Animal Owner
Diagnosis_details
Bill_details
Animal_&
owner_details
Payment_details
Clerk_details
Veterinarian_details
Animal_
history_details
Reminder_
notice
appointment_
details Cust_account
_details
Vaccination_details
Followup_
treatment_details
Drug_details
Clerk
Supplier_
details
Figure 2: Context Diagram for AMS
SIF8035
1/29/03 AMS example 1 - 5 -
Animal_&
owner_details
Animal Owner
Vaccination_details
Veterinarian
Diagnosis_details
Veterinarian_details
Cust_account
_details
Clerk_details
Drug_details
Drug Supplier
Animal_
history_details
Payment_details
Reminder_
notice
Bill_details
appointment_
details
Followup_
treatment_details
Accept Staff
Member Details
Maintain Customer
Account Information
Maintain Drug
Supplier Details
Maintain Owner and
Animal Details
Manage Animal
Treatment Details
Clerk
Animal Animal_Owner
Animal_details
Updated_
owner_details
Updated_
Animal_details
Maintain Appointment
Details
Staff_Member
Updated_staff_details
Staff_details
Owner_details
Existing_
owner_details
Existing_
Animal_details
Drug
Updated_
Drug_details
Existing_
drug_details
Supplier_
details
Drug_treatment
Staff_
availability
Figure 3: First Cut Level 0 DFD

You might also like