Closed cancilla closed 7 years ago
The ECG data being used in the Beacon Service originated from Physionet. The QRS complex is very obvious in this data so I would have expected something to be detected.
I will investigate and update this issue with my findings.
The RPeakDetect service expects the input values to have an integer datatype, however the data coming from the BeaconService are floating point values that are mostly in the range of +/- 1.0. This data is being cast to an integer data type, which results in them becoming 0, causing the QRSDetect operator to not detect anything.
The quick "fix" is to simply multiple the value in the RPeakDetectService by 1000 to change from mV to uV, but this is a hack in my opinion. I think the better option here is to modify the operator to use the reading.uom field to determine the unit of measure and act appropriately.
@chanskw your thoughts on this?
How much more work to fix this "properly"? In the EWSService, I do look at the UOM and convert temperature to expected format. I don't think I have done it for all data types tho.
The challenge with fixing is that since the UOM value in the Observation type is not standardized, it's not possible to know exactly what that value is going to look like when it gets populated by the source. For example, Physionet and the Beacon service are going to use common names for the UOM (i.e. V, mV). However, the Vines service uses the IEEE standard to represent UOMs (i.e. MDC_DIM_MILLI_VOLT).
What did you do in the EWSService when determining UOM?
I see. I suggest we document what the QRSDetector service expects as signal input. And then we create a new component call prepare that will do this conversion. In the beacon service, we also document the unit of measure of the signals that will be generated. The expectation here is that clients need to handle this until we can standardize the UOM in the platform.
I have added a new UOM Conversion service that will convert the ECG values from one unit to another. Using this service up stream from the QRSDetector and converting to uV enables the service to work when ingesting data from the beacon service. Closing this issue as resolved.
What if we take it from Physionet? does it detect anything?