imednet package¶
iMednet SDK - A Python client for the iMednet EDC REST API.
Subpackages¶
- imednet.auth package
- imednet.cli package
app()get_parser()- Subpackages
- imednet.cli.codings package
- imednet.cli.datadict package
- imednet.cli.export package
- imednet.cli.forms package
- imednet.cli.intervals package
- imednet.cli.jobs package
- imednet.cli.queries package
- imednet.cli.record_revisions package
- imednet.cli.records package
- imednet.cli.sites package
- imednet.cli.studies package
- imednet.cli.subjects package
- imednet.cli.users package
- imednet.cli.utils package
- imednet.cli.variables package
- imednet.cli.visits package
- Submodules
- imednet.cli.decorators module
- imednet.core package
AsyncClientBaseClientBasePaginatorClientDefaultRetryPolicyEdcAsyncGetEndpointEdcAsyncListEndpointEdcAsyncListGetEndpointEdcAsyncListGetEndpoint.ASYNC_PAGINATOR_CLSEdcAsyncListGetEndpoint.MODELEdcAsyncListGetEndpoint.PAGINATOR_CLSEdcAsyncListGetEndpoint.PATHEdcAsyncListGetEndpoint.__init__()EdcAsyncListGetEndpoint.get()EdcAsyncListGetEndpoint.list()EdcAsyncListGetEndpoint.requires_study_keyEdcAsyncListGetEndpoint.to_dataframe()
EdcSyncGetEndpointEdcSyncListEndpointEdcSyncListGetEndpointEdcSyncListGetEndpoint.ASYNC_PAGINATOR_CLSEdcSyncListGetEndpoint.MODELEdcSyncListGetEndpoint.PAGINATOR_CLSEdcSyncListGetEndpoint.PATHEdcSyncListGetEndpoint.__init__()EdcSyncListGetEndpoint.get()EdcSyncListGetEndpoint.list()EdcSyncListGetEndpoint.requires_study_keyEdcSyncListGetEndpoint.to_dataframe()
HTTPClientBaseRetryConfigRetryPolicyRetryState
- imednet.datadict package
- Subpackages
- Submodules
- imednet.datadict.cdisc_builders module
build_datadict_from_sdk_metadata()build_dataset_json_bundle()build_dataset_json_envelope()build_odm_archive()get_dataset_json_schema()load_dataset_json()make_location_oid()make_oid_slug()make_study_event_oid()make_user_oid()make_xml_ncname()map_queries_to_annotations()map_revisions_to_audit_records()map_sites_and_users_to_admin_data()normalize_odm_datetime()to_dataset_json()to_dataset_json_file()validate_dataset_json()validate_odm_xml()
- imednet.datadict.diff module
- imednet.datadict.emit module
- imednet.datadict.exchange module
DatasetJsonBundleDatasetJsonColumnDatasetJsonEnvelopeDatasetJsonEnvelope.dataset_json_creation_datetimeDatasetJsonEnvelope.dataset_json_versionDatasetJsonEnvelope.file_oidDatasetJsonEnvelope.db_last_modified_datetimeDatasetJsonEnvelope.originatorDatasetJsonEnvelope.source_systemDatasetJsonEnvelope.study_oidDatasetJsonEnvelope.metadata_version_oidDatasetJsonEnvelope.metadata_refDatasetJsonEnvelope.item_group_oidDatasetJsonEnvelope.is_reference_dataDatasetJsonEnvelope.recordsDatasetJsonEnvelope.nameDatasetJsonEnvelope.labelDatasetJsonEnvelope.columnsDatasetJsonEnvelope.rowsDatasetJsonEnvelope.to_json_dict()
DatasetJsonItemDatasetJsonSourceSystemOdmAdminDataOdmAnnotationOdmArchiveOdmArchive.file_oidOdmArchive.file_typeOdmArchive.odm_versionOdmArchive.creation_datetimeOdmArchive.as_of_datetimeOdmArchive.originatorOdmArchive.source_systemOdmArchive.source_system_versionOdmArchive.descriptionOdmArchive.metadata_version_oidOdmArchive.metadata_version_nameOdmArchive.data_dictionaryOdmArchive.admin_dataOdmArchive.reference_dataOdmArchive.clinical_dataOdmArchive.validation_warnings
OdmAuditRecordOdmClinicalDataOdmFlagOdmFormDataOdmItemDataOdmItemGroupDataOdmLocationOdmMetaDataVersionRefOdmReferenceDataOdmStudyEventDataOdmSubjectDataOdmUser
- imednet.datadict.logic module
ExtractedConditionExtractedRuleMetadataExtractedRuleMetadata.rule_idExtractedRuleMetadata.rule_nameExtractedRuleMetadata.formExtractedRuleMetadata.rule_typeExtractedRuleMetadata.severityExtractedRuleMetadata.logical_operatorExtractedRuleMetadata.conditionsExtractedRuleMetadata.messageExtractedRuleMetadata.is_cross_scopeExtractedRuleMetadata.is_ui_only
LogicEvaluationReportLogicTreeEvaluatorRangeCheckConstraintRuleEvaluationResultVariableConstraintsextract_variable_constraints()parse_logic_xml()validate_regex_pattern()
- imednet.datadict.models module
BusinessLogicRuleBusinessLogicRule.idBusinessLogicRule.nameBusinessLogicRule.typeBusinessLogicRule.statusBusinessLogicRule.formBusinessLogicRule.sequenceBusinessLogicRule.logicBusinessLogicRule.logicRawXmlBusinessLogicRule.extraAttributesBusinessLogicRule.get()BusinessLogicRule.items()BusinessLogicRule.keys()
ChoiceDataDictionaryDataDictionary.metadataDataDictionary.formsDataDictionary.unassignedBusinessLogicDataDictionary.business_logicDataDictionary.choicesDataDictionary.form_for_key()DataDictionary.form_key_from_id()DataDictionary.get()DataDictionary.items()DataDictionary.keys()DataDictionary.questionsDataDictionary.rules_for_form()DataDictionary.variables_for_form()
DictCompatMixinFormMetadataVariable
- imednet.datadict.normalize module
- imednet.datadict.schema module
- imednet.endpoints package
- Submodules
- imednet.endpoints.codings module
- imednet.endpoints.forms module
- imednet.endpoints.intervals module
- imednet.endpoints.jobs module
- imednet.endpoints.queries module
- imednet.endpoints.record_revisions module
AsyncRecordRevisionsEndpointAsyncRecordRevisionsEndpoint.ASYNC_PAGINATOR_CLSAsyncRecordRevisionsEndpoint.MODELAsyncRecordRevisionsEndpoint.PAGINATOR_CLSAsyncRecordRevisionsEndpoint.__init__()AsyncRecordRevisionsEndpoint.get()AsyncRecordRevisionsEndpoint.list()AsyncRecordRevisionsEndpoint.requires_study_keyAsyncRecordRevisionsEndpoint.to_dataframe()
RecordRevisionsEndpointRecordRevisionsOperationDef
- imednet.endpoints.records module
AsyncRecordsEndpointAsyncRecordsEndpoint.ASYNC_PAGINATOR_CLSAsyncRecordsEndpoint.MODELAsyncRecordsEndpoint.PAGINATOR_CLSAsyncRecordsEndpoint.__init__()AsyncRecordsEndpoint.create()AsyncRecordsEndpoint.create_batch()AsyncRecordsEndpoint.get()AsyncRecordsEndpoint.list()AsyncRecordsEndpoint.requires_study_keyAsyncRecordsEndpoint.to_dataframe()
RecordsEndpointRecordsOperationDef
- imednet.endpoints.registry module
- imednet.endpoints.sites module
- imednet.endpoints.studies module
- imednet.endpoints.subjects module
AsyncSubjectsEndpointAsyncSubjectsEndpoint.ASYNC_PAGINATOR_CLSAsyncSubjectsEndpoint.MODELAsyncSubjectsEndpoint.PAGINATOR_CLSAsyncSubjectsEndpoint.__init__()AsyncSubjectsEndpoint.get()AsyncSubjectsEndpoint.list()AsyncSubjectsEndpoint.list_by_site()AsyncSubjectsEndpoint.requires_study_keyAsyncSubjectsEndpoint.to_dataframe()
ListBySiteOperationSubjectsEndpointSubjectsOperationDef
- imednet.endpoints.users module
- imednet.endpoints.variables module
- imednet.endpoints.visits module
- imednet.errors package
- Submodules
- imednet.errors.api module
- imednet.errors.base module
- imednet.errors.client module
- imednet.errors.export module
- imednet.errors.network module
- imednet.errors.orchestration module
- imednet.errors.plugin module
- imednet.errors.registry module
- imednet.errors.validation module
- imednet.form_designer package
- Submodules
- imednet.form_designer.builder module
- imednet.form_designer.client module
- imednet.form_designer.models module
BaseFieldPropsBaseFieldProps.fld_idBaseFieldProps.question_idBaseFieldProps.question_nameBaseFieldProps.labelBaseFieldProps.sas_labelBaseFieldProps.sequenceBaseFieldProps.page_noBaseFieldProps.sdv_reqBaseFieldProps.bl_reqBaseFieldProps.bl_req_idBaseFieldProps.bl_future_dateBaseFieldProps.bl_future_date_idBaseFieldProps.bl_inherit_dateBaseFieldProps.bl_inherit_date_idBaseFieldProps.bl_relatedBaseFieldProps.is_blindedBaseFieldProps.blinded_rolesBaseFieldProps.mvBaseFieldProps.nodeleteBaseFieldProps.catalogBaseFieldProps.commentsBaseFieldProps.new_fld_id
CheckboxFieldPropsCheckboxFieldProps.fld_idCheckboxFieldProps.question_idCheckboxFieldProps.question_nameCheckboxFieldProps.labelCheckboxFieldProps.sas_labelCheckboxFieldProps.sequenceCheckboxFieldProps.page_noCheckboxFieldProps.sdv_reqCheckboxFieldProps.bl_reqCheckboxFieldProps.bl_req_idCheckboxFieldProps.bl_future_dateCheckboxFieldProps.bl_future_date_idCheckboxFieldProps.bl_inherit_dateCheckboxFieldProps.bl_inherit_date_idCheckboxFieldProps.bl_relatedCheckboxFieldProps.is_blindedCheckboxFieldProps.blinded_rolesCheckboxFieldProps.mvCheckboxFieldProps.nodeleteCheckboxFieldProps.catalogCheckboxFieldProps.commentsCheckboxFieldProps.new_fld_idCheckboxFieldProps.typeCheckboxFieldProps.choices
ChoiceColDateTimeFieldPropsDateTimeFieldProps.fld_idDateTimeFieldProps.question_idDateTimeFieldProps.question_nameDateTimeFieldProps.labelDateTimeFieldProps.sas_labelDateTimeFieldProps.sequenceDateTimeFieldProps.page_noDateTimeFieldProps.sdv_reqDateTimeFieldProps.bl_reqDateTimeFieldProps.bl_req_idDateTimeFieldProps.bl_future_dateDateTimeFieldProps.bl_future_date_idDateTimeFieldProps.bl_inherit_dateDateTimeFieldProps.bl_inherit_date_idDateTimeFieldProps.bl_relatedDateTimeFieldProps.is_blindedDateTimeFieldProps.blinded_rolesDateTimeFieldProps.mvDateTimeFieldProps.nodeleteDateTimeFieldProps.catalogDateTimeFieldProps.commentsDateTimeFieldProps.new_fld_idDateTimeFieldProps.typeDateTimeFieldProps.time_ctrlDateTimeFieldProps.date_ctrlDateTimeFieldProps.use_secondsDateTimeFieldProps.record_comp_dateDateTimeFieldProps.record_key_dateDateTimeFieldProps.allow_no_dayDateTimeFieldProps.allow_no_monthDateTimeFieldProps.allow_no_year
DropdownFieldPropsDropdownFieldProps.fld_idDropdownFieldProps.question_idDropdownFieldProps.question_nameDropdownFieldProps.labelDropdownFieldProps.sas_labelDropdownFieldProps.sequenceDropdownFieldProps.page_noDropdownFieldProps.sdv_reqDropdownFieldProps.bl_reqDropdownFieldProps.bl_req_idDropdownFieldProps.bl_future_dateDropdownFieldProps.bl_future_date_idDropdownFieldProps.bl_inherit_dateDropdownFieldProps.bl_inherit_date_idDropdownFieldProps.bl_relatedDropdownFieldProps.is_blindedDropdownFieldProps.blinded_rolesDropdownFieldProps.mvDropdownFieldProps.nodeleteDropdownFieldProps.catalogDropdownFieldProps.commentsDropdownFieldProps.new_fld_idDropdownFieldProps.typeDropdownFieldProps.choicesDropdownFieldProps.lab_conditionDropdownFieldProps.lab_default_formDropdownFieldProps.lab_default_form_typeDropdownFieldProps.lab_default_questionDropdownFieldProps.lab_normal
EntityExtQuestionPropsFileUploadPropsFileUploadProps.fld_idFileUploadProps.question_idFileUploadProps.question_nameFileUploadProps.labelFileUploadProps.sas_labelFileUploadProps.sequenceFileUploadProps.page_noFileUploadProps.sdv_reqFileUploadProps.bl_reqFileUploadProps.bl_req_idFileUploadProps.bl_future_dateFileUploadProps.bl_future_date_idFileUploadProps.bl_inherit_dateFileUploadProps.bl_inherit_date_idFileUploadProps.bl_relatedFileUploadProps.is_blindedFileUploadProps.blinded_rolesFileUploadProps.mvFileUploadProps.nodeleteFileUploadProps.catalogFileUploadProps.commentsFileUploadProps.new_fld_idFileUploadProps.typeFileUploadProps.mfsFileUploadProps.max_files
LabelPropsLayoutMemoFieldPropsMemoFieldProps.fld_idMemoFieldProps.question_idMemoFieldProps.question_nameMemoFieldProps.labelMemoFieldProps.sas_labelMemoFieldProps.sequenceMemoFieldProps.page_noMemoFieldProps.sdv_reqMemoFieldProps.bl_reqMemoFieldProps.bl_req_idMemoFieldProps.bl_future_dateMemoFieldProps.bl_future_date_idMemoFieldProps.bl_inherit_dateMemoFieldProps.bl_inherit_date_idMemoFieldProps.bl_relatedMemoFieldProps.is_blindedMemoFieldProps.blinded_rolesMemoFieldProps.mvMemoFieldProps.nodeleteMemoFieldProps.catalogMemoFieldProps.commentsMemoFieldProps.new_fld_idMemoFieldProps.typeMemoFieldProps.lengthMemoFieldProps.columnsMemoFieldProps.rows
NumberFieldPropsNumberFieldProps.fld_idNumberFieldProps.question_idNumberFieldProps.question_nameNumberFieldProps.labelNumberFieldProps.sas_labelNumberFieldProps.sequenceNumberFieldProps.page_noNumberFieldProps.sdv_reqNumberFieldProps.bl_reqNumberFieldProps.bl_req_idNumberFieldProps.bl_future_dateNumberFieldProps.bl_future_date_idNumberFieldProps.bl_inherit_dateNumberFieldProps.bl_inherit_date_idNumberFieldProps.bl_relatedNumberFieldProps.is_blindedNumberFieldProps.blinded_rolesNumberFieldProps.mvNumberFieldProps.nodeleteNumberFieldProps.catalogNumberFieldProps.commentsNumberFieldProps.new_fld_idNumberFieldProps.typeNumberFieldProps.lengthNumberFieldProps.columnsNumberFieldProps.realNumberFieldProps.suffix
PagePrecisionDateFieldPropsPrecisionDateFieldProps.fld_idPrecisionDateFieldProps.question_idPrecisionDateFieldProps.question_namePrecisionDateFieldProps.labelPrecisionDateFieldProps.sas_labelPrecisionDateFieldProps.sequencePrecisionDateFieldProps.page_noPrecisionDateFieldProps.sdv_reqPrecisionDateFieldProps.bl_reqPrecisionDateFieldProps.bl_req_idPrecisionDateFieldProps.bl_future_datePrecisionDateFieldProps.bl_future_date_idPrecisionDateFieldProps.bl_inherit_datePrecisionDateFieldProps.bl_inherit_date_idPrecisionDateFieldProps.bl_relatedPrecisionDateFieldProps.is_blindedPrecisionDateFieldProps.blinded_rolesPrecisionDateFieldProps.mvPrecisionDateFieldProps.nodeletePrecisionDateFieldProps.catalogPrecisionDateFieldProps.commentsPrecisionDateFieldProps.new_fld_idPrecisionDateFieldProps.typePrecisionDateFieldProps.precision_secsPrecisionDateFieldProps.precision_timePrecisionDateFieldProps.allow_no_dayPrecisionDateFieldProps.allow_no_monthPrecisionDateFieldProps.allow_no_yearPrecisionDateFieldProps.allow_no_timePrecisionDateFieldProps.impute_timePrecisionDateFieldProps.impute_dayPrecisionDateFieldProps.impute_monthPrecisionDateFieldProps.impute_yearPrecisionDateFieldProps.display_text_timePrecisionDateFieldProps.display_text_dayPrecisionDateFieldProps.display_text_monthPrecisionDateFieldProps.display_text_yearPrecisionDateFieldProps.record_key_datePrecisionDateFieldProps.record_comp_date
ProtocolDeviationFormPayloadRadioFieldPropsRadioFieldProps.fld_idRadioFieldProps.question_idRadioFieldProps.question_nameRadioFieldProps.labelRadioFieldProps.sas_labelRadioFieldProps.sequenceRadioFieldProps.page_noRadioFieldProps.sdv_reqRadioFieldProps.bl_reqRadioFieldProps.bl_req_idRadioFieldProps.bl_future_dateRadioFieldProps.bl_future_date_idRadioFieldProps.bl_inherit_dateRadioFieldProps.bl_inherit_date_idRadioFieldProps.bl_relatedRadioFieldProps.is_blindedRadioFieldProps.blinded_rolesRadioFieldProps.mvRadioFieldProps.nodeleteRadioFieldProps.catalogRadioFieldProps.commentsRadioFieldProps.new_fld_idRadioFieldProps.typeRadioFieldProps.choicesRadioFieldProps.radio
RowSeparatorPropsTablePropsTextFieldPropsTextFieldProps.fld_idTextFieldProps.question_idTextFieldProps.question_nameTextFieldProps.labelTextFieldProps.sas_labelTextFieldProps.sequenceTextFieldProps.page_noTextFieldProps.sdv_reqTextFieldProps.bl_reqTextFieldProps.bl_req_idTextFieldProps.bl_future_dateTextFieldProps.bl_future_date_idTextFieldProps.bl_inherit_dateTextFieldProps.bl_inherit_date_idTextFieldProps.bl_relatedTextFieldProps.is_blindedTextFieldProps.blinded_rolesTextFieldProps.mvTextFieldProps.nodeleteTextFieldProps.catalogTextFieldProps.commentsTextFieldProps.new_fld_idTextFieldProps.typeTextFieldProps.lengthTextFieldProps.columns
- imednet.form_designer.presets module
- imednet.integrations package
- Submodules
- imednet.integrations.cdisc_export module
- imednet.integrations.dispatcher module
ExportRegistryExportRegistry.__init__()ExportRegistry.get_async_sink()ExportRegistry.get_async_tabular()ExportRegistry.get_config_class()ExportRegistry.get_sink()ExportRegistry.get_tabular()ExportRegistry.register_async_sink()ExportRegistry.register_async_tabular()ExportRegistry.register_config()ExportRegistry.register_sink()ExportRegistry.register_tabular()
async_export()export()register_async_sink_target()register_async_tabular_target()register_config_target()register_sink_target()register_tabular_target()
- imednet.integrations.enrichment module
- imednet.integrations.export module
TabularCSVSinkTabularDuckDBSinkTabularParquetSinkTabularSQLSinkTabularSinkConfigTabularSinkConfig.study_keyTabularSinkConfig.batch_sizeTabularSinkConfig.max_retriesTabularSinkConfig.retry_backoffTabularSinkConfig.idempotentTabularSinkConfig.mask_phiTabularSinkConfig.extraTabularSinkConfig.quality_gate_enabledTabularSinkConfig.min_schema_readiness_scoreTabularSinkConfig.tracerTabularSinkConfig.modified_sinceTabularSinkConfig.record_filterTabularSinkConfig.record_data_filterTabularSinkConfig.include_deletedTabularSinkConfig.incrementalTabularSinkConfig.stream_nameTabularSinkConfig.ledger_pathTabularSinkConfig.state_providerTabularSinkConfig.max_buffered_recordsTabularSinkConfig.as_sdtmTabularSinkConfig.sdtm_domainTabularSinkConfig.standards_profileTabularSinkConfig.min_standards_scoreTabularSinkConfig.naming_conventionTabularSinkConfig.preserve_record_idTabularSinkConfig.manifest_pathTabularSinkConfig.use_labels_as_columnsTabularSinkConfig.sanitizeTabularSinkConfig.variable_whitelistTabularSinkConfig.form_whitelistTabularSinkConfig.pandas_kwargsTabularSinkConfig.__init__()
export_to_csv()export_to_dataset_json()export_to_duckdb()export_to_duckdb_by_form()export_to_excel()export_to_hive_parquet()export_to_json()export_to_long_sql()export_to_odm()export_to_parquet()export_to_sql()export_to_sql_by_form()
- imednet.integrations.parquet module
- imednet.integrations.parquet_engine module
PartitionedStorageEnginePyArrowDatasetPartitionedStorageEnginePyArrowDatasetPartitionedStorageEngine.compressionPyArrowDatasetPartitionedStorageEngine.use_dictionaryPyArrowDatasetPartitionedStorageEngine.existing_data_behaviorPyArrowDatasetPartitionedStorageEngine.staging_dir_namePyArrowDatasetPartitionedStorageEngine.__init__()PyArrowDatasetPartitionedStorageEngine.write_form_table()
- imednet.integrations.sink_base module
- Architecture decision
- Shared contracts
- Optional dependency conventions
- Public-API exposure rules
AsyncBoundedFormBufferRouterAsyncExportSinkBoundedFormBufferRouterExportSinkSdtmLineageSessionSinkConfigSinkConfig.study_keySinkConfig.batch_sizeSinkConfig.max_retriesSinkConfig.retry_backoffSinkConfig.idempotentSinkConfig.mask_phiSinkConfig.extraSinkConfig.quality_gate_enabledSinkConfig.min_schema_readiness_scoreSinkConfig.tracerSinkConfig.modified_sinceSinkConfig.record_filterSinkConfig.record_data_filterSinkConfig.include_deletedSinkConfig.incrementalSinkConfig.stream_nameSinkConfig.ledger_pathSinkConfig.state_providerSinkConfig.max_buffered_recordsSinkConfig.as_sdtmSinkConfig.sdtm_domainSinkConfig.standards_profileSinkConfig.min_standards_scoreSinkConfig.naming_conventionSinkConfig.preserve_record_id
StateProviderProtocolStateProviderProtocol.batch_transaction()StateProviderProtocol.delete_entry()StateProviderProtocol.get_last_timestamp()StateProviderProtocol.get_sdtm_lineage()StateProviderProtocol.read_state()StateProviderProtocol.record_sdtm_lineage()StateProviderProtocol.set_last_timestamp()StateProviderProtocol.transaction()
TabularBatchStampapply_quality_gate()async_apply_quality_gate()async_iter_batches()async_iter_filtered_sdk_records()async_run_streaming_export()bind_sdtm_stream_metadata()build_record_query_branches()commit_sdtm_lineage()evaluate_standards_readiness()extract_record_id()extract_record_timestamp()get_state_provider()get_tabular_batch_stamp()has_valid_tabular_batch_stamp()is_incremental_sink_config()is_record_deleted()iter_batches()iter_filtered_sdk_records()normalize_phi_keys_snapshot()normalize_sink_value()normalize_watermark_datetime()redact_batch_records()rehydrate_sdtm_lineage()resolve_effective_as_sdtm()resolve_max_buffered_records()resolve_voided_sdtm_keys()run_streaming_export()should_preserve_sdtm_record_id()stamp_tabular_batch()validate_max_buffered_records()
- imednet.models package
- Submodules
- imednet.models.base module
- imednet.models.codings module
CodingCoding.study_keyCoding.site_nameCoding.site_idCoding.subject_idCoding.subject_keyCoding.form_idCoding.form_nameCoding.form_keyCoding.record_idCoding.variableCoding.valueCoding.coding_idCoding.codeCoding.coded_byCoding.dictionary_nameCoding.dictionary_versionCoding.date_codedCoding.reasonCoding.revisionCoding.last_updated
- imednet.models.contract module
- imednet.models.engine module
- imednet.models.forms module
FormForm.subject_record_reportForm.unscheduled_visitForm.disabledForm.study_keyForm.form_idForm.form_keyForm.form_nameForm.form_typeForm.revisionForm.date_createdForm.date_modifiedForm.epro_formForm.allow_copyForm.embedded_logForm.enforce_ownershipForm.other_formsForm.user_agreementForm.last_updated
- imednet.models.intervals module
FormSummaryIntervalInterval.formsInterval.study_keyInterval.interval_idInterval.interval_nameInterval.interval_descriptionInterval.interval_sequenceInterval.interval_group_idInterval.interval_group_nameInterval.disabledInterval.date_createdInterval.date_modifiedInterval.actual_dateInterval.actual_date_formInterval.defined_using_intervalInterval.due_date_will_be_inInterval.epro_grace_periodInterval.negative_slackInterval.positive_slackInterval.timelineInterval.window_calculation_dateInterval.window_calculation_formInterval.last_updated
- imednet.models.jobs module
InvalidJobStateErrorInvalidJobTransitionErrorInvalidStateTransitionErrorJobJobStateJobStatusJobStatus.stateJobStatus.job_idJobStatus.batch_idJobStatus.date_createdJobStatus.date_finishedJobStatus.date_startedJobStatus.progressJobStatus.result_urlJobStatus.resultsJobStatus.record_total_countJobStatus.record_success_countJobStatus.record_failure_countJobStatus.result_errorJobStatus.failed_recordsJobStatus.is_failedJobStatus.is_successfulJobStatus.is_terminalJobStatus.successful_recordsJobStatus.total_recordsJobStatus.transition_to()
is_valid_job_transition()normalize_job_state()validate_job_transition()
- imednet.models.queries module
QueryQuery.query_commentsQuery.statusQuery.study_keyQuery.subject_idQuery.annotation_idQuery.descriptionQuery.record_idQuery.variableQuery.subject_keyQuery.date_createdQuery.date_modifiedQuery.annotation_typeQuery.subject_oidQuery.typeQuery.last_updatedQuery.can_transition_to()Query.transition_to()Query.update_status()
QueryCommentQueryStatuscalculate_legacy_status()is_valid_query_transition()is_valid_transition()validate_query_transition()validate_transition()
- imednet.models.record_revisions module
RecordRevisionRecordRevision.record_revisionRecordRevision.data_revisionRecordRevision.record_statusRecordRevision.study_keyRecordRevision.record_revision_idRecordRevision.record_idRecordRevision.subject_idRecordRevision.subject_keyRecordRevision.site_idRecordRevision.form_keyRecordRevision.interval_idRecordRevision.deletedRecordRevision.date_createdRecordRevision.reason_for_changeRecordRevision.record_oidRecordRevision.roleRecordRevision.subject_oidRecordRevision.userRecordRevision.last_updatedRecordRevision.can_follow()RecordRevision.validate_chain()RecordRevision.validate_follows()
is_valid_record_revision_chain()validate_record_revision_chain()
- imednet.models.records module
BaseRecordRequestBaseRecordRequest.form_keyBaseRecordRequest.form_idBaseRecordRequest.site_nameBaseRecordRequest.site_idBaseRecordRequest.subject_keyBaseRecordRequest.subject_idBaseRecordRequest.subject_oidBaseRecordRequest.interval_nameBaseRecordRequest.interval_idBaseRecordRequest.visit_idBaseRecordRequest.record_idBaseRecordRequest.record_oidBaseRecordRequest.record_statusBaseRecordRequest.reason_for_changeBaseRecordRequest.dataBaseRecordRequest.model_dump()
CreateNewRecordRequestCreateNewRecordRequest.form_keyCreateNewRecordRequest.form_idCreateNewRecordRequest.site_nameCreateNewRecordRequest.site_idCreateNewRecordRequest.subject_keyCreateNewRecordRequest.subject_idCreateNewRecordRequest.subject_oidCreateNewRecordRequest.interval_nameCreateNewRecordRequest.interval_idCreateNewRecordRequest.visit_idCreateNewRecordRequest.record_idCreateNewRecordRequest.record_oidCreateNewRecordRequest.record_statusCreateNewRecordRequest.reason_for_changeCreateNewRecordRequest.dataCreateNewRecordRequest.model_dump()
KeywordRecordRecord.keywordsRecord.record_dataRecord.record_statusRecord.deletedRecord.study_keyRecord.interval_idRecord.form_idRecord.form_keyRecord.site_idRecord.record_idRecord.record_oidRecord.record_typeRecord.date_createdRecord.date_modifiedRecord.subject_idRecord.subject_oidRecord.subject_keyRecord.visit_idRecord.parent_record_idRecord.last_updatedRecord.can_transition_to()Record.effective_statusRecord.is_deletedRecord.transition_to()Record.update_status()
RecordDataRecordJobResponseRecordStatusRecordStatus.RECORD_INCOMPLETERecordStatus.RECORD_COMPLETERecordStatus.INCOMPLETERecordStatus.COMPLETERecordStatus.PARTIALRecordStatus.LOCKEDRecordStatus.FROZENRecordStatus.SIGNEDRecordStatus.VERIFIEDRecordStatus.APPROVEDRecordStatus.DELETEDRecordStatus.allowed_transitionsRecordStatus.can_transition_to()RecordStatus.validate_transition_to()
RegisterSubjectRequestRegisterSubjectRequest.form_keyRegisterSubjectRequest.form_idRegisterSubjectRequest.site_nameRegisterSubjectRequest.site_idRegisterSubjectRequest.subject_keyRegisterSubjectRequest.subject_idRegisterSubjectRequest.subject_oidRegisterSubjectRequest.interval_nameRegisterSubjectRequest.interval_idRegisterSubjectRequest.visit_idRegisterSubjectRequest.record_idRegisterSubjectRequest.record_oidRegisterSubjectRequest.record_statusRegisterSubjectRequest.reason_for_changeRegisterSubjectRequest.dataRegisterSubjectRequest.model_dump()
UpdateRecordRequestUpdateRecordRequest.form_keyUpdateRecordRequest.form_idUpdateRecordRequest.site_nameUpdateRecordRequest.site_idUpdateRecordRequest.subject_keyUpdateRecordRequest.subject_idUpdateRecordRequest.subject_oidUpdateRecordRequest.interval_nameUpdateRecordRequest.interval_idUpdateRecordRequest.visit_idUpdateRecordRequest.record_idUpdateRecordRequest.record_oidUpdateRecordRequest.record_statusUpdateRecordRequest.reason_for_changeUpdateRecordRequest.dataUpdateRecordRequest.model_dump()
UpdateScheduledRecordRequestUpdateScheduledRecordRequest.form_keyUpdateScheduledRecordRequest.form_idUpdateScheduledRecordRequest.site_nameUpdateScheduledRecordRequest.site_idUpdateScheduledRecordRequest.subject_keyUpdateScheduledRecordRequest.subject_idUpdateScheduledRecordRequest.subject_oidUpdateScheduledRecordRequest.interval_nameUpdateScheduledRecordRequest.interval_idUpdateScheduledRecordRequest.visit_idUpdateScheduledRecordRequest.record_idUpdateScheduledRecordRequest.record_oidUpdateScheduledRecordRequest.record_statusUpdateScheduledRecordRequest.reason_for_changeUpdateScheduledRecordRequest.dataUpdateScheduledRecordRequest.model_dump()
is_valid_record_transition()normalize_record_status()validate_record_transition()
- imednet.models.reporting module
- imednet.models.sdtm module
async_iter_subject_ordered_sdtm_records()build_form_sdtm_domain_map()deduplicate_sdtm_rows()extract_record_form_ref()extract_sdtm_composite_key()filter_forms_by_sdtm_domain()format_iso8601_dtc()format_nested_variable_name()format_variable_name()get_sdtm_domain_variables()iter_subject_ordered_sdtm_records()merge_form_ids_into_record_filter()normalize_naming_convention()prefix_colliding_variable_name()record_matches_sdtm_domain()resolve_form_sdtm_domain()resolve_sdtm_domain()transform_records_to_sdtm()transform_records_to_sdtm_rows()
- imednet.models.sites module
- imednet.models.standards module
BiologicSafetyProfileCategoricalNormalizerDeviceSafetyProfileDrugSafetyProfileGeneralClinicalProfileNormalizationResultStandardsProfileStandardsProfileRegistryStandardsReadinessReportStandardsReadinessReport.scoreStandardsReadinessReport.successfully_validated_fieldsStandardsReadinessReport.total_expected_fieldsStandardsReadinessReport.warningsStandardsReadinessReport.violationsStandardsReadinessReport.profileStandardsReadinessReport.checked_recordsStandardsReadinessReport.domain_scoresStandardsReadinessReport.checked_fieldsStandardsReadinessReport.is_ready
StandardsReadinessValidatorVaccineSafetyProfileValidationViolationis_valid_cdash_variable()resolve_standards_profile()validate_cdash_variable()
- imednet.models.studies module
- imednet.models.study_config module
MappingRuleStudyConfigurationStudyConfiguration.versionStudyConfiguration.study_keyStudyConfiguration.reporting_profileStudyConfiguration.mappingsStudyConfiguration.terminology_lookupsStudyConfiguration.widgetsStudyConfiguration.phi_fieldsStudyConfiguration.strictStudyConfiguration.strict_modeStudyConfiguration.strict_cdash
WidgetConfig
- imednet.models.study_structure module
FormStructureIntervalStructureIntervalStructure.interval_idIntervalStructure.interval_nameIntervalStructure.interval_sequenceIntervalStructure.interval_descriptionIntervalStructure.interval_group_nameIntervalStructure.disabledIntervalStructure.date_createdIntervalStructure.date_modifiedIntervalStructure.formsIntervalStructure.from_interval()
StudyStructure
- imednet.models.subjects module
SubjectSubject.keywordsSubject.subject_statusSubject.deletedSubject.study_keySubject.subject_idSubject.subject_keySubject.site_idSubject.site_nameSubject.date_createdSubject.date_modifiedSubject.enrollment_start_dateSubject.subject_oidSubject.last_updatedSubject.can_transition_to()Subject.effective_statusSubject.is_deletedSubject.transition_to()Subject.update_status()
SubjectKeywordSubjectStatusSubjectStatus.SCREENEDSubjectStatus.REGISTEREDSubjectStatus.BASELINESubjectStatus.ENROLLEDSubjectStatus.ACTIVESubjectStatus.COMPLETEDSubjectStatus.WITHDRAWNSubjectStatus.SCREEN_FAILEDSubjectStatus.CLOSEDSubjectStatus.INACTIVESubjectStatus.DELETEDSubjectStatus.allowed_transitionsSubjectStatus.can_transition_to()SubjectStatus.validate_transition_to()
is_valid_subject_transition()normalize_subject_status()validate_subject_transition()
- imednet.models.triage module
- imednet.models.users module
- imednet.models.variables module
VariableVariable.labelVariable.variable_oidVariable.requiredVariable.study_keyVariable.variable_idVariable.variable_typeVariable.variable_nameVariable.sequenceVariable.revisionVariable.date_createdVariable.date_modifiedVariable.form_idVariable.form_keyVariable.form_nameVariable.blindedVariable.deletedVariable.disabledVariable.last_updated
- imednet.models.verification module
- imednet.models.visits module
- imednet.orchestration package
- imednet.pagination package
- imednet.resources package
- imednet.simulation package
- Submodules
- imednet.simulation.state module
SimulationStateSimulationState.__init__()SimulationState.get_codings()SimulationState.get_forms()SimulationState.get_intervals()SimulationState.get_queries()SimulationState.get_record_revisions()SimulationState.get_records()SimulationState.get_sites()SimulationState.get_studies()SimulationState.get_subjects()SimulationState.get_users()SimulationState.get_variables()SimulationState.get_visits()SimulationState.reset()
get_default_simulation_state()reset_default_simulation_state()
- imednet.simulation.transport module
- imednet.spi package
- Submodules
- imednet.spi.cdisc module
- imednet.spi.cli module
- imednet.spi.constants module
- imednet.spi.endpoints module
- imednet.spi.errors module
- imednet.spi.facade module
AsyncImednetFacadeAsyncImednetFacade.authAsyncImednetFacade.create_record()AsyncImednetFacade.create_records_batch()AsyncImednetFacade.get_codings()AsyncImednetFacade.get_forms()AsyncImednetFacade.get_intervals()AsyncImednetFacade.get_job()AsyncImednetFacade.get_queries()AsyncImednetFacade.get_record_revisions()AsyncImednetFacade.get_records()AsyncImednetFacade.get_sites()AsyncImednetFacade.get_studies()AsyncImednetFacade.get_subjects()AsyncImednetFacade.get_users()AsyncImednetFacade.get_variables()AsyncImednetFacade.get_visits()AsyncImednetFacade.poll_job()AsyncImednetFacade.poll_jobs()AsyncImednetFacade.study_context()
ImednetFacadeImednetFacade.authImednetFacade.create_record()ImednetFacade.create_records_batch()ImednetFacade.get_codings()ImednetFacade.get_forms()ImednetFacade.get_intervals()ImednetFacade.get_job()ImednetFacade.get_queries()ImednetFacade.get_record_revisions()ImednetFacade.get_records()ImednetFacade.get_sites()ImednetFacade.get_studies()ImednetFacade.get_subjects()ImednetFacade.get_users()ImednetFacade.get_variables()ImednetFacade.get_visits()ImednetFacade.poll_job()ImednetFacade.poll_jobs()ImednetFacade.study_context()
- imednet.spi.models module
- imednet.spi.sink_base module
- imednet.spi.sinks module
- imednet.spi.utils module
delegates_to_sdk_retry_policy()extract_record_errors()extract_sdk_base_url()extract_sdk_security_key()fetch_terminal_job_result_async()format_record_error_item_detail()format_record_error_line()get_base_url_context()get_security_key_context()get_study_context()is_fetchable_result_url()job_item_has_error()matches_revision_date_bound()matches_revision_date_bounds()parse_revision_timestamp_utc()reset_base_url_context()reset_security_key_context()resolve_async_sdk_result_fetcher()sdk_governance_context()security_key_context()set_base_url_context()set_security_key_context()split_revision_date_bounds()
- imednet.spi.validation module
- imednet.testing package
- Submodules
- imednet.testing.data_generator module
RandomDataGeneratorRandomDataGenerator.__init__()RandomDataGenerator.boolean()RandomDataGenerator.bothify()RandomDataGenerator.company()RandomDataGenerator.date_time()RandomDataGenerator.email()RandomDataGenerator.first_name()RandomDataGenerator.last_name()RandomDataGenerator.lexify()RandomDataGenerator.paragraph()RandomDataGenerator.pyfloat()RandomDataGenerator.random_element()RandomDataGenerator.random_int()RandomDataGenerator.sentence()RandomDataGenerator.user_name()RandomDataGenerator.uuid4()RandomDataGenerator.word()
- imednet.testing.fake_data module
- imednet.testing.typed_values module
- imednet.utils package
- Submodules
- imednet.utils.arrow module
- imednet.utils.ast_eval module
- imednet.utils.async_bridge module
SyncToAsyncFacadeAdapterSyncToAsyncFacadeAdapter.__init__()SyncToAsyncFacadeAdapter.authSyncToAsyncFacadeAdapter.configSyncToAsyncFacadeAdapter.create_record()SyncToAsyncFacadeAdapter.create_records_batch()SyncToAsyncFacadeAdapter.get_codings()SyncToAsyncFacadeAdapter.get_forms()SyncToAsyncFacadeAdapter.get_intervals()SyncToAsyncFacadeAdapter.get_job()SyncToAsyncFacadeAdapter.get_queries()SyncToAsyncFacadeAdapter.get_record_revisions()SyncToAsyncFacadeAdapter.get_records()SyncToAsyncFacadeAdapter.get_sites()SyncToAsyncFacadeAdapter.get_studies()SyncToAsyncFacadeAdapter.get_subjects()SyncToAsyncFacadeAdapter.get_users()SyncToAsyncFacadeAdapter.get_variables()SyncToAsyncFacadeAdapter.get_visits()SyncToAsyncFacadeAdapter.poll_job()SyncToAsyncFacadeAdapter.poll_jobs()SyncToAsyncFacadeAdapter.study_context()SyncToAsyncFacadeAdapter.sync_sdk
call_async_facade_method()is_async_facade()maybe_to_thread()run_sync_over_async()
- imednet.utils.batch_coordinator module
AsyncBatchCoordinatorBatchCoordinatorBatchSubmissionSummaryBatchSubmissionSummary.study_keyBatchSubmissionSummary.jobsBatchSubmissionSummary.chunk_sizesBatchSubmissionSummary.total_recordsBatchSubmissionSummary.skipped_countBatchSubmissionSummary.poll_summaryBatchSubmissionSummary.dry_runBatchSubmissionSummary.validation_reportBatchSubmissionSummary.unsubmitted_chunksBatchSubmissionSummary.wait_for_completionBatchSubmissionSummary.has_errorBatchSubmissionSummary.__iter__()BatchSubmissionSummary.all_successfulBatchSubmissionSummary.batch_idsBatchSubmissionSummary.chunk_countBatchSubmissionSummary.created_record_idsBatchSubmissionSummary.enrolled_subject_keysBatchSubmissionSummary.last_jobBatchSubmissionSummary.record_errorsBatchSubmissionSummary.successful_recordsBatchSubmissionSummary.unsubmitted_records
chunk_records()extract_single_submitted_job()poll_facade_many_async()poll_facade_many_sync()poll_facade_single_async()poll_facade_single_sync()sanitize_job_diagnostics()validate_single_job_preflight()
- imednet.utils.dates module
- imednet.utils.db module
- imednet.utils.enrollment module
- imednet.utils.evaluator module
- imednet.utils.filters module
build_filter_string()coerce_query_status()compile_raw_filter_expression()compile_sort_parameter()derive_model_sort_attributes()extract_filter_attributes()matches_query_status_bounds()matches_revision_date_bound()matches_revision_date_bounds()normalize_filter_connectors()parse_filter_expression()parse_filter_expressions()parse_revision_timestamp_utc()resolve_query_status()split_query_status_filters()split_revision_date_bounds()validate_connector_exclusivity()validate_filter_key()validate_filter_operator()validate_filter_syntax()validate_record_filter()
- imednet.utils.job_poller module
- imednet.utils.json_logging module
- imednet.utils.pandas module
- imednet.utils.record_filter_eval module
- imednet.utils.secrets module
- imednet.utils.security module
- imednet.utils.serialization module
- imednet.utils.tabular module
- imednet.utils.typing module
- imednet.utils.url module
- imednet.utils.validators module
- imednet.validation package
- Submodules
- imednet.validation.cache module
AsyncSchemaCacheAsyncSchemaCache.__init__()AsyncSchemaCache.form_key_from_id()AsyncSchemaCache.formsAsyncSchemaCache.forms_for_study()AsyncSchemaCache.is_prevalidatedAsyncSchemaCache.is_record_prevalidated()AsyncSchemaCache.populate()AsyncSchemaCache.prevalidated()AsyncSchemaCache.refresh()AsyncSchemaCache.study_formsAsyncSchemaCache.variables_for_form()
AsyncSchemaValidatorBaseSchemaCacheBaseSchemaCache.__init__()BaseSchemaCache.form_key_from_id()BaseSchemaCache.formsBaseSchemaCache.forms_for_study()BaseSchemaCache.is_prevalidatedBaseSchemaCache.is_record_prevalidated()BaseSchemaCache.populate()BaseSchemaCache.prevalidated()BaseSchemaCache.refresh()BaseSchemaCache.study_formsBaseSchemaCache.variables_for_form()
BaseSchemaValidatorBatchValidationReportBatchValidationReport.total_recordsBatchValidationReport.valid_recordsBatchValidationReport.invalid_recordsBatchValidationReport.errorsBatchValidationReport.warningsBatchValidationReport.error_countBatchValidationReport.format_summary()BatchValidationReport.is_validBatchValidationReport.raise_for_errors()BatchValidationReport.to_dict()
RecordValidationIssueSchemaCacheSchemaValidatorValidationSchemaProtocolcalculate_readiness_score()is_schema_record_prevalidated()prevalidated_records()validate_record_data()validate_record_entry()validate_records_batch()
Submodules¶
imednet.config module¶
Global SDK configuration state.
This module provides the core configuration object for the iMednet SDK.
- class imednet.config.Config[source]¶
Bases:
objectConfiguration object for the SDK client.
- api_key: str | None = None¶
The API key for authentication.
- Type:
str | None
- security_key: str | None = None¶
The security key for authentication.
- Type:
str | None
- base_url: str | None = None¶
The base URL for the iMednet API.
- Type:
str | None
- oidc_token: str | None = None¶
Optional OIDC token for authentication.
- Type:
str | None
- timeout: float = 30.0¶
The default timeout for network requests.
- Type:
float
- strict_mode: bool = False¶
Toggle strict mode for data validation.
- Type:
bool
- simulation_mode: bool = False¶
Toggle offline simulation mode.
- Type:
bool
- imednet.config.load_config(api_key=None, security_key=None, base_url=None, oidc_token=None, timeout=None, strict_mode=None, simulation_mode=None, *, credential_source=None, require_credentials=True, has_transport=False)[source]¶
Return configuration using arguments or environment variables.
- Parameters:
api_key (str | None) – The API key for authentication. Defaults to IMEDNET_API_KEY environment variable.
security_key (str | None) – The security key for authentication. Defaults to IMEDNET_SECURITY_KEY environment variable.
base_url (str | None) – The base URL for the iMednet API. Defaults to IMEDNET_BASE_URL environment variable.
oidc_token (str | None) – Optional OIDC token. Defaults to IMEDNET_OIDC_TOKEN environment variable.
timeout (float | None) – HTTP request timeout in seconds. Defaults to IMEDNET_TIMEOUT environment variable or 30.0.
strict_mode (bool | None) – Toggle strict mode for data validation. Defaults to IMEDNET_STRICT_MODE environment variable or False.
simulation_mode (bool | None) – Toggle offline simulation mode. Defaults to IMEDNET_SIMULATION_MODE environment variable or False.
credential_source (CredentialSource | None) – Optional caller-owned source, consulted before the environment.
require_credentials (bool) – Validate default credential requirements. Custom authentication or an injected client owns authentication when this is False.
has_transport (bool) – Bypass default credential requirements when an offline HTTP transport is supplied.
- Returns:
The loaded SDK configuration.
- Raises:
ConfigurationError – If required authentication parameters are missing or credential loading fails.
- Return type:
imednet.constants module¶
Common constants used throughout the iMednet SDK.
This module centralizes configuration constants to avoid magic numbers and improve maintainability.
- imednet.constants.CONTENT_TYPE_JSON = 'application/json'¶
JSON content type value.
- imednet.constants.DEFAULT_BACKOFF_FACTOR = 1.0¶
Default backoff factor for exponential retry delays.
- imednet.constants.DEFAULT_BASE_URL = 'https://edc.prod.imednetapi.com'¶
Default base URL for the iMednet API.
- imednet.constants.DEFAULT_MAX_RETRY_AFTER = 60.0¶
Default maximum delay in seconds honored from HTTP Retry-After headers.
- imednet.constants.DEFAULT_PAGE_SIZE = 100¶
Default number of items to fetch per page.
- imednet.constants.DEFAULT_RETRIES = 3¶
Default number of retry attempts for failed requests.
- imednet.constants.DEFAULT_TIMEOUT = 30.0¶
Default timeout in seconds for HTTP requests.
- imednet.constants.HEADER_ACCEPT = 'Accept'¶
HTTP Accept header name.
- imednet.constants.HEADER_API_KEY = 'x-api-key'¶
iMednet API key header name.
- imednet.constants.HEADER_CONTENT_TYPE = 'Content-Type'¶
HTTP Content-Type header name.
- imednet.constants.HEADER_EMAIL_NOTIFY = 'x-email-notify'¶
iMednet email notification header name.
- imednet.constants.HEADER_SECURITY_KEY = 'x-imn-security-key'¶
iMednet security key header name.
- imednet.constants.LARGE_PAGE_SIZE = 500¶
Page size for endpoints with large metadata (forms, intervals, variables).
- imednet.constants.MAX_PAGE_SIZE = 500¶
Maximum number of items per page allowed by the upstream iMednet API.
- imednet.constants.MAX_SQLITE_COLUMNS = 2000¶
Maximum number of columns allowed in a SQLite table.
When exporting data to SQLite, tables exceeding this limit must be split into multiple tables.
- imednet.constants.TERMINAL_JOB_STATES = frozenset({'CANCELLED', 'COMPLETE', 'COMPLETED', 'FAILED', 'SUCCESS', 'TIMEOUT'})¶
Job states that indicate the job has finished processing.
These states are used by the job poller to determine when to stop polling. Jobs in these states will not transition to another state.
imednet.discovery module¶
Runtime discovery utilities for live tests and scripts.
- exception imednet.discovery.NoLiveDataError[source]¶
Bases:
RuntimeErrorRaised when required live data cannot be found.
- imednet.discovery.discover_form_key(sdk, study_key)[source]¶
Return the first subject record form key for
study_key.- Parameters:
sdk (ImednetSDK) –
study_key (str) –
- Return type:
str
- imednet.discovery.discover_interval_name(sdk, study_key)[source]¶
Return the first non-disabled interval name for
study_key.- Parameters:
sdk (ImednetSDK) –
study_key (str) –
- Return type:
str
- imednet.discovery.discover_site_name(sdk, study_key)[source]¶
Return the first eligible site name for
study_key.A site is eligible when its
site_enrollment_statusis one ofELIGIBLE_SITE_STATUSES. When no eligible site is found the encountered statuses are logged so callers can distinguish missing data from unsupported status vocabulary.- Parameters:
sdk (ImednetSDK) –
study_key (str) –
- Return type:
str
- imednet.discovery.discover_study_key(sdk)[source]¶
Return the first study key available for the provided SDK.
- Parameters:
sdk (ImednetSDK) –
- Return type:
str
- imednet.discovery.discover_subject_key(sdk, study_key)[source]¶
Return the first eligible subject key for
study_key.A subject is eligible when its
subject_statusis one ofELIGIBLE_SUBJECT_STATUSES. When no eligible subject is found the encountered statuses are logged so callers can distinguish missing data from unsupported status vocabulary.- Parameters:
sdk (ImednetSDK) –
study_key (str) –
- Return type:
str
- imednet.discovery.is_site_eligible(site_enrollment_status)[source]¶
Return
Truewhen site_enrollment_status is usable for live tests.- Parameters:
site_enrollment_status (str | SiteEnrollmentStatus | None) –
- Return type:
bool
- imednet.discovery.is_subject_eligible(subject_status, *, deleted=None)[source]¶
Return
Truewhen subject_status is usable for live tests and not soft-deleted.- Parameters:
subject_status (str | SubjectStatus | None) –
deleted (bool | None) –
- Return type:
bool
imednet.plugins module¶
Plugin contracts for the iMednet SDK.
This module defines the PluginProtocol that namespace-level plugin
factories satisfy when discovered via the imednet.plugins entry-point
group (such as sinks = "imednet_sinks.plugin:create_sinks"), together with
mode-separated SyncWorkflowsNamespaceProtocol,
AsyncWorkflowsNamespaceProtocol, WorkflowsNamespaceProtocol,
SinksNamespaceProtocol, and AsyncSinksNamespaceProtocol.
Individual workflows exposed on sdk.workflows are discovered lazily by
WorkflowRegistry via the imednet.workflows
entry-point group, where each entry point maps a workflow attribute name to a
callable accepting the SDK instance.
Minimal plugin skeleton¶
To register an individual workflow on sdk.workflows:
Expose a class or factory callable under
[project.entry-points."imednet.workflows"].The callable must accept a single argument — the
ImednetSDK(orAsyncImednetSDK) instance — and return the workflow helper.
Example pyproject.toml snippet:
[project.entry-points."imednet.workflows"]
my_workflow = "myplugin.workflows:MyWorkflow"
[project.entry-points."imednet.plugins"]
sinks = "imednet_sinks.plugin:create_sinks"
Example workflow class:
# myplugin/workflows.py
from imednet.sdk import ImednetSDK
class MyWorkflow:
def __init__(self, sdk: ImednetSDK) -> None:
self._sdk = sdk
- class imednet.plugins.AsyncDataExtractionWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.data_extraction.- async extract_audit_trail(study_key, start_date=None, end_date=None, user_filter=None, **filters)[source]¶
Extract record revisions bounded by optional UTC dates and filters.
- Parameters:
study_key (str) –
start_date (str | None) –
end_date (str | None) –
user_filter (dict[str, Any] | None) –
filters (Any) –
- Return type:
list[RecordRevision]
- async extract_odm_audit_records(study_key, start_date=None, end_date=None, user_filter=None, *, default_location_oid=None, mask_phi=True, phi_keys=None, **filters)[source]¶
Asynchronously extract record revisions mapped to CDISC ODM 1.3.2 AuditRecord models.
- Parameters:
study_key (str) –
start_date (str | None) –
end_date (str | None) –
user_filter (dict[str, Any] | None) –
default_location_oid (str | None) –
mask_phi (bool) –
phi_keys (Collection[str] | None) –
filters (Any) –
- Return type:
list[OdmAuditRecord]
- async extract_records_by_criteria(study_key, record_filter=None, subject_filter=None, visit_filter=None, on_progress=None, *, include_deleted=False, record_data_filter=None, **other_filters)[source]¶
Extract study records matching combined subject, visit, and record filters.
- Parameters:
study_key (str) –
record_filter (dict[str, Any] | None) –
subject_filter (dict[str, Any] | None) –
visit_filter (dict[str, Any] | None) –
on_progress (Callable[[str], None] | None) –
include_deleted (bool) –
record_data_filter (str | None) –
other_filters (Any) –
- Return type:
list[Record]
- class imednet.plugins.AsyncDuckDBIngestionWorkflowProtocol[source]¶
Bases:
ProtocolAsynchronous contract for
sdk.workflows.duckdb_centralizeronAsyncImednetSDK.- async build_silver_view(study_key, *, include_deleted=False)[source]¶
Asynchronously create or replace the deduplicated DuckDB silver view for a study.
- Parameters:
study_key (str) –
include_deleted (bool) –
- Return type:
None
- async ingest_revisions(study_key, *, start_date=None, end_date=None, mode='append', mask_phi=None)[source]¶
Asynchronously ingest study record revisions into the DuckDB bronze table.
- Parameters:
study_key (str) –
start_date (str | None) –
end_date (str | None) –
mode (Literal['append', 'replace']) –
mask_phi (bool | None) –
- Return type:
int
- class imednet.plugins.AsyncMongoDbExportSinkFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.AsyncMongoDbExportSink.
- class imednet.plugins.AsyncNeo4jExportSinkFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.AsyncNeo4jExportSink.
- class imednet.plugins.AsyncQueryManagementWorkflowProtocol[source]¶
Bases:
ProtocolAsynchronous contract for
sdk.workflows.query_managementonAsyncImednetSDK.- async extract_odm_annotations(study_key, additional_filter=None, *, open_only=False, include_answered=False, mask_phi=True, phi_keys=None, **kwargs)[source]¶
Asynchronously extract study queries mapped to CDISC ODM 1.3.2 Annotation models.
- Parameters:
study_key (str) –
additional_filter (dict[str, Any] | None) –
open_only (bool) –
include_answered (bool) –
mask_phi (bool) –
phi_keys (Collection[str] | None) –
kwargs (Any) –
- Return type:
list[OdmAnnotation]
- async get_open_queries(study_key, additional_filter=None, include_answered=False, **kwargs)[source]¶
Asynchronously retrieve open queries for a study, optionally including answered.
- Parameters:
study_key (str) –
additional_filter (dict[str, Any] | None) –
include_answered (bool) –
kwargs (Any) –
- Return type:
list[Query]
- async get_queries_by_site(study_key, site_key, additional_filter=None, **kwargs)[source]¶
Asynchronously retrieve queries associated with a specific site.
- Parameters:
study_key (str) –
site_key (str) –
additional_filter (dict[str, Any] | None) –
kwargs (Any) –
- Return type:
list[Query]
- async get_queries_for_subject(study_key, subject_key, additional_filter=None, **kwargs)[source]¶
Asynchronously retrieve queries associated with a specific subject.
- Parameters:
study_key (str) –
subject_key (str) –
additional_filter (dict[str, Any] | None) –
kwargs (Any) –
- Return type:
list[Query]
- async get_query_state_counts(study_key, **kwargs)[source]¶
Asynchronously count queries grouped by query status.
- Parameters:
study_key (str) –
kwargs (Any) –
- Return type:
dict[str, int]
- async get_unresolved_queries(study_key, additional_filter=None, **kwargs)[source]¶
Asynchronously retrieve all unresolved (OPEN and ANSWERED) queries for a study.
- Parameters:
study_key (str) –
additional_filter (dict[str, Any] | None) –
kwargs (Any) –
- Return type:
list[Query]
- async sync_queries_to_triage(study_key, store=None, *, additional_filter=None, unresolved_only=False, default_severity='medium', **kwargs)[source]¶
Asynchronously synchronize clinical queries into a local triage queue.
- Parameters:
study_key (str) –
store (TriageStoreProtocol | str | Path | None) –
additional_filter (dict[str, Any] | None) –
unresolved_only (bool) –
default_severity (str) –
kwargs (Any) –
- Return type:
list[TriageItem]
- class imednet.plugins.AsyncRecordMapperProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.record_mapper.- async build_hierarchy(study_key, visit_key=None, use_labels_as_keys=False, variable_whitelist=None, form_whitelist=None, *, mask_phi=None, include_deleted=None, records=None)[source]¶
Generate a nested JSON hierarchy for study records.
- Parameters:
- Return type:
list[dict[str, Any]]
- async dataframe(study_key, visit_key=None, use_labels_as_columns=True, variable_whitelist=None, form_whitelist=None, *, as_sdtm=False, domain=None, mask_phi=None, include_deleted=None)[source]¶
Return mapped study records as a pandas DataFrame.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
as_sdtm (bool) –
domain (str | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
DataFrame
- iter_dataframes(study_key, visit_key=None, use_labels_as_columns=True, variable_whitelist=None, form_whitelist=None, *, as_sdtm=False, domain=None, mask_phi=None, include_deleted=None)[source]¶
Yield mapped study record DataFrames in bounded chunks.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
as_sdtm (bool) –
domain (str | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
AsyncIterator[DataFrame]
- iter_sdtm_dataframes(study_key, domain, visit_key=None, variable_whitelist=None, form_whitelist=None, *, mask_phi=None, include_deleted=None)[source]¶
Yield chunked DataFrames mapped to a CDISC SDTM domain.
- Parameters:
study_key (str) –
domain (str) –
visit_key (str | None) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
AsyncIterator[DataFrame]
- async sdtm_dataframe(study_key, domain, visit_key=None, variable_whitelist=None, form_whitelist=None, *, mask_phi=None, include_deleted=None)[source]¶
Return study records mapped to a CDISC SDTM domain DataFrame.
- Parameters:
study_key (str) –
domain (str) –
visit_key (str | None) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
DataFrame
- async sdtm_dataset_json(study_key, domain, visit_key=None, variable_whitelist=None, form_whitelist=None, *, preserve_record_id=False, mask_phi=None, include_deleted=None, metadata_version_oid='MDV.001', file_oid=None, creation_datetime=None)[source]¶
Asynchronously emit a CDISC Dataset-JSON v1.1 envelope for a specific SDTM domain.
- Parameters:
study_key (str) –
domain (str) –
visit_key (str | None) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
preserve_record_id (bool) –
mask_phi (bool | None) –
include_deleted (bool | None) –
metadata_version_oid (str) –
file_oid (str | None) –
creation_datetime (str | None) –
- Return type:
- async to_dataset_json(study_key, visit_key=None, use_labels_as_columns=False, variable_whitelist=None, form_whitelist=None, *, form_key=None, as_sdtm=None, domain=None, naming_convention=None, preserve_record_id=False, mask_phi=None, include_deleted=None, metadata_version_oid='MDV.001', file_oid=None, creation_datetime=None, records=None)[source]¶
Asynchronously emit a CDISC Dataset-JSON v1.1 envelope for CDASH Forms or SDTM domains.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
form_key (str | None) –
as_sdtm (bool | None) –
domain (str | None) –
naming_convention (str | None) –
preserve_record_id (bool) –
mask_phi (bool | None) –
include_deleted (bool | None) –
metadata_version_oid (str) –
file_oid (str | None) –
creation_datetime (str | None) –
records (Iterable[Any] | AsyncIterable[Any] | None) –
- Return type:
- async to_dataset_json_bundle(study_key, visit_key=None, use_labels_as_columns=False, variable_whitelist=None, form_whitelist=None, *, form_key=None, as_sdtm=None, domain=None, naming_convention=None, preserve_record_id=False, mask_phi=None, include_deleted=None, metadata_version_oid='MDV.001', file_oid=None, creation_datetime=None, records=None)[source]¶
Asynchronously emit a multi-dataset CDISC Dataset-JSON v1.1 bundle.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
form_key (str | None) –
as_sdtm (bool | None) –
domain (str | None) –
naming_convention (str | None) –
preserve_record_id (bool) –
mask_phi (bool | None) –
include_deleted (bool | None) –
metadata_version_oid (str) –
file_oid (str | None) –
creation_datetime (str | None) –
records (Iterable[Any] | AsyncIterable[Any] | None) –
- Return type:
- transform_to_sdtm(records, domain, study_key, *, mask_phi=None, include_deleted=None, seq_counters=None, record_seqs=None, preserve_record_id=False)[source]¶
Transform records into a normalized SDTM domain DataFrame.
- Parameters:
records (Iterable[Any]) –
domain (str) –
study_key (str) –
mask_phi (bool | None) –
include_deleted (bool | None) –
seq_counters (dict[str, int] | None) –
record_seqs (dict[str, int] | None) –
preserve_record_id (bool) –
- Return type:
DataFrame
- class imednet.plugins.AsyncRecordUpdateWorkflowProtocol[source]¶
Bases:
ProtocolAsynchronous contract for
sdk.workflows.record_updateonAsyncImednetSDK.- async_create_new_record(study_key, form_identifier, subject_identifier, data, form_identifier_type='key', subject_identifier_type='key', wait_for_completion=False, timeout=300, poll_interval=5, *, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Asynchronously create a new unscheduled record for an existing subject.
- Parameters:
study_key (str) –
form_identifier (str | int) –
subject_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- async_create_or_update_records(study_key, records_data, wait_for_completion=False, timeout=300, poll_interval=5, *, email_notify=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Asynchronously submit records for creation or update and return the Job.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async_create_or_update_records_batch(study_key, records_data, wait_for_completion=False, timeout=300, poll_interval=5, *, email_notify=None, chunk_size=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Asynchronously validate once, submit chunks, and return a batch summary.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
chunk_size (int | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async_register_subject(study_key, form_identifier, site_identifier, data, form_identifier_type='key', site_identifier_type='name', wait_for_completion=False, timeout=300, poll_interval=5, *, subject_key=None, subject_oid=None, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Asynchronously register a new subject via the Records API.
- Parameters:
study_key (str) –
form_identifier (str | int) –
site_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
site_identifier_type (Literal['name', 'id']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
subject_key (str | None) –
subject_oid (str | None) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- async_update_record(study_key, data=None, *, record_id=None, record_oid=None, visit_id=None, form_identifier=None, form_identifier_type='key', subject_identifier=None, subject_identifier_type='key', interval_identifier=None, interval_identifier_type='name', site_identifier=None, site_identifier_type='name', record_status=None, reason_for_change=None, wait_for_completion=False, timeout=300, poll_interval=5, email_notify=None, schema=None, resolve_results=True)[source]¶
Asynchronously update an existing record by recordId, recordOid, visitId, or interval.
- Parameters:
study_key (str) –
data (dict[str, Any] | None) –
record_id (int | None) –
record_oid (str | None) –
visit_id (int | None) –
form_identifier (str | int | None) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier (str | int | None) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
interval_identifier (str | int | None) –
interval_identifier_type (Literal['name', 'id']) –
site_identifier (str | int | None) –
site_identifier_type (Literal['name', 'id']) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- async_update_scheduled_record(study_key, form_identifier, subject_identifier, interval_identifier, data, form_identifier_type='key', subject_identifier_type='key', interval_identifier_type='name', wait_for_completion=False, timeout=300, poll_interval=5, *, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Asynchronously update an existing scheduled record for a subject.
- Parameters:
study_key (str) –
form_identifier (str | int) –
subject_identifier (str | int) –
interval_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
interval_identifier_type (Literal['name', 'id']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- async create_new_record(study_key, form_identifier, subject_identifier, data, form_identifier_type='key', subject_identifier_type='key', wait_for_completion=False, timeout=300, poll_interval=5, *, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Create a new unscheduled record for an existing subject.
- Parameters:
study_key (str) –
form_identifier (str | int) –
subject_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- async create_or_update_records(study_key, records_data, wait_for_completion=False, timeout=300, poll_interval=5, *, email_notify=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Submit records for creation or update and return the resulting Job.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async create_or_update_records_batch(study_key, records_data, wait_for_completion=False, timeout=300, poll_interval=5, *, email_notify=None, chunk_size=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Validate once, submit records in bounded chunks, and return a batch summary.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
chunk_size (int | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async register_subject(study_key, form_identifier, site_identifier, data, form_identifier_type='key', site_identifier_type='name', wait_for_completion=False, timeout=300, poll_interval=5, *, subject_key=None, subject_oid=None, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Register a new subject by submitting a single enrollment record.
- Parameters:
study_key (str) –
form_identifier (str | int) –
site_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
site_identifier_type (Literal['name', 'id']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
subject_key (str | None) –
subject_oid (str | None) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- async update_record(study_key, data=None, *, record_id=None, record_oid=None, visit_id=None, form_identifier=None, form_identifier_type='key', subject_identifier=None, subject_identifier_type='key', interval_identifier=None, interval_identifier_type='name', site_identifier=None, site_identifier_type='name', record_status=None, reason_for_change=None, wait_for_completion=False, timeout=300, poll_interval=5, email_notify=None, schema=None, resolve_results=True)[source]¶
Asynchronously update an existing record by recordId, recordOid, visitId, or interval.
- Parameters:
study_key (str) –
data (dict[str, Any] | None) –
record_id (int | None) –
record_oid (str | None) –
visit_id (int | None) –
form_identifier (str | int | None) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier (str | int | None) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
interval_identifier (str | int | None) –
interval_identifier_type (Literal['name', 'id']) –
site_identifier (str | int | None) –
site_identifier_type (Literal['name', 'id']) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- async update_scheduled_record(study_key, form_identifier, subject_identifier, interval_identifier, data, form_identifier_type='key', subject_identifier_type='key', interval_identifier_type='name', wait_for_completion=False, timeout=300, poll_interval=5, *, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Update an existing scheduled record for a subject.
- Parameters:
study_key (str) –
form_identifier (str | int) –
subject_identifier (str | int) –
interval_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
interval_identifier_type (Literal['name', 'id']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- class imednet.plugins.AsyncRegisterSubjectsWorkflowProtocol[source]¶
Bases:
ProtocolAsynchronous contract for
sdk.workflows.register_subjectsonAsyncImednetSDK.- async_register_subjects(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Deprecated alias for
register_subjects().- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async_register_subjects_batch(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, chunk_size=None, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Deprecated alias for
register_subjects_batch().- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
chunk_size (int | None) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async register_subjects(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Asynchronously register one or more subjects in a study.
- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async register_subjects_batch(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, chunk_size=None, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Asynchronously validate sites and submit subject registrations in bounded chunks.
- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
chunk_size (int | None) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- class imednet.plugins.AsyncSinksNamespaceProtocol[source]¶
Bases:
ProtocolAsynchronous sinks namespace contract exposed on
AsyncImednetSDK.sinks.- property AsyncMongoDbExportSink: AsyncMongoDbExportSinkFactoryProtocol¶
Asynchronous sink class for MongoDB record exports.
- property AsyncNeo4jExportSink: AsyncNeo4jExportSinkFactoryProtocol¶
Asynchronous sink class for Neo4j record exports.
- property AsyncSnowflakeExportSink: AsyncSnowflakeExportSinkFactoryProtocol¶
Asynchronous sink class for Snowflake record exports.
- property MongoDbExportSink: MongoDbExportSinkFactoryProtocol¶
Synchronous sink class for MongoDB record exports.
- property MongoDbSinkConfig: MongoDbSinkConfigFactoryProtocol¶
Configuration class for MongoDB export sinks.
- property Neo4jExportSink: Neo4jExportSinkFactoryProtocol¶
Synchronous sink class for Neo4j record exports.
- property Neo4jSinkConfig: Neo4jSinkConfigFactoryProtocol¶
Configuration class for Neo4j export sinks.
- property SnowflakeExportSink: SnowflakeExportSinkFactoryProtocol¶
Synchronous sink class for Snowflake record exports.
- property SnowflakeSinkConfig: SnowflakeSinkConfigFactoryProtocol¶
Configuration class for Snowflake export sinks.
- property export_to_mongodb: BoundAsyncExportToMongoDbProtocol¶
Bound coroutine helper to export study records to MongoDB.
- property export_to_neo4j: BoundAsyncExportToNeo4jProtocol¶
Bound coroutine helper to export study records to Neo4j.
- property export_to_snowflake: BoundAsyncExportToSnowflakeProtocol¶
Bound coroutine helper to export study records to Snowflake.
- class imednet.plugins.AsyncSnowflakeExportSinkFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.AsyncSnowflakeExportSink.
- class imednet.plugins.AsyncStudySchemaInspectorProtocol[source]¶
Bases:
ProtocolAsynchronous contract for
sdk.workflows.uat_inspectoronAsyncImednetSDK.- async_inspect(study_key, *, force_refresh=False)[source]¶
Deprecated alias for
inspect().- Parameters:
study_key (str) –
force_refresh (bool) –
- Return type:
- clear_cache(study_key=None)[source]¶
Clear cached study snapshots.
- Parameters:
study_key (str | None) –
- Return type:
None
- class imednet.plugins.AsyncSubjectDataWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.subject_data.
- class imednet.plugins.AsyncUATWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.uat.- build_spec(snapshot, **kwargs)[source]¶
Auto-generate a UAT specification from a study snapshot.
- Parameters:
snapshot (Any) –
kwargs (Any) –
- Return type:
Any
- generate(spec, snapshot, *, data_dictionary=None, seed=None)[source]¶
Generate synthetic record sets from a UAT specification and snapshot.
- Parameters:
spec (Any) –
snapshot (Any) –
data_dictionary (DataDictionary | None) –
seed (int | None) –
- Return type:
list[Any]
- async inspect(study_key)[source]¶
Inspect study metadata via StudySchemaInspector.
- Parameters:
study_key (str) –
- Return type:
- property last_result: UATRunResultProtocol | None¶
Result from the most recent
run()invocation, if any.
- async monitor(study_key, submission_result)[source]¶
Poll submitted UAT job batches to completion.
- Parameters:
study_key (str) –
submission_result (Any) –
- Return type:
Any
- async run(study_key, *, spec=None, subject_count=2, site_name=None, enabled_form_keys=None, email_notify=None, data_dictionary=None, schema=None, seed=None, dry_run=False)[source]¶
Execute the end-to-end UAT pipeline and return its run result.
- Parameters:
study_key (str) –
spec (Any) –
subject_count (int) –
site_name (str | None) –
enabled_form_keys (list[str] | None) –
email_notify (bool | str | None) –
data_dictionary (DataDictionary | None) –
schema (ValidationSchemaProtocol | None) –
seed (int | None) –
dry_run (bool) –
- Return type:
- property state: str¶
Current lifecycle state of the UAT workflow.
- property state_history: Sequence[str]¶
Recorded lifecycle state transitions for the current or latest run.
- async submit(study_key, record_sets, email_notify=None, *, schema=None)[source]¶
Submit generated UAT record sets in two phases.
- Parameters:
study_key (str) –
record_sets (list[Any]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
- Return type:
Any
- class imednet.plugins.AsyncWorkflowsNamespaceProtocol[source]¶
Bases:
ProtocolAsynchronous workflows namespace contract exposed on
AsyncImednetSDK.workflows.- property data_extraction: AsyncDataExtractionWorkflowProtocol¶
Access the asynchronous data extraction workflow.
- property duckdb_centralizer: AsyncDuckDBIngestionWorkflowProtocol¶
Access the asynchronous DuckDB bronze/silver ingestion workflow.
- property query_management: AsyncQueryManagementWorkflowProtocol¶
Access the asynchronous query management workflow.
- property record_mapper: AsyncRecordMapperProtocol¶
Access the asynchronous tabular and SDTM record mapper workflow.
- property record_update: AsyncRecordUpdateWorkflowProtocol¶
Access the asynchronous record submission and update workflow.
- property register_subjects: AsyncRegisterSubjectsWorkflowProtocol¶
Access the asynchronous bulk subject registration workflow.
- property subject_data: AsyncSubjectDataWorkflowProtocol¶
Access the asynchronous comprehensive subject data retrieval workflow.
- property uat: AsyncUATWorkflowProtocol¶
Access the asynchronous end-to-end UAT orchestration workflow.
- property uat_inspector: AsyncStudySchemaInspectorProtocol¶
Access the asynchronous study schema inspector.
- class imednet.plugins.BoundAsyncExportToMongoDbProtocol[source]¶
Bases:
ProtocolBound coroutine contract for
async_sdk.sinks.export_to_mongodb.- async __call__(study_key: str, uri: str = '', database: str = '', collection: str = '', *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int[source]¶
- async __call__(sdk: AsyncImednetFacade, study_key: str, uri: str = '', database: str = '', collection: str = '', *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int
Asynchronously export study records to MongoDB using the bound
AsyncImednetSDK.
- class imednet.plugins.BoundAsyncExportToNeo4jProtocol[source]¶
Bases:
ProtocolBound coroutine contract for
async_sdk.sinks.export_to_neo4j.- async __call__(study_key: str, uri: str = '', auth: tuple[str, str] = ('', ''), *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int[source]¶
- async __call__(sdk: AsyncImednetFacade, study_key: str, uri: str = '', auth: tuple[str, str] = ('', ''), *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int
Asynchronously export study records to Neo4j using the bound
AsyncImednetSDK.
- class imednet.plugins.BoundAsyncExportToSnowflakeProtocol[source]¶
Bases:
ProtocolBound coroutine contract for
async_sdk.sinks.export_to_snowflake.- async __call__(study_key: str, *, config: Any, mask_phi: bool | None = None) int[source]¶
- async __call__(sdk: AsyncImednetFacade, study_key: str, *, config: Any, mask_phi: bool | None = None) int
Asynchronously export study records to Snowflake using the bound
AsyncImednetSDK.
- class imednet.plugins.BoundExportToMongoDbProtocol[source]¶
Bases:
ProtocolBound callable contract for
sdk.sinks.export_to_mongodb.- __call__(study_key: str, uri: str = '', database: str = '', collection: str = '', *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int[source]¶
- __call__(sdk: ImednetFacade, study_key: str, uri: str = '', database: str = '', collection: str = '', *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int
Export study records to MongoDB using the bound SDK client.
- class imednet.plugins.BoundExportToNeo4jProtocol[source]¶
Bases:
ProtocolBound callable contract for
sdk.sinks.export_to_neo4j.- __call__(study_key: str, uri: str = '', auth: tuple[str, str] = ('', ''), *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int[source]¶
- __call__(sdk: ImednetFacade, study_key: str, uri: str = '', auth: tuple[str, str] = ('', ''), *, config: Any = None, mask_phi: bool | None = None, **kwargs: Any) int
Export study records to Neo4j using the bound SDK client.
- class imednet.plugins.BoundExportToSnowflakeProtocol[source]¶
Bases:
ProtocolBound callable contract for
sdk.sinks.export_to_snowflake.- __call__(study_key: str, *, config: Any, mask_phi: bool | None = None) int[source]¶
- __call__(sdk: ImednetFacade, study_key: str, *, config: Any, mask_phi: bool | None = None) int
Export study records to Snowflake using the bound SDK client.
- class imednet.plugins.DataExtractionWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.data_extraction.- extract_audit_trail(study_key, start_date=None, end_date=None, user_filter=None, **filters)[source]¶
Extract record revisions bounded by optional UTC dates and filters.
- Parameters:
study_key (str) –
start_date (str | None) –
end_date (str | None) –
user_filter (dict[str, Any] | None) –
filters (Any) –
- Return type:
list[RecordRevision]
- extract_odm_audit_records(study_key, start_date=None, end_date=None, user_filter=None, *, default_location_oid=None, mask_phi=True, phi_keys=None, **filters)[source]¶
Extract record revisions mapped to CDISC ODM 1.3.2 AuditRecord models.
- Parameters:
study_key (str) –
start_date (str | None) –
end_date (str | None) –
user_filter (dict[str, Any] | None) –
default_location_oid (str | None) –
mask_phi (bool) –
phi_keys (Collection[str] | None) –
filters (Any) –
- Return type:
list[OdmAuditRecord]
- extract_records_by_criteria(study_key, record_filter=None, subject_filter=None, visit_filter=None, on_progress=None, *, include_deleted=False, record_data_filter=None, **other_filters)[source]¶
Extract study records matching combined subject, visit, and record filters.
- Parameters:
study_key (str) –
record_filter (dict[str, Any] | None) –
subject_filter (dict[str, Any] | None) –
visit_filter (dict[str, Any] | None) –
on_progress (Callable[[str], None] | None) –
include_deleted (bool) –
record_data_filter (str | None) –
other_filters (Any) –
- Return type:
list[Record]
- class imednet.plugins.DuckDBIngestionWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.duckdb_centralizer.- build_silver_view(study_key, *, include_deleted=False)[source]¶
Create or replace the deduplicated DuckDB silver view for a study.
- Parameters:
study_key (str) –
include_deleted (bool) –
- Return type:
None
- ingest_revisions(study_key, *, start_date=None, end_date=None, mode='append', mask_phi=None)[source]¶
Ingest study record revisions into the DuckDB bronze table.
- Parameters:
study_key (str) –
start_date (str | None) –
end_date (str | None) –
mode (Literal['append', 'replace']) –
mask_phi (bool | None) –
- Return type:
int
- class imednet.plugins.MongoDbExportSinkFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.MongoDbExportSink.
- class imednet.plugins.MongoDbSinkConfigFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.MongoDbSinkConfig.- __call__(study_key, batch_size=500, max_retries=3, retry_backoff=1.0, idempotent=True, mask_phi=True, extra=Ellipsis, quality_gate_enabled=False, min_schema_readiness_score=100.0, tracer=None, modified_since=None, record_filter=None, record_data_filter=None, include_deleted=False, incremental=False, stream_name=None, ledger_path=None, state_provider=None, max_buffered_records=None, as_sdtm=False, sdtm_domain=None, standards_profile=None, min_standards_score=None, naming_convention=None, preserve_record_id=None, uri='', database='', collection='')[source]¶
Instantiate a MongoDB sink configuration.
- Parameters:
study_key (str) –
batch_size (int) –
max_retries (int) –
retry_backoff (float) –
idempotent (bool) –
mask_phi (bool) –
extra (dict[str, Any]) –
quality_gate_enabled (bool) –
min_schema_readiness_score (float) –
tracer (Any | None) –
modified_since (datetime | str | None) –
record_filter (dict[str, Any] | str | None) –
record_data_filter (str | None) –
include_deleted (bool) –
incremental (bool) –
stream_name (str | None) –
ledger_path (str | Path | None) –
state_provider (Any | None) –
max_buffered_records (int | None) –
as_sdtm (bool) –
sdtm_domain (str | None) –
standards_profile (str | Any | None) –
min_standards_score (float | None) –
naming_convention (str | None) –
preserve_record_id (bool | None) –
uri (str) –
database (str) –
collection (str) –
- Return type:
- class imednet.plugins.MongoDbSinkConfigProtocol[source]¶
Bases:
ProtocolStructural contract for
MongoDbSinkConfiginstances.- study_key: str¶
- uri: str¶
- database: str¶
- collection: str¶
- batch_size: int¶
- max_buffered_records: int | None¶
- as_sdtm: bool¶
- sdtm_domain: str | None¶
- standards_profile: str | Any | None¶
- min_standards_score: float | None¶
- naming_convention: str | None¶
- preserve_record_id: bool | None¶
- idempotent: bool¶
- mask_phi: bool¶
- include_deleted: bool¶
- incremental: bool¶
- modified_since: datetime | str | None¶
- record_filter: dict[str, Any] | str | None¶
- class imednet.plugins.Neo4jExportSinkFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.Neo4jExportSink.
- class imednet.plugins.Neo4jSinkConfigFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.Neo4jSinkConfig.- __call__(study_key, batch_size=500, max_retries=3, retry_backoff=1.0, idempotent=True, mask_phi=True, extra=Ellipsis, quality_gate_enabled=False, min_schema_readiness_score=100.0, tracer=None, modified_since=None, record_filter=None, record_data_filter=None, include_deleted=False, incremental=False, stream_name=None, ledger_path=None, state_provider=None, max_buffered_records=None, as_sdtm=False, sdtm_domain=None, standards_profile=None, min_standards_score=None, naming_convention=None, preserve_record_id=None, uri='', auth=('', ''), database='neo4j')[source]¶
Instantiate a Neo4j sink configuration.
- Parameters:
study_key (str) –
batch_size (int) –
max_retries (int) –
retry_backoff (float) –
idempotent (bool) –
mask_phi (bool) –
extra (dict[str, Any]) –
quality_gate_enabled (bool) –
min_schema_readiness_score (float) –
tracer (Any | None) –
modified_since (datetime | str | None) –
record_filter (dict[str, Any] | str | None) –
record_data_filter (str | None) –
include_deleted (bool) –
incremental (bool) –
stream_name (str | None) –
ledger_path (str | Path | None) –
state_provider (Any | None) –
max_buffered_records (int | None) –
as_sdtm (bool) –
sdtm_domain (str | None) –
standards_profile (str | Any | None) –
min_standards_score (float | None) –
naming_convention (str | None) –
preserve_record_id (bool | None) –
uri (str) –
auth (tuple[str, str]) –
database (str) –
- Return type:
- class imednet.plugins.Neo4jSinkConfigProtocol[source]¶
Bases:
ProtocolStructural contract for
Neo4jSinkConfiginstances.- study_key: str¶
- uri: str¶
- auth: tuple[str, str]¶
- database: str¶
- batch_size: int¶
- max_buffered_records: int | None¶
- as_sdtm: bool¶
- sdtm_domain: str | None¶
- standards_profile: str | Any | None¶
- min_standards_score: float | None¶
- naming_convention: str | None¶
- preserve_record_id: bool | None¶
- idempotent: bool¶
- mask_phi: bool¶
- include_deleted: bool¶
- incremental: bool¶
- modified_since: datetime | str | None¶
- record_filter: dict[str, Any] | str | None¶
- class imednet.plugins.PluginProtocol[source]¶
Bases:
ProtocolProtocol that every iMednet plugin factory must satisfy.
A conforming factory is a callable that accepts an SDK instance and returns an object implementing
WorkflowsNamespaceProtocol.Example:
from imednet.plugins import PluginProtocol from imednet.sdk import ImednetSDK class MyWorkflows: def __init__(self, sdk: ImednetSDK) -> None: self.data_extraction = ... self.duckdb_centralizer = ... self.query_management = ... self.record_mapper = ... self.record_update = ... self.register_subjects = ... self.subject_data = ... self.uat = ... self.uat_inspector = ... def create_workflows(sdk: ImednetSDK) -> MyWorkflows: return MyWorkflows(sdk) # Verify conformance at import time (optional, for development use): assert isinstance(create_workflows, PluginProtocol)
- __call__(sdk_instance, /)[source]¶
Initialize the workflows plugin with an SDK instance.
- Parameters:
sdk_instance (ImednetFacade) –
- Return type:
- class imednet.plugins.QueryManagementWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.query_management.- extract_odm_annotations(study_key, additional_filter=None, *, open_only=False, include_answered=False, mask_phi=True, phi_keys=None, **kwargs)[source]¶
Extract study queries mapped to CDISC ODM 1.3.2 Annotation models.
- Parameters:
study_key (str) –
additional_filter (dict[str, Any] | None) –
open_only (bool) –
include_answered (bool) –
mask_phi (bool) –
phi_keys (Collection[str] | None) –
kwargs (Any) –
- Return type:
list[OdmAnnotation]
- get_open_queries(study_key, additional_filter=None, include_answered=False, **kwargs)[source]¶
Retrieve open queries for a study, optionally including answered queries.
- Parameters:
study_key (str) –
additional_filter (dict[str, Any] | None) –
include_answered (bool) –
kwargs (Any) –
- Return type:
list[Query]
- get_queries_by_site(study_key, site_key, additional_filter=None, **kwargs)[source]¶
Retrieve queries associated with a specific site.
- Parameters:
study_key (str) –
site_key (str) –
additional_filter (dict[str, Any] | None) –
kwargs (Any) –
- Return type:
list[Query]
- get_queries_for_subject(study_key, subject_key, additional_filter=None, **kwargs)[source]¶
Retrieve queries associated with a specific subject.
- Parameters:
study_key (str) –
subject_key (str) –
additional_filter (dict[str, Any] | None) –
kwargs (Any) –
- Return type:
list[Query]
- get_query_state_counts(study_key, **kwargs)[source]¶
Count queries grouped by query status.
- Parameters:
study_key (str) –
kwargs (Any) –
- Return type:
dict[str, int]
- get_unresolved_queries(study_key, additional_filter=None, **kwargs)[source]¶
Retrieve all unresolved (OPEN and ANSWERED) queries for a study.
- Parameters:
study_key (str) –
additional_filter (dict[str, Any] | None) –
kwargs (Any) –
- Return type:
list[Query]
- sync_queries_to_triage(study_key, store=None, *, additional_filter=None, unresolved_only=False, default_severity='medium', **kwargs)[source]¶
Synchronize clinical queries for a study into a local triage queue.
- Parameters:
study_key (str) –
store (TriageStoreProtocol | str | Path | None) –
additional_filter (dict[str, Any] | None) –
unresolved_only (bool) –
default_severity (str) –
kwargs (Any) –
- Return type:
list[TriageItem]
- class imednet.plugins.RecordMapperProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.record_mapper.- build_hierarchy(study_key, visit_key=None, use_labels_as_keys=False, variable_whitelist=None, form_whitelist=None, *, mask_phi=None, include_deleted=None, records=None)[source]¶
Generate a nested JSON hierarchy for study records.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_keys (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
records (Iterable[Record] | None) –
- Return type:
list[dict[str, Any]]
- dataframe(study_key, visit_key=None, use_labels_as_columns=True, variable_whitelist=None, form_whitelist=None, *, as_sdtm=False, domain=None, mask_phi=None, include_deleted=None)[source]¶
Return mapped study records as a pandas DataFrame.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
as_sdtm (bool) –
domain (str | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
DataFrame
- iter_dataframes(study_key, visit_key=None, use_labels_as_columns=True, variable_whitelist=None, form_whitelist=None, *, as_sdtm=False, domain=None, mask_phi=None, include_deleted=None)[source]¶
Yield mapped study record DataFrames in bounded chunks.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
as_sdtm (bool) –
domain (str | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
Iterator[DataFrame]
- iter_sdtm_dataframes(study_key, domain, visit_key=None, variable_whitelist=None, form_whitelist=None, *, mask_phi=None, include_deleted=None)[source]¶
Yield chunked DataFrames mapped to a CDISC SDTM domain.
- Parameters:
study_key (str) –
domain (str) –
visit_key (str | None) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
Iterator[DataFrame]
- sdtm_dataframe(study_key, domain, visit_key=None, variable_whitelist=None, form_whitelist=None, *, mask_phi=None, include_deleted=None)[source]¶
Return study records mapped to a CDISC SDTM domain DataFrame.
- Parameters:
study_key (str) –
domain (str) –
visit_key (str | None) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
mask_phi (bool | None) –
include_deleted (bool | None) –
- Return type:
DataFrame
- sdtm_dataset_json(study_key, domain, visit_key=None, variable_whitelist=None, form_whitelist=None, *, preserve_record_id=False, mask_phi=None, include_deleted=None, metadata_version_oid='MDV.001', file_oid=None, creation_datetime=None)[source]¶
Emit a CDISC Dataset-JSON v1.1 envelope for a specific SDTM domain.
- Parameters:
study_key (str) –
domain (str) –
visit_key (str | None) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
preserve_record_id (bool) –
mask_phi (bool | None) –
include_deleted (bool | None) –
metadata_version_oid (str) –
file_oid (str | None) –
creation_datetime (str | None) –
- Return type:
- to_dataset_json(study_key, visit_key=None, use_labels_as_columns=False, variable_whitelist=None, form_whitelist=None, *, form_key=None, as_sdtm=None, domain=None, naming_convention=None, preserve_record_id=False, mask_phi=None, include_deleted=None, metadata_version_oid='MDV.001', file_oid=None, creation_datetime=None, records=None)[source]¶
Emit a CDISC Dataset-JSON v1.1 envelope for CDASH Forms or SDTM domains.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
form_key (str | None) –
as_sdtm (bool | None) –
domain (str | None) –
naming_convention (str | None) –
preserve_record_id (bool) –
mask_phi (bool | None) –
include_deleted (bool | None) –
metadata_version_oid (str) –
file_oid (str | None) –
creation_datetime (str | None) –
records (Iterable[Any] | None) –
- Return type:
- to_dataset_json_bundle(study_key, visit_key=None, use_labels_as_columns=False, variable_whitelist=None, form_whitelist=None, *, form_key=None, as_sdtm=None, domain=None, naming_convention=None, preserve_record_id=False, mask_phi=None, include_deleted=None, metadata_version_oid='MDV.001', file_oid=None, creation_datetime=None, records=None)[source]¶
Emit a multi-dataset CDISC Dataset-JSON v1.1 bundle for CDASH Forms or SDTM domains.
- Parameters:
study_key (str) –
visit_key (str | None) –
use_labels_as_columns (bool) –
variable_whitelist (list[str] | None) –
form_whitelist (list[int] | None) –
form_key (str | None) –
as_sdtm (bool | None) –
domain (str | None) –
naming_convention (str | None) –
preserve_record_id (bool) –
mask_phi (bool | None) –
include_deleted (bool | None) –
metadata_version_oid (str) –
file_oid (str | None) –
creation_datetime (str | None) –
records (Iterable[Any] | None) –
- Return type:
- transform_to_sdtm(records, domain, study_key, *, mask_phi=None, include_deleted=None, seq_counters=None, record_seqs=None, preserve_record_id=False)[source]¶
Transform records into a normalized SDTM domain DataFrame.
- Parameters:
records (Iterable[Any]) –
domain (str) –
study_key (str) –
mask_phi (bool | None) –
include_deleted (bool | None) –
seq_counters (dict[str, int] | None) –
record_seqs (dict[str, int] | None) –
preserve_record_id (bool) –
- Return type:
DataFrame
- imednet.plugins.RegisterSubjectsWorkflowProtocol: TypeAlias = SyncRegisterSubjectsWorkflowProtocol¶
Explicit protocol type alias for
SyncRegisterSubjectsWorkflowProtocol.
- class imednet.plugins.SinksNamespaceProtocol[source]¶
Bases:
ProtocolSynchronous sinks namespace contract exposed on
ImednetSDK.sinks.- property MongoDbExportSink: MongoDbExportSinkFactoryProtocol¶
Sink class for MongoDB record exports.
- property MongoDbSinkConfig: MongoDbSinkConfigFactoryProtocol¶
Configuration class for MongoDB export sinks.
- property Neo4jExportSink: Neo4jExportSinkFactoryProtocol¶
Sink class for Neo4j record exports.
- property Neo4jSinkConfig: Neo4jSinkConfigFactoryProtocol¶
Configuration class for Neo4j export sinks.
- property SnowflakeExportSink: SnowflakeExportSinkFactoryProtocol¶
Sink class for Snowflake record exports.
- property SnowflakeSinkConfig: SnowflakeSinkConfigFactoryProtocol¶
Configuration class for Snowflake export sinks.
- property export_to_mongodb: BoundExportToMongoDbProtocol¶
Bound helper to export study records to MongoDB.
- property export_to_neo4j: BoundExportToNeo4jProtocol¶
Bound helper to export study records to Neo4j.
- property export_to_snowflake: BoundExportToSnowflakeProtocol¶
Bound helper to export study records to Snowflake.
- class imednet.plugins.SinksPluginProtocol[source]¶
Bases:
ProtocolProtocol for the sinks plugin factory.
- __call__(sdk_instance: AsyncImednetFacade, /) AsyncSinksNamespaceProtocol[source]¶
- __call__(sdk_instance: ImednetFacade, /) SinksNamespaceProtocol
- __call__(sdk_instance: ImednetFacade | AsyncImednetFacade, /) SinksNamespaceProtocol | AsyncSinksNamespaceProtocol
Initialize the sinks plugin with an SDK instance.
- class imednet.plugins.SnowflakeExportSinkFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.SnowflakeExportSink.
- class imednet.plugins.SnowflakeSinkConfigFactoryProtocol[source]¶
Bases:
ProtocolCallable factory contract for
sdk.sinks.SnowflakeSinkConfig.- __call__(study_key, batch_size=500, max_retries=3, retry_backoff=1.0, idempotent=True, mask_phi=True, extra=Ellipsis, quality_gate_enabled=False, min_schema_readiness_score=100.0, tracer=None, modified_since=None, record_filter=None, record_data_filter=None, include_deleted=False, incremental=False, stream_name=None, ledger_path=None, state_provider=None, max_buffered_records=None, as_sdtm=False, sdtm_domain=None, standards_profile=None, min_standards_score=None, naming_convention=None, preserve_record_id=None, account='', user='', password='', database='', schema='PUBLIC', warehouse='', stage='', table='', stage_prefix='imednet', prefix=None, local_staging_dir=None, manifest_path=None, hard_delete=False)[source]¶
Instantiate a Snowflake sink configuration.
- Parameters:
study_key (str) –
batch_size (int) –
max_retries (int) –
retry_backoff (float) –
idempotent (bool) –
mask_phi (bool) –
extra (dict[str, Any]) –
quality_gate_enabled (bool) –
min_schema_readiness_score (float) –
tracer (Any | None) –
modified_since (datetime | str | None) –
record_filter (dict[str, Any] | str | None) –
record_data_filter (str | None) –
include_deleted (bool) –
incremental (bool) –
stream_name (str | None) –
ledger_path (str | Path | None) –
state_provider (Any | None) –
max_buffered_records (int | None) –
as_sdtm (bool) –
sdtm_domain (str | None) –
standards_profile (str | Any | None) –
min_standards_score (float | None) –
naming_convention (str | None) –
preserve_record_id (bool | None) –
account (str) –
user (str) –
password (str) –
database (str) –
schema (str) –
warehouse (str) –
stage (str) –
table (str) –
stage_prefix (str) –
prefix (str | None) –
local_staging_dir (str | PathLike[str] | None) –
manifest_path (str | PathLike[str] | None) –
hard_delete (bool) –
- Return type:
- class imednet.plugins.SnowflakeSinkConfigProtocol[source]¶
Bases:
ProtocolStructural contract for
SnowflakeSinkConfiginstances.- study_key: str¶
- account: str¶
- user: str¶
- database: str¶
- schema: str¶
- warehouse: str¶
- stage: str¶
- table: str¶
- stage_prefix: str¶
- batch_size: int¶
- max_buffered_records: int | None¶
- as_sdtm: bool¶
- sdtm_domain: str | None¶
- standards_profile: str | Any | None¶
- min_standards_score: float | None¶
- naming_convention: str | None¶
- preserve_record_id: bool | None¶
- idempotent: bool¶
- mask_phi: bool¶
- include_deleted: bool¶
- incremental: bool¶
- modified_since: datetime | str | None¶
- record_filter: dict[str, Any] | str | None¶
- class imednet.plugins.StudySnapshotProtocol[source]¶
Bases:
ProtocolStructural contract for a study metadata snapshot.
- property captured_at: datetime¶
UTC timestamp when the snapshot was captured.
- enrollment_forms()[source]¶
Return forms configured for subject enrollment/registration.
- Return type:
list[Form]
- property forms: list[imednet.models.forms.Form]¶
Study form definitions.
- property forms_by_key: dict[str, imednet.models.forms.Form]¶
Lookup dictionary mapping form keys to Form models.
- property intervals: list[imednet.models.intervals.Interval]¶
Study interval definitions.
- property intervals_by_name: dict[str, imednet.models.intervals.Interval]¶
Lookup dictionary mapping interval names to Interval models.
- property sites: list[imednet.models.sites.Site]¶
Study site definitions.
- property study_key: str¶
Study key identifier.
- property variables: list[imednet.models.variables.Variable]¶
Study variable definitions.
- property variables_by_form: dict[str, list[imednet.models.variables.Variable]]¶
Lookup dictionary mapping form keys to Variable lists.
- class imednet.plugins.SubjectComprehensiveDataProtocol[source]¶
Bases:
ProtocolStructural contract for aggregated subject data returned by
subject_data.- property queries: list[imednet.models.queries.Query]¶
Queries associated with the subject.
- property records: list[imednet.models.records.Record]¶
Records associated with the subject.
- property visits: list[imednet.models.visits.Visit]¶
Visits associated with the subject.
- class imednet.plugins.SubjectDataWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.subject_data.
- class imednet.plugins.SyncRecordUpdateWorkflowProtocol[source]¶
Bases:
ProtocolSynchronous contract for
sdk.workflows.record_updateonImednetSDK.- create_new_record(study_key, form_identifier, subject_identifier, data, form_identifier_type='key', subject_identifier_type='key', wait_for_completion=False, timeout=300, poll_interval=5, *, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Create a new unscheduled record for an existing subject.
- Parameters:
study_key (str) –
form_identifier (str | int) –
subject_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- create_or_update_records(study_key, records_data, wait_for_completion=False, timeout=300, poll_interval=5, *, email_notify=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Submit records for creation or update and return the resulting Job.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- create_or_update_records_batch(study_key, records_data, wait_for_completion=False, timeout=300, poll_interval=5, *, email_notify=None, chunk_size=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Validate once, submit records in bounded chunks, and return a batch summary.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
chunk_size (int | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- register_subject(study_key, form_identifier, site_identifier, data, form_identifier_type='key', site_identifier_type='name', wait_for_completion=False, timeout=300, poll_interval=5, *, subject_key=None, subject_oid=None, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Register a new subject by submitting a single enrollment record.
- Parameters:
study_key (str) –
form_identifier (str | int) –
site_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
site_identifier_type (Literal['name', 'id']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
subject_key (str | None) –
subject_oid (str | None) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- update_record(study_key, data=None, *, record_id=None, record_oid=None, visit_id=None, form_identifier=None, form_identifier_type='key', subject_identifier=None, subject_identifier_type='key', interval_identifier=None, interval_identifier_type='name', site_identifier=None, site_identifier_type='name', record_status=None, reason_for_change=None, wait_for_completion=False, timeout=300, poll_interval=5, email_notify=None, schema=None, resolve_results=True)[source]¶
Update an existing record by recordId, recordOid, visitId, or interval.
- Parameters:
study_key (str) –
data (dict[str, Any] | None) –
record_id (int | None) –
record_oid (str | None) –
visit_id (int | None) –
form_identifier (str | int | None) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier (str | int | None) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
interval_identifier (str | int | None) –
interval_identifier_type (Literal['name', 'id']) –
site_identifier (str | int | None) –
site_identifier_type (Literal['name', 'id']) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- update_scheduled_record(study_key, form_identifier, subject_identifier, interval_identifier, data, form_identifier_type='key', subject_identifier_type='key', interval_identifier_type='name', wait_for_completion=False, timeout=300, poll_interval=5, *, record_status=None, reason_for_change=None, email_notify=None, schema=None, resolve_results=True)[source]¶
Update an existing scheduled record for a subject.
- Parameters:
study_key (str) –
form_identifier (str | int) –
subject_identifier (str | int) –
interval_identifier (str | int) –
data (dict[str, Any]) –
form_identifier_type (Literal['key', 'id']) –
subject_identifier_type (Literal['key', 'id', 'oid']) –
interval_identifier_type (Literal['name', 'id']) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
record_status (RecordStatus | str | None) –
reason_for_change (str | None) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
resolve_results (bool) –
- Return type:
- class imednet.plugins.SyncRegisterSubjectsWorkflowProtocol[source]¶
Bases:
ProtocolSynchronous contract for
sdk.workflows.register_subjectsonImednetSDK.- async async_register_subjects(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Asynchronously register one or more subjects in a study.
- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async async_register_subjects_batch(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, chunk_size=None, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Asynchronously register subjects in bounded chunks.
- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
chunk_size (int | None) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- register_subjects(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Register one or more subjects in a study.
- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- register_subjects_batch(study_key, subjects, email_notify=None, wait_for_completion=False, timeout=300, poll_interval=5, *, chunk_size=None, filter_enrolled=None, skip_existing=False, subject_key_field=None, schema=None, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Validate sites and submit subject registrations in bounded chunks.
- Parameters:
study_key (str) –
subjects (Sequence[RegisterSubjectRequest | dict[str, Any]] | Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (str | None) –
wait_for_completion (bool) –
timeout (int) –
poll_interval (int) –
chunk_size (int | None) –
filter_enrolled (bool | None) –
skip_existing (bool) –
subject_key_field (str | None) –
schema (ValidationSchemaProtocol | None) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- imednet.plugins.SyncSinksNamespaceProtocol: TypeAlias = SinksNamespaceProtocol¶
Explicit protocol type alias for
SinksNamespaceProtocol.
- class imednet.plugins.SyncStudySchemaInspectorProtocol[source]¶
Bases:
ProtocolSynchronous contract for
sdk.workflows.uat_inspectoronImednetSDK.- clear_cache(study_key=None)[source]¶
Clear cached study snapshots.
- Parameters:
study_key (str | None) –
- Return type:
None
- class imednet.plugins.SyncWorkflowsNamespaceProtocol[source]¶
Bases:
ProtocolSynchronous workflows namespace contract exposed on
ImednetSDK.workflows.- property data_extraction: DataExtractionWorkflowProtocol¶
Access the synchronous data extraction workflow.
- property duckdb_centralizer: DuckDBIngestionWorkflowProtocol¶
Access the lazy DuckDB bronze/silver ingestion workflow.
- property query_management: QueryManagementWorkflowProtocol¶
Access the query management workflow.
- property record_mapper: RecordMapperProtocol¶
Access the tabular and SDTM record mapper workflow.
- property record_update: SyncRecordUpdateWorkflowProtocol¶
Access the synchronous record submission and update workflow.
- property register_subjects: SyncRegisterSubjectsWorkflowProtocol¶
Access the synchronous bulk subject registration workflow.
- property subject_data: SubjectDataWorkflowProtocol¶
Access the comprehensive subject data retrieval workflow.
- property uat: UATWorkflowProtocol¶
Access the end-to-end UAT orchestration workflow.
- property uat_inspector: SyncStudySchemaInspectorProtocol¶
Access the synchronous study schema inspector.
- class imednet.plugins.TriageStoreProtocol[source]¶
Bases:
ProtocolStructural contract for triage stores used by
sdk.workflows.query_management.- get_queue(study_key, status=None)[source]¶
Fetch the triage queue for a study, optionally filtered by status.
- Parameters:
study_key (str) –
status (TriageStatus | None) –
- Return type:
list[TriageItem]
- get_triage_item(item_id)[source]¶
Fetch a single triage item by ID.
- Parameters:
item_id (str) –
- Return type:
TriageItem | None
- upsert_item(item)[source]¶
Insert or update a triage item while preserving annotations and history.
- Parameters:
item (TriageItem) –
- Return type:
None
- class imednet.plugins.UATRunResultProtocol[source]¶
Bases:
ProtocolStructural contract for
UATWorkflow.runexecution results.- property completed_at: datetime | None¶
UTC timestamp when the UAT run finished, if completed.
- property dry_run: bool¶
Whether the run executed in local dry-run validation mode.
- property error_message: str | None¶
Failure message captured when a phase errors.
- property failed_phase: str | None¶
Alias for
failure_phase.
- property failure_phase: str | None¶
Phase in which execution failed, if any.
- property is_terminal: bool¶
Whether the run reached a terminal lifecycle state.
- property overall_success: bool¶
Whether all UAT batches completed without failure.
- property phase_durations: Mapping[str, float]¶
Elapsed seconds recorded per execution phase.
- property poll_summary: Any¶
Job polling summary produced by the monitor phase.
- property record_sets: Sequence[Any]¶
Generated synthetic record sets submitted during the run.
- property run_id: str¶
Unique execution identifier.
- property spec: Any¶
Generated or supplied UAT specification.
- property started_at: datetime¶
UTC timestamp when the UAT run started.
- property state: str¶
Current or final lifecycle state value.
- property state_history: Sequence[str]¶
Ordered sequence of visited lifecycle states.
- property study_key: str¶
Study key tested.
- property submission_result: Any¶
Bulk submission result produced by the submit phase.
- property validation_report: Any¶
Local batch validation report captured during dry-run execution, if any.
- class imednet.plugins.UATWorkflowProtocol[source]¶
Bases:
ProtocolStructural contract for
sdk.workflows.uat.- build_spec(snapshot, **kwargs)[source]¶
Auto-generate a UAT specification from a study snapshot.
- Parameters:
snapshot (Any) –
kwargs (Any) –
- Return type:
Any
- generate(spec, snapshot, *, data_dictionary=None, seed=None)[source]¶
Generate synthetic record sets from a UAT specification and snapshot.
- Parameters:
spec (Any) –
snapshot (Any) –
data_dictionary (DataDictionary | None) –
seed (int | None) –
- Return type:
list[Any]
- inspect(study_key)[source]¶
Inspect study metadata via StudySchemaInspector.
- Parameters:
study_key (str) –
- Return type:
- property last_result: UATRunResultProtocol | None¶
Result from the most recent
run()invocation, if any.
- monitor(study_key, submission_result)[source]¶
Poll submitted UAT job batches to completion.
- Parameters:
study_key (str) –
submission_result (Any) –
- Return type:
Any
- run(study_key, *, spec=None, subject_count=2, site_name=None, enabled_form_keys=None, email_notify=None, data_dictionary=None, schema=None, seed=None, dry_run=False)[source]¶
Execute the end-to-end UAT pipeline and return its run result.
- Parameters:
study_key (str) –
spec (Any) –
subject_count (int) –
site_name (str | None) –
enabled_form_keys (list[str] | None) –
email_notify (bool | str | None) –
data_dictionary (DataDictionary | None) –
schema (ValidationSchemaProtocol | None) –
seed (int | None) –
dry_run (bool) –
- Return type:
- property state: str¶
Current lifecycle state of the UAT workflow.
- property state_history: Sequence[str]¶
Recorded lifecycle state transitions for the current or latest run.
- submit(study_key, record_sets, email_notify=None, *, schema=None)[source]¶
Submit generated UAT record sets in two phases.
- Parameters:
study_key (str) –
record_sets (list[Any]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
- Return type:
Any
- imednet.plugins.WorkflowsNamespaceProtocol: TypeAlias = SyncWorkflowsNamespaceProtocol¶
Explicit protocol type alias for
SyncWorkflowsNamespaceProtocol.
imednet.sdk module¶
Public entry-point for the iMednet SDK.
This module provides the ImednetSDK class which: - Manages configuration and authentication - Exposes all endpoint functionality through a unified interface - Provides context management for proper resource cleanup
- class imednet.sdk.AsyncImednetSDK[source]¶
Bases:
AsyncSDKConvenienceMixinAsync variant of
ImednetSDKusing the async HTTP client.Always use this class with
async withor callawait sdk.aclose()explicitly when done. Using the synchronous context manager (with) or synchronousclose()on this class will raise aTypeError.- __init__(api_key=None, security_key=None, base_url=None, timeout=None, strict_mode=None, retry_config=None, async_client=None, retries=None, backoff_factor=None, retry_policy=None, simulation_mode=None, transport=None, *, config=None, oidc_token=None, auth=None, credential_source=None)[source]¶
Initialize the asynchronous SDK.
- Parameters:
api_key (str | None) –
security_key (str | None) –
base_url (str | None) –
timeout (float | None) –
strict_mode (bool | None) –
retry_config (RetryConfig | None) –
async_client (AsyncClient | None) –
retries (int | None) –
backoff_factor (float | None) –
retry_policy (RetryPolicy | None) –
simulation_mode (bool | None) –
transport (Any) –
config (Config | None) –
oidc_token (str | None) –
auth (AuthStrategy | None) –
credential_source (CredentialSource | None) –
- Return type:
None
- async aclose()[source]¶
Close the underlying asynchronous client and free resources.
- Return type:
None
- async_create_record(study_key, records_data, email_notify=None, *, schema=None, skip_validation=False)¶
Deprecated alias for
create_record().- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
skip_validation (bool) –
- Return type:
- async_create_records_batch(study_key, records_data, email_notify=None, *, schema=None, chunk_size=100, skip_validation=False, wait_for_completion=False, timeout=300.0, interval=5.0, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)¶
Deprecated alias for
create_records_batch().- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
chunk_size (int) –
skip_validation (bool) –
wait_for_completion (bool) –
timeout (float) –
interval (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async async_get_codings(study_key=None, **filters)¶
Asynchronously list codings.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Coding]
- async async_get_forms(study_key=None, **filters)¶
Asynchronously list forms.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Form]
- async async_get_intervals(study_key=None, **filters)¶
Asynchronously list intervals.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Interval]
- async_get_job(study_key, batch_id)¶
Deprecated alias for
get_job().- Parameters:
study_key (str) –
batch_id (str) –
- Return type:
- async async_get_queries(study_key=None, **filters)¶
Asynchronously list queries.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Query]
- async async_get_record_revisions(study_key=None, **filters)¶
Asynchronously list record_revisions.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[RecordRevision]
- async async_get_records(study_key=None, **filters)¶
Asynchronously list records.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Record]
- async async_get_sites(study_key=None, **filters)¶
Asynchronously list sites.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Site]
- async async_get_studies(study_key=None, **filters)¶
Asynchronously list studies.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Study]
- async async_get_subjects(study_key=None, **filters)¶
Asynchronously list subjects.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Subject]
- async async_get_users(study_key=None, **filters)¶
Asynchronously list users.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[User]
- async async_get_variables(study_key=None, **filters)¶
Asynchronously list variables.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Variable]
- async async_get_visits(study_key=None, **filters)¶
Asynchronously list visits.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Visit]
- async_poll_job(study_key, batch_id, *, interval=5, timeout=300, on_progress=None, resolve_results=False)¶
Deprecated alias for
poll_job().- Parameters:
study_key (str) –
batch_id (str) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
resolve_results (bool) –
- Return type:
- async_poll_jobs(study_key, batch_ids, *, interval=5.0, timeout=300.0, on_progress=None, fail_fast=False, resolve_results=False)¶
Deprecated alias for
poll_jobs().- Parameters:
study_key (str) –
batch_ids (list[str]) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
fail_fast (bool) –
resolve_results (bool) –
- Return type:
- property auth: AuthStrategy | None¶
Return the authentication provider used by the async client.
- async create_record(study_key, records_data, email_notify=None, *, schema=None, skip_validation=False)¶
Asynchronously create records in the specified study.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
skip_validation (bool) –
- Return type:
- async create_records_batch(study_key, records_data, email_notify=None, *, schema=None, chunk_size=100, skip_validation=False, wait_for_completion=False, timeout=300.0, interval=5.0, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)¶
Asynchronously validate once and submit records in bounded chunks.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
chunk_size (int) –
skip_validation (bool) –
wait_for_completion (bool) –
timeout (float) –
interval (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async get_codings(study_key=None, **filters)¶
Asynchronously list codings.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Coding]
- async get_forms(study_key=None, **filters)¶
Asynchronously list forms.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Form]
- async get_intervals(study_key=None, **filters)¶
Asynchronously list intervals.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Interval]
- async get_job(study_key, batch_id)¶
Asynchronously get job status.
- Parameters:
study_key (str) –
batch_id (str) –
- Return type:
- async get_queries(study_key=None, **filters)¶
Asynchronously list queries.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Query]
- async get_record_revisions(study_key=None, **filters)¶
Asynchronously list record_revisions.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[RecordRevision]
- async get_records(study_key=None, **filters)¶
Asynchronously list records.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Record]
- async get_sites(study_key=None, **filters)¶
Asynchronously list sites.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Site]
- async get_studies(study_key=None, **filters)¶
Asynchronously list studies.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Study]
- async get_subjects(study_key=None, **filters)¶
Asynchronously list subjects.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Subject]
- async get_users(study_key=None, **filters)¶
Asynchronously list users.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[User]
- async get_variables(study_key=None, **filters)¶
Asynchronously list variables.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Variable]
- async get_visits(study_key=None, **filters)¶
Asynchronously list visits.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Visit]
- async poll_job(study_key, batch_id, *, interval=5, timeout=300, on_progress=None, resolve_results=False)¶
Asynchronously poll a job until terminal state, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_id (str) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
resolve_results (bool) –
- Return type:
- async poll_jobs(study_key, batch_ids, *, interval=5.0, timeout=300.0, on_progress=None, fail_fast=False, resolve_results=False)¶
Asynchronously poll multiple jobs concurrently, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_ids (list[str]) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
fail_fast (bool) –
resolve_results (bool) –
- Return type:
- property retry_policy: RetryPolicy¶
Return the current retry policy of the async client.
- study_context(study_key)¶
Set a temporary default study key for the current thread/task context.
- Parameters:
study_key (str) –
- Return type:
Iterator[Self]
- class imednet.sdk.ImednetSDK[source]¶
Bases:
SyncSDKConvenienceMixinPublic entry-point for library users.
Provides access to all iMednet API endpoints and maintains configuration.
- __init__(api_key=None, security_key=None, base_url=None, timeout=None, strict_mode=None, retry_config=None, client=None, retries=None, backoff_factor=None, retry_policy=None, simulation_mode=None, transport=None, *, config=None, oidc_token=None, auth=None, credential_source=None)[source]¶
Initialize the SDK with credentials and configuration.
- Parameters:
api_key (str | None) – iMednet API key.
security_key (str | None) – iMednet security key.
base_url (str | None) – Base URL for the iMednet API.
timeout (float | None) – Default request timeout in seconds.
strict_mode (bool | None) – Toggle strict mode for data validation.
retry_config (RetryConfig | None) – Centralized configuration for retry behaviors.
client (Client | None) – Pre-configured client instance.
retries (int | None) – Number of retries for failed requests.
backoff_factor (float | None) – Backoff factor for retry delays.
retry_policy (RetryPolicy | None) – Custom retry policy.
simulation_mode (bool | None) – Toggle offline simulation mode.
transport (Any) – Custom HTTP transport or SimulationTransport.
config (Config | None) – Pre-resolved configuration instance.
oidc_token (str | None) – Explicit OIDC bearer token.
auth (AuthStrategy | None) – Explicit authentication strategy, used instead of default credentials.
credential_source (CredentialSource | None) – Caller-owned credential source for client construction.
- Return type:
None
- async aclose()[source]¶
Asynchronous close is not supported on the synchronous SDK.
- Return type:
None
- property auth: AuthStrategy | None¶
Return the authentication provider used by the client.
- create_record(study_key, records_data, email_notify=None, *, schema=None, skip_validation=False)¶
Create records in the specified study.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
skip_validation (bool) –
- Return type:
- create_records_batch(study_key, records_data, email_notify=None, *, schema=None, chunk_size=100, skip_validation=False, wait_for_completion=False, timeout=300.0, interval=5.0, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)¶
Validate once and submit records in bounded chunks (default 100 per POST).
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
chunk_size (int) –
skip_validation (bool) –
wait_for_completion (bool) –
timeout (float) –
interval (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- get_codings(study_key=None, **filters)¶
List codings.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Coding]
- get_forms(study_key=None, **filters)¶
List forms.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Form]
- get_intervals(study_key=None, **filters)¶
List intervals.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Interval]
- get_job(study_key, batch_id)¶
Get job status.
- Parameters:
study_key (str) –
batch_id (str) –
- Return type:
- get_queries(study_key=None, **filters)¶
List queries.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Query]
- get_record_revisions(study_key=None, **filters)¶
List record_revisions.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[RecordRevision]
- get_records(study_key=None, **filters)¶
List records.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Record]
- get_sites(study_key=None, **filters)¶
List sites.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Site]
- get_studies(study_key=None, **filters)¶
List studies.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Study]
- get_subjects(study_key=None, **filters)¶
List subjects.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Subject]
- get_users(study_key=None, **filters)¶
List users.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[User]
- get_variables(study_key=None, **filters)¶
List variables.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Variable]
- get_visits(study_key=None, **filters)¶
List visits.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Visit]
- poll_job(study_key, batch_id, *, interval=5, timeout=300, on_progress=None, resolve_results=False)¶
Poll a job until it reaches a terminal state, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_id (str) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
resolve_results (bool) –
- Return type:
- poll_jobs(study_key, batch_ids, *, interval=5.0, timeout=300.0, on_progress=None, fail_fast=False, resolve_results=False)¶
Poll multiple jobs concurrently until terminal states, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_ids (list[str]) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
fail_fast (bool) –
resolve_results (bool) –
- Return type:
- property retry_policy: RetryPolicy¶
Return the current retry policy.
- study_context(study_key)¶
Set a temporary default study key for the current thread/task context.
- Parameters:
study_key (str) –
- Return type:
Iterator[Self]
imednet.sdk_convenience module¶
Convenience mixins for the iMedNet SDK.
These mixins contain high-level helper methods that delegate to specific endpoints. They are architecturally linked to the core execution engine.
- class imednet.sdk_convenience.AsyncSDKConvenienceMixin[source]¶
Bases:
objectAsynchronous SDK convenience methods.
- async_create_record(study_key, records_data, email_notify=None, *, schema=None, skip_validation=False)[source]¶
Deprecated alias for
create_record().- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
skip_validation (bool) –
- Return type:
- async_create_records_batch(study_key, records_data, email_notify=None, *, schema=None, chunk_size=100, skip_validation=False, wait_for_completion=False, timeout=300.0, interval=5.0, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Deprecated alias for
create_records_batch().- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
chunk_size (int) –
skip_validation (bool) –
wait_for_completion (bool) –
timeout (float) –
interval (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async async_get_codings(study_key=None, **filters)¶
Asynchronously list codings.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Coding]
- async async_get_forms(study_key=None, **filters)¶
Asynchronously list forms.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Form]
- async async_get_intervals(study_key=None, **filters)¶
Asynchronously list intervals.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Interval]
- async_get_job(study_key, batch_id)[source]¶
Deprecated alias for
get_job().- Parameters:
study_key (str) –
batch_id (str) –
- Return type:
- async async_get_queries(study_key=None, **filters)¶
Asynchronously list queries.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Query]
- async async_get_record_revisions(study_key=None, **filters)¶
Asynchronously list record_revisions.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[RecordRevision]
- async async_get_records(study_key=None, **filters)¶
Asynchronously list records.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Record]
- async async_get_sites(study_key=None, **filters)¶
Asynchronously list sites.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Site]
- async async_get_studies(study_key=None, **filters)¶
Asynchronously list studies.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Study]
- async async_get_subjects(study_key=None, **filters)¶
Asynchronously list subjects.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Subject]
- async async_get_users(study_key=None, **filters)¶
Asynchronously list users.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[User]
- async async_get_variables(study_key=None, **filters)¶
Asynchronously list variables.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Variable]
- async async_get_visits(study_key=None, **filters)¶
Asynchronously list visits.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Visit]
- async_poll_job(study_key, batch_id, *, interval=5, timeout=300, on_progress=None, resolve_results=False)[source]¶
Deprecated alias for
poll_job().- Parameters:
study_key (str) –
batch_id (str) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
resolve_results (bool) –
- Return type:
- async_poll_jobs(study_key, batch_ids, *, interval=5.0, timeout=300.0, on_progress=None, fail_fast=False, resolve_results=False)[source]¶
Deprecated alias for
poll_jobs().- Parameters:
study_key (str) –
batch_ids (list[str]) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
fail_fast (bool) –
resolve_results (bool) –
- Return type:
- async create_record(study_key, records_data, email_notify=None, *, schema=None, skip_validation=False)[source]¶
Asynchronously create records in the specified study.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
skip_validation (bool) –
- Return type:
- async create_records_batch(study_key, records_data, email_notify=None, *, schema=None, chunk_size=100, skip_validation=False, wait_for_completion=False, timeout=300.0, interval=5.0, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Asynchronously validate once and submit records in bounded chunks.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
chunk_size (int) –
skip_validation (bool) –
wait_for_completion (bool) –
timeout (float) –
interval (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- async get_codings(study_key=None, **filters)¶
Asynchronously list codings.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Coding]
- async get_forms(study_key=None, **filters)¶
Asynchronously list forms.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Form]
- async get_intervals(study_key=None, **filters)¶
Asynchronously list intervals.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Interval]
- async get_job(study_key, batch_id)[source]¶
Asynchronously get job status.
- Parameters:
study_key (str) –
batch_id (str) –
- Return type:
- async get_queries(study_key=None, **filters)¶
Asynchronously list queries.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Query]
- async get_record_revisions(study_key=None, **filters)¶
Asynchronously list record_revisions.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[RecordRevision]
- async get_records(study_key=None, **filters)¶
Asynchronously list records.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Record]
- async get_sites(study_key=None, **filters)¶
Asynchronously list sites.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Site]
- async get_studies(study_key=None, **filters)¶
Asynchronously list studies.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Study]
- async get_subjects(study_key=None, **filters)¶
Asynchronously list subjects.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Subject]
- async get_users(study_key=None, **filters)¶
Asynchronously list users.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[User]
- async get_variables(study_key=None, **filters)¶
Asynchronously list variables.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Variable]
- async get_visits(study_key=None, **filters)¶
Asynchronously list visits.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Visit]
- async poll_job(study_key, batch_id, *, interval=5, timeout=300, on_progress=None, resolve_results=False)[source]¶
Asynchronously poll a job until terminal state, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_id (str) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
resolve_results (bool) –
- Return type:
- async poll_jobs(study_key, batch_ids, *, interval=5.0, timeout=300.0, on_progress=None, fail_fast=False, resolve_results=False)[source]¶
Asynchronously poll multiple jobs concurrently, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_ids (list[str]) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
fail_fast (bool) –
resolve_results (bool) –
- Return type:
- imednet.sdk_convenience.SDKConvenienceMixin¶
alias of
SyncSDKConvenienceMixin
- class imednet.sdk_convenience.SyncSDKConvenienceMixin[source]¶
Bases:
objectSynchronous SDK convenience methods.
- create_record(study_key, records_data, email_notify=None, *, schema=None, skip_validation=False)[source]¶
Create records in the specified study.
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
skip_validation (bool) –
- Return type:
- create_records_batch(study_key, records_data, email_notify=None, *, schema=None, chunk_size=100, skip_validation=False, wait_for_completion=False, timeout=300.0, interval=5.0, on_progress=None, dry_run=False, collect_errors=False, resolve_results=True)[source]¶
Validate once and submit records in bounded chunks (default 100 per POST).
- Parameters:
study_key (str) –
records_data (Sequence[BaseRecordRequest | Mapping[str, Any]] | DataFrameLike | str | PathLike[str]) –
email_notify (bool | str | None) –
schema (ValidationSchemaProtocol | None) –
chunk_size (int) –
skip_validation (bool) –
wait_for_completion (bool) –
timeout (float) –
interval (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
dry_run (bool) –
collect_errors (bool) –
resolve_results (bool) –
- Return type:
- get_codings(study_key=None, **filters)¶
List codings.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Coding]
- get_forms(study_key=None, **filters)¶
List forms.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Form]
- get_intervals(study_key=None, **filters)¶
List intervals.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Interval]
- get_job(study_key, batch_id)[source]¶
Get job status.
- Parameters:
study_key (str) –
batch_id (str) –
- Return type:
- get_queries(study_key=None, **filters)¶
List queries.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Query]
- get_record_revisions(study_key=None, **filters)¶
List record_revisions.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[RecordRevision]
- get_records(study_key=None, **filters)¶
List records.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Record]
- get_sites(study_key=None, **filters)¶
List sites.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Site]
- get_studies(study_key=None, **filters)¶
List studies.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Study]
- get_subjects(study_key=None, **filters)¶
List subjects.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Subject]
- get_users(study_key=None, **filters)¶
List users.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[User]
- get_variables(study_key=None, **filters)¶
List variables.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Variable]
- get_visits(study_key=None, **filters)¶
List visits.
- Parameters:
study_key (str | None) –
filters (str | int | float | bool | tuple[str, str | int | float | bool | None] | list[tuple[str, str | int | float | bool | None]] | list[str | int | float | bool | None] | None) –
- Return type:
list[Visit]
- poll_job(study_key, batch_id, *, interval=5, timeout=300, on_progress=None, resolve_results=False)[source]¶
Poll a job until it reaches a terminal state, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_id (str) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
resolve_results (bool) –
- Return type:
- poll_jobs(study_key, batch_ids, *, interval=5.0, timeout=300.0, on_progress=None, fail_fast=False, resolve_results=False)[source]¶
Poll multiple jobs concurrently until terminal states, optionally resolving
resultUrlpayloads.- Parameters:
study_key (str) –
batch_ids (list[str]) –
interval (float) –
timeout (float) –
on_progress (JobProgressCallback | Callable[[JobStatusEvent], None] | None) –
fail_fast (bool) –
resolve_results (bool) –
- Return type: