EpicFhirClient class

Inheritance

Constructors

EpicFhirClient({required FhirUri fhirUri, required String? clientId, required FhirUri? redirectUri, String? customUriScheme, List<String>? scopes, FhirUri? authorizeUrl, FhirUri? tokenUrl, String? launch, String? secret, String? contactSerialNumber, String? dob, String? encounterDate, String? patientFirstName, String? patientLastName, String? patientMiddleName, String? sysLogin, String? userEpicId, String? userProviderNumber})
EpicFhirClient.fromLaunchParameters({required Uri base, required Map<String, String> queryParameters, FhirUri? fhirUri, String? clientId, FhirUri? redirectUri, String? customUriScheme, List<String>? scopes, String? authorizeUrl, String? tokenUrl, String? launch, String? secret, String redirectPath = '/redirect.html'})
factory

Properties

authClient BaseAuthentication
The smart auth client, version is based on if this is a web or mobile app
getter/setter pairinherited
authHeaders Map<String, String>?
authHeaders that can be stored while in use for a client not using an oauth2 flow but has security headers
getter/setter pairinherited
authorizeUrl ↔ FhirUri?
authorizeUrl - url used for authorization
getter/setter pairinherited
client ↔ Client?
The actual oauth2 client that
getter/setter pairinherited
clientId String?
clientId for the application
getter/setter pairinherited
contactSerialNumber String?
The patient's contact serial number (CSN). In an order-based URL or command, Epic sends the CSN from the encounter on which the order was placed. In a patient-based URL or command, Epic sends the CSN for the currently open activity. For example, if the user is working in the hospital chart for the patient, Epic sends the CSN for that admission.
getter/setter pair
customUriScheme String?
customUriScheme
getter/setter pairinherited
displayName String?
DisplayName for the fhirUser
getter/setter pairinherited
dob String?
The patient's date of birth in the format "MM/DD/YYYY."
getter/setter pair
email String?
Email for fhirUser
getter/setter pairinherited
encounterDate String?
The patient's encounter date in the format "MM/DD/YYYY."
getter/setter pair
encounterId String?
String value with an encounter id, indicating that the app was launched in the context of FHIR Encounter 123.
getter/setter pairinherited
fhirContext List<String>?
Array of relative resource References to any resource type other than “Patient” or “Encounter”. It is not prohibited to have more than one Reference to a given type of resource.
getter/setter pairinherited
fhirUri ↔ FhirUri
Base fhirUri
getter/setter pairinherited
fhirUser String?
Local reference for the fhirUser
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
intent String?
String value describing the intent of the application launch (see notes below)
getter/setter pairinherited
isDemo bool
simple boolean to tell us if this is a demo or not
getter/setter pairinherited
launch String?
String for launch context
getter/setter pairinherited
needPatientBanner bool?
Boolean value indicating whether the app was launched in a UX context where a patient banner is required (when true) or not required (when false). An app receiving a value of false should not take up screen real estate displaying a patient banner.
getter/setter pairinherited
patientFirstName String?
getter/setter pair
patientId String?
https://build.fhir.org/ig/HL7/smart-app-launch/scopes-and-launch-context.html#launch-context-arrives-with-your-access_token Once an app is authorized, the token response will include any context data the app requested and any (potentially) unsolicited context data the EHR may decide to communicate. For example, EHRs may use launch context to communicate UX and UI expectations to the app (see need_patient_banner below).
getter/setter pairinherited
patientLastName String?
getter/setter pair
patientMiddleName String?
getter/setter pair
practitionerId String?
String value with an encounter id, indicating that the app was launched in the context of FHIR Encounter 123.
getter/setter pairinherited
profile String?
Profile (which is generally the same as the fhirUser reference)
getter/setter pairinherited
redirectUri ↔ FhirUri?
redirectUri is required for most oAuth2 flows
getter/setter pairinherited
responseUrl Uri?
responseUrl
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopes List<String>?
Scopes which aren't required for this base class but are used for any that involve authentication & permissions
getter/setter pairinherited
secret String?
Secret string, which isn't a good idea, because most of Flutter is web or mobile, so you really shouldn't be using a secret
getter/setter pairinherited
smartStyleUrl String?
String URL where the EHR’s style parameters can be retrieved (for apps that support styling)
getter/setter pairinherited
sysLogin String?
The user's login ID, as stored in the System Login item in the user record.
getter/setter pair
tenant String?
String conveying an opaque identifier for the healthcare organization that is launching the app. This parameter is intended primarily to support EHR Launch scenarios.
getter/setter pairinherited
tokenUrl ↔ FhirUri?
tokenUrl = url used for obtaining tokens
getter/setter pairinherited
userEpicId String?
The user's ID in Epic.
getter/setter pair
userProviderNumber String?
The provider's FHIR ID number.
getter/setter pair

Methods

close() → void
Not so important for the generic client
inherited
delete(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP DELETE request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request
inherited
get(Uri url, {Map<String, String>? headers}) Future<Response>
Sends an HTTP GET request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request
inherited
Sends an HTTP HEAD request with the given headers to the given URL.
inherited
isLoggedIn() Future<bool>
Checks if client isLoggedIn (same as isSignedIn), maintained because some clients use one and some prefer the other
inherited
isSignedIn() Future<bool>
Checks if client isSignedIn (same as isLoggedIn), maintained because some clients use one and some prefer the other
inherited
login() Future<void>
Method to login the client, it does attempt to parse out any of the above values that may be passed from the server
inherited
logout() Future<void>
Logs the client out and deletes any security information that shouldn't be stored
inherited
newHeaders(Map<String, String>? headers) Future<Map<String, String>>
Adds authorization headers to the client if needed. All methods check if there is a Client as part of the class or if it's null. If it's null it calls this method to check for headers, otherwise it assumes that any authorization information is within the client object
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PATCH request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request
inherited
post(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP POST request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request
inherited
put(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PUT request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request
inherited
read(Uri url, {Map<String, String>? headers}) Future<String>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a String.
inherited
readBytes(Uri url, {Map<String, String>? headers}) Future<Uint8List>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a list of bytes.
inherited
send(BaseRequest request) Future<StreamedResponse>
Sends an HTTP request and asynchronously returns the response.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited