== Релациско Мапирање == === Ознаки === * Примарните кличеви се болдирани и подвлечени. * Надворешните кличеви се означени со * до името на надворешниот клуч и во заградата () е името на ентитетот кој го референцираат * Задолжителните атрибути се болдирани === Табели === 1. Company (**__id__**, **company_name**, description, **registration_number**) 2. Medicine (**__id__**, **medicine_name**, **active_ingredient**) 3. PaymentMethod (**__id__**, **method_name**) 4. Users (**__id__**, **first_name**, **last_name**, **username**, **hashed_password**, **e_mail**, gender, **date_created**) 5. Admins (**__user_id*(Users)__**) 6. DeliveryCompany (**__company_id*(Company)__**) 7.Distributor (**__company_id*(Company)__**) 8. Facility (**__id__**, **__company_id*(Company)__**, **facility_name**, **code**) 9. Inventory (**__facility_id*(Facility)__**) 10. Manufacturer (**__company_id*(Company)__**) 11. MedicineInteraction (**__medicine_id_1*(Medicine)__**, **__medicine_id_2*(Medicine)__**, **type**, description, **severity**) 12. Patient (**__user_id*(Users)__**, **is_verified**) 13. Payment (**__id__**, **__patient_id*(Patient)__**, **__payment_method_id*(PaymentMethod)__**, **payment_date**, **amount**, **status**) 14. Pharmacist (**__user_id*(Users)__**) 15. Pharmacy (**__company_id*(Company)__**) 16. Prescription (**__id__**, patient_id*(Patient), **__medicine_id*(Medicine)__**, **issued_by**, **issued_at**, **valid_to**, **embg**) 17. SensitivePatientData (**__id__**, **__patient_id*(Patient)__**, pharmacist_id*(Pharmacist), **embg**, **portrait_photo**) 18.ShoppingCart (**__id__**, **__patient_id*(Patient)__**) 19.SupplyOrder (**__id__**, **__distributor_id*(Distributor)__**, **__pharmacy_id*(Pharmacy)__**, **order_date**, **expected_arrival_date**) 20.BrandedMedicine (**__id__**, **__manufacturer_id*(Manufacturer)__**, **price**, description, **dosage_form**, **strength**, origin_country) 21.BrandedMedicineImage (**__id__**, **__branded_medicine_id*(BrandedMedicine)__**, **image**) 22. ClubCard (**__id__**, **__user_id*(Patient)__**, **club_program**, **points**) 23. ContactInformation (**__id__**, phone, address, user_id*(User), facility_id*(Facility)) 24. Distributor_BrandedMedicine (**__id__**, **__distributor_id*(Distributor)__**, **__branded_medicine_id*(BrandedMedicine)__**) 25. HealthProfile (**__id__**, **__patient_id*(Patient)__**, blood_type) 26. Inventory_BrandedMedicine (**__inventory_id*(Inventory)__**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**, **last_changed**) 27. PatientOrder (**__id__**, **__patient_id*(Patient)__**, **__delivery_company_id*(DeliveryCompany)__**, **__payment_id*(Payment)__**, **order_date**, **expected_arrival_date**, **status**, **total_price**) 28. PatientOrder_BrandedMedicine (**__id__**, **order_id*(Order)**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**) 29. Pharmacy_Catalog (**__pharmacy_id*(Pharmacy)__**, **__branded_medicine_id*(BrandedMedicine)__**) 30. ShoppingCart_BrandedMedicine (**__shopping_cart_id*(ShoppingCart)__**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**) 31. SupplyOrder_BrandedMedicine (**__supply_order_id*(SupplyOrder)__**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**) 32. AllergicReaction_HealthProfile_Medicine (**__health_profile_id*(HealthProfile)__**, **__medicine_id*(Medicine)__**, date_diagnosed, description, severity) 33. Branded_Medicine_InstanceOf_Medicine (**__branded_medicine_id*(BrandedMedicine)__**, **__medicine_id*(Medicine)__**) === DDL скрипта за бришење и креирање на табелите === === DDL скрипта за полнење на табелите со податоци === == Релациски Дијаграм ==