add diagnostic certainty
This commit is contained in:
@@ -308,6 +308,7 @@ class CaseForm(ModelForm):
|
|||||||
"report",
|
"report",
|
||||||
"open_access",
|
"open_access",
|
||||||
"previous_case",
|
"previous_case",
|
||||||
|
"diagnostic_certainty",
|
||||||
]
|
]
|
||||||
# fields = ['question', 'findings', 'subspecialty', 'references']
|
# fields = ['question', 'findings', 'subspecialty', 'references']
|
||||||
widgets = {
|
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")
|
# VASC = "VA", _("Vascular")
|
||||||
# HAEMONC = "HA", _("Haemotology and Oncology")
|
# 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="")
|
title = models.CharField(max_length=255, help_text="Title of the case", default="")
|
||||||
description = models.TextField(
|
description = models.TextField(
|
||||||
blank=True,
|
blank=True,
|
||||||
@@ -266,6 +274,8 @@ class Case(models.Model):
|
|||||||
Condition, through=Differential, related_name="casedifferential"
|
Condition, through=Differential, related_name="casedifferential"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
diagnostic_certainty = models.IntegerField(choices=CertaintyChoices.choices, default=CertaintyChoices.NONE)
|
||||||
|
|
||||||
verified = models.BooleanField(default=False)
|
verified = models.BooleanField(default=False)
|
||||||
created_date = models.DateTimeField(default=timezone.now)
|
created_date = models.DateTimeField(default=timezone.now)
|
||||||
published_date = models.DateTimeField(blank=True, null=True)
|
published_date = models.DateTimeField(blank=True, null=True)
|
||||||
|
|||||||
@@ -119,6 +119,7 @@
|
|||||||
<li>{{p.get_link}}</li>
|
<li>{{p.get_link}}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
<b>Diagnostic certainty:</b> {{case.get_diagnostic_certainty_display}}<br />
|
||||||
<b>Collections:</b>
|
<b>Collections:</b>
|
||||||
<button
|
<button
|
||||||
hx-get="{% url 'atlas:case_collection_form' case.pk %}"
|
hx-get="{% url 'atlas:case_collection_form' case.pk %}"
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>Name: {{condition.name}}</h3>
|
<h3>Name: {{condition.name}}</h3>
|
||||||
Primary name: {{condition.primary}}<br />
|
Primary name: {{condition.primary}}<br />
|
||||||
|
Subspecialty: {% for sub in condition.subspecialty.all %}
|
||||||
|
<a href="{{sub.get_absolute_url}}">{{sub}}</a>
|
||||||
|
{% endfor %}<br />
|
||||||
Synonyms:
|
Synonyms:
|
||||||
{% for syn in condition.synonym.all %}
|
{% for syn in condition.synonym.all %}
|
||||||
<a href="{{syn.get_absolute_url}}">{{syn}}</a>
|
<a href="{{syn.get_absolute_url}}">{{syn}}</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user