The objective is to create a system that allows you to completely manage the functions of the company through an optimal design of the data model, to be adapted to a system connected to a SQL database.
The objective is to create a system that allows you to completely manage the functions of the
company through an optimal design of the data model, to be adapted to a system connected to a
SQL
Statement
The pharmacy chain “Recetas Rayos X” needs a system to manage information about its operations, such as the purchase, sale and administration of medications, other patients and who prescribed them.
a medicine. The information that must be stored is the following:
1. Patients are identified by the RUT and the name, surname, date of birth, email,
address, several telephone numbers and pension system.
2. There are various health provisions, both social and private, and they are correctly codified.
3. Doctors are identified by the RUT. For each doctor you have to store the first name, last name,
date of birth, specialties and years of practice.
4. There are various specialties which are adequately codified.
5. Each pharmaceutical company is identified by a code, the name and a telephone number are stored.
6. For each medication, the trade name and formula must be registered. Every medicine is sold
a given pharmaceutical company, and the trade name identifies that drug univocally among
the products of that company. If a pharmaceutical company is deleted, there is no longer a need to track it
of their products.
7. Each pharmacy has a code, name, address and telephone number.
8. Each patient has a primary care doctor. Each doctor has at least one patient. It could happen
that over time a patient's primary care doctor changes. Therefore it is important to maintain a
record of the start and end dates of this medical supervision.
9. Patients can purchase medications with or without a prescription.
10. Each pharmacy sells several medications and has a price for each of them. Each medication is
It can be sold in several pharmacies, and the price may vary from one to another.
11. Doctors prescribe drugs to their patients. Each doctor can prescribe one or more drugs to several
patients, and each patient can get prescriptions from several doctors. Each recipe has a date and list
of drugs and an amount associated with them.
12. Pharmaceutical companies have long-term contracts with pharmacies. Each pharmaceutical company can contract with several pharmacies, and each pharmacy can contract with several pharmaceutical companies.
For each contract you must save the start date, the end date and the full text.
13. Pharmacies appoint a supervisor for each contract. There must always be a contractual supervisor,
but the supervisor of a contract can change during its validity period.
Step by step
Solved in 3 steps