IT Consulting/Outsourcing/data flow diagram
Expert: Colin Jervis - 8/30/2006
QuestionDear Colin, I have a really hard task from uni and have to ask you for help cauze I enjoyed learning from your website. I'd be very appreciated if you can have a quick look at the following situation and any suggestion would be nice to me:
The situation is: A patient may make any number of appointments to see a physician. Each appointment is made for a specific data and time with a physician. The patient may cancel an appointment without notice. If the appointment is not cancelled it leads to a bill. Each bill has a specific amount due. If the appointment is cancelled, a cancellation fee is generated. The bill for their last visit is calculated.
I've got a task to draw a detailed class diagram to capture the requirements of the Appointment systems to be developed. I should also make reasonable assumptions about the attributes and methods that are required for this class diagram.
The software I have to use is CASE TOOL--visible analyst..hope you are familiar with that too.
AnswerThanks for your question.
I am rusty at data modelling as it is not an area of deep involvement for me these days. Nonetheless, here are a few ideas.
I guess you need to derive: classes, respnsibilities, associations, inheritance relationships and composition associations. I presume you have a modelling technique, so I will try to make this generic so you can adapt it.
For classes (often modelled as rectangles with sections for their name attributes, responsibilities and methods): you have physician, patient, appointment, account (or bill). Treatment will relate to the type of appointment and treatment given: so you will have appointment type (maybe you want to be smart and use some grouping system like DRGs or HRGs) the treatment and appointment type will relate to the amount of the bill. You can take all of this as far as you like: each patient will have an address or a unique ID number.
You can make the classes as many or few as you like. You could add lab tests, labs, results...
Attributes: for these classes you should be able to invent some eg patient: name, unique ID, sex, DoB etc. Appointment: duration, clinic location.
Responsibilities: patients can make an appointment, physicians can decide treatment.
Associations: classes are related: physician treats patient, patient lives at address etc.
Inheritance relationships: you can create classes to reduce complexity. Some of your classes will share attributes, so to normalise (or make simpler, if you like) you can create an inherited class eg the patient and physician may both have an address or contact details as attributes.
Methods: you should be able to derive from the actions (look for verbs in the description or in what you invent): patient makes appointment, cancels appointment, pays bill etc. Account may bill, process payment, and so on.
The main things are to look for nouns (usually classes) and verbs usually methods or associations. Start with the classes and then make it as complex as you want. It usually takes a few attempts to get it looking OK, so don't be too precious at first. I usually start on a big piece of paper with the important things first and then make it more complex; you may find using the software easier.
I hope this helps and good luck with it.
Regards, C.