Skip to content

Conversation

@krml19
Copy link

@krml19 krml19 commented Jun 23, 2022

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 for nil value for averageHeartRate.

// MARK: - CustomStringConvertible
@available(iOS 14.0, *)
extension HKElectrocardiogram.Classification: CustomStringConvertible {
public var key: String {
Copy link
Owner

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 {
Copy link
Owner

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)
Copy link
Owner

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

Copy link
Owner

@kvs-coder kvs-coder left a 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

@kvs-coder kvs-coder force-pushed the master branch 7 times, most recently from ddb82fa to 7ee3437 Compare October 29, 2022 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants