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
b653cfea
Commit
b653cfea
authored
4 years ago
by
Carlos Vega
Browse files
Options
Downloads
Patches
Plain Diff
create provenance for finished visits (only if is_finished changes)
parent
89806f53
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!249
More provenance #328
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/redcap_connector.py
+11
-2
11 additions, 2 deletions
smash/web/redcap_connector.py
with
11 additions
and
2 deletions
smash/web/redcap_connector.py
+
11
−
2
View file @
b653cfea
...
...
@@ -206,8 +206,17 @@ class RedcapConnector(object):
status
=
Appointment
.
APPOINTMENT_STATUS_SCHEDULED
)
for
smasch_appointment
in
smasch_appointments
:
smasch_appointment
.
mark_as_finished
()
smasch_appointment
.
visit
.
is_finished
=
True
smasch_appointment
.
visit
.
save
()
if
smasch_appointment
.
visit
.
is_finished
!=
True
:
description
=
u
'
{} changed from
"
{}
"
to
"
{}
"'
.
format
(
'
is_finished
'
,
smasch_appointment
.
visit
.
is_finished
,
True
)
p
=
Provenance
(
modified_table
=
Visit
.
_meta
.
db_table
,
modified_table_id
=
smasch_appointment
.
visit
.
id
,
modification_author
=
self
.
importer_user
,
previous_value
=
smasch_appointment
.
visit
.
is_finished
,
new_value
=
True
,
modification_description
=
description
,
modified_field
=
'
is_finished
'
)
smasch_appointment
.
visit
.
is_finished
=
True
smasch_appointment
.
visit
.
save
()
if
visit
.
virus
is
not
None
or
visit
.
virus_inconclusive
:
if
visit
.
visit_number
==
1
and
subject
.
virus_test_1
!=
visit
.
virus
:
subject
.
virus_test_1
=
visit
.
virus
...
...
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