Changes between Version 3 and Version 4 of RelationalDesign


Ignore:
Timestamp:
08/26/25 01:37:56 (3 days ago)
Author:
222003
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RelationalDesign

    v3 v4  
    14144. Users (**__id__**, **first_name**, **last_name**, **username**, **hashed_password**, **e_mail**, gender, **date_created**)
    15155. Admins (**__user_id*(Users)__**)
    16 6. DeliveryCompany (**__company_id*(Company)__**)
     166. !DeliveryCompany (**__company_id*(Company)__**)
    17177. Distributor (**__company_id*(Company)__**)
    18188. Facility (**__id__**, **__company_id*(Company)__**, **facility_name**, **code**)
    19199. Inventory (**__facility_id*(Facility)__**)
    202010. Manufacturer (**__company_id*(Company)__**)
    21 11. MedicineInteraction (**__medicine_id_1*(Medicine)__**, **__medicine_id_2*(Medicine)__**, **type**, description, **severity**)
     2111. !MedicineInteraction (**__medicine_id_1*(Medicine)__**, **__medicine_id_2*(Medicine)__**, **type**, description, **severity**)
    222212. Patient (**__user_id*(Users)__**, **is_verified**)
    23 13. Payment (**__id__**, **__patient_id*(Patient)__**, **__payment_method_id*(PaymentMethod)__**, **payment_date**, **amount**, **status**)
     2313. Payment (**__id__**, **__patient_id*(Patient)__**, **__payment_method_id*(!PaymentMethod)__**, **payment_date**, **amount**, **status**)
    242414. Pharmacist (**__user_id*(Users)__**)
    252515. Pharmacy (**__company_id*(Company)__**)
    262616. Prescription (**__id__**, patient_id*(Patient), **__medicine_id*(Medicine)__**, **issued_by**, **issued_at**, **valid_to**, **embg**)
    27 17. SensitivePatientData (**__id__**, **__patient_id*(Patient)__**, pharmacist_id*(Pharmacist), **embg**, **portrait_photo**)
    28 18. ShoppingCart (**__id__**, **__patient_id*(Patient)__**)
    29 19. SupplyOrder (**__id__**, **__distributor_id*(Distributor)__**, **__pharmacy_id*(Pharmacy)__**, **order_date**, **expected_arrival_date**)
    30 20. BrandedMedicine (**__id__**, **__manufacturer_id*(Manufacturer)__**, **price**, description, **dosage_form**, **strength**, origin_country)
    31 21. BrandedMedicineImage (**__id__**, **__branded_medicine_id*(BrandedMedicine)__**, **image**)
    32 22. ClubCard (**__id__**, **__user_id*(Patient)__**, **club_program**, **points**)
    33 23. ContactInformation (**__id__**, phone, address, user_id*(User), facility_id*(Facility))
    34 24. Distributor_BrandedMedicine (**__id__**, **__distributor_id*(Distributor)__**, **__branded_medicine_id*(BrandedMedicine)__**)
    35 25. HealthProfile (**__id__**, **__patient_id*(Patient)__**, blood_type)
    36 26. Inventory_BrandedMedicine (**__inventory_id*(Inventory)__**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**, **last_changed**)
    37 27. PatientOrder (**__id__**, **__patient_id*(Patient)__**, **__delivery_company_id*(DeliveryCompany)__**, **__payment_id*(Payment)__**, **order_date**, **expected_arrival_date**, **status**, **total_price**)
    38 28. PatientOrder_BrandedMedicine (**__id__**, **order_id*(Order)**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**)
    39 29. Pharmacy_Catalog (**__pharmacy_id*(Pharmacy)__**, **__branded_medicine_id*(BrandedMedicine)__**)
    40 30. ShoppingCart_BrandedMedicine (**__shopping_cart_id*(ShoppingCart)__**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**)
    41 31. SupplyOrder_BrandedMedicine (**__supply_order_id*(SupplyOrder)__**, **__branded_medicine_id*(BrandedMedicine)__**, **quantity**)
     2717. !SensitivePatientData (**__id__**, **__patient_id*(Patient)__**, pharmacist_id*(Pharmacist), **embg**, **portrait_photo**)
     2818. !ShoppingCart (**__id__**, **__patient_id*(Patient)__**)
     2919. !SupplyOrder (**__id__**, **__distributor_id*(Distributor)__**, **__pharmacy_id*(Pharmacy)__**, **order_date**, **expected_arrival_date**)
     3020. !BrandedMedicine (**__id__**, **__manufacturer_id*(Manufacturer)__**, **price**, description, **dosage_form**, **strength**, origin_country)
     3121. !BrandedMedicineImage (**__id__**, **__branded_medicine_id*(!BrandedMedicine)__**, **image**)
     3222. !ClubCard (**__id__**, **__user_id*(Patient)__**, **club_program**, **points**)
     3323. !ContactInformation (**__id__**, phone, address, user_id*(User), facility_id*(Facility))
     3424. Distributor_BrandedMedicine (**__id__**, **__distributor_id*(Distributor)__**, **__branded_medicine_id*(!BrandedMedicine)__**)
     3525. !HealthProfile (**__id__**, **__patient_id*(Patient)__**, blood_type)
     3626. Inventory_BrandedMedicine (**__inventory_id*(Inventory)__**, **__branded_medicine_id*(!BrandedMedicine)__**, **quantity**, **last_changed**)
     3727. !PatientOrder (**__id__**, **__patient_id*(Patient)__**, **__delivery_company_id*(!DeliveryCompany)__**, **__payment_id*(Payment)__**, **order_date**, **expected_arrival_date**, **status**, **total_price**)
     3828. PatientOrder_BrandedMedicine (**__id__**, **order_id*(Order)**, **__branded_medicine_id*(!BrandedMedicine)__**, **quantity**)
     3929. Pharmacy_Catalog (**__pharmacy_id*(Pharmacy)__**, **__branded_medicine_id*(!BrandedMedicine)__**)
     4030. ShoppingCart_BrandedMedicine (**__shopping_cart_id*(!ShoppingCart)__**, **__branded_medicine_id*(!BrandedMedicine)__**, **quantity**)
     4131. SupplyOrder_BrandedMedicine (**__supply_order_id*(SupplyOrder)__**, **__branded_medicine_id*(!BrandedMedicine)__**, **quantity**)
    424232. AllergicReaction_HealthProfile_Medicine (**__health_profile_id*(HealthProfile)__**, **__medicine_id*(Medicine)__**, date_diagnosed, description, severity)
    43 33. Branded_Medicine_InstanceOf_Medicine (**__branded_medicine_id*(BrandedMedicine)__**, **__medicine_id*(Medicine)__**)
     4333. Branded_Medicine_InstanceOf_Medicine (**__branded_medicine_id*(!BrandedMedicine)__**, **__medicine_id*(Medicine)__**)
    4444
    4545=== DDL скрипта за бришење и креирање на табелите ===