ba-thesis/docs/analysis/records.py

66 lines
1.1 KiB
Python
Raw Normal View History

2023-08-26 00:36:24 +01:00
"""Type classes used during analysis."""
from datetime import datetime
from dataclasses import dataclass
from typing import Optional
@dataclass
class BloodPressure:
time: datetime
value_diastolic: int
value_systolic: int
@dataclass
class BodyTemp:
time: datetime
value: float
@dataclass
class HeartRate:
time: datetime
value: int
@dataclass
class Mews:
time: datetime
value: int
@dataclass
class RespirationScore:
time: datetime
value: int
@dataclass
class Spo2:
time: datetime
value: int
@dataclass
class Collection:
notification_time: datetime
mews: Optional[Mews]
blood_pressure: Optional[BloodPressure]
body_temp: Optional[BodyTemp]
heart_rate: Optional[HeartRate]
respiration_score: Optional[RespirationScore]
spo2: Optional[Spo2]
s1: Optional[int]
b1: Optional[int]
t1: Optional[int]
s2: Optional[bool]
b2: Optional[bool]
t2: Optional[bool]
p1: bool
p2: Optional[bool]
home_environment: bool
uplink: Optional[float]
downlink: Optional[float]
rtt: Optional[int]