diff --git a/atlas/forms.py b/atlas/forms.py index 51a60279..3c24d386 100755 --- a/atlas/forms.py +++ b/atlas/forms.py @@ -308,6 +308,7 @@ class CaseForm(ModelForm): "report", "open_access", "previous_case", + "diagnostic_certainty", ] # fields = ['question', 'findings', 'subspecialty', 'references'] widgets = { diff --git a/atlas/migrations/0025_case_diagnostic_certainty.py b/atlas/migrations/0025_case_diagnostic_certainty.py new file mode 100644 index 00000000..6dce882b --- /dev/null +++ b/atlas/migrations/0025_case_diagnostic_certainty.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1.4 on 2023-11-01 22:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('atlas', '0024_uncategoriseddicom_created_date'), + ] + + operations = [ + migrations.AddField( + model_name='case', + name='diagnostic_certainty', + field=models.IntegerField(choices=[(0, 'None'), (1, 'Possible'), (2, 'Likely'), (3, 'Almost Certain'), (4, 'Certain')], default=0), + ), + ] diff --git a/atlas/models.py b/atlas/models.py index 1232eb8a..ddb77bb4 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -237,6 +237,14 @@ class Case(models.Model): # VASC = "VA", _("Vascular") # HAEMONC = "HA", _("Haemotology and Oncology") + class CertaintyChoices(models.IntegerChoices): + NONE = 0 + POSSIBLE = 1 + LIKELY = 2 + ALMOST_CERTAIN = 3 + CERTAIN = 4 + + title = models.CharField(max_length=255, help_text="Title of the case", default="") description = models.TextField( blank=True, @@ -266,6 +274,8 @@ class Case(models.Model): Condition, through=Differential, related_name="casedifferential" ) + diagnostic_certainty = models.IntegerField(choices=CertaintyChoices.choices, default=CertaintyChoices.NONE) + verified = models.BooleanField(default=False) created_date = models.DateTimeField(default=timezone.now) published_date = models.DateTimeField(blank=True, null=True) diff --git a/atlas/templates/atlas/case_display_block.html b/atlas/templates/atlas/case_display_block.html index eaa33741..efcfa7f8 100755 --- a/atlas/templates/atlas/case_display_block.html +++ b/atlas/templates/atlas/case_display_block.html @@ -119,6 +119,7 @@
  • {{p.get_link}}
  • {% endfor %} + Diagnostic certainty: {{case.get_diagnostic_certainty_display}}
    Collections: