-
-
Notifications
You must be signed in to change notification settings - Fork 26
Make averageHeartRate optional
#16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| // MARK: - CustomStringConvertible | ||
| @available(iOS 14.0, *) | ||
| extension HKElectrocardiogram.Classification: CustomStringConvertible { | ||
| public var key: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather not introduce another field for the JSON payload, but change the values in description here
| // MARK: - CustomStringConvertible | ||
| @available(iOS 14.0, *) | ||
| extension HKElectrocardiogram.SymptomsStatus: CustomStringConvertible { | ||
| public var key: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as in the comment
|
|
||
| let samplingFrequencyUnit = HKUnit.hertz() | ||
| guard | ||
| let samplingFrequency = samplingFrequency?.doubleValue(for: samplingFrequencyUnit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it appears that the samplingFrequency can also be nullable, could please introduce the optionality here the same way you did for the averageHeartRate? For reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @krml19
many thanks for your PR. I reviewed it at left some comments. I would introduce in the frame of this PR the sampleFrequency nullability as well and remove the key properties for Classification and SymptomsStatus you added. You can use description property and change the raw strings
ddb82fa to
7ee3437
Compare
Status
READY
Migrations
NO
Description
There is no option to collect the voltage measurements for electrograms with inconclusive poor readings because they do not have any value for
averageHeartRate. Therefore, we should allow fornilvalue foraverageHeartRate.