Skip to content

Commit 295bb12

Browse files
committed
Updates for PersonName, QuantityRange, ResponseCode, StudyAmendment (DDF-RA #653, #648, #643, #637)
1 parent 74ffffd commit 295bb12

9 files changed

Lines changed: 651 additions & 213 deletions

docs/USDM_API.json

Lines changed: 378 additions & 136 deletions
Large diffs are not rendered by default.

docs/USDM_API.yaml

Lines changed: 242 additions & 64 deletions
Large diffs are not rendered by default.

model/assigned_person.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
from typing import Union, List, Literal
1+
from typing import Union, Literal
22
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
3+
from .person_name import PersonName
34

45
class AssignedPerson(ApiBaseModelWithIdNameLabelAndDesc):
6+
personName: PersonName
57
jobTitle: str
68
organizationId: Union[str, None] = None
79
instanceType: Literal['AssignedPerson']

model/person_name.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from typing import Union, List, Literal
2+
from .api_base_model import ApiBaseModelWithId
3+
4+
class PersonName(ApiBaseModelWithId):
5+
text: Union[str, None] = None
6+
familyName: Union[str, None] = None
7+
givenNames: List[str] = []
8+
namePrefixes: List[str] = []
9+
nameSuffixes: List[str] = []
10+
instanceType: Literal['PersonName']

model/population_definition.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
44
from .code import Code
55
from .range import Range
6-
from .quantity import Quantity
6+
from .quantity_range import QuantityRange
77
from .characteristic import Characteristic
88
from .comment_annotation import CommentAnnotation
99

1010
class PopulationDefinition(ApiBaseModelWithIdNameLabelAndDesc):
1111
includesHealthySubjects: bool
12-
plannedEnrollmentNumberRange: Union[Range, None] = None
13-
plannedEnrollmentNumberQuantity: Union[Quantity, None] = None
14-
plannedCompletionNumberRange: Union[Range, None] = None
15-
plannedCompletionNumberQuantity: Union[Quantity, None] = None
12+
plannedEnrollmentNumber: Union[QuantityRange, None] = None
13+
plannedCompletionNumber: Union[QuantityRange, None] = None
1614
plannedSex: Annotated[List[Code], Len(min_length=0, max_length=2)] = []
1715
criterionIds: List[str] = []
1816
plannedAge: Union[Range, None] = None

model/quantity_range.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from typing import Literal, Union
2+
from .api_base_model import ApiBaseModelWithId
3+
from .quantity import Quantity
4+
from .range import Range
5+
6+
class QuantityRange(ApiBaseModelWithId):
7+
quantity: Union[Quantity, None] = None
8+
range: Union[Range, None] = None
9+
instanceType: Literal['QuantityRange']

model/response_code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from typing import Literal
2-
from .api_base_model import ApiBaseModelWithId
2+
from .api_base_model import ApiBaseModelWithIdNameAndLabel
33
from .code import Code
44

5-
class ResponseCode(ApiBaseModelWithId):
5+
class ResponseCode(ApiBaseModelWithIdNameAndLabel):
66
isEnabled: bool
77
code: Code
88
instanceType: Literal['ResponseCode']

model/strength.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from typing import Literal, Union
22
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
33
from .quantity import Quantity
4-
from .range import Range
4+
from .quantity_range import QuantityRange
55

66
class Strength(ApiBaseModelWithIdNameLabelAndDesc):
7+
numerator: QuantityRange
78
denominator: Union[Quantity, None] = None
8-
numeratorQuantity: Union[Quantity, None] = None
9-
numeratorRange: Union[Range, None] = None
109
instanceType: Literal['Strength']

model/study_amendment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from typing import Union, List, Literal
2-
from .api_base_model import ApiBaseModelWithId
2+
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
33
from .study_amendment_reason import StudyAmendmentReason
44
from .study_change import StudyChange
55
from .study_amendment_impact import StudyAmendmentImpact
@@ -8,7 +8,7 @@
88
from .governance_date import GovernanceDate
99
from .comment_annotation import CommentAnnotation
1010

11-
class StudyAmendment(ApiBaseModelWithId):
11+
class StudyAmendment(ApiBaseModelWithIdNameLabelAndDesc):
1212
number: str
1313
summary: str
1414
primaryReason: StudyAmendmentReason

0 commit comments

Comments
 (0)