Skip to content
Snippets Groups Projects
Commit 7ae0bdca authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'remove_study_related_fields-issue' into 'master'

migration script was failing when db v0.15.x contained subjects

See merge request NCER-PD/scheduling-system!300
parents 7b0167cf 065c1a58
No related branches found
No related tags found
1 merge request!300migration script was failing when db v0.15.x contained subjects
Pipeline #36759 passed
smasch (1.0.0~beta.3-1) unstable; urgency=low
* bug fix: upgrade from 0.15 version containing subjects failed
-- Piotr Gawron <piotr.gawron@uni.lu> Tue, 12 Jan 2021 10:00:00 +0200
smasch (1.0.0~beta.2-1) unstable; urgency=low smasch (1.0.0~beta.2-1) unstable; urgency=low
* bug fix: npm dependencies must be more strict * bug fix: npm dependencies must be more strict
......
...@@ -38,156 +38,156 @@ def create_custom_fields(apps, schema_editor): ...@@ -38,156 +38,156 @@ def create_custom_fields(apps, schema_editor):
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Inconclusive", possible_values="N/A;Positive;Negative;Inconclusive",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_2_result_field = CustomStudySubjectField.objects.create(name="Virus 1 RT-PCR", virus_test_2_result_field = CustomStudySubjectField.objects.create(name="Virus 1 RT-PCR",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Inconclusive", possible_values="N/A;Positive;Negative;Inconclusive",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_3_result_field = CustomStudySubjectField.objects.create(name="Virus 2 RT-PCR", virus_test_3_result_field = CustomStudySubjectField.objects.create(name="Virus 2 RT-PCR",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Inconclusive", possible_values="N/A;Positive;Negative;Inconclusive",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_4_result_field = CustomStudySubjectField.objects.create(name="Virus 3 RT-PCR", virus_test_4_result_field = CustomStudySubjectField.objects.create(name="Virus 3 RT-PCR",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Inconclusive", possible_values="N/A;Positive;Negative;Inconclusive",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_5_result_field = CustomStudySubjectField.objects.create(name="Virus 4 RT-PCR", virus_test_5_result_field = CustomStudySubjectField.objects.create(name="Virus 4 RT-PCR",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Inconclusive", possible_values="N/A;Positive;Negative;Inconclusive",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_1_updated_field = CustomStudySubjectField.objects.create(name="Visit 0 RT-PCR update date", virus_test_1_updated_field = CustomStudySubjectField.objects.create(name="Visit 0 RT-PCR update date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_2_updated_field = CustomStudySubjectField.objects.create(name="Visit 1 RT-PCR update date", virus_test_2_updated_field = CustomStudySubjectField.objects.create(name="Visit 1 RT-PCR update date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_3_updated_field = CustomStudySubjectField.objects.create(name="Visit 2 RT-PCR update date", virus_test_3_updated_field = CustomStudySubjectField.objects.create(name="Visit 2 RT-PCR update date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_4_updated_field = CustomStudySubjectField.objects.create(name="Visit 3 RT-PCR update date", virus_test_4_updated_field = CustomStudySubjectField.objects.create(name="Visit 3 RT-PCR update date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_5_updated_field = CustomStudySubjectField.objects.create(name="Visit 4 RT-PCR update date", virus_test_5_updated_field = CustomStudySubjectField.objects.create(name="Visit 4 RT-PCR update date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_1_collection_date_field = CustomStudySubjectField.objects.create( virus_test_1_collection_date_field = CustomStudySubjectField.objects.create(
name="Visit 0 RT-PCR collection date", name="Visit 0 RT-PCR collection date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_2_collection_date_field = CustomStudySubjectField.objects.create( virus_test_2_collection_date_field = CustomStudySubjectField.objects.create(
name="Visit 1 RT-PCR collection date", name="Visit 1 RT-PCR collection date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_3_collection_date_field = CustomStudySubjectField.objects.create( virus_test_3_collection_date_field = CustomStudySubjectField.objects.create(
name="Visit 2 RT-PCR collection date", name="Visit 2 RT-PCR collection date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_4_collection_date_field = CustomStudySubjectField.objects.create( virus_test_4_collection_date_field = CustomStudySubjectField.objects.create(
name="Visit 3 RT-PCR collection date", name="Visit 3 RT-PCR collection date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_5_collection_date_field = CustomStudySubjectField.objects.create( virus_test_5_collection_date_field = CustomStudySubjectField.objects.create(
name="Visit 4 RT-PCR collection date", name="Visit 4 RT-PCR collection date",
type=CUSTOM_FIELD_TYPE_DATE, type=CUSTOM_FIELD_TYPE_DATE,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
default="", default_value="",
readonly=True) readonly=True)
virus_test_1_iga_status_field = CustomStudySubjectField.objects.create( virus_test_1_iga_status_field = CustomStudySubjectField.objects.create(
name="Visit 0 IgA Status", name="Visit 0 IgA Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_2_iga_status_field = CustomStudySubjectField.objects.create( virus_test_2_iga_status_field = CustomStudySubjectField.objects.create(
name="Visit 1 IgA Status", name="Visit 1 IgA Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_3_iga_status_field = CustomStudySubjectField.objects.create( virus_test_3_iga_status_field = CustomStudySubjectField.objects.create(
name="Visit 2 IgA Status", name="Visit 2 IgA Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_4_iga_status_field = CustomStudySubjectField.objects.create( virus_test_4_iga_status_field = CustomStudySubjectField.objects.create(
name="Visit 3 IgA Status", name="Visit 3 IgA Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_5_iga_status_field = CustomStudySubjectField.objects.create( virus_test_5_iga_status_field = CustomStudySubjectField.objects.create(
name="Visit 4 IgA Status", name="Visit 4 IgA Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_1_igg_status_field = CustomStudySubjectField.objects.create( virus_test_1_igg_status_field = CustomStudySubjectField.objects.create(
name="Visit 0 IgG Status", name="Visit 0 IgG Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_2_igg_status_field = CustomStudySubjectField.objects.create( virus_test_2_igg_status_field = CustomStudySubjectField.objects.create(
name="Visit 1 IgG Status", name="Visit 1 IgG Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_3_igg_status_field = CustomStudySubjectField.objects.create( virus_test_3_igg_status_field = CustomStudySubjectField.objects.create(
name="Visit 2 IgG Status", name="Visit 2 IgG Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_4_igg_status_field = CustomStudySubjectField.objects.create( virus_test_4_igg_status_field = CustomStudySubjectField.objects.create(
name="Visit 3 IgG Status", name="Visit 3 IgG Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
virus_test_5_igg_status_field = CustomStudySubjectField.objects.create( virus_test_5_igg_status_field = CustomStudySubjectField.objects.create(
name="Visit 4 IgG Status", name="Visit 4 IgG Status",
type=CUSTOM_FIELD_TYPE_SELECT_LIST, type=CUSTOM_FIELD_TYPE_SELECT_LIST,
study_id=GLOBAL_STUDY_ID, study_id=GLOBAL_STUDY_ID,
possible_values="N/A;Positive;Negative;Borderline", possible_values="N/A;Positive;Negative;Borderline",
default="N/A", default_value="N/A",
readonly=True) readonly=True)
for subject in StudySubject.objects.all(): for subject in StudySubject.objects.all():
......
...@@ -256,7 +256,7 @@ desired effect ...@@ -256,7 +256,7 @@ desired effect
{% block footer %} {% block footer %}
<!-- To the right --> <!-- To the right -->
<div class="pull-right hidden-xs"> <div class="pull-right hidden-xs">
Version: <strong>1.0.0~beta.2</strong> Version: <strong>1.0.0~beta.3</strong>
</div> </div>
<!-- Default to the left --> <!-- Default to the left -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment