imednet.models package
Submodules
imednet.models.codings module
- class imednet.models.codings.Coding(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
siteName (str) –
siteId (int) –
subjectId (int) –
subjectKey (str) –
formId (int) –
formName (str) –
formKey (str) –
revision (int) –
recordId (int) –
variable (str) –
value (str) –
codingId (int) –
code (str) –
codedBy (str) –
reason (str) –
dictionaryName (str) –
dictionaryVersion (str) –
dateCoded (datetime) –
- code: str
- coded_by: str
- coding_id: int
- date_coded: datetime
- dictionary_name: str
- dictionary_version: str
- form_id: int
- form_key: str
- form_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- reason: str
- record_id: int
- revision: int
- site_id: int
- site_name: str
- study_key: str
- subject_id: int
- subject_key: str
- value: str
- variable: str
imednet.models.forms module
- class imednet.models.forms.Form(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
formId (int) –
formKey (str) –
formName (str) –
formType (str) –
revision (int) –
embeddedLog (bool) –
enforceOwnership (bool) –
userAgreement (bool) –
subjectRecordReport (bool) –
unscheduledVisit (bool) –
otherForms (bool) –
eproForm (bool) –
allowCopy (bool) –
disabled (bool) –
dateCreated (datetime) –
dateModified (datetime) –
- allow_copy: bool
- date_created: datetime
- date_modified: datetime
- disabled: bool
- embedded_log: bool
- enforce_ownership: bool
- epro_form: bool
- form_id: int
- form_key: str
- form_name: str
- form_type: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- other_forms: bool
- revision: int
- study_key: str
- subject_record_report: bool
- unscheduled_visit: bool
- user_agreement: bool
imednet.models.intervals module
- class imednet.models.intervals.FormSummary(**data)[source]
Bases:
JsonModel
- Parameters:
formId (int) –
formKey (str) –
formName (str) –
- form_id: int
- form_key: str
- form_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.intervals.Interval(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
intervalId (int) –
intervalName (str) –
intervalDescription (str) –
intervalSequence (int) –
intervalGroupId (int) –
intervalGroupName (str) –
disabled (bool) –
dateCreated (datetime) –
dateModified (datetime) –
timeline (str) –
definedUsingInterval (str) –
windowCalculationForm (str) –
windowCalculationDate (str) –
actualDateForm (str) –
actualDate (str) –
dueDateWillBeIn (int) –
negativeSlack (int) –
positiveSlack (int) –
eproGracePeriod (int) –
forms (List[FormSummary]) –
- actual_date: str
- actual_date_form: str
- date_created: datetime
- date_modified: datetime
- defined_using_interval: str
- disabled: bool
- due_date_will_be_in: int
- epro_grace_period: int
- forms: List[FormSummary]
- interval_description: str
- interval_group_id: int
- interval_group_name: str
- interval_id: int
- interval_name: str
- interval_sequence: int
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- negative_slack: int
- positive_slack: int
- study_key: str
- timeline: str
- window_calculation_date: str
- window_calculation_form: str
imednet.models.jobs module
- class imednet.models.jobs.Job(**data)[source]
Bases:
JsonModel
- Parameters:
jobId (str) –
batchId (str) –
state (str) –
dateCreated (datetime) –
dateStarted (datetime) –
dateFinished (datetime) –
- batch_id: str
- date_created: datetime
- date_finished: datetime
- date_started: datetime
- job_id: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: str
- class imednet.models.jobs.JobStatus(**data)[source]
Bases:
Job
Extended job information returned when polling.
- Parameters:
jobId (str) –
batchId (str) –
state (str) –
dateCreated (datetime) –
dateStarted (datetime) –
dateFinished (datetime) –
progress (int) –
resultUrl (str) –
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- progress: int
- result_url: str
imednet.models.queries module
- class imednet.models.queries.Query(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
subjectId (int) –
subjectOid (str) –
annotationType (str) –
annotationId (int) –
type (str | None) –
description (str) –
recordId (int) –
variable (str) –
subjectKey (str) –
dateCreated (datetime) –
dateModified (datetime) –
queryComments (List[QueryComment]) –
- annotation_id: int
- annotation_type: str
- date_created: datetime
- date_modified: datetime
- description: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- query_comments: List[QueryComment]
- record_id: int
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- type: Optional[str]
- variable: str
- class imednet.models.queries.QueryComment(**data)[source]
Bases:
JsonModel
- Parameters:
sequence (int) –
annotationStatus (str) –
user (str) –
comment (str) –
closed (bool) –
date (datetime) –
- annotation_status: str
- closed: bool
- comment: str
- date: datetime
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- sequence: int
- user: str
imednet.models.record_revisions module
- class imednet.models.record_revisions.RecordRevision(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
recordRevisionId (int) –
recordId (int) –
recordOid (str) –
recordRevision (int) –
dataRevision (int) –
recordStatus (str) –
subjectId (int) –
subjectOid (str) –
subjectKey (str) –
siteId (int) –
formKey (str) –
intervalId (int) –
role (str) –
user (str) –
reasonForChange (str) –
deleted (bool) –
dateCreated (datetime) –
- data_revision: int
- date_created: datetime
- deleted: bool
- form_key: str
- interval_id: int
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- reason_for_change: str
- record_id: int
- record_oid: str
- record_revision: int
- record_revision_id: int
- record_status: str
- role: str
- site_id: int
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- user: str
imednet.models.records module
- class imednet.models.records.BaseRecordRequest(**data)[source]
Bases:
JsonModel
Base class for record creation/update requests.
- Parameters:
formKey (str) –
data (RecordData) –
- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.records.CreateNewRecordRequest(**data)[source]
Bases:
BaseRecordRequest
- Parameters:
formKey (str) –
data (RecordData) –
subjectKey (str) –
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- subject_key: str
- class imednet.models.records.Keyword(**data)[source]
Bases:
JsonModel
A keyword or tag associated with a record.
- Parameters:
keywordName (str) –
keywordKey (str) –
keywordId (int) –
dateAdded (datetime) –
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.records.Record(**data)[source]
Bases:
JsonModel
A data record for a subject, form, and visit.
- Parameters:
studyKey (str) –
intervalId (int) –
formId (int) –
formKey (str) –
siteId (int) –
recordId (int) –
recordOid (str) –
recordType (str) –
recordStatus (str) –
deleted (bool) –
dateCreated (datetime) –
dateModified (datetime) –
subjectId (int) –
subjectOid (str) –
subjectKey (str) –
visitId (int) –
parentRecordId (int) –
keywords (List[Keyword]) –
recordData (Dict[str, Any]) –
- date_created: datetime
- date_modified: datetime
- deleted: bool
- form_id: int
- form_key: str
- interval_id: int
- keywords: List[Keyword]
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parent_record_id: int
- record_data: Dict[str, Any]
- record_id: int
- record_oid: str
- record_status: str
- record_type: str
- site_id: int
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- visit_id: int
- class imednet.models.records.RecordData(root=PydanticUndefined, **data)[source]
Bases:
RootModel[Dict[str, Any]]
Arbitrary record data as a dictionary.
- Parameters:
root (RootModelRootType) –
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.records.RecordJobResponse(**data)[source]
Bases:
JsonModel
Response for a record-related job (batch operations, etc).
- Parameters:
jobId (str) –
batchId (str) –
state (str) –
- batch_id: str
- job_id: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: str
- class imednet.models.records.RegisterSubjectRequest(**data)[source]
Bases:
BaseRecordRequest
- Parameters:
formKey (str) –
data (RecordData) –
siteName (str) –
subjectKey (str) –
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- site_name: str
- subject_key: str
- class imednet.models.records.UpdateScheduledRecordRequest(**data)[source]
Bases:
BaseRecordRequest
- Parameters:
formKey (str) –
data (RecordData) –
subjectKey (str) –
intervalName (str) –
- interval_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- subject_key: str
imednet.models.sites module
- class imednet.models.sites.Site(**data)[source]
Bases:
JsonModel
A site participating in a study.
- Parameters:
studyKey (str) –
siteId (int) –
siteName (str) –
siteEnrollmentStatus (str) –
dateCreated (datetime) –
dateModified (datetime) –
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- site_enrollment_status: str
- site_id: int
- site_name: str
- study_key: str
imednet.models.studies module
- class imednet.models.studies.Study(**data)[source]
Bases:
JsonModel
Represents a clinical study and its metadata.
- Parameters:
sponsorKey (str) –
studyKey (str) –
studyId (int) –
studyName (str) –
studyDescription (str) –
studyType (str) –
dateCreated (datetime) –
dateModified (datetime) –
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- sponsor_key: str
- study_description: str
- study_id: int
- study_key: str
- study_name: str
- study_type: str
imednet.models.subjects module
- class imednet.models.subjects.Subject(**data)[source]
Bases:
JsonModel
A subject (participant) in a study, with status and site info.
- Parameters:
studyKey (str) –
subjectId (int) –
subjectOid (str) –
subjectKey (str) –
subjectStatus (str) –
siteId (int) –
siteName (str) –
deleted (bool) –
enrollmentStartDate (datetime) –
dateCreated (datetime) –
dateModified (datetime) –
keywords (List[SubjectKeyword]) –
- date_created: datetime
- date_modified: datetime
- deleted: bool
- enrollment_start_date: datetime
- keywords: List[SubjectKeyword]
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- site_id: int
- site_name: str
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- subject_status: str
- class imednet.models.subjects.SubjectKeyword(**data)[source]
Bases:
JsonModel
A keyword or tag associated with a subject.
- Parameters:
keywordName (str) –
keywordKey (str) –
keywordId (int) –
dateAdded (datetime) –
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
imednet.models.users module
- class imednet.models.users.Role(**data)[source]
Bases:
JsonModel
- Parameters:
dateCreated (datetime) –
dateModified (datetime) –
roleId (str) –
communityId (int) –
name (str) –
description (str) –
level (int) –
type (str) –
inactive (bool) –
- community_id: int
- date_created: datetime
- date_modified: datetime
- description: str
- inactive: bool
- level: int
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- role_id: str
- type: str
- class imednet.models.users.User(**data)[source]
Bases:
JsonModel
- Parameters:
userId (str) –
login (str) –
firstName (str) –
lastName (str) –
email (str) –
userActiveInStudy (bool) –
roles (List[Role]) –
- email: str
- first_name: str
- last_name: str
- login: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property name: str
A convenience full-name property so you can do user.name instead of f”{user.first_name} {user.last_name}” everywhere.
- roles: List[Role]
- user_active_in_study: bool
- user_id: str
imednet.models.variables module
- class imednet.models.variables.Variable(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
variableId (int) –
variableType (str) –
variableName (str) –
sequence (int) –
revision (int) –
disabled (bool) –
dateCreated (datetime) –
dateModified (datetime) –
formId (int) –
variableOid (str | None) –
deleted (bool) –
formKey (str) –
formName (str) –
label (str) –
blinded (bool) –
- blinded: bool
- date_created: datetime
- date_modified: datetime
- deleted: bool
- disabled: bool
- form_id: int
- form_key: str
- form_name: str
- label: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- revision: int
- sequence: int
- study_key: str
- variable_id: int
- variable_name: str
- variable_oid: Optional[str]
- variable_type: str
imednet.models.visits module
- class imednet.models.visits.Visit(**data)[source]
Bases:
JsonModel
- Parameters:
visitId (int) –
studyKey (str) –
intervalId (int) –
intervalName (str) –
subjectId (int) –
subjectKey (str) –
startDate (datetime | None) –
endDate (datetime | None) –
dueDate (datetime | None) –
visitDate (datetime | None) –
visitDateForm (str) –
visitDateQuestion (str) –
deleted (bool) –
dateCreated (datetime) –
dateModified (datetime) –
- date_created: datetime
- date_modified: datetime
- deleted: bool
- due_date: Optional[datetime]
- end_date: Optional[datetime]
- interval_id: int
- interval_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start_date: Optional[datetime]
- study_key: str
- subject_id: int
- subject_key: str
- visit_date: Optional[datetime]
- visit_date_form: str
- visit_date_question: str
- visit_id: int
Module contents
Models package for the iMedNet SDK.
This package contains all data models used by the SDK to represent iMedNet resources.
- class imednet.models.BaseRecordRequest(**data)[source]
Bases:
JsonModel
Base class for record creation/update requests.
- Parameters:
formKey (str) –
data (RecordData) –
- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.Coding(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
siteName (str) –
siteId (int) –
subjectId (int) –
subjectKey (str) –
formId (int) –
formName (str) –
formKey (str) –
revision (int) –
recordId (int) –
variable (str) –
value (str) –
codingId (int) –
code (str) –
codedBy (str) –
reason (str) –
dictionaryName (str) –
dictionaryVersion (str) –
dateCoded (datetime) –
- code: str
- coded_by: str
- coding_id: int
- date_coded: datetime
- dictionary_name: str
- dictionary_version: str
- form_id: int
- form_key: str
- form_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- reason: str
- record_id: int
- revision: int
- site_id: int
- site_name: str
- study_key: str
- subject_id: int
- subject_key: str
- value: str
- variable: str
- class imednet.models.CreateNewRecordRequest(**data)[source]
Bases:
BaseRecordRequest
- Parameters:
formKey (str) –
data (RecordData) –
subjectKey (str) –
- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- subject_key: str
- class imednet.models.Form(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
formId (int) –
formKey (str) –
formName (str) –
formType (str) –
revision (int) –
embeddedLog (bool) –
enforceOwnership (bool) –
userAgreement (bool) –
subjectRecordReport (bool) –
unscheduledVisit (bool) –
otherForms (bool) –
eproForm (bool) –
allowCopy (bool) –
disabled (bool) –
dateCreated (datetime) –
dateModified (datetime) –
- allow_copy: bool
- date_created: datetime
- date_modified: datetime
- disabled: bool
- embedded_log: bool
- enforce_ownership: bool
- epro_form: bool
- form_id: int
- form_key: str
- form_name: str
- form_type: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- other_forms: bool
- revision: int
- study_key: str
- subject_record_report: bool
- unscheduled_visit: bool
- user_agreement: bool
- class imednet.models.FormStructure(**data)[source]
Bases:
BaseModel
- Parameters:
formId (int) –
formKey (str) –
formName (str) –
formType (str) –
revision (int) –
disabled (bool) –
eproForm (bool) –
allowCopy (bool) –
dateCreated (datetime) –
dateModified (datetime) –
variables (List[Variable]) –
- allow_copy: bool
- date_created: datetime
- date_modified: datetime
- disabled: bool
- epro_form: bool
- form_id: int
- form_key: str
- form_name: str
- form_type: str
- classmethod from_form(form, variables)[source]
Creates FormStructure from a Form model and its associated variables.
- Return type:
- Parameters:
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- revision: int
- variables: List[Variable]
- class imednet.models.FormSummary(**data)[source]
Bases:
JsonModel
- Parameters:
formId (int) –
formKey (str) –
formName (str) –
- form_id: int
- form_key: str
- form_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.Interval(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
intervalId (int) –
intervalName (str) –
intervalDescription (str) –
intervalSequence (int) –
intervalGroupId (int) –
intervalGroupName (str) –
disabled (bool) –
dateCreated (datetime) –
dateModified (datetime) –
timeline (str) –
definedUsingInterval (str) –
windowCalculationForm (str) –
windowCalculationDate (str) –
actualDateForm (str) –
actualDate (str) –
dueDateWillBeIn (int) –
negativeSlack (int) –
positiveSlack (int) –
eproGracePeriod (int) –
forms (List[FormSummary]) –
- actual_date: str
- actual_date_form: str
- date_created: datetime
- date_modified: datetime
- defined_using_interval: str
- disabled: bool
- due_date_will_be_in: int
- epro_grace_period: int
- forms: List[FormSummary]
- interval_description: str
- interval_group_id: int
- interval_group_name: str
- interval_id: int
- interval_name: str
- interval_sequence: int
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- negative_slack: int
- positive_slack: int
- study_key: str
- timeline: str
- window_calculation_date: str
- window_calculation_form: str
- class imednet.models.IntervalStructure(**data)[source]
Bases:
BaseModel
- Parameters:
intervalId (int) –
intervalName (str) –
intervalSequence (int) –
intervalDescription (str) –
intervalGroupName (str) –
disabled (bool) –
dateCreated (datetime) –
dateModified (datetime) –
forms (List[FormStructure]) –
- date_created: datetime
- date_modified: datetime
- disabled: bool
- forms: List[FormStructure]
- classmethod from_interval(interval, forms)[source]
Creates IntervalStructure from an Interval model and its associated FormStructures.
- Return type:
- Parameters:
interval (Interval) –
forms (List[FormStructure]) –
- interval_description: str
- interval_group_name: str
- interval_id: int
- interval_name: str
- interval_sequence: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.Job(**data)[source]
Bases:
JsonModel
- Parameters:
jobId (str) –
batchId (str) –
state (str) –
dateCreated (datetime) –
dateStarted (datetime) –
dateFinished (datetime) –
- batch_id: str
- date_created: datetime
- date_finished: datetime
- date_started: datetime
- job_id: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: str
- class imednet.models.JobStatus(**data)[source]
Bases:
Job
Extended job information returned when polling.
- Parameters:
jobId (str) –
batchId (str) –
state (str) –
dateCreated (datetime) –
dateStarted (datetime) –
dateFinished (datetime) –
progress (int) –
resultUrl (str) –
- batch_id: str
- date_created: datetime
- date_finished: datetime
- date_started: datetime
- job_id: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- progress: int
- result_url: str
- state: str
- class imednet.models.Keyword(**data)[source]
Bases:
JsonModel
A keyword or tag associated with a record.
- Parameters:
keywordName (str) –
keywordKey (str) –
keywordId (int) –
dateAdded (datetime) –
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.Query(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
subjectId (int) –
subjectOid (str) –
annotationType (str) –
annotationId (int) –
type (str | None) –
description (str) –
recordId (int) –
variable (str) –
subjectKey (str) –
dateCreated (datetime) –
dateModified (datetime) –
queryComments (List[QueryComment]) –
- annotation_id: int
- annotation_type: str
- date_created: datetime
- date_modified: datetime
- description: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- query_comments: List[QueryComment]
- record_id: int
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- type: Optional[str]
- variable: str
- class imednet.models.QueryComment(**data)[source]
Bases:
JsonModel
- Parameters:
sequence (int) –
annotationStatus (str) –
user (str) –
comment (str) –
closed (bool) –
date (datetime) –
- annotation_status: str
- closed: bool
- comment: str
- date: datetime
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- sequence: int
- user: str
- class imednet.models.Record(**data)[source]
Bases:
JsonModel
A data record for a subject, form, and visit.
- Parameters:
studyKey (str) –
intervalId (int) –
formId (int) –
formKey (str) –
siteId (int) –
recordId (int) –
recordOid (str) –
recordType (str) –
recordStatus (str) –
deleted (bool) –
dateCreated (datetime) –
dateModified (datetime) –
subjectId (int) –
subjectOid (str) –
subjectKey (str) –
visitId (int) –
parentRecordId (int) –
keywords (List[Keyword]) –
recordData (Dict[str, Any]) –
- date_created: datetime
- date_modified: datetime
- deleted: bool
- form_id: int
- form_key: str
- interval_id: int
- keywords: List[Keyword]
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parent_record_id: int
- record_data: Dict[str, Any]
- record_id: int
- record_oid: str
- record_status: str
- record_type: str
- site_id: int
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- visit_id: int
- class imednet.models.RecordData(root=PydanticUndefined, **data)[source]
Bases:
RootModel[Dict[str, Any]]
Arbitrary record data as a dictionary.
- Parameters:
root (RootModelRootType) –
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- root: RootModelRootType
- class imednet.models.RecordJobResponse(**data)[source]
Bases:
JsonModel
Response for a record-related job (batch operations, etc).
- Parameters:
jobId (str) –
batchId (str) –
state (str) –
- batch_id: str
- job_id: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- state: str
- class imednet.models.RecordRevision(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
recordRevisionId (int) –
recordId (int) –
recordOid (str) –
recordRevision (int) –
dataRevision (int) –
recordStatus (str) –
subjectId (int) –
subjectOid (str) –
subjectKey (str) –
siteId (int) –
formKey (str) –
intervalId (int) –
role (str) –
user (str) –
reasonForChange (str) –
deleted (bool) –
dateCreated (datetime) –
- data_revision: int
- date_created: datetime
- deleted: bool
- form_key: str
- interval_id: int
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- reason_for_change: str
- record_id: int
- record_oid: str
- record_revision: int
- record_revision_id: int
- record_status: str
- role: str
- site_id: int
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- user: str
- class imednet.models.RegisterSubjectRequest(**data)[source]
Bases:
BaseRecordRequest
- Parameters:
formKey (str) –
data (RecordData) –
siteName (str) –
subjectKey (str) –
- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- site_name: str
- subject_key: str
- class imednet.models.Role(**data)[source]
Bases:
JsonModel
- Parameters:
dateCreated (datetime) –
dateModified (datetime) –
roleId (str) –
communityId (int) –
name (str) –
description (str) –
level (int) –
type (str) –
inactive (bool) –
- community_id: int
- date_created: datetime
- date_modified: datetime
- description: str
- inactive: bool
- level: int
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- role_id: str
- type: str
- class imednet.models.Site(**data)[source]
Bases:
JsonModel
A site participating in a study.
- Parameters:
studyKey (str) –
siteId (int) –
siteName (str) –
siteEnrollmentStatus (str) –
dateCreated (datetime) –
dateModified (datetime) –
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- site_enrollment_status: str
- site_id: int
- site_name: str
- study_key: str
- class imednet.models.Study(**data)[source]
Bases:
JsonModel
Represents a clinical study and its metadata.
- Parameters:
sponsorKey (str) –
studyKey (str) –
studyId (int) –
studyName (str) –
studyDescription (str) –
studyType (str) –
dateCreated (datetime) –
dateModified (datetime) –
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- sponsor_key: str
- study_description: str
- study_id: int
- study_key: str
- study_name: str
- study_type: str
- class imednet.models.StudyStructure(**data)[source]
Bases:
BaseModel
- Parameters:
studyKey (str) –
intervals (List[IntervalStructure]) –
- intervals: List[IntervalStructure]
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- study_key: str
- class imednet.models.Subject(**data)[source]
Bases:
JsonModel
A subject (participant) in a study, with status and site info.
- Parameters:
studyKey (str) –
subjectId (int) –
subjectOid (str) –
subjectKey (str) –
subjectStatus (str) –
siteId (int) –
siteName (str) –
deleted (bool) –
enrollmentStartDate (datetime) –
dateCreated (datetime) –
dateModified (datetime) –
keywords (List[SubjectKeyword]) –
- date_created: datetime
- date_modified: datetime
- deleted: bool
- enrollment_start_date: datetime
- keywords: List[SubjectKeyword]
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- site_id: int
- site_name: str
- study_key: str
- subject_id: int
- subject_key: str
- subject_oid: str
- subject_status: str
- class imednet.models.SubjectKeyword(**data)[source]
Bases:
JsonModel
A keyword or tag associated with a subject.
- Parameters:
keywordName (str) –
keywordKey (str) –
keywordId (int) –
dateAdded (datetime) –
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.UpdateScheduledRecordRequest(**data)[source]
Bases:
BaseRecordRequest
- Parameters:
formKey (str) –
data (RecordData) –
subjectKey (str) –
intervalName (str) –
- data: RecordData
- form_key: str
- interval_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- subject_key: str
- class imednet.models.User(**data)[source]
Bases:
JsonModel
- Parameters:
userId (str) –
login (str) –
firstName (str) –
lastName (str) –
email (str) –
userActiveInStudy (bool) –
roles (List[Role]) –
- email: str
- first_name: str
- last_name: str
- login: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property name: str
A convenience full-name property so you can do user.name instead of f”{user.first_name} {user.last_name}” everywhere.
- roles: List[Role]
- user_active_in_study: bool
- user_id: str
- class imednet.models.Variable(**data)[source]
Bases:
JsonModel
- Parameters:
studyKey (str) –
variableId (int) –
variableType (str) –
variableName (str) –
sequence (int) –
revision (int) –
disabled (bool) –
dateCreated (datetime) –
dateModified (datetime) –
formId (int) –
variableOid (str | None) –
deleted (bool) –
formKey (str) –
formName (str) –
label (str) –
blinded (bool) –
- blinded: bool
- date_created: datetime
- date_modified: datetime
- deleted: bool
- disabled: bool
- form_id: int
- form_key: str
- form_name: str
- label: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- revision: int
- sequence: int
- study_key: str
- variable_id: int
- variable_name: str
- variable_oid: Optional[str]
- variable_type: str
- class imednet.models.Visit(**data)[source]
Bases:
JsonModel
- Parameters:
visitId (int) –
studyKey (str) –
intervalId (int) –
intervalName (str) –
subjectId (int) –
subjectKey (str) –
startDate (datetime | None) –
endDate (datetime | None) –
dueDate (datetime | None) –
visitDate (datetime | None) –
visitDateForm (str) –
visitDateQuestion (str) –
deleted (bool) –
dateCreated (datetime) –
dateModified (datetime) –
- date_created: datetime
- date_modified: datetime
- deleted: bool
- due_date: Optional[datetime]
- end_date: Optional[datetime]
- interval_id: int
- interval_name: str
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start_date: Optional[datetime]
- study_key: str
- subject_id: int
- subject_key: str
- visit_date: Optional[datetime]
- visit_date_form: str
- visit_date_question: str
- visit_id: int
- imednet.models.parse_bool(v)[source]
Normalize boolean values from various representations. Accepts bool, str, int, float and returns a bool.
- Return type:
bool
- Parameters:
v (Any) –
- imednet.models.parse_datetime(v)[source]
Parse an ISO datetime string or return a sentinel value.
The SDK historically returns
datetime(1969, 4, 20, 16, 20)
when a timestamp field is empty. This helper mirrors that behaviour for backward compatibility.- Return type:
datetime
- Parameters:
v (str | datetime) –
- imednet.models.parse_dict_or_default(v, default_factory=<class 'dict'>)[source]
Normalize dictionary values, defaulting if None. Ensures result is a dict.
- Return type:
Dict
[str
,Any
]- Parameters:
v (Any) –
default_factory (Callable[[], Dict[str, Any]]) –
- imednet.models.parse_int_or_default(v, default=0, strict=False)[source]
Normalize integer values, defaulting if None or empty string. If strict=True, raise ValueError on parse failure.
- Return type:
int
- Parameters:
v (Any) –
default (int) –
strict (bool) –