Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
PPTI-Mobile Apps Monitoring Wabah Tuberkolosis
Neza-Backend
Commits
678a4d2c
Commit
678a4d2c
authored
Apr 19, 2020
by
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
Changes
19
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/accounts/migrations/0002_auto_20200419_0156.py
View file @
678a4d2c
...
...
@@ -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
),
),
]
apps/accounts/migrations/0003_accounthistory_author.py
View file @
678a4d2c
...
...
@@ -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
),
),
]
apps/accounts/migrations/0004_account_author.py
View file @
678a4d2c
...
...
@@ -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"
,
),
),
]
apps/accounts/serializers.py
View file @
678a4d2c
...
...
@@ -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
)
apps/cases/filters.py
View file @
678a4d2c
...
...
@@ -129,5 +129,3 @@ MONITORING_CASE_ORDERING_FIELDS = (
"author__name"
,
"created_at"
,
)
\ No newline at end of file
apps/cases/migrations/0002_auto_20200413_2102.py
View file @
678a4d2c
...
...
@@ -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"
,),
]
apps/cases/migrations/0003_auto_20200414_1453.py
View file @
678a4d2c
...
...
@@ -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
=
"
[]
"
),
),
]
apps/cases/migrations/0004_casesubject_author.py
View file @
678a4d2c
...
...
@@ -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"
,
),
),
]
apps/cases/migrations/0005_auto_20200416_2334.py
View file @
678a4d2c
...
...
@@ -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
"
],
},
),
]
apps/cases/migrations/0006_auto_20200417_2200.py
View file @
678a4d2c
...
...
@@ -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
"
],
},
),
]
apps/cases/migrations/0007_auto_20200418_1632.py
View file @
678a4d2c
...
...
@@ -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"
,
),
),
]
apps/cases/migrations/0008_auto_20200419_0156.py
View file @
678a4d2c
...
...
@@ -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
,