Skip to content

Commit 688f6a5

Browse files
Merge pull request #5 from data4knowledge/api-sprint-5
Api sprint 5
2 parents 711e6f1 + a064ded commit 688f6a5

11 files changed

Lines changed: 725 additions & 526 deletions

factory/factory.py

Lines changed: 283 additions & 168 deletions
Large diffs are not rendered by default.

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from model.transition_rule import *
1616
from model.encounter import *
1717

18-
VERSION = "1.4 Provisional (0.28)"
18+
VERSION = "1.5 Provisional (0.29)"
1919
SYSTEM_NAME = "Simple API for DDF"
2020

2121
tags_metadata = [

model/activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ class Activity(ApiBaseModel):
1414
definedProcedures: List[Procedure] = []
1515
studyDataCollection: List[StudyData] = []
1616
activityIsOptional: bool
17-
activityIsOptionalReason: str
17+
activityIsOptionalReason: Union[str, None] = None

model/address.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from .api_base_model import ApiBaseModel
2+
3+
class Address(ApiBaseModel):
4+
5+
text: str
6+
line: str
7+
city: str
8+
district: str
9+
state: str
10+
postalCode: str
11+
country: str

model/organisation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
from typing import Union
2-
from uuid import UUID
32
from .api_base_model import ApiBaseModel
43
from .code import Code
4+
from .address import Address
55

66
class Organisation(ApiBaseModel):
77
organizationId: str
88
organisationIdentifierScheme: str
99
organisationIdentifier: str
1010
organisationName: str
1111
organisationType: Code
12+
organizationLegalAddress: Union[Address, None] = None
1213

1314
@classmethod
1415
def global_reuse(cls):

model/study.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Study(ApiBaseModel):
1717
studyIdentifiers: List[StudyIdentifier] = []
1818
studyProtocolVersions: List[StudyProtocolVersion] = []
1919
studyDesigns: List[StudyDesign] = []
20+
studyRationale: str
21+
studyAcronym: str
2022

2123
@classmethod
2224
def scope_reuse(cls):

model/study_design.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class StudyDesign(ApiBaseModel):
3232
studyEstimands: List[Estimand] = []
3333
encounters: List[Encounter] = []
3434
activities: List[Activity] = []
35+
studyDesignRationale: str
3536

3637
@classmethod
3738
def search(cls, store, uuid):

model/study_design_population.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
from .api_base_model import ApiBaseModel
2+
from typing import List
3+
from .code import Code
24

35
class StudyDesignPopulation(ApiBaseModel):
46
studyDesignPopulationId: str
57
populationDescription: str
8+
plannedNumberOfParticipants: int
9+
plannedMaximumAgeOfParticipants: str
10+
plannedMinimumAgeOfParticipants: str
11+
plannedSexOfParticipants: List[Code] = []

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
fastapi
22
deta
33
pyyaml
4-
pandas
4+
pandas
5+
Faker

0 commit comments

Comments
 (0)