Fakultas Ilmu Komputer UI

Commit 678a4d2c authored by Jonathan Christopher Jakub's avatar Jonathan Christopher Jakub
Browse files

[GREEN/REFACTOR] Fix stylings to pass lint test

parent 505fa23d
Pipeline #41414 passed with stages
in 11 minutes and 33 seconds
......@@ -7,39 +7,57 @@ import uuid
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
("accounts", "0001_initial"),
]
operations = [
migrations.CreateModel(
name='AccountHistory',
name="AccountHistory",
fields=[
('revision_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('object_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('action_type', models.CharField(choices=[('Create', 'Create'), ('Edit', 'Edit'), ('Delete', 'Delete')], max_length=64)),
('recorded_at', models.DateTimeField(auto_now_add=True)),
('user_id', models.IntegerField()),
('name', models.CharField(max_length=128)),
('email', models.EmailField(max_length=128)),
('phone_number', models.CharField(max_length=64)),
('area', models.CharField(max_length=128)),
('is_admin', models.BooleanField(default=False)),
('is_verified', models.BooleanField(default=False)),
('is_active', models.BooleanField(default=False)),
(
"revision_id",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("object_id", models.UUIDField(default=uuid.uuid4, editable=False)),
(
"action_type",
models.CharField(
choices=[
("Create", "Create"),
("Edit", "Edit"),
("Delete", "Delete"),
],
max_length=64,
),
),
("recorded_at", models.DateTimeField(auto_now_add=True)),
("user_id", models.IntegerField()),
("name", models.CharField(max_length=128)),
("email", models.EmailField(max_length=128)),
("phone_number", models.CharField(max_length=64)),
("area", models.CharField(max_length=128)),
("is_admin", models.BooleanField(default=False)),
("is_verified", models.BooleanField(default=False)),
("is_active", models.BooleanField(default=False)),
],
options={
'verbose_name_plural': 'account histories',
'db_table': 'account_history',
'ordering': ['-recorded_at'],
"verbose_name_plural": "account histories",
"db_table": "account_history",
"ordering": ["-recorded_at"],
},
),
migrations.AlterModelOptions(
name='account',
options={'ordering': ['-created_at'], 'verbose_name_plural': 'accounts'},
name="account",
options={"ordering": ["-created_at"], "verbose_name_plural": "accounts"},
),
migrations.AddField(
model_name='account',
name='deleted_at',
model_name="account",
name="deleted_at",
field=models.DateTimeField(blank=True, null=True),
),
]
......@@ -6,13 +6,13 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_auto_20200419_0156'),
("accounts", "0002_auto_20200419_0156"),
]
operations = [
migrations.AddField(
model_name='accounthistory',
name='author',
model_name="accounthistory",
name="author",
field=models.UUIDField(null=True),
),
]
......@@ -7,13 +7,19 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_accounthistory_author'),
("accounts", "0003_accounthistory_author"),
]
operations = [
migrations.AddField(
model_name='account',
name='author',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='account', to='accounts.Account'),
model_name="account",
name="author",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="account",
to="accounts.Account",
),
),
]
......@@ -53,5 +53,5 @@ class AccountRegisterSerializer(serializers.ModelSerializer):
return serializer.data
def save(self):
account = self.context.get('request').user.account
account = self.context.get('request').user.account
super(AccountRegisterSerializer, self).save(author=account)
......@@ -129,5 +129,3 @@ MONITORING_CASE_ORDERING_FIELDS = (
"author__name",
"created_at",
)
\ No newline at end of file
......@@ -7,35 +7,30 @@ import uuid
class Migration(migrations.Migration):
dependencies = [
('cases', '0001_initial'),
("cases", "0001_initial"),
]
operations = [
migrations.RemoveField(
model_name='monitoringcase',
name='positive_case_id',
),
migrations.RemoveField(model_name="monitoringcase", name="positive_case_id",),
migrations.AddField(
model_name='investigationcase',
name='outcome',
model_name="investigationcase",
name="outcome",
field=models.CharField(blank=True, max_length=256, null=True),
),
migrations.AlterField(
model_name='casesubject',
name='subject_id',
model_name="casesubject",
name="subject_id",
field=models.UUIDField(default=uuid.uuid4, editable=False),
),
migrations.AlterField(
model_name='investigationcase',
name='case_id',
model_name="investigationcase",
name="case_id",
field=models.UUIDField(default=uuid.uuid4, editable=False),
),
migrations.AlterField(
model_name='monitoringcase',
name='case_id',
model_name="monitoringcase",
name="case_id",
field=models.UUIDField(default=uuid.uuid4, editable=False),
),
migrations.DeleteModel(
name='PositiveCase',
),
migrations.DeleteModel(name="PositiveCase",),
]
......@@ -6,25 +6,18 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cases', '0002_auto_20200413_2102'),
("cases", "0002_auto_20200413_2102"),
]
operations = [
migrations.RemoveField(model_name="monitoringcase", name="checking_date",),
migrations.RemoveField(
model_name='monitoringcase',
name='checking_date',
),
migrations.RemoveField(
model_name='monitoringcase',
name='is_regularly_treated',
),
migrations.RemoveField(
model_name='monitoringcase',
name='outcome',
model_name="monitoringcase", name="is_regularly_treated",
),
migrations.RemoveField(model_name="monitoringcase", name="outcome",),
migrations.AddField(
model_name='monitoringcase',
name='regular_medicine_intake',
field=models.TextField(default='[]'),
model_name="monitoringcase",
name="regular_medicine_intake",
field=models.TextField(default="[]"),
),
]
......@@ -7,14 +7,20 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
('cases', '0003_auto_20200414_1453'),
("accounts", "0001_initial"),
("cases", "0003_auto_20200414_1453"),
]
operations = [
migrations.AddField(
model_name='casesubject',
name='author',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='case_subject', to='accounts.Account'),
model_name="casesubject",
name="author",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="case_subject",
to="accounts.Account",
),
),
]
......@@ -8,43 +8,62 @@ import uuid
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
('cases', '0004_casesubject_author'),
("accounts", "0001_initial"),
("cases", "0004_casesubject_author"),
]
operations = [
migrations.RenameField(
model_name='casesubject',
old_name='revision_id',
new_name='id',
),
migrations.RemoveField(
model_name='casesubject',
name='is_active',
),
migrations.RemoveField(
model_name='casesubject',
name='subject_id',
model_name="casesubject", old_name="revision_id", new_name="id",
),
migrations.RemoveField(model_name="casesubject", name="is_active",),
migrations.RemoveField(model_name="casesubject", name="subject_id",),
migrations.CreateModel(
name='CaseSubjectHistory',
name="CaseSubjectHistory",
fields=[
('revision_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('object_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('action_type', models.CharField(choices=[('Create', 'Create'), ('Edit', 'Edit'), ('Delete', 'Delete')], max_length=64)),
('recorded_at', models.DateTimeField(auto_now_add=True)),
('name', models.CharField(max_length=128)),
('age', models.IntegerField()),
('is_male', models.BooleanField(db_index=True)),
('address', models.CharField(max_length=256)),
('district', models.CharField(max_length=128)),
('sub_district', models.CharField(max_length=128)),
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='case_subject_history', to='accounts.Account')),
(
"revision_id",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("object_id", models.UUIDField(default=uuid.uuid4, editable=False)),
(
"action_type",
models.CharField(
choices=[
("Create", "Create"),
("Edit", "Edit"),
("Delete", "Delete"),
],
max_length=64,
),
),
("recorded_at", models.DateTimeField(auto_now_add=True)),
("name", models.CharField(max_length=128)),
("age", models.IntegerField()),
("is_male", models.BooleanField(db_index=True)),
("address", models.CharField(max_length=256)),
("district", models.CharField(max_length=128)),
("sub_district", models.CharField(max_length=128)),
(
"author",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="case_subject_history",
to="accounts.Account",
),
),
],
options={
'verbose_name_plural': 'case subject histories',
'db_table': 'case_subject_history',
'ordering': ['-recorded_at'],
"verbose_name_plural": "case subject histories",
"db_table": "case_subject_history",
"ordering": ["-recorded_at"],
},
),
]
......@@ -8,53 +8,71 @@ import uuid
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
('cases', '0005_auto_20200416_2334'),
("accounts", "0001_initial"),
("cases", "0005_auto_20200416_2334"),
]
operations = [
migrations.RenameField(
model_name='investigationcase',
old_name='revision_id',
new_name='id',
model_name="investigationcase", old_name="revision_id", new_name="id",
),
migrations.RemoveField(model_name="investigationcase", name="case_id",),
migrations.RemoveField(model_name="investigationcase", name="case_subject_id",),
migrations.RemoveField(model_name="investigationcase", name="is_active",),
migrations.RemoveField(
model_name='investigationcase',
name='case_id',
),
migrations.RemoveField(
model_name='investigationcase',
name='case_subject_id',
),
migrations.RemoveField(
model_name='investigationcase',
name='is_active',
),
migrations.RemoveField(
model_name='investigationcase',
name='reference_case_id',
model_name="investigationcase", name="reference_case_id",
),
migrations.CreateModel(
name='InvestigationCaseHistory',
name="InvestigationCaseHistory",
fields=[
('revision_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('object_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('action_type', models.CharField(choices=[('Create', 'Create'), ('Edit', 'Edit'), ('Delete', 'Delete')], max_length=64)),
('recorded_at', models.DateTimeField(auto_now_add=True)),
('case_subject_id', models.UUIDField(blank=True, null=True)),
('reference_case_id', models.UUIDField(blank=True, null=True)),
('case_relation', models.CharField(blank=True, max_length=128)),
('medical_symptoms', models.TextField(default='{}')),
('risk_factors', models.TextField(default='{}')),
('is_referral_needed', models.BooleanField(db_index=True)),
('medical_facility_reference', models.CharField(blank=True, max_length=128)),
('outcome', models.CharField(blank=True, max_length=256, null=True)),
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='investigation_case_history', to='accounts.Account')),
(
"revision_id",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("object_id", models.UUIDField(default=uuid.uuid4, editable=False)),
(
"action_type",
models.CharField(
choices=[
("Create", "Create"),
("Edit", "Edit"),
("Delete", "Delete"),
],
max_length=64,
),
),
("recorded_at", models.DateTimeField(auto_now_add=True)),
("case_subject_id", models.UUIDField(blank=True, null=True)),
("reference_case_id", models.UUIDField(blank=True, null=True)),
("case_relation", models.CharField(blank=True, max_length=128)),
("medical_symptoms", models.TextField(default="{}")),
("risk_factors", models.TextField(default="{}")),
("is_referral_needed", models.BooleanField(db_index=True)),
(
"medical_facility_reference",
models.CharField(blank=True, max_length=128),
),
("outcome", models.CharField(blank=True, max_length=256, null=True)),
(
"author",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="investigation_case_history",
to="accounts.Account",
),
),
],
options={
'verbose_name_plural': 'investigation case histories',
'db_table': 'investigation_case_history',
'ordering': ['-recorded_at'],
"verbose_name_plural": "investigation case histories",
"db_table": "investigation_case_history",
"ordering": ["-recorded_at"],
},
),
]
......@@ -7,18 +7,30 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cases', '0006_auto_20200417_2200'),
("cases", "0006_auto_20200417_2200"),
]
operations = [
migrations.AddField(
model_name='investigationcase',
name='case_subject',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='investigation_case', to='cases.CaseSubject'),
model_name="investigationcase",
name="case_subject",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="investigation_case",
to="cases.CaseSubject",
),
),
migrations.AddField(
model_name='investigationcase',
name='reference_case',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='referring_investigation_case', to='cases.InvestigationCase'),
model_name="investigationcase",
name="reference_case",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="referring_investigation_case",
to="cases.InvestigationCase",
),
),
]
......@@ -8,55 +8,89 @@ import uuid
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_auto_20200419_0156'),
('cases', '0007_auto_20200418_1632'),
("accounts", "0002_auto_20200419_0156"),
("cases", "0007_auto_20200418_1632"),
]
operations = [
migrations.RenameField(
model_name='monitoringcase',
old_name='revision_id',
new_name='id',
model_name="monitoringcase", old_name="revision_id", new_name="id",
),
migrations.RemoveField(model_name="monitoringcase", name="case_id",),
migrations.RemoveField(
model_name='monitoringcase',
name='case_id',
),
migrations.RemoveField(
model_name='monitoringcase',
name='investigation_case_id',
),
migrations.RemoveField(
model_name='monitoringcase',
name='is_active',
model_name="monitoringcase", name="investigation_case_id",
),
migrations.RemoveField(model_name="monitoringcase", name="is_active",),
migrations.AddField(
model_name='monitoringcase',
name='investigation_case',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='monitoring_case', to='cases.InvestigationCase'),
model_name="monitoringcase",
name="investigation_case",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="monitoring_case",
to="cases.InvestigationCase",
),
),
migrations.AlterField(
model_name='investigationcase',
name='reference_case',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='investigation_case', to='cases.InvestigationCase'),
model_name="investigationcase",
name="reference_case",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="investigation_case",
to="cases.InvestigationCase",
),
),
migrations.CreateModel(
name='MonitoringCaseHistory',
name="MonitoringCaseHistory",
fields=[
('revision_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('object_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('action_type', models.CharField(choices=[('Create', 'Create'), ('Edit', 'Edit'), ('Delete', 'Delete')], max_length=64)),
('recorded_at', models.DateTimeField(auto_now_add=True)),
('investigation_case_id', models.UUIDField(blank=True, null=True)),
('is_referred', models.BooleanField(blank=True, db_index=True, null=True)),
('is_checked', models.BooleanField(blank=True, db_index=True, null=True)),
('regular_medicine_intake', models.TextField(default='[]')),
('treatment_start_date', models.DateField(blank=True, null=True)),
('treatment_end_date', models.DateField(blank=True, null=True)),
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='monitoring_case_history', to='accounts.Account')),
(
"revision_id",
models.UUIDField(
default=uuid.uuid4,
editable=False,