Vital Signs
Normal Ranges by Age
| Age |
HR (bpm) |
RR (breaths/min) |
SBP (mmHg) |
Temp (°C) |
| Newborn (0-1m) |
100-180 |
30-60 |
60-90 |
36.5-37.5 |
| Infant (1-12m) |
80-120 |
20-40 |
70-100 |
36.5-37.5 |
| Toddler (1-3y) |
80-130 |
20-30 |
90-110 |
36.5-37.5 |
| Child (3-12y) |
70-110 |
15-25 |
95-120 |
36.5-37.5 |
| Adult |
60-100 |
12-20 |
90-120 |
36.5-37.5 |
| Geriatric |
60-100 |
12-20 |
90-140 |
36.0-37.5 |
Blood Pressure Classification
| Category |
Systolic (mmHg) |
Diastolic (mmHg) |
| Normal |
<120 |
<80 |
| Elevated |
120-129 |
<80 |
| Stage 1 HTN |
130-139 |
80-89 |
| Stage 2 HTN |
≥140 |
≥90 |
| Hypertensive Crisis |
>180 |
>120 |
Biological Signals
Electrocardiogram (ECG)
class ECGAnalysis:
"""ECG signal processing"""
# Wave components
WAVES = {
"P": {"duration": "0.08-0.10s", "amplitude": "0.1-0.2 mV"},
"QRS": {"duration": "0.06-0.10s", "amplitude": "1.0-2.0 mV"},
"T": {"duration": "0.10-0.25s", "amplitude": "0.1-0.3 mV"},
"U": {"duration": "0.16-0.24s", "amplitude": "0.05-0.2 mV"}
}
# Heart rate calculation
def calculate_heart_rate(self, rr_interval_ms):
"""Calculate BPM from RR interval"""
return 60000 / rr_interval_ms
# Rhythm analysis
def analyze_rhythm(self, rr_intervals):
"""
HRV metrics
- SDNN: Standard deviation of NN intervals
- RMSSD: Root mean square of successive differences
- pNN50: % of successive intervals > 50ms
"""
import numpy as np
# RMSSD
successive_diffs = np.diff(rr_intervals)
rmssd = np.sqrt(np.mean(successive_diffs ** 2))
# pNN50
nn50 = sum(1 for d in successive_diffs if abs(d) > 50)
pnn50 = (nn50 / len(successive_diffs)) * 100 if len(successive_diffs) > 0 else 0
return {"RMSSD": rmssd, "pNN50": pnn50}
# QRS detection
def detect_qrs(self, ecg_signal, fs):
"""
Pan-Tompkins algorithm
1. Bandpass filter (5-15 Hz)
2. Differentiate
3. Square
4. Moving window integrate
5. Adaptive threshold
"""
pass
Electroencephalogram (EEG)
| Band |
Frequency |
Associated State |
| Delta |
0.5-4 Hz |
Deep sleep |
| Theta |
4-8 Hz |
Light sleep, meditation |
| Alpha |
8-12 Hz |
Rest, eyes closed |
| Beta |
12-30 Hz |
Active thinking |
| Gamma |
30-100 Hz |
High-level processing |
Electromyogram (EMG)
class EMGProcessing:
"""EMG signal analysis"""
def rect_filter(self, emg_signal, fs):
"""
Process EMG:
1. Bandpass filter (20-500 Hz)
2. Full-wave rectification
3. Moving average (smoothing)
"""
pass
def calculate_mav(self, emg_segment):
"""Mean Absolute Value"""
return sum(abs(x) for x in emg_segment) / len(emg_segment)
def calculate_rms(self, emg_segment):
"""Root Mean Square"""
import numpy as np
return np.sqrt(sum(x**2 for x in emg_segment) / len(emg_segment))
def calculate_fatigue(self, emg_segment1, emg_segment2):
"""
Detect fatigue via frequency shift
- Median frequency decreases with fatigue
"""
import numpy as np
freq1 = np.median(np.abs(np.fft.rfft(emg_segment1)))
freq2 = np.median(np.abs(np.fft.rfft(emg_segment2)))
return freq2 < freq1 # True if fatigue detected
Medical Devices
Device Classification (FDA)
| Class |
Risk |
Examples |
Requirements |
| I |
Low |
Bandages, stethoscopes |
General controls |
| II |
Medium |
Infection pumps, monitors |
510(k) clearance |
| III |
High |
Pacemakers, heart valves |
PMA required |
| IVD (in vitro) |
Varies |
Glucose meters |
Registration |
Device Categories
| Device |
Function |
Monitoring Parameters |
| Pulse oximetry |
SpO₂ measurement |
SpO₂, PR |
| ECG monitor |
Heart rhythm |
HR, rhythm, ST |
| Sphygmomanometer |
Blood pressure |
SBP, DBP, MAP |
| Spirometer |
Lung function |
FVC, FEV₁ |
| Glucose meter |
Blood glucose |
Blood glucose |
| Defibrillator |
Cardiac arrest |
Energy delivery |
Healthcare Data Standards
HL7 FHIR Resources
| Resource |
Purpose |
| Patient |
Demographics, identifiers |
| Observation |
Vital signs, lab results |
| MedicationRequest |
Prescription orders |
| Condition |
Diagnoses, problems |
| Encounter |
Clinical visits |
| DiagnosticReport |
Lab/imaging results |
DICOM
class DICOMHandler:
"""DICOM file handling"""
# Important tags
IMPORTANT_TAGS = {
"0010,0010": "Patient Name",
"0010,0020": "Patient ID",
"0008,0060": "Modality",
"0020,000D": "Study Instance UID",
"0008,1030": "Study Description",
"0028,0010": "Rows (image height)",
"0028,0011": "Columns (image width)",
"0028,0100": "Bits Allocated",
"0028,0101": "Bits Stored"
}
def load_dicom(self, filepath):
"""Load DICOM file"""
import pydicom
ds = pydicom.dcmread(filepath)
return {
"patient": ds.PatientName,
"modality": ds.Modality,
"rows": ds.Rows,
"columns": ds.Columns,
"pixel_data": ds.pixel_array
}
def window_level(self, image, window, level):
"""
Apply window/level for viewing
"""
import numpy as np
lower = level - window / 2
upper = level + window / 2
return np.clip((image - lower) / (upper - lower), 0, 1)
Medical Terminology
| System |
Content |
Use Case |
| SNOMED CT |
Clinical terms |
Documentation |
| ICD-10 |
Disease codes |
Billing, statistics |
| LOINC |
Lab results |
Interoperability |
| RxNorm |
Medications |
e-Prescribing |
Biomedical Instrumentation
Amplifier Requirements
| Parameter |
Typical Value |
Notes |
| Input impedance |
>10 MΩ |
High to minimize loading |
| Gain |
100-10000 |
Depends on signal |
| Bandwidth |
0.05-100 Hz (ECG) |
Signal-specific |
| CMRR |
>80 dB |
Reject common noise |
| Noise |
<10 μV |
Depends on application |
Safety Standards
| Standard |
Scope |
| IEC 60601-1 |
Medical electrical equipment safety |
| IEC 60601-1-2 |
EMC requirements |
| IEC 60601-1-4 |
Software |
| IEC 62366 |
Usability |
Common Errors to Avoid
- Ignoring electrode placement — Standard 12-lead ECG positions critical
- Not filtering properly — Wrong filters distort signals
- Confusing correlation with causation — Signals show association
- Ignoring artifact contamination — Motion, electrical noise
- Using wrong device class — Regulatory implications
- Not considering biocompatibility — Material-tissue interactions
- Ignoring calibration — Regular calibration needed for accuracy
- Confusing device standards — Different regions have different requirements
1---2name: biomedical-23description: Vital Signs4---56## Vital Signs78### Normal Ranges by Age910|Age|HR (bpm)|RR (breaths/min)|SBP (mmHg)|Temp (°C)|11|---|---------|-----------------|----------|----------|12|Newborn (0-1m)|100-180|30-60|60-90|36.5-37.5|13|Infant (1-12m)|80-120|20-40|70-100|36.5-37.5|14|Toddler (1-3y)|80-130|20-30|90-110|36.5-37.5|15|Child (3-12y)|70-110|15-25|95-120|36.5-37.5|16|Adult|60-100|12-20|90-120|36.5-37.5|17|Geriatric|60-100|12-20|90-140|36.0-37.5|1819### Blood Pressure Classification2021|Category|Systolic (mmHg)|Diastolic (mmHg)|22|--------|---------------|-----------------|23|Normal|<120|<80|24|Elevated|120-129|<80|25|Stage 1 HTN|130-139|80-89|26|Stage 2 HTN|≥140|≥90|27|Hypertensive Crisis|>180|>120|2829---3031## Biological Signals3233### Electrocardiogram (ECG)3435```python36class ECGAnalysis:37 """ECG signal processing"""38 39 # Wave components40 WAVES = {41 "P": {"duration": "0.08-0.10s", "amplitude": "0.1-0.2 mV"},42 "QRS": {"duration": "0.06-0.10s", "amplitude": "1.0-2.0 mV"},43 "T": {"duration": "0.10-0.25s", "amplitude": "0.1-0.3 mV"},44 "U": {"duration": "0.16-0.24s", "amplitude": "0.05-0.2 mV"}45 }46 47 # Heart rate calculation48 def calculate_heart_rate(self, rr_interval_ms):49 """Calculate BPM from RR interval"""50 return 60000 / rr_interval_ms51 52 # Rhythm analysis53 def analyze_rhythm(self, rr_intervals):54 """55 HRV metrics56 - SDNN: Standard deviation of NN intervals57 - RMSSD: Root mean square of successive differences58 - pNN50: % of successive intervals > 50ms59 """60 import numpy as np61 62 # RMSSD63 successive_diffs = np.diff(rr_intervals)64 rmssd = np.sqrt(np.mean(successive_diffs ** 2))65 66 # pNN5067 nn50 = sum(1 for d in successive_diffs if abs(d) > 50)68 pnn50 = (nn50 / len(successive_diffs)) * 100 if len(successive_diffs) > 0 else 069 70 return {"RMSSD": rmssd, "pNN50": pnn50}71 72 # QRS detection73 def detect_qrs(self, ecg_signal, fs):74 """75 Pan-Tompkins algorithm76 1. Bandpass filter (5-15 Hz)77 2. Differentiate78 3. Square79 4. Moving window integrate80 5. Adaptive threshold81 """82 pass83```8485### Electroencephalogram (EEG)8687|Band|Frequency|Associated State|88|-----|----------|-----------------|89|Delta|0.5-4 Hz|Deep sleep|90|Theta|4-8 Hz|Light sleep, meditation|91|Alpha|8-12 Hz|Rest, eyes closed|92|Beta|12-30 Hz|Active thinking|93|Gamma|30-100 Hz|High-level processing|9495### Electromyogram (EMG)9697```python98class EMGProcessing:99 """EMG signal analysis"""100 101 def rect_filter(self, emg_signal, fs):102 """103 Process EMG:104 1. Bandpass filter (20-500 Hz)105 2. Full-wave rectification106 3. Moving average (smoothing)107 """108 pass109 110 def calculate_mav(self, emg_segment):111 """Mean Absolute Value"""112 return sum(abs(x) for x in emg_segment) / len(emg_segment)113 114 def calculate_rms(self, emg_segment):115 """Root Mean Square"""116 import numpy as np117 return np.sqrt(sum(x**2 for x in emg_segment) / len(emg_segment))118 119 def calculate_fatigue(self, emg_segment1, emg_segment2):120 """121 Detect fatigue via frequency shift122 - Median frequency decreases with fatigue123 """124 import numpy as np125 126 freq1 = np.median(np.abs(np.fft.rfft(emg_segment1)))127 freq2 = np.median(np.abs(np.fft.rfft(emg_segment2)))128 129 return freq2 < freq1 # True if fatigue detected130```131132---133134## Medical Devices135136### Device Classification (FDA)137138|Class|Risk|Examples|Requirements|139|-----|-----|--------|-------------|140|I|Low|Bandages, stethoscopes|General controls|141|II|Medium|Infection pumps, monitors|510(k) clearance|142|III|High|Pacemakers, heart valves|PMA required|143|IVD (in vitro)|Varies|Glucose meters|Registration|144145### Device Categories146147|Device|Function|Monitoring Parameters|148|------|--------|---------------------|149|Pulse oximetry|SpO₂ measurement|SpO₂, PR|150|ECG monitor|Heart rhythm|HR, rhythm, ST|151|Sphygmomanometer|Blood pressure|SBP, DBP, MAP|152|Spirometer|Lung function|FVC, FEV₁|153|Glucose meter|Blood glucose|Blood glucose|154|Defibrillator|Cardiac arrest|Energy delivery|155156---157158## Healthcare Data Standards159160### HL7 FHIR Resources161162|Resource|Purpose|163|--------|-------|164|Patient|Demographics, identifiers|165|Observation|Vital signs, lab results|166|MedicationRequest|Prescription orders|167|Condition|Diagnoses, problems|168|Encounter|Clinical visits|169|DiagnosticReport|Lab/imaging results|170171### DICOM172173```python174class DICOMHandler:175 """DICOM file handling"""176 177 # Important tags178 IMPORTANT_TAGS = {179 "0010,0010": "Patient Name",180 "0010,0020": "Patient ID",181 "0008,0060": "Modality",182 "0020,000D": "Study Instance UID",183 "0008,1030": "Study Description",184 "0028,0010": "Rows (image height)",185 "0028,0011": "Columns (image width)",186 "0028,0100": "Bits Allocated",187 "0028,0101": "Bits Stored"188 }189 190 def load_dicom(self, filepath):191 """Load DICOM file"""192 import pydicom193 194 ds = pydicom.dcmread(filepath)195 196 return {197 "patient": ds.PatientName,198 "modality": ds.Modality,199 "rows": ds.Rows,200 "columns": ds.Columns,201 "pixel_data": ds.pixel_array202 }203 204 def window_level(self, image, window, level):205 """206 Apply window/level for viewing207 """208 import numpy as np209 210 lower = level - window / 2211 upper = level + window / 2212 213 return np.clip((image - lower) / (upper - lower), 0, 1)214```215216### Medical Terminology217218|System|Content|Use Case|219|-------|--------|--------|220|SNOMED CT|Clinical terms|Documentation|221|ICD-10|Disease codes|Billing, statistics|222|LOINC|Lab results|Interoperability|223|RxNorm|Medications|e-Prescribing|224225---226227## Biomedical Instrumentation228229### Amplifier Requirements230231|Parameter|Typical Value|Notes|232|---------|--------------|-----|233|Input impedance|>10 MΩ|High to minimize loading|234|Gain|100-10000|Depends on signal|235|Bandwidth|0.05-100 Hz (ECG)|Signal-specific|236|CMRR|>80 dB|Reject common noise|237|Noise|<10 μV|Depends on application|238239### Safety Standards240241|Standard|Scope|242|--------|------|243|IEC 60601-1|Medical electrical equipment safety|244|IEC 60601-1-2|EMC requirements|245|IEC 60601-1-4|Software|246|IEC 62366|Usability|247248---249250## Common Errors to Avoid2512521. **Ignoring electrode placement** — Standard 12-lead ECG positions critical2532. **Not filtering properly** — Wrong filters distort signals2543. **Confusing correlation with causation** — Signals show association2554. **Ignoring artifact contamination** — Motion, electrical noise2565. **Using wrong device class** — Regulatory implications2576. **Not considering biocompatibility** — Material-tissue interactions2587. **Ignoring calibration** — Regular calibration needed for accuracy2598. **Confusing device standards** — Different regions have different requirements260