Team LiB
Previous Section Next Section

Appendix B: Alternative Case Studies

This appendix is meant to be a companion appendix to Appendix A, as well as a supplement to many of the end-of-chapter exercises found throughout the book. In this appendix, we propose some alternative case studies that can be used as the basis of formal course work or personal study applications.

Case Study #1: Prescription Tracking System

This case study is relatively straightforward, and hence can be tackled by most beginning modelers fairly effortlessly.


Drugs For You pharmacy wishes for us to design and develop an automated Prescription Tracking System (PTS). The requirements are as follows:

  • The system is to keep track of the following information for each customer:

    • Customer's name

    • Telephone number

    • Date of birth

    • Insurance provider

    • Insurance policy number

    • A prescription history, detailed next

  • Each customer's prescription history will record the following information about each prescription:

    • A unique prescription ID number assigned by the pharmacy

    • The medication being prescribed

    • The prescribing physician's name and telephone number

    • The date of issue

    • Expiration date

    • Number of refills authorized

    • Number of "units" per prescription refill, where a "unit" might be a pill, a teaspoon, a milliliter (ml), etc.—see discussion of medications, next

    • Whether or not it's OK to provide the customer with a generic substitute, if one exists

  • For each medication stocked by the pharmacy, the system will track

    • Its name

    • The "unit" by which the medication is prescribed (pills, teaspoons, ml, etc.)

    • Which medications can serve as "generic" equivalents of which other medication(s)

    • Any common side effects associated with taking the medication

  • The system is required to support the following queries (some will be printed as hardcopy reports, others will be viewed online only):

    • A prescription history—that is, a report of all prescriptions ever issued to a given customer—as requested by a given customer

    • A report of all side effects of a given medication, to be enclosed with each prescription dispensed

    • A list of all generic substitutes available for a given medication

    • Whether a given prescription is refillable: that is, whether any refills remain and whether the prescription has yet to expire

All of the preceding will be accessible via a secure web site to individual customers as well as to the in-store pharmacist.

Simplifying Assumptions

A real-life prescription tracking system would be quite complicated; we suggest the following simplifications to make the PTS problem a bit more tractable for beginning-level object-oriented programmers.

  • The system isn't to be concerned with billing matters in any way; that is, we aren't going to worry about computing the price to be paid for a prescription, nor will we be concerned with trying to get a customer's insurance company to reimburse the pharmacy in any way.

  • We'll assume that there is only one Drugs For You pharmacy location; that is, it isn't a chain of multiple stores.

  • The system isn't responsible for inventory control—that is, we'll assume that "infinite" quantities of all medications are in stock.

  • Assume that the prescription is always refilled with the same medication as was issued for that prescription the first time around; that is, we'll never initially fill the prescription with a generic medication, and then refill it with a nongeneric equivalent, or vice versa.

Team LiB
Previous Section Next Section