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:
Dan Funk 2021-08-17 10:31:57 -04:00 committed by GitHub
commit 6433e36a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 8 deletions

View 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))

View File

@ -184,10 +184,6 @@ components:
type: number type: number
example: 11770 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 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: TITLE:
type: string type: string
format: string format: string

View File

@ -15,7 +15,6 @@ class StudyForm(FlaskForm):
requirements = SelectMultipleField("Documents", requirements = SelectMultipleField("Documents",
render_kw={'class': 'multi'}, render_kw={'class': 'multi'},
choices=[(rd.AUXDOCID, rd.AUXDOC) for rd in RequiredDocument.all()]) choices=[(rd.AUXDOCID, rd.AUXDOC) for rd in RequiredDocument.all()])
HSRNUMBER = StringField('HSR Number')
Q_COMPLETE = SelectField("IRBStatus", Q_COMPLETE = SelectField("IRBStatus",
choices=[((q.STATUS, q.DETAIL), q.DETAIL) for q in IRBStatus.all()]) choices=[((q.STATUS, q.DETAIL), q.DETAIL) for q in IRBStatus.all()])

View File

@ -66,7 +66,6 @@ class StudySponsorSchema(ma.Schema):
class Study(db.Model): class Study(db.Model):
STUDYID = db.Column(db.Integer, primary_key=True) STUDYID = db.Column(db.Integer, primary_key=True)
HSRNUMBER = db.Column(db.String())
TITLE = db.Column(db.Text(), nullable=False) TITLE = db.Column(db.Text(), nullable=False)
NETBADGEID = db.Column(db.String(), nullable=False) NETBADGEID = db.Column(db.String(), nullable=False)
DATE_MODIFIED = db.Column(db.DateTime(timezone=True), default=func.now()) DATE_MODIFIED = db.Column(db.DateTime(timezone=True), default=func.now())
@ -81,7 +80,7 @@ class Study(db.Model):
class StudySchema(ma.Schema): class StudySchema(ma.Schema):
class Meta: class Meta:
# Fields to expose # Fields to expose
fields = ("STUDYID", "HSRNUMBER", "TITLE", "NETBADGEID", fields = ("STUDYID", "TITLE", "NETBADGEID",
"DATE_MODIFIED") "DATE_MODIFIED")

View File

@ -85,7 +85,6 @@ def _update_study(study, form):
study.TITLE = form.TITLE.data study.TITLE = form.TITLE.data
study.NETBADGEID = form.NETBADGEID.data study.NETBADGEID = form.NETBADGEID.data
study.DATE_MODIFIED = datetime.datetime.now() study.DATE_MODIFIED = datetime.datetime.now()
study.HSRNUMBER = form.HSRNUMBER.data
for r in form.requirements: for r in form.requirements:
if r.checked: if r.checked: