Skip to content

Commit

Permalink
use opal diagnosis
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Dec 12, 2017
1 parent f803417 commit 08b6bb6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
23 changes: 23 additions & 0 deletions elcid/migrations/0017_auto_20171212_1614.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('elcid', '0016_auto_20171212_1252'),
]

operations = [
migrations.AlterModelOptions(
name='diagnosis',
options={},
),
migrations.AlterField(
model_name='diagnosis',
name='provisional',
field=models.BooleanField(default=False, help_text=b'True if the diagnosis is provisional. Defaults to False', verbose_name=b'Provisional?'),
),
]
28 changes: 4 additions & 24 deletions elcid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.db import models
from django.db.models.signals import post_save
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
from lab import models as lmodels

from jsonfield import JSONField

import opal.models as omodels

from opal.models import (
EpisodeSubrecord, PatientSubrecord, Episode, ExternallySourcedModel
EpisodeSubrecord, PatientSubrecord, ExternallySourcedModel
)
from opal.core.fields import ForeignKeyOrFreeText
from opal.core import lookuplists
Expand Down Expand Up @@ -170,31 +166,15 @@ class Meta:
verbose_name_plural = "Primary diagnoses"


class Consultant(lookuplists.LookupList): pass
class Consultant(lookuplists.LookupList):
pass


class Diagnosis(EpisodeSubrecord):
class Diagnosis(omodels.Diagnosis):
"""
This is a working-diagnosis list, will often contain things that are
not technically diagnoses, but is for historical reasons, called diagnosis.
"""
_title = 'Diagnosis / Issues'
_sort = 'date_of_diagnosis'
_icon = 'fa fa-stethoscope'

condition = ForeignKeyOrFreeText(omodels.Condition)
provisional = models.NullBooleanField()
details = models.CharField(max_length=255, blank=True)
date_of_diagnosis = models.DateField(blank=True, null=True)

def __unicode__(self):
return u'Diagnosis of {0} - {1}'.format(
self.condition,
self.date_of_diagnosis
)

class Meta:
verbose_name_plural = "Diagnoses"


class Iv_stop(lookuplists.LookupList):
Expand Down
5 changes: 0 additions & 5 deletions elcid/templates/records/diagnosis.html

This file was deleted.

0 comments on commit 08b6bb6

Please sign in to comment.