mirror of
https://github.com/sartography/protocol-builder-mock.git
synced 2025-01-12 00:34:44 +00:00
Merge pull request #66 from sartography/418-remove-hsr-number-from-study-edit
remove hsr number from study edit #418
This commit is contained in:
commit
6433e36a8f
24
migrations/versions/42d973f2723f_.py
Normal file
24
migrations/versions/42d973f2723f_.py
Normal file
@ -0,0 +1,24 @@
|
||||
"""Drop HSRNUMBER column from study table
|
||||
|
||||
Revision ID: 42d973f2723f
|
||||
Revises: c1b37c418abd
|
||||
Create Date: 2021-08-16 09:37:36.766180
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '42d973f2723f'
|
||||
down_revision = 'c1b37c418abd'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.drop_column('study', 'HSRNUMBER')
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.add_column('study', sa.Column('HSRNUMBER', sa.String(), nullable=True))
|
@ -184,10 +184,6 @@ components:
|
||||
type: number
|
||||
example: 11770
|
||||
description: The unique id of the study in Protocol Builder. Sometimes referenced as the "HSR Submission number" if you are looking at Protocol Builder
|
||||
HSRNUMBER:
|
||||
type: number
|
||||
example: 15378
|
||||
description: This is the number users use to lookup and reference when talking about non SOM protocols in IRB Online and displayed in more documentation. Its only used in IRB Online. Its not an auto increment.
|
||||
TITLE:
|
||||
type: string
|
||||
format: string
|
||||
|
@ -15,7 +15,6 @@ class StudyForm(FlaskForm):
|
||||
requirements = SelectMultipleField("Documents",
|
||||
render_kw={'class': 'multi'},
|
||||
choices=[(rd.AUXDOCID, rd.AUXDOC) for rd in RequiredDocument.all()])
|
||||
HSRNUMBER = StringField('HSR Number')
|
||||
Q_COMPLETE = SelectField("IRBStatus",
|
||||
choices=[((q.STATUS, q.DETAIL), q.DETAIL) for q in IRBStatus.all()])
|
||||
|
||||
|
@ -66,7 +66,6 @@ class StudySponsorSchema(ma.Schema):
|
||||
|
||||
class Study(db.Model):
|
||||
STUDYID = db.Column(db.Integer, primary_key=True)
|
||||
HSRNUMBER = db.Column(db.String())
|
||||
TITLE = db.Column(db.Text(), nullable=False)
|
||||
NETBADGEID = db.Column(db.String(), nullable=False)
|
||||
DATE_MODIFIED = db.Column(db.DateTime(timezone=True), default=func.now())
|
||||
@ -81,7 +80,7 @@ class Study(db.Model):
|
||||
class StudySchema(ma.Schema):
|
||||
class Meta:
|
||||
# Fields to expose
|
||||
fields = ("STUDYID", "HSRNUMBER", "TITLE", "NETBADGEID",
|
||||
fields = ("STUDYID", "TITLE", "NETBADGEID",
|
||||
"DATE_MODIFIED")
|
||||
|
||||
|
||||
|
@ -85,7 +85,6 @@ def _update_study(study, form):
|
||||
study.TITLE = form.TITLE.data
|
||||
study.NETBADGEID = form.NETBADGEID.data
|
||||
study.DATE_MODIFIED = datetime.datetime.now()
|
||||
study.HSRNUMBER = form.HSRNUMBER.data
|
||||
|
||||
for r in form.requirements:
|
||||
if r.checked:
|
||||
|
Loading…
x
Reference in New Issue
Block a user