Fakultas Ilmu Komputer UI

Commit 5c8a4136 authored by Glenda Emanuella Sutanto's avatar Glenda Emanuella Sutanto
Browse files

[REFACTOR] Changed typo variable name, updated choice for yes no question,...

[REFACTOR] Changed typo variable name, updated choice for yes no question, made some fields as multiple-choice
parent 2ad67f5b
......@@ -11,7 +11,7 @@ pylint:
- pip install -r requirements.txt
when: on_success
script:
- pylint --load-plugins pylint_django --rcfile=./.pylintrc dietela_backend dietela_program dietela_quiz nutritionists authentication payment profile_dietku
- pylint --load-plugins pylint_django --rcfile=./.pylintrc dietela_backend dietela_program dietela_quiz nutritionists authentication payment profile_dietku diet_questionnaire
UnitTest:
image: python:3.6.5
......@@ -29,7 +29,7 @@ UnitTest:
- coverage erase
- SSLCONF="?sslmode=require"
- echo "$TEST_DATABASE_URL$SSLCONF"
- DATABASE_URL="$TEST_DATABASE_URL$SSLCONF" coverage run --branch --source=dietela_quiz,nutritionists,dietela_program,authentication,payment,profile_dietku manage.py test --keepdb
- DATABASE_URL="$TEST_DATABASE_URL$SSLCONF" coverage run --branch --source=dietela_quiz,nutritionists,dietela_program,authentication,payment,profile_dietku,diet_questionnaire manage.py test --keepdb
- coverage xml -i
- coverage report -m
artifacts:
......
......@@ -5,6 +5,8 @@ disable=
C0116, # missing-function-docstring
E5110, # django-not-configured
E1120, # no-value-for-parameter
W0221, # arguments-differ
W1113, # keyword-arg-before-vararg
[DESIGN]
max-parents=15
......
def get_diet_questionnaire_payload_sample_with_step():
return {
"agree_to_all_statements_consent": 1,
"personal_data_consent": 1,
"general_purpose": 1,
"date_of_birth": "1995-12-30",
"city_and_area_of_residence": "yang jauh disana",
"handphone_no": "081234567890",
"whatsapp_no": "080987654321",
"profession": 4,
"last_education": 5,
"meal_preference": 2,
"waist_size": 60,
"dietary_change": 2,
"has_weigher": 1,
"breakfast_frequency": 3,
"breakfast_meal_type": 2,
"sweet_tea_consumption_frequency": 9,
"coffee_consumption_frequency": 9,
"milk_consumption_frequency": 9,
"other_drink_consumption_frequency": 9,
"additional_sugar_in_a_day": 7,
"liquid_consumption_frequency": 3,
"meal_consumed_almost_every_day": "gaada",
"unliked_food": "semua",
"preferred_food_taste": "gaada",
"expected_food_on_breakfast": "makanan mahal",
"expected_food_on_lunch_dinner": "makanan murah",
"breakfast_meal_explanation": "-",
"morning_snack_explanation": "ga nyemil",
"lunch_meal_explanation": "-",
"evening_snack_explanation": "-",
"dinner_meal_explanation": "makan enak",
"night_snack_explanation": "indomi",
"food_alergies": "-",
"diet_drinks": "-",
"meal_provider": [
1,
2,
3
],
"cigarette_alcohol_condition": [
4
],
"multivitamin_tablet_suplement": "-",
"physical_activity": [
"jogging",
"basket",
"apa aja boleh"
],
"diet_and_life_style_story": "-",
"disease": [
18
],
"complaint": [
1,
2,
3,
4,
5,
6
],
"regular_drug_consumption": "obatobatan",
"other_disease": "dis-ease",
"motivation_using_dietela": "-",
"dietela_nutritionist_expectation": "-",
"dietela_program_expectation": "-",
"step": 1
}
def get_diet_questionnaire_response_sample_with_step(id, user_id):
return {
"id": id,
"meal_provider": [
1,
2,
3
],
"complaint": [
1,
2,
3,
4,
5,
6
],
"agree_to_all_statements_consent": 1,
"personal_data_consent": 1,
"general_purpose": 1,
"date_of_birth": "1995-12-30",
"city_and_area_of_residence": "yang jauh disana",
"handphone_no": "081234567890",
"whatsapp_no": "080987654321",
"profession": 4,
"last_education": 5,
"meal_preference": 2,
"waist_size": 60,
"dietary_change": 2,
"has_weigher": 1,
"breakfast_frequency": 3,
"breakfast_meal_type": 2,
"sweet_tea_consumption_frequency": 9,
"coffee_consumption_frequency": 9,
"milk_consumption_frequency": 9,
"other_drink_consumption_frequency": 9,
"additional_sugar_in_a_day": 7,
"liquid_consumption_frequency": 3,
"meal_consumed_almost_every_day": "gaada",
"unliked_food": "semua",
"preferred_food_taste": "gaada",
"expected_food_on_breakfast": "makanan mahal",
"expected_food_on_lunch_dinner": "makanan murah",
"breakfast_meal_explanation": "-",
"morning_snack_explanation": "ga nyemil",
"lunch_meal_explanation": "-",
"evening_snack_explanation": "-",
"dinner_meal_explanation": "makan enak",
"night_snack_explanation": "indomi",
"food_alergies": "-",
"diet_drinks": "-",
"meal_provider": [
1,
2,
3
],
"cigarette_alcohol_condition": [
4
],
"multivitamin_tablet_suplement": "-",
"physical_activity": [
"jogging",
"basket",
"apa aja boleh"
],
"diet_and_life_style_story": "-",
"disease": [
18
],
"regular_drug_consumption": "obatobatan",
"other_disease": "dis-ease",
"motivation_using_dietela": "-",
"dietela_nutritionist_expectation": "-",
"dietela_program_expectation": "-",
"finished_steps": [
1
],
"user": user_id
}
def get_diet_questionnaire_payload_sample_without_step():
return {
"agree_to_all_statements_consent": 1,
"personal_data_consent": 1,
"general_purpose": 1,
"date_of_birth": "1995-12-30",
"city_and_area_of_residence": "yang jauh disana",
"handphone_no": "081234567890",
"whatsapp_no": "080987654321",
"profession": 4,
"last_education": 5,
"meal_preference": 2,
"waist_size": 60,
"dietary_change": 2,
"has_weigher": 1,
"breakfast_frequency": 3,
"breakfast_meal_type": 2,
"sweet_tea_consumption_frequency": 9,
"coffee_consumption_frequency": 9,
"milk_consumption_frequency": 9,
"other_drink_consumption_frequency": 9,
"additional_sugar_in_a_day": 7,
"liquid_consumption_frequency": 3,
"meal_consumed_almost_every_day": "gaada",
"unliked_food": "semua",
"preferred_food_taste": "gaada",
"expected_food_on_breakfast": "makanan mahal",
"expected_food_on_lunch_dinner": "makanan murah",
"breakfast_meal_explanation": "-",
"morning_snack_explanation": "ga nyemil",
"lunch_meal_explanation": "-",
"evening_snack_explanation": "-",
"dinner_meal_explanation": "makan enak",
"night_snack_explanation": "indomi",
"food_alergies": "-",
"diet_drinks": "-",
"meal_provider": [
1,
2,
3
],
"cigarette_alcohol_condition": [
4
],
"multivitamin_tablet_suplement": "-",
"physical_activity": [
"jogging",
"basket",
"apa aja boleh"
],
"diet_and_life_style_story": "-",
"disease": [
18
],
"complaint": [
1,
2,
3,
4,
5,
6
],
"regular_drug_consumption": "obatobatan",
"other_disease": "dis-ease",
"motivation_using_dietela": "-",
"dietela_nutritionist_expectation": "-",
"dietela_program_expectation": "-",
}
def get_diet_questionnaire_response_sample_without_step(id, user_id):
return {
"id": id,
"meal_provider": [
1,
2,
3
],
"complaint": [
1,
2,
3,
4,
5,
6
],
"agree_to_all_statements_consent": 1,
"personal_data_consent": 1,
"general_purpose": 1,
"date_of_birth": "1995-12-30",
"city_and_area_of_residence": "yang jauh disana",
"handphone_no": "081234567890",
"whatsapp_no": "080987654321",
"profession": 4,
"last_education": 5,
"meal_preference": 2,
"waist_size": 60,
"dietary_change": 2,
"has_weigher": 1,
"breakfast_frequency": 3,
"breakfast_meal_type": 2,
"sweet_tea_consumption_frequency": 9,
"coffee_consumption_frequency": 9,
"milk_consumption_frequency": 9,
"other_drink_consumption_frequency": 9,
"additional_sugar_in_a_day": 7,
"liquid_consumption_frequency": 3,
"meal_consumed_almost_every_day": "gaada",
"unliked_food": "semua",
"preferred_food_taste": "gaada",
"expected_food_on_breakfast": "makanan mahal",
"expected_food_on_lunch_dinner": "makanan murah",
"breakfast_meal_explanation": "-",
"morning_snack_explanation": "ga nyemil",
"lunch_meal_explanation": "-",
"evening_snack_explanation": "-",
"dinner_meal_explanation": "makan enak",
"night_snack_explanation": "indomi",
"food_alergies": "-",
"diet_drinks": "-",
"meal_provider": [
1,
2,
3
],
"cigarette_alcohol_condition": [
4
],
"multivitamin_tablet_suplement": "-",
"physical_activity": [
"jogging",
"basket",
"apa aja boleh"
],
"diet_and_life_style_story": "-",
"disease": [
18
],
"regular_drug_consumption": "obatobatan",
"other_disease": "dis-ease",
"motivation_using_dietela": "-",
"dietela_nutritionist_expectation": "-",
"dietela_program_expectation": "-",
"finished_steps": [],
"user": user_id
}
......@@ -93,3 +93,117 @@ class HealthProblem(models.IntegerChoices):
PROBLEM_11 = 11, 'Maag/GERD/Dispepsia/Gangguan lambung'
PROBLEM_12 = 12, 'Penyintas Kanker'
PROBLEM_13 = 13, 'Penyakit Kronis Lainnya'
class YesNoChoices(models.IntegerChoices):
YES = 1, 'Ya'
NO = 2, 'Tidak'
class GeneralPurpose(models.IntegerChoices):
BODY_GOALS = 1, 'Mencapai Body Goals'
HEALTHY_LIFE = 2, 'Mencapai Hidup Sehat Jangka Panjang'
class Profession(models.IntegerChoices):
PRIVATE_EMPLOYEE = 1, 'Pegawai Swasta'
GOVERNMENT_EMPLOYEE = 2, 'PNS'
ENTREPRENEUR = 3, 'Wirausaha'
SELF_EMPLOYED = 4, 'Self-Employed'
FREELANCER = 5, 'Freelancer'
HOUSEWIFE = 6, 'Ibu Rumah Tangga'
COLLEGE_STUDENT = 7, 'Mahasiswa'
STUDENT = 8, 'Pelajar (selain mahasiswa)'
OTHERS = 9, 'Lainnya'
class LastEducation(models.IntegerChoices):
POSTGRADUATE = 1, 'S2 atau S3'
BACHELOR = 2, 'S1'
HIGH_SCHOOL = 3, 'SMA'
JUNIOR_HIGH_SCHOOL = 4, 'SMP'
ELEMENTARY_SCHOOL = 5, 'SD'
OTHERS = 6, 'Lainnya'
class MealPreference(models.IntegerChoices):
NO_LIMIT = 1, 'Tidak ada batasan'
HALAL = 2, 'Halal'
VEGETARIAN = 3, 'Vegetarian'
LACTO_OVO_VEGETARIAN = 4, 'Lacto-Ovo Vegetarian'
OVO_VEGETARIAN = 5, 'Ovo-Vegetarian'
VEGAN = 6, 'Vegan'
class DietaryChange(models.IntegerChoices):
STRICT_DIET = 1, 'Diet ketat'
GRADUALLY_CHANGING_DIET = 2, 'Dimulai dari perubahan bertahap saja dulu'
class BreakfastFrequency(models.IntegerChoices):
ALWAYS = 1, 'Selalu'
SOMETIMES = 2, 'Kadang-Kadang'
NEVER = 3, 'Tidak Pernah'
class BreakfastMealType(models.IntegerChoices):
LIGHT_MEAL = 1, 'Makanan yang ringan saja, hanya untuk mengganjal perut sebelum beraktivitas (misalnya: roti isi, cemilan tradisional seperti lontong, gorengan, atau kue-kue jajanan pasar)'
HEAVY_MEAL = 2, 'Makanan yang mengenyangkan perut (nasi atau roti atau kentang dengan lauk-pauk)'
class BeverageConsumptionFrequency(models.IntegerChoices):
NEVER = 1, 'Tidak pernah'
VERY_RARE = 2, 'Sangat jarang'
FREQUENCY_1 = 3, 'Tidak lebih dari 3 gelas per bulan'
FREQUENCY_2 = 4, '1 gelas/minggu'
FREQUENCY_3 = 5, '2 gelas atau lebih/minggu'
FREQUENCY_4 = 6, 'Hampir setiap hari'
FREQUENCY_5 = 7, '1 gelas (250 ml)/hari'
FREQUENCY_6 = 8, '2 gelas (500 ml)/hari'
FREQUENCY_7 = 9, 'Lebih dari 2 gelas/hari'
class AdditionalSpoonOfSugarConsumed(models.IntegerChoices):
NEVER = 1, 'Tidak pernah menggunakan gula tambahan'
SPOON_1 = 2, '1 sendok teh'
SPOON_2 = 3, '2 sendok teh'
SPOON_3 = 4, 'Lebih dari 2 sendok teh'
SPOON_4 = 5, '1 sendok makan'
SPOON_5 = 6, '2 sendok makan'
SPOON_6 = 7, 'Lebih dari 2 sendok makan'
class LiquidConsumptionFrequency(models.IntegerChoices):
FREQUENCY_1 = 1, '8 gelas/hari atau 2 liter/hari'
FREQUENCY_2 = 2, 'Kurang dari 8 gelas/hari atau kurang dari 2 liter/hari'
FREQUENCY_3 = 3, 'Lebih dari 8 gelas/hari atau lebih dari 2 liter/hari'
class MealProvider(models.IntegerChoices):
PROVIDER_1 = 1, 'Anggota keluarga'
PROVIDER_2 = 2, 'Asisten Rumah Tangga'
PROVIDER_3 = 3, 'Beli makanan di luar (beli langsung maupun delivery/pesan antar)'
PROVIDER_4 = 4, 'Dapat makanan di kantor'
PROVIDER_5 = 5, 'Saya Sendiri'
class CigaretteAlcoholCondition(models.IntegerChoices):
CONDITION_1 = 1, 'Saat ini merokok'
CONDITION_2 = 2, 'Pernah merokok tetapi sudah berhenti'
CONDITION_3 = 3, 'Terkadang mengkonsumsi salah satu jenis minuman beralkohol (contoh: bir, vodka, wine)'
CONDITION_4 = 4, 'Tidak termasuk salah satu diatas'
class Disease(models.IntegerChoices):
DISEASE_1 = 1, 'Tidak ada'
DISEASE_2 = 2, 'Diabetes Melitus Tipe II (Kencing Manis)'
DISEASE_3 = 3, 'Diabetes Melitus Tipe I (Bawaan/Keturunan)'
DISEASE_4 = 4, 'Gagal Ginjal Kronis Tingkat Akhir'
DISEASE_5 = 5, 'Gagal Ginjal Kronis Tingkat 1-4'
DISEASE_6 = 6, 'Penyakit Liver'
DISEASE_7 = 7, 'Jantung Koroner'
DISEASE_8 = 8, 'Kelainan Jantung Bawaan'
DISEASE_9 = 9, 'Kelainan Ginjal Bawaan'
DISEASE_10 = 10, 'Kanker'
DISEASE_11 = 11, 'Maag'
DISEASE_12 = 12, 'Tinggi kolesterol'
DISEASE_13 = 13, 'Tinggi asam urat'
DISEASE_14 = 14, 'Konstipasi'
DISEASE_15 = 15, 'Anemia'
DISEASE_16 = 16, 'Autoimun'
DISEASE_17 = 17, 'Lupus'
DISEASE_18 = 18, 'HIV/AIDS'
class Complaint(models.IntegerChoices):
COMPLAINT_1 = 1, 'Tidak ada'
COMPLAINT_2 = 2, 'Mual'
COMPLAINT_3 = 3, 'Muntah'
COMPLAINT_4 = 4, 'Susah buang air besar dalam 3 hari terakhir'
COMPLAINT_5 = 5, 'Kesulitan mengunyah'
COMPLAINT_6 = 6, 'Kesulitan menelan'
from django.contrib import admin
from .models import DietQuestionnaire
admin.site.register(DietQuestionnaire)
from django.apps import AppConfig
class DietQuestionnaireConfig(AppConfig):
name = 'diet_questionnaire'
# Generated by Django 3.1 on 2021-05-08 08:18
from django.conf import settings
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import multiselectfield.db.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='DietQuestionnaire',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('agree_to_all_statements_consent', models.IntegerField(choices=[(0, 'Ya'), (1, 'Tidak')])),
('personal_data_consent', models.IntegerField(choices=[(0, 'Ya'), (1, 'Tidak')])),
('general_purpose', models.IntegerField(blank=True, choices=[(1, 'Mencapai Body Goals'), (2, 'Mencapai Hidup Sehat Jangka Panjang')], null=True)),
('date_of_birth', models.DateField(blank=True, null=True)),
('city_and_area_of_residence', models.CharField(blank=True, max_length=200, null=True)),
('handphone_no', models.CharField(blank=True, max_length=50, null=True)),
('whatsapp_no', models.CharField(blank=True, max_length=50, null=True)),
('profession', models.IntegerField(blank=True, choices=[(1, 'Pegawai Swasta'), (2, 'PNS'), (3, 'Wirausaha'), (4, 'Self-Employed'), (5, 'Freelancer'), (6, 'Ibu Rumah Tangga'), (7, 'Mahasiswa'), (8, 'Pelajar (selain mahasiswa)'), (9, 'Lainnya')], null=True)),
('meal_preference', models.IntegerField(blank=True, choices=[(1, 'Tidak ada batasan'), (2, 'Halal'), (3, 'Vegetarian'), (4, 'Lacto-Ovo Vegetarian'), (5, 'Ovo-Vegetarian'), (6, 'Vegan')], null=True)),
('waist_size', models.PositiveIntegerField(blank=True, null=True)),
('dietary_change', models.IntegerField(blank=True, choices=[(1, 'Diet ketat'), (2, 'Dimulai dari perubahan bertahap saja dulu')], null=True)),
('has_weigher', models.IntegerField(blank=True, choices=[(0, 'Ya'), (1, 'Tidak')], null=True)),
('breakfast_frequency', models.IntegerField(blank=True, choices=[(1, 'Selalu'), (2, 'Kadang-Kadang'), (3, 'Tidak Pernah')], null=True)),
('breakfast_meal_type', models.IntegerField(blank=True, choices=[(1, 'Makanan yang ringan saja, hanya untuk mengganjal perut sebelum beraktivitas (misalnya: roti isi, cemilan tradisional seperti lontong, gorengan, atau kue-kue jajanan pasar)'), (2, 'Makanan yang mengenyangkan perut (nasi atau roti atau kentang dengan lauk-pauk)')], null=True)),
('sweet_tea_consumption_frequency', models.IntegerField(blank=True, choices=[(1, 'Tidak pernah'), (2, 'Sangat jarang'), (3, 'Tidak lebih dari 3 gelas per bulan'), (4, '1 gelas/minggu'), (5, '2 gelas atau lebih/minggu'), (6, 'Hampir setiap hari'), (7, '1 gelas (250 ml)/hari'), (8, '2 gelas (500 ml)/hari'), (9, 'Lebih dari 2 gelas/hari')], null=True)),
('coffee_consumption_frequency', models.IntegerField(blank=True, choices=[(1, 'Tidak pernah'), (2, 'Sangat jarang'), (3, 'Tidak lebih dari 3 gelas per bulan'), (4, '1 gelas/minggu'), (5, '2 gelas atau lebih/minggu'), (6, 'Hampir setiap hari'), (7, '1 gelas (250 ml)/hari'), (8, '2 gelas (500 ml)/hari'), (9, 'Lebih dari 2 gelas/hari')], null=True)),
('milk_consumption_frequency', models.IntegerField(blank=True, choices=[(1, 'Tidak pernah'), (2, 'Sangat jarang'), (3, 'Tidak lebih dari 3 gelas per bulan'), (4, '1 gelas/minggu'), (5, '2 gelas atau lebih/minggu'), (6, 'Hampir setiap hari'), (7, '1 gelas (250 ml)/hari'), (8, '2 gelas (500 ml)/hari'), (9, 'Lebih dari 2 gelas/hari')], null=True)),
('other_drink_consumption_frequency', models.IntegerField(blank=True, choices=[(1, 'Tidak pernah'), (2, 'Sangat jarang'), (3, 'Tidak lebih dari 3 gelas per bulan'), (4, '1 gelas/minggu'), (5, '2 gelas atau lebih/minggu'), (6, 'Hampir setiap hari'), (7, '1 gelas (250 ml)/hari'), (8, '2 gelas (500 ml)/hari'), (9, 'Lebih dari 2 gelas/hari')], null=True)),
('additional_sugar_in_a_day', models.IntegerField(blank=True, choices=[(1, 'Tidak pernah menggunakan gula tambahan'), (2, '1 sendok teh'), (3, '2 sendok teh'), (4, 'Lebih dari 2 sendok teh'), (5, '1 sendok makan'), (6, '2 sendok makan'), (7, 'Lebih dari 2 sendok makan')], null=True)),
('liquid_consumption_frequency', models.IntegerField(blank=True, choices=[(1, '8 gelas/hari atau 2 liter/hari'), (2, 'Kurang dari 8 gelas/hari atau kurang dari 2 liter/hari'), (3, 'Lebih dari 8 gelas/hari atau lebih dari 2 liter/hari')], null=True)),
('meal_consumed_almost_every_day', models.CharField(blank=True, max_length=200, null=True)),
('unliked_food', models.CharField(blank=True, max_length=200, null=True)),
('prefered_food_taste', models.CharField(blank=True, max_length=200, null=True)),
('expected_food_on_breakfast', models.CharField(blank=True, max_length=200, null=True)),
('expected_food_on_lunch_dinner', models.CharField(blank=True, max_length=200, null=True)),
('breakfast_meal_explanation', models.TextField(blank=True, null=True)),
('morning_snack_explanation', models.TextField(blank=True, null=True)),
('lunch_meal_explanation', models.TextField(blank=True, null=True)),
('evening_snack_explanation', models.TextField(blank=True, null=True)),
('dinner_meal_explanation', models.TextField(blank=True, null=True)),
('night_snack_explanation', models.TextField(blank=True, null=True)),
('food_alergies', models.CharField(blank=True, max_length=200, null=True)),
('diet_drinks', models.CharField(blank=True, max_length=200, null=True)),
('meal_provider', multiselectfield.db.fields.MultiSelectField(blank=True, choices=[(1, 'Anggota keluarga'), (2, 'Asisten Rumah Tangga'), (3, 'Beli makanan di luar (beli langsung maupun delivery/pesan antar)'), (4, 'Dapat makanan di kantor'), (5, 'Saya Sendiri')], max_length=9, null=True)),
('cigarette_alcohol_condition', models.IntegerField(blank=True, choices=[(1, 'Saat ini merokok'), (2, 'Pernah merokok tetapi sudah berhenti'), (3, 'Terkadang mengkonsumsi salah satu jenis minuman beralkohol (contoh: bir, vodka, wine)'), (4, 'Tidak termasuk salah satu diatas')], null=True)),
('multivitamin_tablet_suplement', models.CharField(blank=True, max_length=200, null=True)),
('physical_activity', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=200), blank=True, null=True, size=None)),
('diet_and_life_style_story', models.TextField(blank=True, null=True)),
('disease', models.IntegerField(blank=True, choices=[(1, 'Tidak ada'), (2, 'Diabetes Melitus Tipe II (Kencing Manis)'), (3, 'Diabetes Melitus Tipe I (Bawaan/Keturunan)'), (4, 'Gagal Ginjal Kronis Tingkat Akhir'), (5, 'Gagal Ginjal Kronis Tingkat 1-4'), (6, 'Penyakit Liver'), (7, 'Jantung Koroner'), (8, 'Kelainan Jantung Bawaan'), (9, 'Kelainan Ginjal Bawaan'), (10, 'Kanker'), (11, 'Maag'), (12, 'Tinggi kolesterol'), (13, 'Tinggi asam urat'), (14, 'Konstipasi'), (15, 'Anemia'), (16, 'Autoimun'), (17, 'Lupus'), (18, 'HIV/AIDS')], null=True)),
('complaint', multiselectfield.db.fields.MultiSelectField(blank=True, choices=[(1, 'Tidak ada'), (2, 'Mual'), (3, 'Muntah'), (4, 'Susah buang air besar dalam 3 hari terakhir'), (5, 'Kesulitan mengunyah'), (6, 'Kesulitan menelan')], max_length=11, null=True)),
('regular_drug_consumption', models.TextField(blank=True, null=True)),
('other_disease', models.TextField(blank=True, null=True)),
('motivation_using_dietela', models.TextField(blank=True, null=True)),
('dietela_nutritionist_expectation', models.TextField(blank=True, null=True)),
('dietela_program_expectation', models.TextField(blank=True, null=True)),
('finished_steps', django.contrib.postgres.fields.ArrayField(base_field=models.PositiveIntegerField(), blank=True, null=True, size=None)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='diet_questionnaire', to=settings.AUTH_USER_MODEL)),
],
),
]
# Generated by Django 3.1 on 2021-05-08 08:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('diet_questionnaire', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='dietquestionnaire',
name='last_education',
field=models.IntegerField(blank=True, choices=[(1, 'S2 atau S3'), (2, 'S1'), (3, 'SMA'), (4, 'SMP'), (5, 'SD'), (6, 'Lainnya')], null=True),
),
]
# Generated by Django 3.1 on 2021-05-08 09:13
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('diet_questionnaire', '0002_dietquestionnaire_last_education'),
]
operations = [
migrations.AlterField(
model_name='dietquestionnaire',
name='user',
field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='diet_questionnaire', to=settings.AUTH_USER_MODEL),
),
]
# Generated by Django 3.1 on 2021-05-08 09:37