Client

  • A client instance handles authentication and connection to a SMART on FHIR resource server.

    Create an instance of this class, then hold on to it for all your interactions with the SMART server:

    import SMART
    
    let smart = Client(
        baseURL: "https://fhir-api-dstu2.smarthealthit.org",
        settings: [
            //"client_id": "my_mobile_app",       // if you have one; otherwise uses dyn reg
            "redirect": "smartapp://callback",    // must be registered in Info.plist
        ]
    )
    

    There are many other options that you can pass to settings, take a look at init(baseURL:settings:). Also see our programming guide for more information.

    See more

    Declaration

    Swift

    open class Client
  • Describes properties for the authorization flow.

    See more

    Declaration

    Swift

    public struct SMARTAuthProperties
  • Enum describing the desired granularity of the authorize flow.

    See more

    Declaration

    Swift

    public enum SMARTAuthGranularity
  • FHIR errors.

    See more

    Declaration

    Swift

    public enum FHIRError: Error, CustomStringConvertible
  • A JSON dictionary, with String keys and Any values.

    Declaration

    Swift

    public typealias FHIRJSON = [String: Any]
  • The block signature for server interaction callbacks that return an error.

    Declaration

    Swift

    public typealias FHIRErrorCallback = ((FHIRError?) -> Void)
  • The block signature for most server interaction callbacks that return a resource and an error.

    Declaration

    Swift

    public typealias FHIRResourceErrorCallback = ((Resource?, FHIRError?) -> Void)