m3resp.DataModelStore#

class m3resp.DataModelStore[source]#

A dict-of-id-to-entity table per entity type, plus relational lookups.

Methods

add_breath(breath)[source]#
Parameters:

breath (Breath)

Return type:

Breath

add_case(case)[source]#
Parameters:

case (Case)

Return type:

Case

add_clinical_event(event)[source]#
Parameters:

event (ClinicalEvent)

Return type:

ClinicalEvent

add_data_file(data_file)[source]#
Parameters:

data_file (DataFile)

Return type:

DataFile

add_derived_feature(feature)[source]#
Parameters:

feature (DerivedFeature)

Return type:

DerivedFeature

add_device(device)[source]#
Parameters:

device (Device)

Return type:

Device

add_eit_configuration(config)[source]#
Parameters:

config (EITConfiguration)

Return type:

EITConfiguration

add_emg_channel(channel)[source]#
Parameters:

channel (EMGChannel)

Return type:

EMGChannel

add_processing_run(run)[source]#

Store and return a processing run after checking its file references.

Parameters:

run (ProcessingRun) – Run whose input and array-results file identifiers must already appear in data_files. An existing run with the same identifier is replaced.

Returns:

The supplied run, stored under its identifier.

Return type:

ProcessingRun

Raises:

DataModelStoreError – If any referenced file record is missing.

add_quality_annotation(annotation)[source]#
Parameters:

annotation (QualityAnnotation)

Return type:

QualityAnnotation

add_session(session)[source]#
Parameters:

session (RecordingSession)

Return type:

RecordingSession

add_signal_stream(stream)[source]#
Parameters:

stream (SignalStream)

Return type:

SignalStream

add_ventilator_setting(setting)[source]#
Parameters:

setting (VentilatorSetting)

Return type:

VentilatorSetting

annotations_for_target(target_type, target_id)[source]#
Parameters:
  • target_type (str)

  • target_id (str)

Return type:

list[QualityAnnotation]

features_for_run(processing_run_id)[source]#
Parameters:

processing_run_id (str)

Return type:

list[DerivedFeature]

files_for_signal(signal_id)[source]#
Parameters:

signal_id (str)

Return type:

list[DataFile]

has_quality_annotation_target(target_type, target_id)[source]#

Return whether a quality annotation target exists in this store.

Parameters:
  • target_type (str)

  • target_id (str)

Return type:

bool

runs_for_file(file_id)[source]#
Parameters:

file_id (str)

Return type:

list[ProcessingRun]

sessions_for_case(case_id)[source]#
Parameters:

case_id (str)

Return type:

list[RecordingSession]

streams_for_session(session_id)[source]#
Parameters:

session_id (str)

Return type:

list[SignalStream]