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
20a24be6
Commit
20a24be6
authored
5 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
redcap puts inconclusive virus results
parent
989043da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!245
Resolve "mail about virus test results"
Pipeline
#25470
passed
5 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/redcap_connector.py
+18
-0
18 additions, 0 deletions
smash/web/redcap_connector.py
with
18 additions
and
0 deletions
smash/web/redcap_connector.py
+
18
−
0
View file @
20a24be6
...
@@ -43,6 +43,7 @@ class RedcapSubject(object):
...
@@ -43,6 +43,7 @@ class RedcapSubject(object):
class
RedcapVisit
(
object
):
class
RedcapVisit
(
object
):
virus
=
None
virus
=
None
virus_inconclusive
=
False
visit_number
=
0
visit_number
=
0
...
@@ -218,6 +219,21 @@ class RedcapConnector(object):
...
@@ -218,6 +219,21 @@ class RedcapConnector(object):
subject
.
virus_test_5
=
visit
.
virus
subject
.
virus_test_5
=
visit
.
virus
subject
.
virus_test_5_updated
=
datetime
.
datetime
.
now
()
subject
.
virus_test_5_updated
=
datetime
.
datetime
.
now
()
subject
.
save
()
subject
.
save
()
if
visit
.
visit_number
==
1
and
subject
.
virus_test_1_updated
is
None
and
visit
.
virus_inconclusive
:
subject
.
virus_test_1_updated
=
datetime
.
datetime
.
now
()
subject
.
save
()
if
visit
.
visit_number
==
2
and
subject
.
virus_test_2_updated
is
None
and
visit
.
virus_inconclusive
:
subject
.
virus_test_2_updated
=
datetime
.
datetime
.
now
()
subject
.
save
()
if
visit
.
visit_number
==
3
and
subject
.
virus_test_3_updated
is
None
and
visit
.
virus_inconclusive
:
subject
.
virus_test_3_updated
=
datetime
.
datetime
.
now
()
subject
.
save
()
if
visit
.
visit_number
==
4
and
subject
.
virus_test_4_updated
is
None
and
visit
.
virus_inconclusive
:
subject
.
virus_test_4_updated
=
datetime
.
datetime
.
now
()
subject
.
save
()
if
visit
.
visit_number
==
5
and
subject
.
virus_test_5_updated
is
None
and
visit
.
virus_inconclusive
:
subject
.
virus_test_5_updated
=
datetime
.
datetime
.
now
()
subject
.
save
()
return
result
return
result
...
@@ -330,6 +346,8 @@ class RedcapConnector(object):
...
@@ -330,6 +346,8 @@ class RedcapConnector(object):
visit
.
virus
=
False
visit
.
virus
=
False
elif
row
.
get
(
self
.
virus_field
)
==
"
Positive
"
:
elif
row
.
get
(
self
.
virus_field
)
==
"
Positive
"
:
visit
.
virus
=
True
visit
.
virus
=
True
elif
row
.
get
(
self
.
virus_field
)
==
"
Inconclusive
"
:
visit
.
virus_inconclusive
=
True
if
self
.
sample_date_field
!=
""
:
if
self
.
sample_date_field
!=
""
:
if
row
.
get
(
self
.
sample_date_field
)
!=
""
:
if
row
.
get
(
self
.
sample_date_field
)
!=
""
:
redcap_subject
.
visits
.
append
(
visit
)
redcap_subject
.
visits
.
append
(
visit
)
...
...
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