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:
ImednetBaseModelCanonical CDISC-aligned Adverse Event (AE) reporting model.
- 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.AnalysisAdverseEvent[source]¶
Bases:
ImednetBaseModelAnalysis Adverse Event Dataset (ADAE).
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', '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.AnalysisLabResult[source]¶
Bases:
ImednetBaseModelAnalysis Lab Result Dataset (ADLB).
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', '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.ApiResponse[source]¶
Bases:
ImednetBaseModel,Generic[T]Generic API response model.
- 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.BaseRecordRequest[source]¶
Bases:
ImednetBaseModelBase class for record creation/update requests.
- 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¶
Bases:
Coding- 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.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].
- class imednet.models.DeviceDeficiency[source]¶
Bases:
ImednetBaseModelCanonical CDISC-aligned Device Deficiency (DD) reporting model.
- 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.DeviceSafetyProfile[source]¶
Bases:
StandardsProfileDevice safety profile including device deficiency (DD) requirements.
- validate(domain, data)[source]¶
Validate device-specific constraints for DD and other domains.
- Return type:
list[ValidationViolation]- Parameters:
domain (str) –
data (dict[str, Any]) –
- class imednet.models.DrugSafetyProfile[source]¶
Bases:
StandardsProfileDrug safety profile with stricter requirements for AE data.
- class imednet.models.Error[source]¶
Bases:
ImednetBaseModelError information in an API response.
- 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¶
Bases:
Form- 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.FormStructure[source]¶
Bases:
ImednetBaseModelHierarchical representation of a form including its variables.
- classmethod from_form(form, variables)[source]¶
Creates FormStructure from a Form model and its associated variables.
- Return type:
- Parameters:
form (Form) –
variables (list[imednet.models.engine.Variable]) –
- 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.FormSummary[source]¶
Bases:
ImednetBaseModelMinimal form details embedded within an interval definition.
- 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:
StandardsProfileGeneral clinical profile with basic AE and PD requirements.
- class imednet.models.ImednetBaseModel[source]¶
Bases:
BaseModelCore 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.
- 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].
- class imednet.models.Interval¶
Bases:
Interval- 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.IntervalStructure[source]¶
Bases:
ImednetBaseModelHierarchical representation of an interval including its forms.
- classmethod from_interval(interval, forms)[source]¶
Creates IntervalStructure from an Interval model and its associated FormStructures.
- Return type:
- Parameters:
interval (Interval) –
forms (list[imednet.models.study_structure.FormStructure]) –
- 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.Job¶
Bases:
Job- 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.JobStatus¶
Bases:
JobStatus- 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.Keyword¶
Bases:
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].
- class imednet.models.MappingRule[source]¶
Bases:
ImednetBaseModelMapping from raw source variable to canonical reporting field.
- 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.Metadata[source]¶
Bases:
ImednetBaseModelMetadata information in an API response.
- 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.Pagination[source]¶
Bases:
ImednetBaseModelPagination information in an API response.
- 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.ProtocolDeviation[source]¶
Bases:
ImednetBaseModelCanonical CDISC-aligned Protocol Deviation (PD) reporting model.
- 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.Query¶
Bases:
Query- 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.QueryComment¶
Bases:
QueryComment- 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.Record¶
Bases:
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].
- 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:
ImednetBaseModelResponse for a record-related job (batch operations, etc).
- 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.RecordRevision¶
Bases:
RecordRevision- 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.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].
- class imednet.models.ResourceRegistry[source]¶
Bases:
objectUnified resource governance registry serving as the single source of truth for fields.
- class imednet.models.Role¶
Bases:
Role- 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.Site¶
Bases:
Site- 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.SortField[source]¶
Bases:
ImednetBaseModelSorting information for a field in a paginated response.
- 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.StandardsProfile[source]¶
Bases:
objectA profile defining required, recommended, and optional fields for data domains.
- __init__(*, profile_name, required_fields=None, recommended_fields=None, optional_fields=None, value_constraints=None)[source]¶
Initialize a standards profile.
- Parameters:
profile_name (
str) – Unique name for the profile.required_fields (
Optional[dict[str,list[str]]]) – Mapping of domain to required field names.recommended_fields (
Optional[dict[str,list[str]]]) – Mapping of domain to recommended field names.optional_fields (
Optional[dict[str,list[str]]]) – Mapping of domain to optional field names.value_constraints (
Optional[dict[str,list[Any]]]) – Mapping of field or domain.field to allowed values.
- Return type:
None
- expected_fields(domain)[source]¶
Return the list of expected (required + recommended) fields for a domain.
- Return type:
list[str]- Parameters:
domain (str) –
- validate(domain, data)[source]¶
Validate a data dictionary against the profile for a specific domain.
- Parameters:
domain (
str) – The domain name (e.g., ‘AE’, ‘PD’).data (
dict[str,Any]) – The data dictionary to validate.
- Return type:
list[ValidationViolation]- Returns:
A list of ValidationViolation objects.
- class imednet.models.StandardsProfileRegistry[source]¶
Bases:
objectRegistry for managing and retrieving standards profiles.
- get(profile_name)[source]¶
Retrieve a profile by its name.
- Return type:
- Parameters:
profile_name (str) –
- register(profile)[source]¶
Register a new standards profile.
- Return type:
None- Parameters:
profile (StandardsProfile) –
- class imednet.models.Study¶
Bases:
Study- 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.StudyConfiguration[source]¶
Bases:
ImednetBaseModelSerialized study reporting dashboard configuration.
- 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.StudyStructure[source]¶
Bases:
ImednetBaseModelHierarchical representation of a full study including intervals and forms.
- 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.Subject¶
Bases:
Subject- 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.SubjectKeyword¶
Bases:
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].
- class imednet.models.SubjectLevelAnalysis[source]¶
Bases:
ImednetBaseModelSubject-Level Analysis Dataset (ADSL).
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', '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:
ImednetBaseModelReviewer note attached to a triage item.
- 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.TriageHistoryEntry[source]¶
Bases:
ImednetBaseModelStatus transition audit entry for a triage item.
- 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.TriageItem[source]¶
Bases:
ImednetBaseModelCore triage item used by queue and reviewer workflows.
- 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.TriageStatus[source]¶
Bases:
str,EnumEnumeration of possible triage statuses.
- class imednet.models.UpdateScheduledRecordRequest[source]¶
Bases:
BaseRecordRequestPayload for updating an existing scheduled 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].
- class imednet.models.User¶
Bases:
User- 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.ValidationViolation[source]¶
Bases:
BaseModelRepresents a violation of a data standard constraint.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.Variable¶
Bases:
Variable- 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.Visit¶
Bases:
Visit- 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.WidgetConfig[source]¶
Bases:
ImednetBaseModelDeclarative dashboard widget configuration.
- 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.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 unparsable 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
>>> from imednet.utils.validators import parse_bool >>> 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:
ImednetBaseModel,Generic[T]Generic API response model.
- 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.Error[source]¶
Bases:
ImednetBaseModelError information in an API response.
- 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:
BaseModelCore 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.
- 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].
- class imednet.models.base.Metadata[source]¶
Bases:
ImednetBaseModelMetadata information in an API response.
- 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.Pagination[source]¶
Bases:
ImednetBaseModelPagination information in an API response.
- 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.SortField[source]¶
Bases:
ImednetBaseModelSorting information for a field in a paginated response.
- 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.codings module¶
Medical coding models for iMedNet.
imednet.models.contract module¶
Unified contract definitions.
- class imednet.models.contract.APIContract[source]¶
Bases:
BaseModelUnified API Contract.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class imednet.models.contract.ContractBuilder[source]¶
Bases:
objectBuilder for APIContract.
- ingest_openapi(file_path)[source]¶
Ingest an OpenAPI specification JSON file.
- Return type:
None- Parameters:
file_path (str) –
- class imednet.models.contract.FieldDefinition[source]¶
Bases:
BaseModelInternal contract for a model field.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
imednet.models.engine module¶
Engine module.
- class imednet.models.engine.ModelEngine[source]¶
Bases:
objectEngine for dynamically creating Pydantic models from schemas.
- classmethod generate_stubs(output_dir)[source]¶
Generate type stubs for dynamic models.
- Return type:
None- Parameters:
output_dir (str) –
- classmethod get_model(model_name, base_cls=<class 'imednet.models.base.ImednetBaseModel'>)[source]¶
Get or create a dynamic Pydantic model for the given name.
- Parameters:
model_name (
str) – The name of the model (e.g., ‘Subject’, ‘Record’).base_cls (
type[Any]) – The base class to inherit from.
- Return type:
type[Any]- Returns:
A Pydantic model class.
- class imednet.models.engine.ResourceRegistry[source]¶
Bases:
objectUnified resource governance registry serving as the single source of truth for fields.
imednet.models.forms module¶
Form (eCRF) metadata models for iMedNet.
imednet.models.intervals module¶
Interval (visit definition) models for iMedNet.
- class imednet.models.intervals.FormSummary[source]¶
Bases:
ImednetBaseModelMinimal form details embedded within an interval definition.
- 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.jobs module¶
Job and background operation models for iMedNet.
imednet.models.queries module¶
Query and annotation models for iMedNet.
imednet.models.record_revisions module¶
Record revision history models for iMedNet.
imednet.models.records module¶
Record (eCRF instance) models for iMedNet.
- class imednet.models.records.BaseRecordRequest[source]¶
Bases:
ImednetBaseModelBase class for record creation/update requests.
- 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.
- 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.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.records.RecordJobResponse[source]¶
Bases:
ImednetBaseModelResponse for a record-related job (batch operations, etc).
- 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.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].
- class imednet.models.records.UpdateScheduledRecordRequest[source]¶
Bases:
BaseRecordRequestPayload for updating an existing scheduled 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].
imednet.models.reporting module¶
Reporting and analysis models for iMedNet, including CDISC-aligned datasets.
- class imednet.models.reporting.AdverseEvent[source]¶
Bases:
ImednetBaseModelCanonical CDISC-aligned Adverse Event (AE) reporting model.
- 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.reporting.AnalysisAdverseEvent[source]¶
Bases:
ImednetBaseModelAnalysis Adverse Event Dataset (ADAE).
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', '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.reporting.AnalysisLabResult[source]¶
Bases:
ImednetBaseModelAnalysis Lab Result Dataset (ADLB).
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', '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.reporting.DeviceDeficiency[source]¶
Bases:
ImednetBaseModelCanonical CDISC-aligned Device Deficiency (DD) reporting model.
- 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.reporting.ProtocolDeviation[source]¶
Bases:
ImednetBaseModelCanonical CDISC-aligned Protocol Deviation (PD) reporting model.
- 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.reporting.SubjectLevelAnalysis[source]¶
Bases:
ImednetBaseModelSubject-Level Analysis Dataset (ADSL).
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', '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.sites module¶
Site (study location) models for iMedNet.
imednet.models.standards module¶
Data standard profiles and validation models for clinical domains.
- class imednet.models.standards.DeviceSafetyProfile[source]¶
Bases:
StandardsProfileDevice safety profile including device deficiency (DD) requirements.
- validate(domain, data)[source]¶
Validate device-specific constraints for DD and other domains.
- Return type:
list[ValidationViolation]- Parameters:
domain (str) –
data (dict[str, Any]) –
- class imednet.models.standards.DrugSafetyProfile[source]¶
Bases:
StandardsProfileDrug safety profile with stricter requirements for AE data.
- class imednet.models.standards.GeneralClinicalProfile[source]¶
Bases:
StandardsProfileGeneral clinical profile with basic AE and PD requirements.
- class imednet.models.standards.StandardsProfile[source]¶
Bases:
objectA profile defining required, recommended, and optional fields for data domains.
- __init__(*, profile_name, required_fields=None, recommended_fields=None, optional_fields=None, value_constraints=None)[source]¶
Initialize a standards profile.
- Parameters:
profile_name (
str) – Unique name for the profile.required_fields (
Optional[dict[str,list[str]]]) – Mapping of domain to required field names.recommended_fields (
Optional[dict[str,list[str]]]) – Mapping of domain to recommended field names.optional_fields (
Optional[dict[str,list[str]]]) – Mapping of domain to optional field names.value_constraints (
Optional[dict[str,list[Any]]]) – Mapping of field or domain.field to allowed values.
- Return type:
None
- expected_fields(domain)[source]¶
Return the list of expected (required + recommended) fields for a domain.
- Return type:
list[str]- Parameters:
domain (str) –
- validate(domain, data)[source]¶
Validate a data dictionary against the profile for a specific domain.
- Parameters:
domain (
str) – The domain name (e.g., ‘AE’, ‘PD’).data (
dict[str,Any]) – The data dictionary to validate.
- Return type:
list[ValidationViolation]- Returns:
A list of ValidationViolation objects.
- class imednet.models.standards.StandardsProfileRegistry[source]¶
Bases:
objectRegistry for managing and retrieving standards profiles.
- get(profile_name)[source]¶
Retrieve a profile by its name.
- Return type:
- Parameters:
profile_name (str) –
- register(profile)[source]¶
Register a new standards profile.
- Return type:
None- Parameters:
profile (StandardsProfile) –
imednet.models.studies module¶
Study metadata models for iMedNet.
imednet.models.study_config module¶
Study configuration models and validation.
This module provides Pydantic models for parsing and validating study configurations, including reporting profiles, widgets, and mapping rules.
- class imednet.models.study_config.MappingRule[source]¶
Bases:
ImednetBaseModelMapping from raw source variable to canonical reporting field.
- 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.study_config.StudyConfiguration[source]¶
Bases:
ImednetBaseModelSerialized study reporting dashboard configuration.
- 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.study_config.WidgetConfig[source]¶
Bases:
ImednetBaseModelDeclarative dashboard widget configuration.
- 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.study_structure module¶
Models for representing the hierarchical structure of a study.
- class imednet.models.study_structure.FormStructure[source]¶
Bases:
ImednetBaseModelHierarchical representation of a form including its variables.
- classmethod from_form(form, variables)[source]¶
Creates FormStructure from a Form model and its associated variables.
- Return type:
- Parameters:
form (Form) –
variables (list[imednet.models.engine.Variable]) –
- 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.study_structure.IntervalStructure[source]¶
Bases:
ImednetBaseModelHierarchical representation of an interval including its forms.
- classmethod from_interval(interval, forms)[source]¶
Creates IntervalStructure from an Interval model and its associated FormStructures.
- Return type:
- Parameters:
interval (Interval) –
forms (list[imednet.models.study_structure.FormStructure]) –
- 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.study_structure.StudyStructure[source]¶
Bases:
ImednetBaseModelHierarchical representation of a full study including intervals and forms.
- 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.subjects module¶
Models for subjects and participant keywords.
imednet.models.triage module¶
Models for triage and reviewer workflows.
- class imednet.models.triage.TriageAnnotation[source]¶
Bases:
ImednetBaseModelReviewer note attached to a triage item.
- 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.triage.TriageHistoryEntry[source]¶
Bases:
ImednetBaseModelStatus transition audit entry for a triage item.
- 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.triage.TriageItem[source]¶
Bases:
ImednetBaseModelCore triage item used by queue and reviewer workflows.
- 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.users module¶
Models for users and roles within iMedNet.
imednet.models.variables module¶
Models for form variables (data fields) in iMedNet.
imednet.models.visits module¶
Models for subject visits and study events.