CDAKHKRecord
public class CDAKHKRecord: CustomStringConvertible
Primary bridging record to connect our CDA models with HealthKit
-
Person’s prefix (was Title)
Declaration
Swift
public var prefix: String?
-
Person’s first / given name
Declaration
Swift
public var first: String?
-
Person’s last / family name
Declaration
Swift
public var last: String?
-
Person’s name suffix
Declaration
Swift
public var suffix: String?
-
Person’s biological sex / gender
Declaration
Swift
public var gender: HKBiologicalSex?
-
Birth date
Declaration
Swift
public var birthdate: NSDate?
-
Deceased date
Declaration
Swift
public var deathdate: NSDate? //probably not interested in this one...
-
Effective time of record
Declaration
Swift
public var effective_time: NSDate?
-
All HealthKit samples
Declaration
Swift
public var samples: [HKQuantitySample] = []
-
Any metadata you may wish to inject into HealthKit when it samples are created
Declaration
Swift
public var metadata: [String:AnyObject] = [:]
-
Export this HealthKit-based record to a CDA-based representation
This can then be used to add more information or export to CDA XML.
Declaration
Swift
public func exportAsCDAKRecord() -> CDAKRecord
-
For a given CDA-based record (and associated metadata), attempts to inspect that supplied record and convert the contents to HealthKit samples.
Declaration
Swift
public init(fromCDAKRecord patient: CDAKRecord, withHKMetadata metadata: [String:AnyObject] = [:])
Parameters
fromCDAKRecord
The primary CDAKRecord from which you wish to create the patient demographics and samples
withHKMetadata
[String:AnyObject] Any custom metadata you might wish to inject into the HealthKit samples
-
Quick description of the included HealthKit samples
Declaration
Swift
public var samplesDescription : String
-
Debugging description
Declaration
Swift
public var description: String