Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature for Allowing Doctors to Rate Predictions #224

Merged
merged 6 commits into from
Feb 21, 2024
Prev Previous commit
Next Next commit
Feature for Allowing Doctors to Rate Predictions
TebogoYungMercykay committed Feb 22, 2024
commit b586d35a9ef5819db4a4d015834451347060c6f7
11 changes: 11 additions & 0 deletions app/models.py
Original file line number Diff line number Diff line change
@@ -161,3 +161,14 @@ class Feedback(Base):
receiver_id = Column(Integer, ForeignKey("doctors.doctor_id", ondelete="CASCADE"))
feedback = Column(Text, nullable=False)


class RatingPrediction(Base):
__tablename__ = "ratingprediction"

id = Column(Integer, primary_key=True, nullable=False, autoincrement=True)
diseaseinfo_id = Column(Integer, ForeignKey("diseaseinfos.id", ondelete="SET NULL"), nullable=True)
consultation_id = Column(Integer, ForeignKey("consultations.id", ondelete="SET NULL"), nullable=True)
doctor_id = Column(Integer, ForeignKey("doctors.doctor_id", ondelete="SET NULL"), nullable=True)
rating = Column(Integer, server_default='0')
symptoms = Column(ARRAY(String), nullable=False)
diseasename = Column(String(200), nullable=False)