imednet.models package
Models package for the iMedNet SDK.
This package contains all data models used by the SDK to represent iMedNet resources.
- class imednet.models.AdverseEvent[source]
Bases:
JsonModelCanonical CDISC-aligned Adverse Event (AE) reporting model.
- ae_action_taken: Optional[str]
- ae_decod: Optional[str]
- ae_end_date: Optional[datetime]
- ae_outcome: Optional[str]
- ae_relationship: Optional[str]
- ae_serious: bool
- ae_severity: str
- ae_start_date: Optional[datetime]
- ae_term: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.ApiResponse[source]
Bases:
JsonModel,Generic[T]Generic API response model.
- data: T
- metadata: Metadata
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pagination: Optional[Pagination]
- class imednet.models.BaseRecordRequest[source]
Bases:
JsonModelBase class for record creation/update requests.
- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelRepresents a medical coding entry associated with a record.
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
BaseRecordRequestPayload for creating a new unscheduled record.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.DeviceDeficiency[source]
Bases:
JsonModelCanonical CDISC-aligned Device Deficiency (DD) reporting model.
- dd_category: str
- dd_date: datetime
- dd_serious: bool
- dd_term: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.DeviceSafetyProfile[source]
Bases:
StandardsProfile- validate(domain, data)[source]
- Return type:
list[ValidationViolation]- Parameters:
domain (str) –
data (dict[str, Any]) –
- class imednet.models.DrugSafetyProfile[source]
Bases:
StandardsProfile
- class imednet.models.Error[source]
Bases:
JsonModelError information in an API response.
- code: str
- details: Dict[str, Any]
- message: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.Form[source]
Bases:
JsonModelConfiguration and metadata for a CRF (Case Report Form).
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
BaseModelHierarchical representation of a form including its variables.
- 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[source]
Bases:
JsonModelMinimal form details embedded within an interval definition.
- form_id: int
- form_key: str
- form_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.GeneralClinicalProfile[source]
Bases:
StandardsProfile
- class imednet.models.ImednetBaseModel[source]
Bases:
JsonModelCore base model for all iMedNet API responses.
Design philosophy: extra=’ignore’ silently drops new undocumented fields the API introduces. populate_by_name allows models to be instantiated using either pythonic snake_case names or original API camelCase names via Field aliases. str_strip_whitespace trims leading and trailing whitespace from string values.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelRepresents a visit interval or event within the study timeline.
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
BaseModelHierarchical representation of an interval including its forms.
- 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[source]
Bases:
JsonModelRepresents an asynchronous background job.
- batch_id: str
- date_created: datetime
- date_finished: datetime
- date_started: datetime
- property is_failed: bool
Checks if the job failed or was cancelled.
- property is_successful: bool
Checks if the job completed successfully.
- property is_terminal: bool
Checks if the job has reached a final state (Success/Failed/Cancelled).
- job_id: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JobExtended job information returned when polling.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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
- class imednet.models.Keyword[source]
Bases:
JsonModelA keyword or tag associated with a record.
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.MappingRule[source]
Bases:
JsonModelMapping from raw source variable to canonical reporting field.
- domain: str
- fallback_value: Optional[str]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- source_form_key: str
- source_variable_name: str
- target_field: str
- class imednet.models.Metadata[source]
Bases:
JsonModelMetadata information in an API response.
- error: Error
- method: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- path: str
- status: str
- timestamp: datetime
- class imednet.models.Pagination[source]
Bases:
JsonModelPagination information in an API response.
- current_page: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- size: int
- sort: List[SortField]
- total_elements: int
- total_pages: int
- class imednet.models.ProtocolDeviation[source]
Bases:
JsonModelCanonical CDISC-aligned Protocol Deviation (PD) reporting model.
- dv_category: str
- dv_date: datetime
- dv_severity: str
- dv_status: str
- dv_term: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.Query[source]
Bases:
JsonModelRepresents a data query (discrepancy) raised on a record.
- annotation_id: int
- annotation_type: str
- date_created: datetime
- date_modified: datetime
- description: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA comment or response within a data query thread.
- annotation_status: str
- closed: bool
- comment: str
- date: datetime
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA data record for a subject, form, and visit.
- date_created: datetime
- date_modified: datetime
- deleted: bool
- form_id: int
- form_key: str
- interval_id: int
- keywords: List[Keyword]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
RootModel[Dict[str, Any]]Arbitrary record data as a dictionary.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.RecordJobResponse[source]
Bases:
JsonModelResponse for a record-related job (batch operations, etc).
- batch_id: str
- job_id: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelHistorical version of a record including change reason and user.
- data_revision: int
- date_created: datetime
- deleted: bool
- form_key: str
- interval_id: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
BaseRecordRequestPayload for registering (enrolling) a new subject.
Per the API documentation, registering a subject only requires
formKeyandsiteName. The system assigns the subject identifier upon creation. Do not include asubjectKeyhere — doing so causes the server to treat the request as an update and reject it when the key is unknown.- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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
- class imednet.models.Role[source]
Bases:
JsonModelA role assigned to a user within a study or community.
- community_id: int
- date_created: datetime
- date_modified: datetime
- description: str
- inactive: bool
- level: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA site participating in a study.
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.SortField[source]
Bases:
JsonModelSorting information for a field in a paginated response.
- direction: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property: str
- class imednet.models.StandardsProfile[source]
Bases:
object- __init__(*, profile_name, required_fields=None, recommended_fields=None, optional_fields=None, value_constraints=None)[source]
- Parameters:
profile_name (str) –
required_fields (dict[str, list[str]] | None) –
recommended_fields (dict[str, list[str]] | None) –
optional_fields (dict[str, list[str]] | None) –
value_constraints (dict[str, list[Any]] | None) –
- Return type:
None
- validate(domain, data)[source]
- Return type:
list[ValidationViolation]- Parameters:
domain (str) –
data (dict[str, Any]) –
- class imednet.models.StandardsProfileRegistry[source]
Bases:
object- register(profile)[source]
- Return type:
None- Parameters:
profile (StandardsProfile) –
- class imednet.models.Study[source]
Bases:
JsonModelRepresents a clinical study and its metadata.
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.StudyConfiguration[source]
Bases:
JsonModelSerialized study reporting dashboard configuration.
- mappings: list[MappingRule]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- reporting_profile: str
- study_key: str
- terminology_lookups: dict[str, dict[str, str]]
- version: str
- widgets: list[WidgetConfig]
- class imednet.models.StudyStructure[source]
Bases:
BaseModelHierarchical representation of a full study including intervals and forms.
- intervals: List[IntervalStructure]
- 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].
- study_key: str
- class imednet.models.Subject[source]
Bases:
JsonModelA subject (participant) in a study, with status and site info.
- date_created: datetime
- date_modified: datetime
- deleted: bool
- enrollment_start_date: datetime
- keywords: List[SubjectKeyword]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA keyword or tag associated with a subject.
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.TriageAnnotation[source]
Bases:
JsonModelReviewer note attached to a triage item.
- annotation_id: str
- comment: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: datetime
- user_id: str
- class imednet.models.TriageHistoryEntry[source]
Bases:
JsonModelStatus transition audit entry for a triage item.
- comment: Optional[str]
- from_status: TriageStatus
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: datetime
- to_status: TriageStatus
- transition_id: str
- user_id: str
- class imednet.models.TriageItem[source]
Bases:
JsonModelCore triage item used by queue and reviewer workflows.
- annotations: list[TriageAnnotation]
- assignee: Optional[str]
- history: list[TriageHistoryEntry]
- item_id: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- severity: str
- status: TriageStatus
- study_key: str
- class imednet.models.TriageStatus[source]
Bases:
str,EnumAn enumeration.
- NEW = 'NEW'
- RESOLVED = 'RESOLVED'
- UNDER_REVIEW = 'UNDER_REVIEW'
- class imednet.models.UpdateScheduledRecordRequest[source]
Bases:
BaseRecordRequestPayload for updating an existing scheduled record.
- interval_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA user account in the system.
- email: str
- first_name: str
- last_name: str
- login: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.ValidationViolation[source]
Bases:
BaseModel- field: str
- message: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- severity: str
- class imednet.models.Variable[source]
Bases:
JsonModelDefinition of a data field (question) on a form.
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA specific instance of a subject visiting a site (or equivalent event).
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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
- class imednet.models.WidgetConfig[source]
Bases:
JsonModelDeclarative dashboard widget configuration.
- domain: str
- layout_cols: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str
- type: str
- widget_id: str
- x_axis: Optional[str]
- y_axis: Optional[str]
- imednet.models.parse_bool(v)[source]
Normalize boolean values from various representations. Accepts bool, str, int, float and returns a bool.
Defaults to False for unknown or unparseable types (e.g. None, [], object()). String representations like ‘1.0’, ‘inf’, and ‘nan’ are treated as truthy via float fallback.
- Return type:
bool- Parameters:
v (Any) –
Example
>>> parse_bool("yes") True >>> parse_bool("1.0") True >>> parse_bool(None) False
- imednet.models.parse_datetime(v)[source]
Parse an ISO datetime string, numeric timestamp, 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.- Parameters:
v (
str|int|float|datetime) – Date string, numeric timestamp (seconds since epoch), or datetime object. Numeric values are assumed to be UTC timestamps.- Return type:
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) –
- imednet.models.parse_list_or_default(v, default_factory=<class 'list'>)[source]
Normalize list values, defaulting if None. Ensures result is a list.
- Return type:
List[TypeVar(T)]- Parameters:
v (Any) –
default_factory (Callable[[], List[T]]) –
- imednet.models.parse_str_or_default(v, default='')[source]
Normalize string values, defaulting if None.
- Return type:
str- Parameters:
v (Any) –
default (str) –
Submodules
imednet.models.base module
Base models for the iMedNet SDK.
- class imednet.models.base.ApiResponse[source]
Bases:
JsonModel,Generic[T]Generic API response model.
- data: T
- metadata: Metadata
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pagination: Optional[Pagination]
- class imednet.models.base.Error[source]
Bases:
JsonModelError information in an API response.
- code: str
- details: Dict[str, Any]
- message: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.base.ImednetBaseModel[source]
Bases:
JsonModelCore base model for all iMedNet API responses.
Design philosophy: extra=’ignore’ silently drops new undocumented fields the API introduces. populate_by_name allows models to be instantiated using either pythonic snake_case names or original API camelCase names via Field aliases. str_strip_whitespace trims leading and trailing whitespace from string values.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.base.Metadata[source]
Bases:
JsonModelMetadata information in an API response.
- error: Error
- method: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- path: str
- status: str
- timestamp: datetime
- class imednet.models.base.Pagination[source]
Bases:
JsonModelPagination information in an API response.
- current_page: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- size: int
- sort: List[SortField]
- total_elements: int
- total_pages: int
- class imednet.models.base.SortField[source]
Bases:
JsonModelSorting information for a field in a paginated response.
- direction: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property: str
imednet.models.codings module
- class imednet.models.codings.Coding[source]
Bases:
JsonModelRepresents a medical coding entry associated with a record.
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelConfiguration and metadata for a CRF (Case Report Form).
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelMinimal form details embedded within an interval definition.
- form_id: int
- form_key: str
- form_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelRepresents a visit interval or event within the study timeline.
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelRepresents an asynchronous background job.
- batch_id: str
- date_created: datetime
- date_finished: datetime
- date_started: datetime
- property is_failed: bool
Checks if the job failed or was cancelled.
- property is_successful: bool
Checks if the job completed successfully.
- property is_terminal: bool
Checks if the job has reached a final state (Success/Failed/Cancelled).
- job_id: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JobExtended job information returned when polling.
- batch_id: str
- date_created: datetime
- date_finished: datetime
- date_started: datetime
- job_id: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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
imednet.models.json_base module
- class imednet.models.json_base.JsonModel[source]
Bases:
BaseModelBase model with shared JSON parsing helpers.
- classmethod from_json(data)[source]
Validate data coming from JSON APIs.
- Return type:
Self- Parameters:
data (Any) –
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.queries module
- class imednet.models.queries.Query[source]
Bases:
JsonModelRepresents a data query (discrepancy) raised on a record.
- annotation_id: int
- annotation_type: str
- date_created: datetime
- date_modified: datetime
- description: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA comment or response within a data query thread.
- annotation_status: str
- closed: bool
- comment: str
- date: datetime
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelHistorical version of a record including change reason and user.
- data_revision: int
- date_created: datetime
- deleted: bool
- form_key: str
- interval_id: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelBase class for record creation/update requests.
- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
BaseRecordRequestPayload for creating a new unscheduled record.
- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA keyword or tag associated with a record.
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA data record for a subject, form, and visit.
- date_created: datetime
- date_modified: datetime
- deleted: bool
- form_id: int
- form_key: str
- interval_id: int
- keywords: List[Keyword]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
RootModel[Dict[str, Any]]Arbitrary record data as a dictionary.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- root: RootModelRootType
- class imednet.models.records.RecordJobResponse[source]
Bases:
JsonModelResponse for a record-related job (batch operations, etc).
- batch_id: str
- job_id: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
BaseRecordRequestPayload for registering (enrolling) a new subject.
Per the API documentation, registering a subject only requires
formKeyandsiteName. The system assigns the subject identifier upon creation. Do not include asubjectKeyhere — doing so causes the server to treat the request as an update and reject it when the key is unknown.- data: RecordData
- form_key: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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
- class imednet.models.records.UpdateScheduledRecordRequest[source]
Bases:
BaseRecordRequestPayload for updating an existing scheduled record.
- data: RecordData
- form_key: str
- interval_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.reporting module
- class imednet.models.reporting.AdverseEvent[source]
Bases:
JsonModelCanonical CDISC-aligned Adverse Event (AE) reporting model.
- ae_action_taken: Optional[str]
- ae_decod: Optional[str]
- ae_end_date: Optional[datetime]
- ae_outcome: Optional[str]
- ae_relationship: Optional[str]
- ae_serious: bool
- ae_severity: str
- ae_start_date: Optional[datetime]
- ae_term: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.reporting.DeviceDeficiency[source]
Bases:
JsonModelCanonical CDISC-aligned Device Deficiency (DD) reporting model.
- dd_category: str
- dd_date: datetime
- dd_serious: bool
- dd_term: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.reporting.ProtocolDeviation[source]
Bases:
JsonModelCanonical CDISC-aligned Protocol Deviation (PD) reporting model.
- dv_category: str
- dv_date: datetime
- dv_severity: str
- dv_status: str
- dv_term: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA site participating in a study.
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.standards module
- class imednet.models.standards.DeviceSafetyProfile[source]
Bases:
StandardsProfile- validate(domain, data)[source]
- Return type:
list[ValidationViolation]- Parameters:
domain (str) –
data (dict[str, Any]) –
- class imednet.models.standards.DrugSafetyProfile[source]
Bases:
StandardsProfile
- class imednet.models.standards.GeneralClinicalProfile[source]
Bases:
StandardsProfile
- class imednet.models.standards.StandardsProfile[source]
Bases:
object- __init__(*, profile_name, required_fields=None, recommended_fields=None, optional_fields=None, value_constraints=None)[source]
- Parameters:
profile_name (str) –
required_fields (dict[str, list[str]] | None) –
recommended_fields (dict[str, list[str]] | None) –
optional_fields (dict[str, list[str]] | None) –
value_constraints (dict[str, list[Any]] | None) –
- Return type:
None
- validate(domain, data)[source]
- Return type:
list[ValidationViolation]- Parameters:
domain (str) –
data (dict[str, Any]) –
imednet.models.studies module
- class imednet.models.studies.Study[source]
Bases:
JsonModelRepresents a clinical study and its metadata.
- date_created: datetime
- date_modified: datetime
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.study_config module
- class imednet.models.study_config.MappingRule[source]
Bases:
JsonModelMapping from raw source variable to canonical reporting field.
- domain: str
- fallback_value: Optional[str]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- source_form_key: str
- source_variable_name: str
- target_field: str
- class imednet.models.study_config.StudyConfiguration[source]
Bases:
JsonModelSerialized study reporting dashboard configuration.
- mappings: list[MappingRule]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- reporting_profile: str
- study_key: str
- terminology_lookups: dict[str, dict[str, str]]
- version: str
- widgets: list[WidgetConfig]
- class imednet.models.study_config.WidgetConfig[source]
Bases:
JsonModelDeclarative dashboard widget configuration.
- domain: str
- layout_cols: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str
- type: str
- widget_id: str
- x_axis: Optional[str]
- y_axis: Optional[str]
imednet.models.study_structure module
- class imednet.models.study_structure.FormStructure[source]
Bases:
BaseModelHierarchical representation of a form including its variables.
- 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.study_structure.IntervalStructure[source]
Bases:
BaseModelHierarchical representation of an interval including its forms.
- 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.study_structure.StudyStructure[source]
Bases:
BaseModelHierarchical representation of a full study including intervals and forms.
- intervals: List[IntervalStructure]
- 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].
- study_key: str
imednet.models.subjects module
- class imednet.models.subjects.Subject[source]
Bases:
JsonModelA subject (participant) in a study, with status and site info.
- date_created: datetime
- date_modified: datetime
- deleted: bool
- enrollment_start_date: datetime
- keywords: List[SubjectKeyword]
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA keyword or tag associated with a subject.
- date_added: datetime
- keyword_id: int
- keyword_key: str
- keyword_name: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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.triage module
- class imednet.models.triage.TriageAnnotation[source]
Bases:
JsonModelReviewer note attached to a triage item.
- annotation_id: str
- comment: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: datetime
- user_id: str
- class imednet.models.triage.TriageHistoryEntry[source]
Bases:
JsonModelStatus transition audit entry for a triage item.
- comment: Optional[str]
- from_status: TriageStatus
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: datetime
- to_status: TriageStatus
- transition_id: str
- user_id: str
- class imednet.models.triage.TriageItem[source]
Bases:
JsonModelCore triage item used by queue and reviewer workflows.
- annotations: list[TriageAnnotation]
- assignee: Optional[str]
- history: list[TriageHistoryEntry]
- item_id: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- severity: str
- status: TriageStatus
- study_key: str
imednet.models.users module
- class imednet.models.users.Role[source]
Bases:
JsonModelA role assigned to a user within a study or community.
- community_id: int
- date_created: datetime
- date_modified: datetime
- description: str
- inactive: bool
- level: int
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA user account in the system.
- email: str
- first_name: str
- last_name: str
- login: str
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelDefinition of a data field (question) on a form.
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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[source]
Bases:
JsonModelA specific instance of a subject visiting a site (or equivalent event).
- 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] = {'extra': 'ignore', 'populate_by_name': True, 'str_strip_whitespace': 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