Classes

The following classes are available globally.

  • Assistive functions to help conform to HL7 formats

    See more

    Declaration

    Swift

    public class CDAKHL7Helper
  • CDA Guarantor. Individual legally responsible for all patient charges

    See more

    Declaration

    Swift

    public class CDAKGuarantor: CDAKEntry
  • CDA Identifier

    Usually takes the form of a root (required) and an extension (identifier) (optional).

    Additional information

    Examples:

    Source

     <id root="db734647-fc99-424c-a864-7e3cda82e703"/>
    

    or

     <!-- Fake ID using HL7 example OID. -->
    
     <id extension="998991" root="2.16.840.1.113883.19.5.99999.2"/>
    
     <!-- Fake Social Security Number using the actual SSN OID. -->
    
     <id extension="111-00-2330" root="2.16.840.1.113883.4.1"/>
    
    See more

    Declaration

    Swift

    public class CDAKCDAIdentifier: Equatable, Hashable, CDAKJSONInstantiable, CustomStringConvertible
  • Result Value

    See more

    Declaration

    Swift

    public class CDAKResultValue: NSObject, CDAKThingWithTimes
  • CDA Condition

    Most frequently considerd a problem or diagnosis.

    See more

    Declaration

    Swift

    public class CDAKCondition: CDAKEntry
  • Medical procedure. Commonly used for things like surgical procedures.

    See more

    Declaration

    Swift

    public class CDAKProcedure: CDAKEntry
  • Organization

    See more

    Declaration

    Swift

    public class CDAKOrganization: CDAKJSONInstantiable, CustomStringConvertible, Equatable, Hashable
  • Declaration

    Swift

    public class CDAKProvider: CDAKPersonable, CDAKJSONInstantiable, Hashable, Equatable, CustomStringConvertible
  • Represents a transfer event. EX: transferred to federal holding

    See more

    Declaration

    Swift

    public class CDAKTransfer: CDAKThingWithCodes, CustomStringConvertible
  • Supplies a relationship between a patient and a provider for a particulary start/end date and function.

    See more

    Declaration

    Swift

    public class CDAKProviderPerformance: CDAKEntry
  • Telephone

    See more

    Declaration

    Swift

    public class CDAKTelecom: NSObject, CDAKJSONInstantiable
  • CDA template for result-like things. Primarily lab results.

    See more

    Declaration

    Swift

    public class CDAKLabResult: CDAKEntry
  • Social History

    Reference The Social History Observation is used to define the patient’s occupational, personal (e.g. lifestyle), social, and environmental history and health risk factors, as well as administrative data such as marital status, race, ethnicity and religious affiliation.

    Declaration

    Swift

    public class CDAKSocialHistory: CDAKEntry
  • Communication Could represent provider to patient, etc.

    See more

    Declaration

    Swift

    public class CDAKCommunication: CDAKEntry
  • CDA Reference

    See more

    Declaration

    Swift

    public class CDAKReference: CDAKJSONInstantiable
  • Declaration

    Swift

    public class CDAKEntry: NSObject , CDAKThingWithCodes, CDAKPropertyAddressable, CDAKThingWithTimes, CDAKJSONInstantiable, CDAKThingWithIdentifier
  • CDA Coded Result Value

    See more

    Declaration

    Swift

    public class CDAKCodedResultValue: CDAKResultValue, CDAKThingWithCodes
  • Person. Generic person container. Should not use for a provider.

    See more

    Declaration

    Swift

    public class CDAKPerson: CDAKPersonable, CDAKJSONInstantiable
  • Subclass of CDAKResultValue. Represents a known fixed physical result value (PQ, etc.)

    See more

    Declaration

    Swift

    public class CDAKPhysicalQuantityResultValue: CDAKResultValue
  • Represents a Care Goal. May be any of a variety of entries.

    See more

    Declaration

    Swift

    public class CDAKCareGoal: CDAKEntry
  • Represents an Allergy entry

    See more

    Declaration

    Swift

    public class CDAKAllergy: CDAKEntry
  • Primary container for all patient data that is to be represented with CDA

    When creating this record, you may wish to supply a custom header (CDAKQRDAHeader) or during CDA XML generation a default boilerplate header will be applied

    
     let doc = ((supply your CDA XML string))
    
     do {
       //let's try to import from CDA
       let record = try CDAKImport_BulkRecordImporter.importRecord(doc)
    
       //let's create a new vital
       // use the coded values to govern "meaning" (height, weight, BMI, BP items, etc.)
       let aVital = CDAKVitalSign()
       aVital.codes.addCodes("LOINC", codes: ["3141-9"]) //weight
       aVital.values.append(CDAKPhysicalQuantityResultValue(scalar: 155.0, units: "lb"))
       aVital.start_time = NSDate().timeIntervalSince1970
       aVital.end_time = NSDate().timeIntervalSince1970
    
       //append our height to our record
       record.vital_signs.append(aVital)
    
       //render from our model to CDA - format set to .ccda (could also do .c32)
       print(record(inFormat: .ccda))
     }
     catch {
       //do something
     }
    
    
    See more

    Declaration

    Swift

    public class CDAKRecord: NSObject, NSCopying, CDAKPropertyAddressable
  • Provides HealthKit bridging with CDA structures.

    You can create HealthKit samples and convert them to CDA or take CDA objects and convert them to HealthKit samples.

    Right now HealthKit exposes samples for things that are like some vitals and laboratory results. These can be inferred by reviewing the associated CDA vocabulary code entries and the individual result values.

    NOTE: some common HealthKit samples do not yet universally accepted vocabulary concepts. These includes concepts HKQuantityTypeIdentifierStepCount, which do not yet have LOINC (or SNOMED CT) codes.

    We have provided default curated mappings for some codes. These can be found in the CDAKitDefaultHealthKitTermMap plist file.

    Possible future Concepts and codes:


    Fitness Identifiers

    LOINC has begun to track some of this, but it’s in trial mode

    There is also a more generalized Exercise tracking panel that includes distances and durations

    See more

    Declaration

    Swift

    public class CDAKHealthKitBridge
  • Primary bridging record to connect our CDA models with HealthKit

    See more

    Declaration

    Swift

    public class CDAKHKRecord: CustomStringConvertible
  • Vital signs Inherits all members and methods from CDAKLabResult

    See more

    Declaration

    Swift

    public class CDAKVitalSign: CDAKLabResult
  • Stores and manages all cross-record data and settings for CDA import and export

    See more

    Declaration

    Swift

    public class CDAKGlobals
  • Represents a physical address

    See more

    Declaration

    Swift

    public class CDAKAddress: NSObject, CDAKJSONInstantiable
  • This class can be used to represnt a functional status for a patient. Currently, it is not a very close representation of functional status as it is represented in the HL7 CCD, HITSP C32 or Consolidated CDA.

    In the previously mentioned specifications, functional status may represented using either a condition or result. Having mixed types of entries in a section is currently not well supported in the existing CDAKRecord class

    Additionally, there is a mismatch between the data needed to calculate Stage 2 Meaningful Use Quailty Measures and the data contained in patient summary standards. The CQMs are checking to see if a functional status represented by a result was patient supplied. Right now, results do not have a source, and even if we were to use Provider as a source, it would need to be extended to support patients.

    To avoid this, the patient sumamry style functional status has been flattened into this class. This model supports the information needed to calculate Stage 2 MU CQMs. If importers are created from C32 or CCDA, the information can be stored here, but it will be a lossy transformation.

    See more

    Declaration

    Swift

    public class CDAKFunctionalStatus: CDAKEntry