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
71f43092
Commit
71f43092
authored
5 years ago
by
Carlos Vega
Browse files
Options
Downloads
Patches
Plain Diff
added redcap_columns field to study model
parent
24edf382
No related branches found
No related tags found
1 merge request
!224
Feature/selectable redcap fields
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/migrations/0140_auto_20190528_0953.py
+39
-0
39 additions, 0 deletions
smash/web/migrations/0140_auto_20190528_0953.py
smash/web/models/study.py
+6
-1
6 additions, 1 deletion
smash/web/models/study.py
with
45 additions
and
1 deletion
smash/web/migrations/0140_auto_20190528_0953.py
0 → 100644
+
39
−
0
View file @
71f43092
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2019-05-28 09:53
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
web
'
,
'
0139_auto_20190321_1400
'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'
StudyRedCapColumns
'
,
fields
=
[
(
'
id
'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'
ID
'
)),
(
'
sex
'
,
models
.
BooleanField
(
default
=
True
,
verbose_name
=
b
'
Sex
'
)),
(
'
date_born
'
,
models
.
BooleanField
(
default
=
True
,
verbose_name
=
b
'
Date of birth
'
)),
(
'
dead
'
,
models
.
BooleanField
(
default
=
True
,
verbose_name
=
b
'
Dead
'
)),
(
'
mpower_id
'
,
models
.
BooleanField
(
default
=
True
,
verbose_name
=
b
'
MPower ID
'
)),
(
'
languages
'
,
models
.
BooleanField
(
default
=
True
,
verbose_name
=
b
'
Languages
'
)),
],
),
migrations
.
RunSQL
(
'
insert into web_studyredcapcolumns (sex,
'
+
'
date_born,
'
+
'
dead,
'
+
'
mpower_id,
'
+
'
languages
'
+
'
) values(true, true, true, true, true)
'
),
migrations
.
AddField
(
model_name
=
'
study
'
,
name
=
'
redcap_columns
'
,
field
=
models
.
OneToOneField
(
default
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'
web.StudyRedCapColumns
'
),
preserve_default
=
False
,
),
]
This diff is collapsed.
Click to expand it.
smash/web/models/study.py
+
6
−
1
View file @
71f43092
# coding=utf-8
# coding=utf-8
from
django.db
import
models
from
django.db
import
models
from
web.models
import
StudyColumns
,
StudyNotificationParameters
from
web.models
import
StudyColumns
,
StudyNotificationParameters
,
StudyRedCapColumns
from
django.core.validators
import
MaxValueValidator
,
MinValueValidator
from
django.core.validators
import
MaxValueValidator
,
MinValueValidator
import
re
import
re
...
@@ -33,6 +33,11 @@ class Study(models.Model):
...
@@ -33,6 +33,11 @@ class Study(models.Model):
on_delete
=
models
.
CASCADE
,
on_delete
=
models
.
CASCADE
,
)
)
redcap_columns
=
models
.
OneToOneField
(
StudyRedCapColumns
,
on_delete
=
models
.
CASCADE
,
)
auto_create_follow_up
=
models
.
BooleanField
(
auto_create_follow_up
=
models
.
BooleanField
(
default
=
True
,
default
=
True
,
verbose_name
=
"
Auto create follow up visit
"
verbose_name
=
"
Auto create follow up 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