Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into release-2-9-0
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrycampion committed Jan 11, 2024
2 parents b7851dc + 78f1c2d commit 4a8d188
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 36 deletions.
30 changes: 18 additions & 12 deletions docs/USDM_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -1906,14 +1906,14 @@
},
"instanceType": {
"const": "GeographicScope",
"title": "Instancetype"
"title": "Instancetype",
"default": "GeographicScope"
}
},
"type": "object",
"required": [
"id",
"type",
"instanceType"
"type"
],
"title": "GeographicScope"
},
Expand All @@ -1939,14 +1939,14 @@
},
"instanceType": {
"const": "GeographicScope",
"title": "Instancetype"
"title": "Instancetype",
"default": "GeographicScope"
}
},
"type": "object",
"required": [
"id",
"type",
"instanceType"
"type"
],
"title": "GeographicScope"
},
Expand Down Expand Up @@ -4857,7 +4857,11 @@
"default": []
},
"administrations": {
"$ref": "#/components/schemas/AgentAdministration-Input"
"items": {
"$ref": "#/components/schemas/AgentAdministration-Input"
},
"type": "array",
"title": "Administrations"
},
"productDesignation": {
"$ref": "#/components/schemas/Code"
Expand Down Expand Up @@ -4936,7 +4940,11 @@
"default": []
},
"administrations": {
"$ref": "#/components/schemas/AgentAdministration-Output"
"items": {
"$ref": "#/components/schemas/AgentAdministration-Output"
},
"type": "array",
"title": "Administrations"
},
"productDesignation": {
"$ref": "#/components/schemas/Code"
Expand Down Expand Up @@ -5446,8 +5454,7 @@
"title": "Instancetype"
},
"quantity": {
"type": "string",
"title": "Quantity"
"$ref": "#/components/schemas/Quantity"
}
},
"type": "object",
Expand Down Expand Up @@ -5484,8 +5491,7 @@
"title": "Instancetype"
},
"quantity": {
"type": "string",
"title": "Quantity"
"$ref": "#/components/schemas/Quantity"
}
},
"type": "object",
Expand Down
20 changes: 12 additions & 8 deletions docs/USDM_API.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1230,11 +1230,11 @@ components:
instanceType:
const: GeographicScope
title: Instancetype
default: GeographicScope
type: object
required:
- id
- type
- instanceType
title: GeographicScope
GeographicScope-Output:
properties:
Expand All @@ -1251,11 +1251,11 @@ components:
instanceType:
const: GeographicScope
title: Instancetype
default: GeographicScope
type: object
required:
- id
- type
- instanceType
title: GeographicScope
GovernanceDate-Input:
properties:
Expand Down Expand Up @@ -3122,7 +3122,10 @@ components:
title: Codes
default: []
administrations:
$ref: '#/components/schemas/AgentAdministration-Input'
items:
$ref: '#/components/schemas/AgentAdministration-Input'
type: array
title: Administrations
productDesignation:
$ref: '#/components/schemas/Code'
pharmacologicClass:
Expand Down Expand Up @@ -3175,7 +3178,10 @@ components:
title: Codes
default: []
administrations:
$ref: '#/components/schemas/AgentAdministration-Output'
items:
$ref: '#/components/schemas/AgentAdministration-Output'
type: array
title: Administrations
productDesignation:
$ref: '#/components/schemas/Code'
pharmacologicClass:
Expand Down Expand Up @@ -3522,8 +3528,7 @@ components:
const: SubjectEnrollment
title: Instancetype
quantity:
type: string
title: Quantity
$ref: '#/components/schemas/Quantity'
type: object
required:
- id
Expand All @@ -3547,8 +3552,7 @@ components:
const: SubjectEnrollment
title: Instancetype
quantity:
type: string
title: Quantity
$ref: '#/components/schemas/Quantity'
type: object
required:
- id
Expand Down
10 changes: 5 additions & 5 deletions model/administration_duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from typing import Literal

class AdministrationDuration(ApiBaseModelWithId):
quantity: Quantity
description: str
durationWillVary: bool
reasonDurationWillVary: str
instanceType: Literal['AdministrationDuration']
quantity: Quantity
description: str
durationWillVary: bool
reasonDurationWillVary: str
instanceType: Literal['AdministrationDuration']
10 changes: 5 additions & 5 deletions model/agent_administration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from typing import Literal

class AgentAdministration(ApiBaseModelWithIdNameLabelAndDesc):
duration: AdministrationDuration
dose: Quantity
route: Code
frequency: Code
instanceType: Literal['AgentAdministration']
duration: AdministrationDuration
dose: Quantity
route: Code
frequency: Code
instanceType: Literal['AgentAdministration']
2 changes: 1 addition & 1 deletion model/code.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .api_base_model import ApiBaseModelWithId
from typing import Literal
from .api_base_model import ApiBaseModelWithId

class Code(ApiBaseModelWithId):
code: str
Expand Down
3 changes: 2 additions & 1 deletion model/geographic_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
from .api_base_model import ApiBaseModelWithId
from .code import Code
from .alias_code import AliasCode
from .quantity import Quantity

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

class SubjectEnrollment(GeographicScope):
quantity: str
quantity: Quantity
instanceType: Literal['SubjectEnrollment']
2 changes: 1 addition & 1 deletion model/intercurrent_event.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc
from typing import Literal
from .api_base_model import ApiBaseModelWithIdNameLabelAndDesc

class IntercurrentEvent(ApiBaseModelWithIdNameLabelAndDesc):
strategy: str
Expand Down
2 changes: 1 addition & 1 deletion model/response_code.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Literal
from .api_base_model import ApiBaseModelWithId
from .code import Code
from typing import Literal

class ResponseCode(ApiBaseModelWithId):
isEnabled: bool
Expand Down
2 changes: 1 addition & 1 deletion model/study_identifier.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Literal
from .api_base_model import ApiBaseModelWithId
from .organization import Organization
from typing import Literal

class StudyIdentifier(ApiBaseModelWithId):
studyIdentifier: str
Expand Down
2 changes: 1 addition & 1 deletion model/study_intervention.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class StudyIntervention(ApiBaseModelWithIdNameLabelAndDesc):
type: Code
minimumResponseDuration: Quantity
codes: List[Code] = []
administrations: AgentAdministration
administrations: List[AgentAdministration]
productDesignation: Code
pharmacologicClass: Code
instanceType: Literal['StudyIntervention']

0 comments on commit 4a8d188

Please sign in to comment.