Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new medical history options #2190

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7766a2a
add new fields to disease table
AshrafMd-1 May 22, 2024
c586a14
Update patient_base.py
AshrafMd-1 May 22, 2024
2c9a72c
Merge branch 'develop' into medical-history
AshrafMd-1 May 22, 2024
bed4680
fix disease_map
AshrafMd-1 May 23, 2024
5b538f1
add migrations
AshrafMd-1 May 24, 2024
027fc1b
add validation
AshrafMd-1 May 26, 2024
b1c6200
add tests
AshrafMd-1 May 28, 2024
c46e911
Merge branch 'coronasafe:develop' into medical-history
AshrafMd-1 May 29, 2024
2731569
fix lint
AshrafMd-1 Jun 4, 2024
23dc5f1
Merge branch 'develop' into medical-history
AshrafMd-1 Jun 4, 2024
65a5c2c
merge migrations
AshrafMd-1 Jun 4, 2024
ac563dd
Merge branch 'coronasafe:develop' into medical-history
AshrafMd-1 Jun 6, 2024
28c6696
fix lint
AshrafMd-1 Jun 7, 2024
07a07b0
add migrations
AshrafMd-1 Jun 7, 2024
65e1f1e
Merge branch 'develop' into medical-history
AshrafMd-1 Jun 7, 2024
7a1452d
Merge branch 'coronasafe:develop' into medical-history
AshrafMd-1 Jun 13, 2024
fbdeeb7
fix migrations
AshrafMd-1 Jun 15, 2024
bcf4520
Merge branch 'coronasafe:develop' into medical-history
AshrafMd-1 Jul 5, 2024
23e1e8b
fix migration
AshrafMd-1 Jul 5, 2024
98928f6
Merge branch 'develop' into medical-history
AshrafMd-1 Jul 23, 2024
9f1cc6f
new migration
AshrafMd-1 Jul 23, 2024
4dba549
Merge branch 'develop' into medical-history
AshrafMd-1 Jul 23, 2024
74fdd95
Merge branch 'develop' into medical-history
AshrafMd-1 Jul 29, 2024
0050291
Merge branch 'develop' into medical-history
AshrafMd-1 Aug 9, 2024
1c02013
Merge branch 'develop' into medical-history
nihal467 Aug 20, 2024
3f7d38f
Merge branch 'develop' into medical-history
vigneshhari Aug 21, 2024
6cabe89
Merge branch 'coronasafe:develop' into medical-history
AshrafMd-1 Aug 23, 2024
c960888
fix migrations
AshrafMd-1 Aug 23, 2024
61d6a49
fix lint
AshrafMd-1 Aug 23, 2024
b656f93
Merge branch 'develop' into medical-history
AshrafMd-1 Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions care/facility/api/serializers/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ class PatientDetailSerializer(PatientListSerializer):
class MedicalHistorySerializer(serializers.Serializer):
disease = ChoiceField(choices=DISEASE_CHOICES)
details = serializers.CharField(required=False, allow_blank=True)
status = serializers.CharField(required=False, allow_blank=True)
duration = serializers.CharField(required=False, allow_blank=True)
type = serializers.CharField(required=False, allow_blank=True)
AshrafMd-1 marked this conversation as resolved.
Show resolved Hide resolved

class PatientTeleConsultationSerializer(serializers.ModelSerializer):
class Meta:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Generated by Django 4.2.10 on 2024-05-22 11:10

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("facility", "0423_patientconsultation_consent_records_and_more"),
]

operations = [
migrations.AddField(
model_name="disease",
name="duration",
field=models.IntegerField(blank=True, null=True),
),
migrations.AddField(
model_name="disease",
name="status",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="disease",
name="type",
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name="disease",
name="disease",
field=models.IntegerField(
choices=[
(1, "NO"),
(2, "Diabetes"),
(3, "Heart Disease"),
(4, "HyperTension"),
(5, "Chronic Renal Disease"),
(6, "Asthma"),
(7, "COPD"),
(8, "Bronchitis"),
(9, "Chronic Neurological Or Neuromuscular Disease"),
(10, "Immunocompromised Condition"),
(11, "Liver Disease"),
(12, "TB"),
(13, "Other Chronic Lung Diseases"),
(14, "Cancer"),
(15, "OTHER"),
]
),
),
]
3 changes: 3 additions & 0 deletions care/facility/models/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,9 @@ class Disease(models.Model):
)
disease = models.IntegerField(choices=DISEASE_CHOICES)
details = models.TextField(blank=True, null=True)
status=models.TextField(blank=True, null=True)
duration = models.IntegerField(blank=True, null=True)
type =models.TextField(blank=True, null=True)
AshrafMd-1 marked this conversation as resolved.
Show resolved Hide resolved
deleted = models.BooleanField(default=False)

objects = BaseManager()
Expand Down
15 changes: 11 additions & 4 deletions care/facility/models/patient_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,17 @@ def reverse_choices(choices):
"Diabetes": 2,
"Heart Disease": 3,
"HyperTension": 4,
"Kidney Diseases": 5,
"Lung Diseases/Asthma": 6,
"Cancer": 7,
"OTHER": 8,
"Chronic Renal Disease": 5,
"Asthma": 6,
AshrafMd-1 marked this conversation as resolved.
Show resolved Hide resolved
"COPD": 7,
"Bronchitis": 8,
"Chronic Neurological Or Neuromuscular Disease": 9,
"Immunocompromised Condition": 10,
"Liver Disease": 11,
"TB": 12,
"Other Chronic Lung Diseases": 13,
"Cancer": 14,
"OTHER": 15,
AshrafMd-1 marked this conversation as resolved.
Show resolved Hide resolved
}
DISEASE_CHOICES = [(v, k) for k, v in DISEASE_CHOICES_MAP.items()]

Expand Down