To give a perspective from how does the implementation look like if you use Azure IoT services... below may help with initial query!
You can connect your IoT devices to Azure IoT Hub and configure Azure IoT Hub to route data from your IoT devices to Azure services such as Azure Event Hubs, Azure Stream Analytics, or Azure Functions.
You can analyze data from your IoT devices, including calculating heart rate and SPO2.
// assuming that the byte array received from the IoT sensor
is stored in a variable named **data**
// Decode the byte array to extract the ECG/PPG signal
double[] signal = DecodeSignal(data);
// Apply signal processing techniques
signal = FilterSignal(signal);
signal = RemoveNoise(signal);
signal = NormalizeSignal(signal);
// Detect R-peaks of the ECG signal
int[] rPeaks = DetectRPeaks(signal);
// Calculate heart rate
double heartRate = CalculateHeartRate(rPeaks);
// Calculate SPO2
double spo2 = CalculateSPO2(signal);
//Note that this is a high-level example, and you will need to implement the actual signal processing techniques and algorithms to extract the ECG/PPG signal, detect R-peaks, and calculate heart rate and SPO2.
Store the processed data in Azure storage solutions such as Azure Blob Storage or Azure Cosmos DB and Visualize the data using Azure services such as Power BI or Azure Time Series Insights.
Tutorial: Visualize real-time sensor data from Azure IoT Hub using Power BI
