Skip to content

Commit

Permalink
Protocol Amendment changes, tweak cardinality in Masking
Browse files Browse the repository at this point in the history
  • Loading branch information
ASL-rmarshall committed Sep 26, 2024
1 parent b381595 commit f9e8b34
Show file tree
Hide file tree
Showing 10 changed files with 673 additions and 103 deletions.
414 changes: 362 additions & 52 deletions docs/USDM_API.json

Large diffs are not rendered by default.

293 changes: 256 additions & 37 deletions docs/USDM_API.yaml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions model/document_content_reference.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from typing import Literal
from .api_base_model import ApiBaseModelWithId

class DocumentContentReference(ApiBaseModelWithId):
sectionNumber: str
sectionTitle: str
instanceType: Literal['DocumentContentReference']
7 changes: 0 additions & 7 deletions model/geographic_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@
from .api_base_model import ApiBaseModelWithId
from .code import Code
from .alias_code import AliasCode
from .quantity import Quantity
from .study_site import StudySite

class GeographicScope(ApiBaseModelWithId):
type: Code
code: Union[AliasCode, None] = None
instanceType: Literal['GeographicScope']

class SubjectEnrollment(GeographicScope):
quantity: Quantity
appliesTo: Union[StudySite, None] = None
instanceType: Literal['SubjectEnrollment']
6 changes: 3 additions & 3 deletions model/masking.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .api_base_model import ApiBaseModelWithIdAndDesc
from .code import Code
from typing import Literal
from .api_base_model import ApiBaseModelWithId

class Masking(ApiBaseModelWithIdAndDesc):
class Masking(ApiBaseModelWithId):
description: str
instanceType: Literal['Masking']
15 changes: 12 additions & 3 deletions model/study_amendment.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
from typing import Union, List, Literal
from .api_base_model import ApiBaseModelWithId
from .study_amendment_reason import StudyAmendmentReason
from .geographic_scope import SubjectEnrollment
from .study_change import StudyChange
from .study_amendment_impact import StudyAmendmentImpact
from .geographic_scope import GeographicScope
from .subject_enrollment import SubjectEnrollment
from .governance_date import GovernanceDate
from .comment_annotation import CommentAnnotation

class StudyAmendment(ApiBaseModelWithId):
number: str
summary: str
substantialImpact: bool
primaryReason: StudyAmendmentReason
secondaryReasons: List[StudyAmendmentReason] = []
enrollments: List[SubjectEnrollment]
changes: List[StudyChange]
impacts: List[StudyAmendmentImpact] = []
geographicScopes: List[GeographicScope]
enrollments: List[SubjectEnrollment] = []
dateValues: List[GovernanceDate] = []
previousId: Union[str, None] = None
notes: List[CommentAnnotation] = []
instanceType: Literal['StudyAmendment']
11 changes: 11 additions & 0 deletions model/study_amendment_impact.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from typing import Literal, Union, List
from .api_base_model import ApiBaseModelWithId
from .code import Code
from .comment_annotation import CommentAnnotation

class StudyAmendmentImpact(ApiBaseModelWithId):
type: Code
description: str
isSubstantial: bool
notes: List[CommentAnnotation] = []
instanceType: Literal['StudyAmendmentImpact']
9 changes: 9 additions & 0 deletions model/study_change.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from typing import List, Literal
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
from .document_content_reference import DocumentContentReference

class StudyChange(ApiBaseModelWithIdNameLabelAndDesc):
text: str
rationale: str
changedSections: List[DocumentContentReference]
instanceType: Literal['StudyChange']
4 changes: 3 additions & 1 deletion model/study_site.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Literal
from typing import Literal, Union
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
from .code import Code

class StudySite(ApiBaseModelWithIdNameLabelAndDesc):
country: Code
instanceType: Literal['StudySite']
10 changes: 10 additions & 0 deletions model/subject_enrollment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from typing import Literal, Union
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
from .quantity import Quantity
from .geographic_scope import GeographicScope

class SubjectEnrollment(ApiBaseModelWithIdNameLabelAndDesc):
quantity: Quantity
appliesTo: Union[GeographicScope, None] = None
appliesToId: Union[str, None] = None
instanceType: Literal['SubjectEnrollment']

0 comments on commit f9e8b34

Please sign in to comment.