add diagnostic certainty
This commit is contained in:
@@ -308,6 +308,7 @@ class CaseForm(ModelForm):
|
||||
"report",
|
||||
"open_access",
|
||||
"previous_case",
|
||||
"diagnostic_certainty",
|
||||
]
|
||||
# fields = ['question', 'findings', 'subspecialty', 'references']
|
||||
widgets = {
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
]
|
||||
@@ -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)
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
<li>{{p.get_link}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<b>Diagnostic certainty:</b> {{case.get_diagnostic_certainty_display}}<br />
|
||||
<b>Collections:</b>
|
||||
<button
|
||||
hx-get="{% url 'atlas:case_collection_form' case.pk %}"
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<div>
|
||||
<h3>Name: {{condition.name}}</h3>
|
||||
Primary name: {{condition.primary}}<br />
|
||||
Subspecialty: {% for sub in condition.subspecialty.all %}
|
||||
<a href="{{sub.get_absolute_url}}">{{sub}}</a>
|
||||
{% endfor %}<br />
|
||||
Synonyms:
|
||||
{% for syn in condition.synonym.all %}
|
||||
<a href="{{syn.get_absolute_url}}">{{syn}}</a>
|
||||
|
||||
Reference in New Issue
Block a user