Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Merge requests
!253
Resolve "import of serology data"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "import of serology data"
335-import-of-serology-data
into
master
Overview
0
Commits
10
Pipelines
5
Changes
1
Merged
Piotr Gawron
requested to merge
335-import-of-serology-data
into
master
4 years ago
Overview
0
Commits
10
Pipelines
5
Changes
1
Expand
Closes
#335 (closed)
,
#336 (closed)
Edited
4 years ago
by
Piotr Gawron
0
0
Merge request reports
Viewing commit
6382d9ec
Prev
Next
Show latest version
1 file
+
24
−
24
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6382d9ec
variable names unified
· 6382d9ec
Piotr Gawron
authored
4 years ago
smash/web/models/mail_template.py
+
24
−
24
Options
@@ -82,34 +82,34 @@ class MailTemplate(models.Model):
(
"
##S_ND_NUMBER##
"
,
"
Subject
'
s ND number
"
,
""
),
(
"
##S_DATE_ADDED##
"
,
"
Subject
'
s date of creation
"
,
get_formatted_time
(
DATE_FORMAT_SHORT
)),
(
"
##VIRUS_1_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 1
"
,
(
"
##
S_
VIRUS_1_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 1
"
,
get_formatted_time
(
DATE_FORMAT_SHORT
)),
(
"
##VIRUS_2_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 2
"
,
(
"
##
S_
VIRUS_2_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 2
"
,
get_formatted_time
(
DATE_FORMAT_SHORT
)),
(
"
##VIRUS_3_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 3
"
,
(
"
##
S_
VIRUS_3_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 3
"
,
get_formatted_time
(
DATE_FORMAT_SHORT
)),
(
"
##VIRUS_4_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 4
"
,
(
"
##
S_
VIRUS_4_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 4
"
,
get_formatted_time
(
DATE_FORMAT_SHORT
)),
(
"
##VIRUS_5_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 5
"
,
(
"
##
S_
VIRUS_5_SAMPLE_COLLECTION_DATE##
"
,
"
Virus test collection date in visit 5
"
,
get_formatted_time
(
DATE_FORMAT_SHORT
)),
(
"
##VIRUS_1_RESULT##
"
,
"
Virus test results in visit 1
"
,
"
Positive
"
),
(
"
##VIRUS_2_RESULT##
"
,
"
Virus test results in visit 2
"
,
"
Negative
"
),
(
"
##VIRUS_3_RESULT##
"
,
"
Virus test results in visit 3
"
,
"
Inconclusive
"
),
(
"
##VIRUS_4_RESULT##
"
,
"
Virus test results in visit 4
"
,
""
),
(
"
##VIRUS_5_RESULT##
"
,
"
Virus test results in visit 5
"
,
""
),
(
"
##
S_
VIRUS_1_RESULT##
"
,
"
Virus test results in visit 1
"
,
"
Positive
"
),
(
"
##
S_
VIRUS_2_RESULT##
"
,
"
Virus test results in visit 2
"
,
"
Negative
"
),
(
"
##
S_
VIRUS_3_RESULT##
"
,
"
Virus test results in visit 3
"
,
"
Inconclusive
"
),
(
"
##
S_
VIRUS_4_RESULT##
"
,
"
Virus test results in visit 4
"
,
""
),
(
"
##
S_
VIRUS_5_RESULT##
"
,
"
Virus test results in visit 5
"
,
""
),
(
"
##VIRUS_1_IGA_STATUS##
"
,
"
IgA Status in visit 1
"
,
"
Positive
"
),
(
"
##VIRUS_2_IGA_STATUS##
"
,
"
IgA Status in visit 2
"
,
"
Negative
"
),
(
"
##VIRUS_3_IGA_STATUS##
"
,
"
IgA Status in visit 3
"
,
"
Borderline
"
),
(
"
##VIRUS_4_IGA_STATUS##
"
,
"
IgA Status in visit 4
"
,
""
),
(
"
##VIRUS_5_IGA_STATUS##
"
,
"
IgA Status in visit 5
"
,
""
),
(
"
##
S_
VIRUS_1_IGA_STATUS##
"
,
"
IgA Status in visit 1
"
,
"
Positive
"
),
(
"
##
S_
VIRUS_2_IGA_STATUS##
"
,
"
IgA Status in visit 2
"
,
"
Negative
"
),
(
"
##
S_
VIRUS_3_IGA_STATUS##
"
,
"
IgA Status in visit 3
"
,
"
Borderline
"
),
(
"
##
S_
VIRUS_4_IGA_STATUS##
"
,
"
IgA Status in visit 4
"
,
""
),
(
"
##
S_
VIRUS_5_IGA_STATUS##
"
,
"
IgA Status in visit 5
"
,
""
),
(
"
##VIRUS_1_IGG_STATUS##
"
,
"
IgG Status in visit 1
"
,
"
Positive
"
),
(
"
##VIRUS_2_IGG_STATUS##
"
,
"
IgG Status in visit 2
"
,
"
Negative
"
),
(
"
##VIRUS_3_IGG_STATUS##
"
,
"
IgG Status in visit 3
"
,
"
Borderline
"
),
(
"
##VIRUS_4_IGG_STATUS##
"
,
"
IgG Status in visit 4
"
,
""
),
(
"
##VIRUS_5_IGG_STATUS##
"
,
"
IgG Status in visit 5
"
,
""
),
(
"
##
S_
VIRUS_1_IGG_STATUS##
"
,
"
IgG Status in visit 1
"
,
"
Positive
"
),
(
"
##
S_
VIRUS_2_IGG_STATUS##
"
,
"
IgG Status in visit 2
"
,
"
Negative
"
),
(
"
##
S_
VIRUS_3_IGG_STATUS##
"
,
"
IgG Status in visit 3
"
,
"
Borderline
"
),
(
"
##
S_
VIRUS_4_IGG_STATUS##
"
,
"
IgG Status in visit 4
"
,
""
),
(
"
##
S_
VIRUS_5_IGG_STATUS##
"
,
"
IgG Status in visit 5
"
,
""
),
]
@@ -322,20 +322,20 @@ class MailTemplate(models.Model):
'
##S_KNOWN_LANGUAGES##
'
:
"
,
"
.
join
([
l
.
name
for
l
in
study_subject
.
subject
.
languages
.
all
()])
}
for
i
in
range
(
1
,
6
):
virus_test_field
=
"
##VIRUS_{}_RESULT##
"
.
format
(
i
)
virus_test_field
=
"
##
S_
VIRUS_{}_RESULT##
"
.
format
(
i
)
virus_test_value
=
virus_test_to_str
(
getattr
(
study_subject
,
"
virus_test_{}
"
.
format
(
i
)),
getattr
(
study_subject
,
"
virus_test_{}_updated
"
.
format
(
i
)))
virus_test_date_field
=
"
##VIRUS_{}_SAMPLE_COLLECTION_DATE##
"
.
format
(
i
)
virus_test_date_field
=
"
##
S_
VIRUS_{}_SAMPLE_COLLECTION_DATE##
"
.
format
(
i
)
virus_test_date_value
=
date_to_str
(
getattr
(
study_subject
,
"
virus_test_{}_collection_date
"
.
format
(
i
)),
DATE_FORMAT_SHORT
)
virus_iga_status_field
=
"
##VIRUS_{}_IGA_STATUS##
"
.
format
(
i
)
virus_iga_status_field
=
"
##
S_
VIRUS_{}_IGA_STATUS##
"
.
format
(
i
)
virus_iga_status_value
=
getattr
(
study_subject
,
"
virus_test_{}_iga_status
"
.
format
(
i
))
if
virus_iga_status_value
is
None
:
virus_iga_status_value
=
""
virus_igg_status_field
=
"
##VIRUS_{}_IGG_STATUS##
"
.
format
(
i
)
virus_igg_status_field
=
"
##
S_
VIRUS_{}_IGG_STATUS##
"
.
format
(
i
)
virus_igg_status_value
=
getattr
(
study_subject
,
"
virus_test_{}_igg_status
"
.
format
(
i
))
if
virus_igg_status_value
is
None
:
virus_igg_status_value
=
""
Loading