Add LLM question import functionality and enhance question model with new fields
This commit is contained in:
@@ -15,6 +15,8 @@ import reversion
|
||||
|
||||
from django.contrib.contenttypes.fields import GenericRelation
|
||||
|
||||
from atlas.models import Finding, Structure, Condition, Subspecialty, Presentation
|
||||
|
||||
|
||||
class Category(models.Model):
|
||||
category = models.CharField(max_length=200)
|
||||
@@ -24,6 +26,7 @@ class Category(models.Model):
|
||||
|
||||
|
||||
class Question(QuestionBase):
|
||||
title = models.CharField(max_length=200, help_text="Short title for question", blank=True, null=True)
|
||||
stem = models.TextField(
|
||||
blank=False,
|
||||
help_text="Stem of the question",
|
||||
@@ -91,6 +94,12 @@ class Question(QuestionBase):
|
||||
Category, on_delete=models.SET_NULL, null=True, blank=True
|
||||
)
|
||||
|
||||
finding = models.ManyToManyField(Finding, blank=True, related_name="sbas_questions")
|
||||
structure = models.ManyToManyField(Structure, blank=True, related_name="sbas_questions")
|
||||
condition = models.ManyToManyField(Condition, blank=True, related_name="sbas_questions")
|
||||
presentation = models.ManyToManyField(Presentation, blank=True, related_name="sbas_questions")
|
||||
subspecialty = models.ManyToManyField(Subspecialty, blank=True, related_name="sbas_questions")
|
||||
|
||||
#notes = GenericRelation(QuestionNote)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user