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
Commits
a074fd8d
Commit
a074fd8d
authored
4 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
health partner information is available in subject templates
parent
6382d9ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!253
Resolve "import of serology data"
Pipeline
#27200
passed
4 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/models/mail_template.py
+16
-0
16 additions, 0 deletions
smash/web/models/mail_template.py
with
16 additions
and
0 deletions
smash/web/models/mail_template.py
+
16
−
0
View file @
a074fd8d
...
...
@@ -111,6 +111,11 @@ class MailTemplate(models.Model):
(
"
##S_VIRUS_4_IGG_STATUS##
"
,
"
IgG Status in visit 4
"
,
""
),
(
"
##S_VIRUS_5_IGG_STATUS##
"
,
"
IgG Status in visit 5
"
,
""
),
(
"
##S_HEALTH_PARTNER_NAME##
"
,
"
Name of the health partner
"
,
""
),
(
"
##S_HEALTH_PARTNER_ADDRESS##
"
,
"
Address of the health partner
"
,
""
),
(
"
##S_HEALTH_PARTNER_ZIP_CODE##
"
,
"
Zip code of the health partner
"
,
""
),
(
"
##S_HEALTH_PARTNER_CITY##
"
,
"
City of the health partner
"
,
""
),
]
MAILS_TEMPLATE_VISIT_TAGS
=
[
...
...
@@ -321,6 +326,17 @@ class MailTemplate(models.Model):
'
##S_MAIL_LANGUAGE##
'
:
str
(
study_subject
.
subject
.
default_written_communication_language
),
'
##S_KNOWN_LANGUAGES##
'
:
"
,
"
.
join
([
l
.
name
for
l
in
study_subject
.
subject
.
languages
.
all
()])
}
if
study_subject
.
health_partner
is
not
None
:
result
[
"
##S_HEALTH_PARTNER_NAME##
"
]
=
str
(
study_subject
.
health_partner
.
name
)
result
[
"
##S_HEALTH_PARTNER_ADDRESS##
"
]
=
str
(
study_subject
.
health_partner
.
address
)
result
[
"
##S_HEALTH_PARTNER_ZIP_CODE##
"
]
=
str
(
study_subject
.
health_partner
.
postal_code
)
result
[
"
##S_HEALTH_PARTNER_CITY##
"
]
=
str
(
study_subject
.
health_partner
.
city
)
else
:
result
[
"
##S_HEALTH_PARTNER_NAME##
"
]
=
""
result
[
"
##S_HEALTH_PARTNER_ADDRESS##
"
]
=
""
result
[
"
##S_HEALTH_PARTNER_ZIP_CODE##
"
]
=
""
result
[
"
##S_HEALTH_PARTNER_CITY##
"
]
=
""
for
i
in
range
(
1
,
6
):
virus_test_field
=
"
##S_VIRUS_{}_RESULT##
"
.
format
(
i
)
virus_test_value
=
virus_test_to_str
(
getattr
(
study_subject
,
"
virus_test_{}
"
.
format
(
i
)),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment