@kingstinct/react-native-healthkit 13.1.4 → 13.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/MedicationModule.swift +51 -4
- package/ios/WorkoutProxy.swift +4 -0
- package/lib/typescript/specs/MedicationModule.nitro.d.ts +1 -0
- package/lib/typescript/types/CategoryTypeIdentifier.d.ts +31 -1
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +12 -0
- package/lib/typescript/types/Workouts.d.ts +4 -0
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +17 -1
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +20 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +52 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +32 -2
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +28 -0
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +8 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +28 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +28 -0
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +94 -2
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +20 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +5 -1
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +6 -2
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +162 -134
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +92 -84
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +155 -127
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +149 -121
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +18 -2
- package/package.json +2 -2
- package/src/specs/MedicationModule.nitro.ts +1 -0
- package/src/types/CategoryTypeIdentifier.ts +35 -0
- package/src/types/QuantityTypeIdentifier.ts +14 -0
- package/src/types/Workouts.ts +4 -0
|
@@ -46,11 +46,48 @@ import NitroModules
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
@available(iOS 26.0, *)
|
|
49
|
-
func
|
|
49
|
+
func buildMedicationNameLookup(datePredicate: NSPredicate?) async -> [String: (name: String, nickname: String?)] {
|
|
50
|
+
var lookup: [String: (name: String, nickname: String?)] = [:]
|
|
51
|
+
do {
|
|
52
|
+
let q = HKUserAnnotatedMedicationQueryDescriptor()
|
|
53
|
+
let medications = try await q.result(for: store)
|
|
54
|
+
for med in medications {
|
|
55
|
+
let medPredicate = HKQuery.predicateForMedicationDoseEvent(
|
|
56
|
+
medicationConceptIdentifier: med.medication.identifier)
|
|
57
|
+
let combinedPredicate: NSPredicate?
|
|
58
|
+
if let dp = datePredicate {
|
|
59
|
+
combinedPredicate = NSCompoundPredicate(
|
|
60
|
+
andPredicateWithSubpredicates: [dp, medPredicate])
|
|
61
|
+
} else {
|
|
62
|
+
combinedPredicate = medPredicate
|
|
63
|
+
}
|
|
64
|
+
let events = try await sampleQueryAsync(
|
|
65
|
+
sampleType: HKSeriesType.medicationDoseEventType(),
|
|
66
|
+
limit: 0,
|
|
67
|
+
predicate: combinedPredicate,
|
|
68
|
+
sortDescriptors: nil)
|
|
69
|
+
for event in events {
|
|
70
|
+
lookup[event.uuid.uuidString] = (name: med.medication.displayText, nickname: med.nickname)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} catch {
|
|
74
|
+
warnWithPrefix("Failed to build medication name lookup: \(error.localizedDescription)")
|
|
75
|
+
}
|
|
76
|
+
return lookup
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@available(iOS 26.0, *)
|
|
80
|
+
func serializeMedicationEvent(
|
|
81
|
+
sample: HKMedicationDoseEvent,
|
|
82
|
+
medicationNameLookup: [String: (name: String, nickname: String?)] = [:]
|
|
83
|
+
) throws -> MedicationDoseEvent {
|
|
84
|
+
let info = medicationNameLookup[sample.uuid.uuidString]
|
|
85
|
+
let displayText = info?.name
|
|
50
86
|
return MedicationDoseEvent(
|
|
51
87
|
scheduleType: try getScheduleType(sample.scheduleType),
|
|
52
88
|
medicationConceptIdentifier: try serializeMedicationConceptIdentifier(
|
|
53
89
|
sample.medicationConceptIdentifier),
|
|
90
|
+
medicationDisplayText: displayText,
|
|
54
91
|
scheduledDate: sample.scheduledDate,
|
|
55
92
|
scheduledDoseQuantity: sample.scheduledDoseQuantity,
|
|
56
93
|
doseQuantity: sample.doseQuantity,
|
|
@@ -75,7 +112,13 @@ import NitroModules
|
|
|
75
112
|
uuid: sample.uuid.uuidString,
|
|
76
113
|
sourceRevision: serializeSourceRevision(sample.sourceRevision),
|
|
77
114
|
device: serializeDevice(hkDevice: sample.device),
|
|
78
|
-
metadata:
|
|
115
|
+
metadata: {
|
|
116
|
+
var meta = serializeMetadata(sample.metadata)
|
|
117
|
+
if let nick = info?.nickname {
|
|
118
|
+
meta.setString(key: "HKMedicationNickname", value: nick)
|
|
119
|
+
}
|
|
120
|
+
return meta
|
|
121
|
+
}(),
|
|
79
122
|
|
|
80
123
|
metadataExternalUUID: sample.metadata?[HKMetadataKeyExternalUUID] as? String,
|
|
81
124
|
metadataTimeZone: sample.metadata?[HKMetadataKeyTimeZone] as? String,
|
|
@@ -165,9 +208,11 @@ import NitroModules
|
|
|
165
208
|
sortDescriptors: getSortDescriptors(ascending: options.ascending)
|
|
166
209
|
)
|
|
167
210
|
|
|
211
|
+
let nameLookup = await buildMedicationNameLookup(datePredicate: predicate)
|
|
212
|
+
|
|
168
213
|
return try doseEvents.compactMap({ sample in
|
|
169
214
|
if let event = sample as? HKMedicationDoseEvent {
|
|
170
|
-
return try serializeMedicationEvent(sample: event)
|
|
215
|
+
return try serializeMedicationEvent(sample: event, medicationNameLookup: nameLookup)
|
|
171
216
|
}
|
|
172
217
|
return nil
|
|
173
218
|
})
|
|
@@ -206,9 +251,11 @@ import NitroModules
|
|
|
206
251
|
predicate: predicate
|
|
207
252
|
)
|
|
208
253
|
|
|
254
|
+
let nameLookup = await buildMedicationNameLookup(datePredicate: predicate)
|
|
255
|
+
|
|
209
256
|
let serializedSamples = try response.samples.compactMap { s in
|
|
210
257
|
if let sample = s as? HKMedicationDoseEvent {
|
|
211
|
-
return try serializeMedicationEvent(sample: sample)
|
|
258
|
+
return try serializeMedicationEvent(sample: sample, medicationNameLookup: nameLookup)
|
|
212
259
|
}
|
|
213
260
|
return nil
|
|
214
261
|
}
|
package/ios/WorkoutProxy.swift
CHANGED
|
@@ -214,6 +214,10 @@ class WorkoutProxy: HybridWorkoutProxySpec {
|
|
|
214
214
|
return WorkoutSample(
|
|
215
215
|
workoutActivityType: self.workoutActivityType,
|
|
216
216
|
duration: self.duration,
|
|
217
|
+
totalEnergyBurned: self.totalEnergyBurned,
|
|
218
|
+
totalDistance: self.totalDistance,
|
|
219
|
+
totalSwimmingStrokeCount: self.totalSwimmingStrokeCount,
|
|
220
|
+
totalFlightsClimbed: self.totalFlightsClimbed,
|
|
217
221
|
events: self.events,
|
|
218
222
|
activities: self.activities,
|
|
219
223
|
metadataAverageMETs: self.metadataAverageMETs,
|
|
@@ -34,6 +34,7 @@ export interface UserAnnotatedMedication {
|
|
|
34
34
|
export interface MedicationDoseEvent extends BaseSample {
|
|
35
35
|
scheduleType: MedicationDoseEventScheduleType;
|
|
36
36
|
medicationConceptIdentifier: string;
|
|
37
|
+
medicationDisplayText?: string;
|
|
37
38
|
scheduledDate?: Date;
|
|
38
39
|
scheduledDoseQuantity?: number;
|
|
39
40
|
doseQuantity?: number;
|
|
@@ -24,7 +24,37 @@ export type CategoryTypeIdentifierWriteable = 'HKCategoryTypeIdentifierSleepAnal
|
|
|
24
24
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifierbleedingduringpregnancy Apple Docs }
|
|
25
25
|
* @since iOS 18
|
|
26
26
|
*/
|
|
27
|
-
| 'HKCategoryTypeIdentifierBleedingDuringPregnancy'
|
|
27
|
+
| 'HKCategoryTypeIdentifierBleedingDuringPregnancy'
|
|
28
|
+
/**
|
|
29
|
+
* Infrequent Menstrual Cycles
|
|
30
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/infrequentmenstrualcycles Apple Docs }
|
|
31
|
+
* @since iOS 16
|
|
32
|
+
*/
|
|
33
|
+
| 'HKCategoryTypeIdentifierInfrequentMenstrualCycles'
|
|
34
|
+
/**
|
|
35
|
+
* Irregular Menstrual Cycles
|
|
36
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/irregularmenstrualcycles Apple Docs }
|
|
37
|
+
* @since iOS 16
|
|
38
|
+
*/
|
|
39
|
+
| 'HKCategoryTypeIdentifierIrregularMenstrualCycles'
|
|
40
|
+
/**
|
|
41
|
+
* Persistent Intermenstrual Bleeding
|
|
42
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/persistentintermenstrualbleeding Apple Docs }
|
|
43
|
+
* @since iOS 16
|
|
44
|
+
*/
|
|
45
|
+
| 'HKCategoryTypeIdentifierPersistentIntermenstrualBleeding'
|
|
46
|
+
/**
|
|
47
|
+
* Prolonged Menstrual Periods
|
|
48
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/prolongedmenstrualperiods Apple Docs }
|
|
49
|
+
* @since iOS 16
|
|
50
|
+
*/
|
|
51
|
+
| 'HKCategoryTypeIdentifierProlongedMenstrualPeriods'
|
|
52
|
+
/**
|
|
53
|
+
* Sleep Apnea Event
|
|
54
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/sleepapneaevent Apple Docs }
|
|
55
|
+
* @since iOS 18
|
|
56
|
+
*/
|
|
57
|
+
| 'HKCategoryTypeIdentifierSleepApneaEvent';
|
|
28
58
|
/**
|
|
29
59
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier Apple Docs }
|
|
30
60
|
*/
|
|
@@ -189,6 +189,12 @@ export type QuantityTypeIdentifierWriteable =
|
|
|
189
189
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodglucose Apple Docs HKQuantityTypeIdentifierBloodGlucose}
|
|
190
190
|
*/
|
|
191
191
|
| 'HKQuantityTypeIdentifierBloodGlucose'
|
|
192
|
+
/**
|
|
193
|
+
* Blood Ketones
|
|
194
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifierbloodketones Apple Docs HKQuantityTypeIdentifierBloodKetones}
|
|
195
|
+
* @since iOS 8.0
|
|
196
|
+
*/
|
|
197
|
+
| 'HKQuantityTypeIdentifierBloodKetones'
|
|
192
198
|
/**
|
|
193
199
|
* Number Of Times Fallen
|
|
194
200
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiernumberoftimesfallen Apple Docs HKQuantityTypeIdentifierNumberOfTimesFallen}
|
|
@@ -524,6 +530,12 @@ export type QuantityTypeIdentifierWriteable =
|
|
|
524
530
|
* @since iOS 17
|
|
525
531
|
*/
|
|
526
532
|
| 'HKQuantityTypeIdentifierAppleSleepingWristTemperature'
|
|
533
|
+
/**
|
|
534
|
+
* Apple Sleeping Breathing Disturbances
|
|
535
|
+
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/applesleepingbreathingdisturbances Apple Docs HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances}
|
|
536
|
+
* @since iOS 18
|
|
537
|
+
*/
|
|
538
|
+
| 'HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances'
|
|
527
539
|
/**
|
|
528
540
|
* Time In Daylight
|
|
529
541
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifiertimeindaylight Apple Docs HKQuantityTypeIdentifierTimeInDaylight}
|
|
@@ -182,6 +182,10 @@ export interface WorkoutTotals {
|
|
|
182
182
|
export interface WorkoutSample extends BaseSample {
|
|
183
183
|
readonly workoutActivityType: WorkoutActivityType;
|
|
184
184
|
readonly duration: Quantity;
|
|
185
|
+
readonly totalEnergyBurned?: Quantity;
|
|
186
|
+
readonly totalDistance?: Quantity;
|
|
187
|
+
readonly totalSwimmingStrokeCount?: Quantity;
|
|
188
|
+
readonly totalFlightsClimbed?: Quantity;
|
|
185
189
|
readonly events?: readonly WorkoutEvent[];
|
|
186
190
|
readonly activities?: readonly WorkoutActivity[];
|
|
187
191
|
readonly metadataAverageMETs?: Quantity;
|
|
@@ -56,9 +56,9 @@ namespace margelo::nitro::healthkit { enum class QuantityTypeIdentifier; }
|
|
|
56
56
|
#include "WorkoutActivityType.hpp"
|
|
57
57
|
#include "Quantity.hpp"
|
|
58
58
|
#include <string>
|
|
59
|
+
#include <optional>
|
|
59
60
|
#include "WorkoutEvent.hpp"
|
|
60
61
|
#include <vector>
|
|
61
|
-
#include <optional>
|
|
62
62
|
#include "WorkoutEventType.hpp"
|
|
63
63
|
#include <chrono>
|
|
64
64
|
#include "WorkoutActivity.hpp"
|
|
@@ -129,6 +129,22 @@ namespace margelo::nitro::healthkit {
|
|
|
129
129
|
inline Quantity getDuration() noexcept override {
|
|
130
130
|
return _swiftPart.getDuration();
|
|
131
131
|
}
|
|
132
|
+
inline std::optional<Quantity> getTotalEnergyBurned() noexcept override {
|
|
133
|
+
auto __result = _swiftPart.getTotalEnergyBurned();
|
|
134
|
+
return __result;
|
|
135
|
+
}
|
|
136
|
+
inline std::optional<Quantity> getTotalDistance() noexcept override {
|
|
137
|
+
auto __result = _swiftPart.getTotalDistance();
|
|
138
|
+
return __result;
|
|
139
|
+
}
|
|
140
|
+
inline std::optional<Quantity> getTotalSwimmingStrokeCount() noexcept override {
|
|
141
|
+
auto __result = _swiftPart.getTotalSwimmingStrokeCount();
|
|
142
|
+
return __result;
|
|
143
|
+
}
|
|
144
|
+
inline std::optional<Quantity> getTotalFlightsClimbed() noexcept override {
|
|
145
|
+
auto __result = _swiftPart.getTotalFlightsClimbed();
|
|
146
|
+
return __result;
|
|
147
|
+
}
|
|
132
148
|
inline std::optional<std::vector<WorkoutEvent>> getEvents() noexcept override {
|
|
133
149
|
auto __result = _swiftPart.getEvents();
|
|
134
150
|
return __result;
|
|
@@ -145,6 +145,16 @@ public extension CategoryTypeIdentifier {
|
|
|
145
145
|
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
146
146
|
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
147
147
|
self = .hkcategorytypeidentifierbleedingduringpregnancy
|
|
148
|
+
case "HKCategoryTypeIdentifierInfrequentMenstrualCycles":
|
|
149
|
+
self = .hkcategorytypeidentifierinfrequentmenstrualcycles
|
|
150
|
+
case "HKCategoryTypeIdentifierIrregularMenstrualCycles":
|
|
151
|
+
self = .hkcategorytypeidentifierirregularmenstrualcycles
|
|
152
|
+
case "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding":
|
|
153
|
+
self = .hkcategorytypeidentifierpersistentintermenstrualbleeding
|
|
154
|
+
case "HKCategoryTypeIdentifierProlongedMenstrualPeriods":
|
|
155
|
+
self = .hkcategorytypeidentifierprolongedmenstrualperiods
|
|
156
|
+
case "HKCategoryTypeIdentifierSleepApneaEvent":
|
|
157
|
+
self = .hkcategorytypeidentifiersleepapneaevent
|
|
148
158
|
default:
|
|
149
159
|
return nil
|
|
150
160
|
}
|
|
@@ -283,6 +293,16 @@ public extension CategoryTypeIdentifier {
|
|
|
283
293
|
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
284
294
|
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
285
295
|
return "HKCategoryTypeIdentifierBleedingDuringPregnancy"
|
|
296
|
+
case .hkcategorytypeidentifierinfrequentmenstrualcycles:
|
|
297
|
+
return "HKCategoryTypeIdentifierInfrequentMenstrualCycles"
|
|
298
|
+
case .hkcategorytypeidentifierirregularmenstrualcycles:
|
|
299
|
+
return "HKCategoryTypeIdentifierIrregularMenstrualCycles"
|
|
300
|
+
case .hkcategorytypeidentifierpersistentintermenstrualbleeding:
|
|
301
|
+
return "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding"
|
|
302
|
+
case .hkcategorytypeidentifierprolongedmenstrualperiods:
|
|
303
|
+
return "HKCategoryTypeIdentifierProlongedMenstrualPeriods"
|
|
304
|
+
case .hkcategorytypeidentifiersleepapneaevent:
|
|
305
|
+
return "HKCategoryTypeIdentifierSleepApneaEvent"
|
|
286
306
|
}
|
|
287
307
|
}
|
|
288
308
|
}
|
|
@@ -13,6 +13,10 @@ public protocol HybridWorkoutProxySpec_protocol: HybridObject {
|
|
|
13
13
|
// Properties
|
|
14
14
|
var workoutActivityType: WorkoutActivityType { get }
|
|
15
15
|
var duration: Quantity { get }
|
|
16
|
+
var totalEnergyBurned: Quantity? { get }
|
|
17
|
+
var totalDistance: Quantity? { get }
|
|
18
|
+
var totalSwimmingStrokeCount: Quantity? { get }
|
|
19
|
+
var totalFlightsClimbed: Quantity? { get }
|
|
16
20
|
var events: [WorkoutEvent]? { get }
|
|
17
21
|
var activities: [WorkoutActivity]? { get }
|
|
18
22
|
var metadataAverageMETs: Quantity? { get }
|
|
@@ -128,6 +128,58 @@ open class HybridWorkoutProxySpec_cxx {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
public final var totalEnergyBurned: bridge.std__optional_Quantity_ {
|
|
132
|
+
@inline(__always)
|
|
133
|
+
get {
|
|
134
|
+
return { () -> bridge.std__optional_Quantity_ in
|
|
135
|
+
if let __unwrappedValue = self.__implementation.totalEnergyBurned {
|
|
136
|
+
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
137
|
+
} else {
|
|
138
|
+
return .init()
|
|
139
|
+
}
|
|
140
|
+
}()
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
public final var totalDistance: bridge.std__optional_Quantity_ {
|
|
145
|
+
@inline(__always)
|
|
146
|
+
get {
|
|
147
|
+
return { () -> bridge.std__optional_Quantity_ in
|
|
148
|
+
if let __unwrappedValue = self.__implementation.totalDistance {
|
|
149
|
+
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
150
|
+
} else {
|
|
151
|
+
return .init()
|
|
152
|
+
}
|
|
153
|
+
}()
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
public final var totalSwimmingStrokeCount: bridge.std__optional_Quantity_ {
|
|
158
|
+
@inline(__always)
|
|
159
|
+
get {
|
|
160
|
+
return { () -> bridge.std__optional_Quantity_ in
|
|
161
|
+
if let __unwrappedValue = self.__implementation.totalSwimmingStrokeCount {
|
|
162
|
+
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
163
|
+
} else {
|
|
164
|
+
return .init()
|
|
165
|
+
}
|
|
166
|
+
}()
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
public final var totalFlightsClimbed: bridge.std__optional_Quantity_ {
|
|
171
|
+
@inline(__always)
|
|
172
|
+
get {
|
|
173
|
+
return { () -> bridge.std__optional_Quantity_ in
|
|
174
|
+
if let __unwrappedValue = self.__implementation.totalFlightsClimbed {
|
|
175
|
+
return bridge.create_std__optional_Quantity_(__unwrappedValue)
|
|
176
|
+
} else {
|
|
177
|
+
return .init()
|
|
178
|
+
}
|
|
179
|
+
}()
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
131
183
|
public final var events: bridge.std__optional_std__vector_WorkoutEvent__ {
|
|
132
184
|
@inline(__always)
|
|
133
185
|
get {
|
|
@@ -19,8 +19,14 @@ public extension MedicationDoseEvent {
|
|
|
19
19
|
/**
|
|
20
20
|
* Create a new instance of `MedicationDoseEvent`.
|
|
21
21
|
*/
|
|
22
|
-
init(scheduleType: MedicationDoseEventScheduleType, medicationConceptIdentifier: String, scheduledDate: Date?, scheduledDoseQuantity: Double?, doseQuantity: Double?, logStatus: MedicationDoseEventLogStatus, unit: String, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, metadataWeatherCondition: WeatherCondition?, metadataWeatherHumidity: Quantity?, metadataWeatherTemperature: Quantity?, metadataInsulinDeliveryReason: InsulinDeliveryReason?, metadataHeartRateMotionContext: HeartRateMotionContext?, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap, metadataExternalUUID: String?, metadataTimeZone: String?, metadataWasUserEntered: Bool?, metadataDeviceSerialNumber: String?, metadataUdiDeviceIdentifier: String?, metadataUdiProductionIdentifier: String?, metadataDigitalSignature: String?, metadataDeviceName: String?, metadataDeviceManufacturerName: String?, metadataSyncIdentifier: String?, metadataSyncVersion: Double?, metadataWasTakenInLab: Bool?, metadataReferenceRangeLowerLimit: Double?, metadataReferenceRangeUpperLimit: Double?, metadataAlgorithmVersion: Double?) {
|
|
23
|
-
self.init(scheduleType, std.string(medicationConceptIdentifier), { () -> bridge.
|
|
22
|
+
init(scheduleType: MedicationDoseEventScheduleType, medicationConceptIdentifier: String, medicationDisplayText: String?, scheduledDate: Date?, scheduledDoseQuantity: Double?, doseQuantity: Double?, logStatus: MedicationDoseEventLogStatus, unit: String, sampleType: SampleType, startDate: Date, endDate: Date, hasUndeterminedDuration: Bool, metadataWeatherCondition: WeatherCondition?, metadataWeatherHumidity: Quantity?, metadataWeatherTemperature: Quantity?, metadataInsulinDeliveryReason: InsulinDeliveryReason?, metadataHeartRateMotionContext: HeartRateMotionContext?, uuid: String, sourceRevision: SourceRevision, device: Device?, metadata: AnyMap, metadataExternalUUID: String?, metadataTimeZone: String?, metadataWasUserEntered: Bool?, metadataDeviceSerialNumber: String?, metadataUdiDeviceIdentifier: String?, metadataUdiProductionIdentifier: String?, metadataDigitalSignature: String?, metadataDeviceName: String?, metadataDeviceManufacturerName: String?, metadataSyncIdentifier: String?, metadataSyncVersion: Double?, metadataWasTakenInLab: Bool?, metadataReferenceRangeLowerLimit: Double?, metadataReferenceRangeUpperLimit: Double?, metadataAlgorithmVersion: Double?) {
|
|
23
|
+
self.init(scheduleType, std.string(medicationConceptIdentifier), { () -> bridge.std__optional_std__string_ in
|
|
24
|
+
if let __unwrappedValue = medicationDisplayText {
|
|
25
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
26
|
+
} else {
|
|
27
|
+
return .init()
|
|
28
|
+
}
|
|
29
|
+
}(), { () -> bridge.std__optional_std__chrono__system_clock__time_point_ in
|
|
24
30
|
if let __unwrappedValue = scheduledDate {
|
|
25
31
|
return bridge.create_std__optional_std__chrono__system_clock__time_point_(__unwrappedValue.toCpp())
|
|
26
32
|
} else {
|
|
@@ -189,6 +195,30 @@ public extension MedicationDoseEvent {
|
|
|
189
195
|
}
|
|
190
196
|
}
|
|
191
197
|
|
|
198
|
+
var medicationDisplayText: String? {
|
|
199
|
+
@inline(__always)
|
|
200
|
+
get {
|
|
201
|
+
return { () -> String? in
|
|
202
|
+
if bridge.has_value_std__optional_std__string_(self.__medicationDisplayText) {
|
|
203
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__medicationDisplayText)
|
|
204
|
+
return String(__unwrapped)
|
|
205
|
+
} else {
|
|
206
|
+
return nil
|
|
207
|
+
}
|
|
208
|
+
}()
|
|
209
|
+
}
|
|
210
|
+
@inline(__always)
|
|
211
|
+
set {
|
|
212
|
+
self.__medicationDisplayText = { () -> bridge.std__optional_std__string_ in
|
|
213
|
+
if let __unwrappedValue = newValue {
|
|
214
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
215
|
+
} else {
|
|
216
|
+
return .init()
|
|
217
|
+
}
|
|
218
|
+
}()
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
192
222
|
var scheduledDate: Date? {
|
|
193
223
|
@inline(__always)
|
|
194
224
|
get {
|
|
@@ -145,6 +145,16 @@ public extension ObjectTypeIdentifier {
|
|
|
145
145
|
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
146
146
|
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
147
147
|
self = .hkcategorytypeidentifierbleedingduringpregnancy
|
|
148
|
+
case "HKCategoryTypeIdentifierInfrequentMenstrualCycles":
|
|
149
|
+
self = .hkcategorytypeidentifierinfrequentmenstrualcycles
|
|
150
|
+
case "HKCategoryTypeIdentifierIrregularMenstrualCycles":
|
|
151
|
+
self = .hkcategorytypeidentifierirregularmenstrualcycles
|
|
152
|
+
case "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding":
|
|
153
|
+
self = .hkcategorytypeidentifierpersistentintermenstrualbleeding
|
|
154
|
+
case "HKCategoryTypeIdentifierProlongedMenstrualPeriods":
|
|
155
|
+
self = .hkcategorytypeidentifierprolongedmenstrualperiods
|
|
156
|
+
case "HKCategoryTypeIdentifierSleepApneaEvent":
|
|
157
|
+
self = .hkcategorytypeidentifiersleepapneaevent
|
|
148
158
|
case "HKCharacteristicTypeIdentifierFitzpatrickSkinType":
|
|
149
159
|
self = .hkcharacteristictypeidentifierfitzpatrickskintype
|
|
150
160
|
case "HKCharacteristicTypeIdentifierBiologicalSex":
|
|
@@ -231,6 +241,8 @@ public extension ObjectTypeIdentifier {
|
|
|
231
241
|
self = .hkquantitytypeidentifierperipheralperfusionindex
|
|
232
242
|
case "HKQuantityTypeIdentifierBloodGlucose":
|
|
233
243
|
self = .hkquantitytypeidentifierbloodglucose
|
|
244
|
+
case "HKQuantityTypeIdentifierBloodKetones":
|
|
245
|
+
self = .hkquantitytypeidentifierbloodketones
|
|
234
246
|
case "HKQuantityTypeIdentifierNumberOfTimesFallen":
|
|
235
247
|
self = .hkquantitytypeidentifiernumberoftimesfallen
|
|
236
248
|
case "HKQuantityTypeIdentifierElectrodermalActivity":
|
|
@@ -355,6 +367,8 @@ public extension ObjectTypeIdentifier {
|
|
|
355
367
|
self = .hkquantitytypeidentifierwatertemperature
|
|
356
368
|
case "HKQuantityTypeIdentifierAppleSleepingWristTemperature":
|
|
357
369
|
self = .hkquantitytypeidentifierapplesleepingwristtemperature
|
|
370
|
+
case "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances":
|
|
371
|
+
self = .hkquantitytypeidentifierapplesleepingbreathingdisturbances
|
|
358
372
|
case "HKQuantityTypeIdentifierTimeInDaylight":
|
|
359
373
|
self = .hkquantitytypeidentifiertimeindaylight
|
|
360
374
|
case "HKQuantityTypeIdentifierPhysicalEffort":
|
|
@@ -551,6 +565,16 @@ public extension ObjectTypeIdentifier {
|
|
|
551
565
|
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
552
566
|
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
553
567
|
return "HKCategoryTypeIdentifierBleedingDuringPregnancy"
|
|
568
|
+
case .hkcategorytypeidentifierinfrequentmenstrualcycles:
|
|
569
|
+
return "HKCategoryTypeIdentifierInfrequentMenstrualCycles"
|
|
570
|
+
case .hkcategorytypeidentifierirregularmenstrualcycles:
|
|
571
|
+
return "HKCategoryTypeIdentifierIrregularMenstrualCycles"
|
|
572
|
+
case .hkcategorytypeidentifierpersistentintermenstrualbleeding:
|
|
573
|
+
return "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding"
|
|
574
|
+
case .hkcategorytypeidentifierprolongedmenstrualperiods:
|
|
575
|
+
return "HKCategoryTypeIdentifierProlongedMenstrualPeriods"
|
|
576
|
+
case .hkcategorytypeidentifiersleepapneaevent:
|
|
577
|
+
return "HKCategoryTypeIdentifierSleepApneaEvent"
|
|
554
578
|
case .hkcharacteristictypeidentifierfitzpatrickskintype:
|
|
555
579
|
return "HKCharacteristicTypeIdentifierFitzpatrickSkinType"
|
|
556
580
|
case .hkcharacteristictypeidentifierbiologicalsex:
|
|
@@ -637,6 +661,8 @@ public extension ObjectTypeIdentifier {
|
|
|
637
661
|
return "HKQuantityTypeIdentifierPeripheralPerfusionIndex"
|
|
638
662
|
case .hkquantitytypeidentifierbloodglucose:
|
|
639
663
|
return "HKQuantityTypeIdentifierBloodGlucose"
|
|
664
|
+
case .hkquantitytypeidentifierbloodketones:
|
|
665
|
+
return "HKQuantityTypeIdentifierBloodKetones"
|
|
640
666
|
case .hkquantitytypeidentifiernumberoftimesfallen:
|
|
641
667
|
return "HKQuantityTypeIdentifierNumberOfTimesFallen"
|
|
642
668
|
case .hkquantitytypeidentifierelectrodermalactivity:
|
|
@@ -761,6 +787,8 @@ public extension ObjectTypeIdentifier {
|
|
|
761
787
|
return "HKQuantityTypeIdentifierWaterTemperature"
|
|
762
788
|
case .hkquantitytypeidentifierapplesleepingwristtemperature:
|
|
763
789
|
return "HKQuantityTypeIdentifierAppleSleepingWristTemperature"
|
|
790
|
+
case .hkquantitytypeidentifierapplesleepingbreathingdisturbances:
|
|
791
|
+
return "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances"
|
|
764
792
|
case .hkquantitytypeidentifiertimeindaylight:
|
|
765
793
|
return "HKQuantityTypeIdentifierTimeInDaylight"
|
|
766
794
|
case .hkquantitytypeidentifierphysicaleffort:
|
|
@@ -87,6 +87,8 @@ public extension QuantityTypeIdentifier {
|
|
|
87
87
|
self = .hkquantitytypeidentifierperipheralperfusionindex
|
|
88
88
|
case "HKQuantityTypeIdentifierBloodGlucose":
|
|
89
89
|
self = .hkquantitytypeidentifierbloodglucose
|
|
90
|
+
case "HKQuantityTypeIdentifierBloodKetones":
|
|
91
|
+
self = .hkquantitytypeidentifierbloodketones
|
|
90
92
|
case "HKQuantityTypeIdentifierNumberOfTimesFallen":
|
|
91
93
|
self = .hkquantitytypeidentifiernumberoftimesfallen
|
|
92
94
|
case "HKQuantityTypeIdentifierElectrodermalActivity":
|
|
@@ -211,6 +213,8 @@ public extension QuantityTypeIdentifier {
|
|
|
211
213
|
self = .hkquantitytypeidentifierwatertemperature
|
|
212
214
|
case "HKQuantityTypeIdentifierAppleSleepingWristTemperature":
|
|
213
215
|
self = .hkquantitytypeidentifierapplesleepingwristtemperature
|
|
216
|
+
case "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances":
|
|
217
|
+
self = .hkquantitytypeidentifierapplesleepingbreathingdisturbances
|
|
214
218
|
case "HKQuantityTypeIdentifierTimeInDaylight":
|
|
215
219
|
self = .hkquantitytypeidentifiertimeindaylight
|
|
216
220
|
case "HKQuantityTypeIdentifierPhysicalEffort":
|
|
@@ -335,6 +339,8 @@ public extension QuantityTypeIdentifier {
|
|
|
335
339
|
return "HKQuantityTypeIdentifierPeripheralPerfusionIndex"
|
|
336
340
|
case .hkquantitytypeidentifierbloodglucose:
|
|
337
341
|
return "HKQuantityTypeIdentifierBloodGlucose"
|
|
342
|
+
case .hkquantitytypeidentifierbloodketones:
|
|
343
|
+
return "HKQuantityTypeIdentifierBloodKetones"
|
|
338
344
|
case .hkquantitytypeidentifiernumberoftimesfallen:
|
|
339
345
|
return "HKQuantityTypeIdentifierNumberOfTimesFallen"
|
|
340
346
|
case .hkquantitytypeidentifierelectrodermalactivity:
|
|
@@ -459,6 +465,8 @@ public extension QuantityTypeIdentifier {
|
|
|
459
465
|
return "HKQuantityTypeIdentifierWaterTemperature"
|
|
460
466
|
case .hkquantitytypeidentifierapplesleepingwristtemperature:
|
|
461
467
|
return "HKQuantityTypeIdentifierAppleSleepingWristTemperature"
|
|
468
|
+
case .hkquantitytypeidentifierapplesleepingbreathingdisturbances:
|
|
469
|
+
return "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances"
|
|
462
470
|
case .hkquantitytypeidentifiertimeindaylight:
|
|
463
471
|
return "HKQuantityTypeIdentifierTimeInDaylight"
|
|
464
472
|
case .hkquantitytypeidentifierphysicaleffort:
|
|
@@ -145,6 +145,16 @@ public extension SampleTypeIdentifier {
|
|
|
145
145
|
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
146
146
|
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
147
147
|
self = .hkcategorytypeidentifierbleedingduringpregnancy
|
|
148
|
+
case "HKCategoryTypeIdentifierInfrequentMenstrualCycles":
|
|
149
|
+
self = .hkcategorytypeidentifierinfrequentmenstrualcycles
|
|
150
|
+
case "HKCategoryTypeIdentifierIrregularMenstrualCycles":
|
|
151
|
+
self = .hkcategorytypeidentifierirregularmenstrualcycles
|
|
152
|
+
case "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding":
|
|
153
|
+
self = .hkcategorytypeidentifierpersistentintermenstrualbleeding
|
|
154
|
+
case "HKCategoryTypeIdentifierProlongedMenstrualPeriods":
|
|
155
|
+
self = .hkcategorytypeidentifierprolongedmenstrualperiods
|
|
156
|
+
case "HKCategoryTypeIdentifierSleepApneaEvent":
|
|
157
|
+
self = .hkcategorytypeidentifiersleepapneaevent
|
|
148
158
|
case "HKCorrelationTypeIdentifierBloodPressure":
|
|
149
159
|
self = .hkcorrelationtypeidentifierbloodpressure
|
|
150
160
|
case "HKCorrelationTypeIdentifierFood":
|
|
@@ -219,6 +229,8 @@ public extension SampleTypeIdentifier {
|
|
|
219
229
|
self = .hkquantitytypeidentifierperipheralperfusionindex
|
|
220
230
|
case "HKQuantityTypeIdentifierBloodGlucose":
|
|
221
231
|
self = .hkquantitytypeidentifierbloodglucose
|
|
232
|
+
case "HKQuantityTypeIdentifierBloodKetones":
|
|
233
|
+
self = .hkquantitytypeidentifierbloodketones
|
|
222
234
|
case "HKQuantityTypeIdentifierNumberOfTimesFallen":
|
|
223
235
|
self = .hkquantitytypeidentifiernumberoftimesfallen
|
|
224
236
|
case "HKQuantityTypeIdentifierElectrodermalActivity":
|
|
@@ -343,6 +355,8 @@ public extension SampleTypeIdentifier {
|
|
|
343
355
|
self = .hkquantitytypeidentifierwatertemperature
|
|
344
356
|
case "HKQuantityTypeIdentifierAppleSleepingWristTemperature":
|
|
345
357
|
self = .hkquantitytypeidentifierapplesleepingwristtemperature
|
|
358
|
+
case "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances":
|
|
359
|
+
self = .hkquantitytypeidentifierapplesleepingbreathingdisturbances
|
|
346
360
|
case "HKQuantityTypeIdentifierTimeInDaylight":
|
|
347
361
|
self = .hkquantitytypeidentifiertimeindaylight
|
|
348
362
|
case "HKQuantityTypeIdentifierPhysicalEffort":
|
|
@@ -537,6 +551,16 @@ public extension SampleTypeIdentifier {
|
|
|
537
551
|
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
538
552
|
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
539
553
|
return "HKCategoryTypeIdentifierBleedingDuringPregnancy"
|
|
554
|
+
case .hkcategorytypeidentifierinfrequentmenstrualcycles:
|
|
555
|
+
return "HKCategoryTypeIdentifierInfrequentMenstrualCycles"
|
|
556
|
+
case .hkcategorytypeidentifierirregularmenstrualcycles:
|
|
557
|
+
return "HKCategoryTypeIdentifierIrregularMenstrualCycles"
|
|
558
|
+
case .hkcategorytypeidentifierpersistentintermenstrualbleeding:
|
|
559
|
+
return "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding"
|
|
560
|
+
case .hkcategorytypeidentifierprolongedmenstrualperiods:
|
|
561
|
+
return "HKCategoryTypeIdentifierProlongedMenstrualPeriods"
|
|
562
|
+
case .hkcategorytypeidentifiersleepapneaevent:
|
|
563
|
+
return "HKCategoryTypeIdentifierSleepApneaEvent"
|
|
540
564
|
case .hkcorrelationtypeidentifierbloodpressure:
|
|
541
565
|
return "HKCorrelationTypeIdentifierBloodPressure"
|
|
542
566
|
case .hkcorrelationtypeidentifierfood:
|
|
@@ -611,6 +635,8 @@ public extension SampleTypeIdentifier {
|
|
|
611
635
|
return "HKQuantityTypeIdentifierPeripheralPerfusionIndex"
|
|
612
636
|
case .hkquantitytypeidentifierbloodglucose:
|
|
613
637
|
return "HKQuantityTypeIdentifierBloodGlucose"
|
|
638
|
+
case .hkquantitytypeidentifierbloodketones:
|
|
639
|
+
return "HKQuantityTypeIdentifierBloodKetones"
|
|
614
640
|
case .hkquantitytypeidentifiernumberoftimesfallen:
|
|
615
641
|
return "HKQuantityTypeIdentifierNumberOfTimesFallen"
|
|
616
642
|
case .hkquantitytypeidentifierelectrodermalactivity:
|
|
@@ -735,6 +761,8 @@ public extension SampleTypeIdentifier {
|
|
|
735
761
|
return "HKQuantityTypeIdentifierWaterTemperature"
|
|
736
762
|
case .hkquantitytypeidentifierapplesleepingwristtemperature:
|
|
737
763
|
return "HKQuantityTypeIdentifierAppleSleepingWristTemperature"
|
|
764
|
+
case .hkquantitytypeidentifierapplesleepingbreathingdisturbances:
|
|
765
|
+
return "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances"
|
|
738
766
|
case .hkquantitytypeidentifiertimeindaylight:
|
|
739
767
|
return "HKQuantityTypeIdentifierTimeInDaylight"
|
|
740
768
|
case .hkquantitytypeidentifierphysicaleffort:
|
|
@@ -137,6 +137,16 @@ public extension SampleTypeIdentifierWriteable {
|
|
|
137
137
|
self = .hkcategorytypeidentifierbleedingafterpregnancy
|
|
138
138
|
case "HKCategoryTypeIdentifierBleedingDuringPregnancy":
|
|
139
139
|
self = .hkcategorytypeidentifierbleedingduringpregnancy
|
|
140
|
+
case "HKCategoryTypeIdentifierInfrequentMenstrualCycles":
|
|
141
|
+
self = .hkcategorytypeidentifierinfrequentmenstrualcycles
|
|
142
|
+
case "HKCategoryTypeIdentifierIrregularMenstrualCycles":
|
|
143
|
+
self = .hkcategorytypeidentifierirregularmenstrualcycles
|
|
144
|
+
case "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding":
|
|
145
|
+
self = .hkcategorytypeidentifierpersistentintermenstrualbleeding
|
|
146
|
+
case "HKCategoryTypeIdentifierProlongedMenstrualPeriods":
|
|
147
|
+
self = .hkcategorytypeidentifierprolongedmenstrualperiods
|
|
148
|
+
case "HKCategoryTypeIdentifierSleepApneaEvent":
|
|
149
|
+
self = .hkcategorytypeidentifiersleepapneaevent
|
|
140
150
|
case "HKCorrelationTypeIdentifierBloodPressure":
|
|
141
151
|
self = .hkcorrelationtypeidentifierbloodpressure
|
|
142
152
|
case "HKCorrelationTypeIdentifierFood":
|
|
@@ -201,6 +211,8 @@ public extension SampleTypeIdentifierWriteable {
|
|
|
201
211
|
self = .hkquantitytypeidentifierperipheralperfusionindex
|
|
202
212
|
case "HKQuantityTypeIdentifierBloodGlucose":
|
|
203
213
|
self = .hkquantitytypeidentifierbloodglucose
|
|
214
|
+
case "HKQuantityTypeIdentifierBloodKetones":
|
|
215
|
+
self = .hkquantitytypeidentifierbloodketones
|
|
204
216
|
case "HKQuantityTypeIdentifierNumberOfTimesFallen":
|
|
205
217
|
self = .hkquantitytypeidentifiernumberoftimesfallen
|
|
206
218
|
case "HKQuantityTypeIdentifierElectrodermalActivity":
|
|
@@ -325,6 +337,8 @@ public extension SampleTypeIdentifierWriteable {
|
|
|
325
337
|
self = .hkquantitytypeidentifierwatertemperature
|
|
326
338
|
case "HKQuantityTypeIdentifierAppleSleepingWristTemperature":
|
|
327
339
|
self = .hkquantitytypeidentifierapplesleepingwristtemperature
|
|
340
|
+
case "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances":
|
|
341
|
+
self = .hkquantitytypeidentifierapplesleepingbreathingdisturbances
|
|
328
342
|
case "HKQuantityTypeIdentifierTimeInDaylight":
|
|
329
343
|
self = .hkquantitytypeidentifiertimeindaylight
|
|
330
344
|
case "HKQuantityTypeIdentifierPhysicalEffort":
|
|
@@ -509,6 +523,16 @@ public extension SampleTypeIdentifierWriteable {
|
|
|
509
523
|
return "HKCategoryTypeIdentifierBleedingAfterPregnancy"
|
|
510
524
|
case .hkcategorytypeidentifierbleedingduringpregnancy:
|
|
511
525
|
return "HKCategoryTypeIdentifierBleedingDuringPregnancy"
|
|
526
|
+
case .hkcategorytypeidentifierinfrequentmenstrualcycles:
|
|
527
|
+
return "HKCategoryTypeIdentifierInfrequentMenstrualCycles"
|
|
528
|
+
case .hkcategorytypeidentifierirregularmenstrualcycles:
|
|
529
|
+
return "HKCategoryTypeIdentifierIrregularMenstrualCycles"
|
|
530
|
+
case .hkcategorytypeidentifierpersistentintermenstrualbleeding:
|
|
531
|
+
return "HKCategoryTypeIdentifierPersistentIntermenstrualBleeding"
|
|
532
|
+
case .hkcategorytypeidentifierprolongedmenstrualperiods:
|
|
533
|
+
return "HKCategoryTypeIdentifierProlongedMenstrualPeriods"
|
|
534
|
+
case .hkcategorytypeidentifiersleepapneaevent:
|
|
535
|
+
return "HKCategoryTypeIdentifierSleepApneaEvent"
|
|
512
536
|
case .hkcorrelationtypeidentifierbloodpressure:
|
|
513
537
|
return "HKCorrelationTypeIdentifierBloodPressure"
|
|
514
538
|
case .hkcorrelationtypeidentifierfood:
|
|
@@ -573,6 +597,8 @@ public extension SampleTypeIdentifierWriteable {
|
|
|
573
597
|
return "HKQuantityTypeIdentifierPeripheralPerfusionIndex"
|
|
574
598
|
case .hkquantitytypeidentifierbloodglucose:
|
|
575
599
|
return "HKQuantityTypeIdentifierBloodGlucose"
|
|
600
|
+
case .hkquantitytypeidentifierbloodketones:
|
|
601
|
+
return "HKQuantityTypeIdentifierBloodKetones"
|
|
576
602
|
case .hkquantitytypeidentifiernumberoftimesfallen:
|
|
577
603
|
return "HKQuantityTypeIdentifierNumberOfTimesFallen"
|
|
578
604
|
case .hkquantitytypeidentifierelectrodermalactivity:
|
|
@@ -697,6 +723,8 @@ public extension SampleTypeIdentifierWriteable {
|
|
|
697
723
|
return "HKQuantityTypeIdentifierWaterTemperature"
|
|
698
724
|
case .hkquantitytypeidentifierapplesleepingwristtemperature:
|
|
699
725
|
return "HKQuantityTypeIdentifierAppleSleepingWristTemperature"
|
|
726
|
+
case .hkquantitytypeidentifierapplesleepingbreathingdisturbances:
|
|
727
|
+
return "HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances"
|
|
700
728
|
case .hkquantitytypeidentifiertimeindaylight:
|
|
701
729
|
return "HKQuantityTypeIdentifierTimeInDaylight"
|
|
702
730
|
case .hkquantitytypeidentifierphysicaleffort:
|