Skip to content

Commit

Permalink
Merge pull request #143 from swiftss-org/add-epigastric-hernia
Browse files Browse the repository at this point in the history
New choices
  • Loading branch information
diogenis-si authored Aug 8, 2023
2 parents a10b4db + e8051e7 commit 7fe716f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
9 changes: 8 additions & 1 deletion tmh_registry/registry/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
Episode,
Hospital,
Patient,
PatientHospitalMapping,
PatientHospitalMapping, Discharge, FollowUp,
)

@admin.register(Discharge)
class DischargeAdmin(admin.ModelAdmin):
model = Discharge

@admin.register(FollowUp)
class FollowUpAdmin(admin.ModelAdmin):
model = FollowUp

@admin.register(Hospital)
class HospitalAdmin(admin.ModelAdmin):
Expand Down
18 changes: 18 additions & 0 deletions tmh_registry/registry/migrations/0034_auto_20230808_0957.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.1.3 on 2023-08-08 09:57

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('registry', '0033_merge_20230525_0733'),
]

operations = [
migrations.AlterField(
model_name='episode',
name='episode_type',
field=models.CharField(choices=[('INGUINAL', 'Inguinal Mesh Hernia Repair'), ('INCISIONAL', 'Incisional Mesh Hernia Repair'), ('FEMORAL', 'Femoral Mesh Hernia Repair'), ('UMBILICAL', 'Umbilical/Periumbilicial Mesh Hernia Repair'), ('EPIGASTRIC', 'Epigastric Hernia')], max_length=128),
),
]
5 changes: 3 additions & 2 deletions tmh_registry/registry/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class EpisodeChoices(TextChoices):
"UMBILICAL",
"Umbilical/Periumbilicial Mesh Hernia Repair",
)
EPIGASTRIC = ("EPIGASTRIC", "Epigastric Hernia")

class CepodChoices(TextChoices):
PLANNED = ("PLANNED", "Planned")
Expand Down Expand Up @@ -173,7 +174,7 @@ class Discharge(TimeStampMixin):
comments = TextField(null=True, blank=True)

def __str__(self):
return f"Episode {self.episode.id} Discharge {self.id} - {self.date}"
return f"Episode {self.episode} | Discharge {self.id} - {self.date}"

class Meta:
verbose_name_plural = "Discharges"
Expand Down Expand Up @@ -201,7 +202,7 @@ class PainSeverityChoices(TextChoices):
surgery_comments_box = TextField(null=True, blank=True)

def __str__(self):
return f"[{self.date}] {self.episode}"
return f"Episode {self.episode} | FollowUp {self.id} - {self.date}"

class Meta:
verbose_name_plural = "Follow Ups"

0 comments on commit 7fe716f

Please sign in to comment.