-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from billsioros/feat--design-the-frontend
feat: design the frontend
- Loading branch information
Showing
68 changed files
with
6,243 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,3 +150,5 @@ Thumbs.db #thumbnail cache on Windows | |
|
||
|
||
# End of https://www.toptal.com/developers/gitignore/api/python | ||
|
||
*.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...tbeat/controllers/heartbeat_controller.py → src/api/controllers/heartbeat_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...artbeat/controllers/monitor_controller.py → src/api/controllers/monitor_controller.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from api.models._model import * | ||
from api.models.heartbeat import * |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
from enum import IntEnum, auto | ||
|
||
from sqlalchemy import Boolean, Column, Enum, Float, Integer | ||
from sqlalchemy.orm import Mapped | ||
|
||
from api.models._model import PkModel | ||
|
||
|
||
class Sex(IntEnum): | ||
MALE = auto() | ||
FEMALE = auto() | ||
|
||
|
||
class ChestPain(IntEnum): | ||
TYPICAL_ANGINA = auto() | ||
ATYPICAL_ANGINA = auto() | ||
NON_ANGINAL_PAIN = auto() | ||
ASYMPTOMATIC = auto() | ||
|
||
|
||
class RestingElectrocardiogram(IntEnum): | ||
NORMAL = auto() | ||
STT = auto() # having ST-T wave abnormality (T wave inversions and/or ST elevation or depression of > 0.05 mV) | ||
LVH = auto() # showing probable or definite left ventricular hypertrophy by Estes' criteria | ||
|
||
|
||
class StSlope(IntEnum): | ||
UP = auto() | ||
FLAT = auto() | ||
DOWN = auto() | ||
|
||
|
||
class HeartBeatModel(PkModel): | ||
__tablename__ = "heartbeats" | ||
|
||
age: Mapped[int] = Column(Integer, nullable=False) | ||
sex: Mapped[Sex] = Column(Enum(Sex), nullable=False) | ||
chest_pain_type: Mapped[ChestPain] = Column(Enum(ChestPain), nullable=False) | ||
resting_blood_pressure: Mapped[int] = Column(Integer, nullable=False) | ||
cholesterol: Mapped[int] = Column(Integer, nullable=False) | ||
fasting_blood_sugar: Mapped[bool] = Column(Boolean, nullable=False) | ||
resting_electrocardiogram: Mapped[RestingElectrocardiogram] = Column( | ||
Enum(RestingElectrocardiogram), nullable=False, | ||
) | ||
max_heart_rate: Mapped[int] = Column(Integer, nullable=False) | ||
exercise_angina: Mapped[bool] = Column(Boolean, nullable=False) | ||
old_peak: Mapped[float] = Column(Float, nullable=False) | ||
st_slope: Mapped[StSlope] = Column(Enum(StSlope), nullable=False) | ||
heart_disease: Mapped[bool] = Column(Boolean, nullable=False) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from pydantic import BaseModel, Field | ||
|
||
from api.models.heartbeat import ( | ||
ChestPain, | ||
RestingElectrocardiogram, | ||
Sex, | ||
StSlope, | ||
) | ||
|
||
|
||
class HeartBeatCreateSchema(BaseModel): | ||
class Config: | ||
from_attributes = True | ||
|
||
age: int = Field(..., ge=0, le=130, description="Age of the patient [years]") | ||
sex: Sex | ||
chest_pain_type: ChestPain | ||
resting_blood_pressure: int = Field( | ||
..., ge=0, le=250, description="Resting blood pressure [mm Hg]", | ||
) | ||
cholesterol: int = Field(..., ge=0, le=700, description="Serum cholesterol [mm/dl]") | ||
fasting_blood_sugar: bool = Field( | ||
..., description="Fasting blood sugar [1: if FastingBS > 120 mg/dl, 0: otherwise]", | ||
) | ||
resting_electrocardiogram: RestingElectrocardiogram | ||
max_heart_rate: int = Field( | ||
..., | ||
ge=60, | ||
le=202, | ||
description="Maximum heart rate achieved [Numeric value between 60 and 202]", | ||
) | ||
exercise_angina: bool | ||
old_peak: float = Field( | ||
..., ge=-10, le=10, description="Oldpeak = ST [Numeric value measured in depression]", | ||
) | ||
st_slope: StSlope | ||
|
||
|
||
class HeartBeatSchema(HeartBeatCreateSchema): | ||
id: str | ||
heart_disease: bool |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.