AntonKilk / FA_app

algorhytm to identify FA rhytm
3 stars 1 forks source link

Select and describe Data format for a measurement #4

Open ivan-kleshnin opened 5 years ago

ivan-kleshnin commented 5 years ago
{
  pulse: [0, 10, 20...], // or intervals between two beats
  date: new Date(),    
  comment: "How I felt at the moment...",
  drugs: "...",
  temperature: ???,
}
AntonKilk commented 5 years ago
{
  patient data: {"weight_kg": "70", "height_cm": "160" }
  heart beat intervals: [1000, 1200, 857...], 
  heart rate: [60, 50, 70...],
  date: new Date(),
  symptoms: "nausea", "dizziness"...
  medication: {"drug": "flecainide", dose_mg: "300"}, {"drug":  "propafenone", dose_mg: "600"},
  additional comments: "diet, activities, (blood pressure, if measured separately), doctor/ICU contacted: yes/no",
  medical history(add later?): "Diabetes", "Heart failure", "Vascular disease", "Hypertension", "Stroke", "Blood thinner", "pacemaker", "arrhytmias"  
}
ivan-kleshnin commented 5 years ago

1) Let's use camelCase for property names 2) I don't like patientData object. Most of that can be called a "patient data" IMO. I would avoid extra nesting (of objects) if possible. 3) One heart-beat interval corresponds to one heart rate, right? Than why we have N rates?

If we measure 3 times it should look like:

beats: [[1000, 1200, 857...], [1000 ...], [1000 ...]], // raw beat series
rates: [60, 50, 70], // 3 measurement intervals
ivan-kleshnin commented 5 years ago
medication: {"drug": "flecainide", dose_mg: "300"}, {"drug":  "propafenone", dose_mg: "600"},

Such object can exist only for preselected options of drugs. I don't think we can make it at the moment. So it should be a text with placeholders in UI and a string in terms of data.

medication: "flecainide: 300\npropafenone:600", // using line-break to separate drugs

Raw text certainly makes auto-analysis harder. But as our algorithms aren't drug dependent and not gonna be in the foreseeable future, we don't need that.

ivan-kleshnin commented 5 years ago
medical history(add later?): "Diabetes", "Heart failure", "Vascular disease", "Hypertension", "Stroke", "Blood thinner", "pacemaker", "arrhytmias"

Can we allow ourselves to have an array of such options in UI? Like a MULTIPLE SELECT element or something?

ivan-kleshnin commented 5 years ago

We think about DB and UI at the same time... Maybe it's not bad at this stage of development. We'll separate them as we progress.

AntonKilk commented 5 years ago

3. One heart-beat interval corresponds to one heart rate, right? Than why we have N rates?

We need to show both rate (bpm) and intervals(msec) on the screen. But one corresponds to another, so we can just calculate it, yes.

AntonKilk commented 5 years ago

I suggest we begin from the most important data for measurement:

{
  heartIntervals: [[1000, 1200, 857...], [1000 ...], [1000 ...]], // raw beat series
  date: new Date(),    
}

And we can add later:

{
  comment: "How I felt at the moment...",
  symptoms: "nausea", "dizziness"...
  medical history: "Diabetes", "Heart failure", "Vascular disease", "Hypertension", "Stroke", "Blood thinner", "pacemaker", "arrhytmias",
}

@ivan-kleshnin ?

ivan-kleshnin commented 5 years ago

Yes, absolutely.