Fakultas Ilmu Komputer UI

Commit 587acf94 authored by Jonathan Christopher Jakub's avatar Jonathan Christopher Jakub
Browse files

Implement monitoring case checking date

parent db490dcd
# Generated by Django 3.0.1 on 2020-04-22 15:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cases', '0010_auto_20200420_2300'),
]
operations = [
migrations.AddField(
model_name='monitoringcase',
name='checking_date',
field=models.DateField(blank=True, null=True),
),
migrations.AddField(
model_name='monitoringcasehistory',
name='checking_date',
field=models.DateField(blank=True, null=True),
),
]
......@@ -160,6 +160,7 @@ class MonitoringCaseHistory(HistoryModel):
treatment_start_date = models.DateField(blank=True, null=True)
treatment_end_date = models.DateField(blank=True, null=True)
medication_outcome = models.CharField(max_length=256, blank=True, null=True)
checking_date = models.DateField(blank=True, null=True)
author = models.ForeignKey(
Account,
blank=True,
......@@ -193,6 +194,7 @@ class MonitoringCase(HistoryEnabledModel):
treatment_start_date = models.DateField(blank=True, null=True)
treatment_end_date = models.DateField(blank=True, null=True)
medication_outcome = models.CharField(max_length=256, blank=True, null=True)
checking_date = models.DateField(blank=True, null=True)
author = models.ForeignKey(
Account,
blank=True,
......
......@@ -111,6 +111,7 @@ class MonitoringCaseSummarySerializer(serializers.ModelSerializer):
"treatment_start_date",
"treatment_end_date",
"medication_outcome",
"checking_date",
"author",
]
......@@ -129,6 +130,7 @@ class MonitoringCaseSerializer(serializers.ModelSerializer):
"treatment_start_date",
"treatment_end_date",
"medication_outcome",
"checking_date",
]
def save(self):
......
......@@ -97,7 +97,8 @@ class MonitoringCaseViewTest(APITestCase):
"medication_outcome": "",
"regular_medicine_intake": "[]",
"treatment_start_date": "1111-11-11",
"treatment_end_date": "1111-11-12"
"treatment_end_date": "1111-11-12",
"checking_date": "1111-11-13",
}
response = self.client.post(path=url, data=data, format="json",)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment