Skip to main content

A data standard for working with event stream data

Project description

Event Stream Data Standard

The Event Stream Data Standard is a draft data schema for storing streams of medical events, often sourced from either Electronic Health Records or claims records.

The core of the standard is that we define a patient data structure that contains a series of time stamped events, that in turn contain measurements of various sorts.

The Python type signature for the schema is as follows:

Patient = TypedDict('Patient', {
  'patient_id': int,
  'events': List[Event],
})

Event = TypedDict('Event',{
    'time': datetime.datetime,
    'measurements': List[Measurement],
})

Measurement = TypedDict('Measurement', {
    'code': str,
    'text_value': NotRequired[str],
    'numeric_value': NotRequired[float],
    'datetime_value': NotRequired[datetime.datetime],
    'metadata': NotRequired[Mapping[str, Any]],
})

We also provide ETLs to convert common data formats to this schema: https://github.com/Event-Stream-Data-Standard/esds_etl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meds-0.1.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

meds-0.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page