Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GaleAPIBridge

Hierarchy

  • EventTarget
    • GaleAPIBridge

Index

Constructors

constructor

  • new GaleAPIBridge(options: { apiKey: string; simulatorPort?: number }): GaleAPIBridge
  • Parameters

    • options: { apiKey: string; simulatorPort?: number }
      • apiKey: string

        The 19Labs API key.

      • Optional simulatorPort?: number

        A TCP port for running the 19Gale Simulator.

    Returns GaleAPIBridge

Methods

addBloodPressureData

  • All of the below methods have a similar function, they create a manual measurement of the type specified by the method using measurement data provided

    Parameters

    Returns void

addExternalDocument

  • Parameters

    Returns void

addGlucometerData

addMultifunctionData

addPulseOxData

addSpirometerData

addThermometerData

addWeightScaleData

authenticate

  • authenticate(user: string, profile: string): void
  • Parameters

    • user: string
    • profile: string

    Returns void

endSession

  • endSession(): Promise<void>
  • End a current session

    Returns Promise<void>

getClinics

  • getClinics(): Promise<Clinic[]>
  • Returns a list of clinics, as defined in the Gale configuration.

    Returns Promise<Clinic[]>

getCurrentLanguage

  • getCurrentLanguage(): Promise<string>
  • Returns Promise<string>

    the current language code, e.g. "en" or "es".

getCurrentUser

  • getCurrentUser(): Promise<null | User>
  • Returns Promise<null | User>

    the current user, or null if not logged in.

getIntake

  • Returns Promise<IntakeData>

    the current intake data, as filled in with the intake form.

getLocation

  • Returns Promise<Location>

    the device location

getMeasurementFileByUri

  • getMeasurementFileByUri(uri: string): Promise<string>
  • Takes a file uri as a reference, exposes the relevant file to the captive webpage and returns a reference to the newly exposed file. The reference will take the form of https://{captivewebpageurl}/public/{filename} and the reference can be used as if the file were a part of the webpages directory

    Parameters

    • uri: string

      The uri that references a measurement file. The uri can be obtained from getMeasurementFileData

    Returns Promise<string>

    Returns a string that can be used to reference the relevant file.

getMeasurementFileData

  • Returns Promise<MeasurementFileDataSummary>

    An object contatining metedata for all measurement files stored on the device. Each file object within the measurement files JSON has a uri attribute which can be used to reference the file using getMeasurementFileByUri

getName

  • getName(): Promise<string>
  • Returns Promise<string>

    the device serial id

getPatientProfiles

  • Returns a list of patient profiles registered to the current user.

    Returns Promise<PatientProfile[]>

getPatientVisitSummaryData

  • Returns Promise<PdfFileData[]>

    An object containing metadata of all prescriptions if it exists

getPdfByUri

  • getPdfByUri(uri: string): Promise<string>
  • Takes a file uri as a reference, exposes the relevant file to the captive webpage and returns a reference to the newly exposed file. The reference will take the form of https://{captivewebpageurl}/public/{filename} and the reference can be used as if the file were a part of the webpages directory

    Parameters

    • uri: string

      The uri that references a Pdf file. The uri can be obtained from getPdfFileData

    Returns Promise<string>

    Returns a string that can be used to reference the relevant file.

getPdfData

  • Returns Promise<PdfDataSummary>

    An object containing metedata for all pdf files stored on the device. Each file object within the pdf files JSON has a uri attribute which can be used to reference the file using getPdfFileByUri

getPrescriptionData

  • Returns Promise<PdfFileData[]>

    An object containing metadata of all prescriptions if it exists

getPrescriptionText

  • Returns Promise<PrescriptionText>

    A JSON object containing the text from all PDFs, as well as whether it is left or right aligned.

getSensorData

  • Parameters

    • Optional startSessionTime: number

    Returns Promise<MeasurementData[]>

    all known sensor measurements for the current session.

getSensors

  • getSensors(): Promise<Sensor[]>
  • Returns a list of available sensors, as defined in the Gale DMS.

    Returns Promise<Sensor[]>

getSerial

  • getSerial(): Promise<string>
  • Returns Promise<string>

    the device serial id

listen

  • listen<T>(type: T, listener: (event: GaleEvent<T>) => any): void
  • Listen to a system event from Gale.

    Type parameters

    Parameters

    Returns void

login

  • Attempts a login given a user and a password.

    Parameters

    Returns Promise<undefined | null | User>

    the current user if successful, throws an error otherwise.

logout

  • logout(): Promise<void>
  • Log outs from gale.

    Returns Promise<void>

navigate

  • Instructs Gale to navigate to a particular native page.

    Parameters

    • name: ScreenName

      the name of the screen to navigate to.

    • Optional arg: string

      An optional argument for the screen. Can be the sensor type when showing a sensor, or the clinic name when showing a clinic.

    Returns void

print

  • print(): void
  • Print the current page

    Returns void

saveCurrentPatientProfile

  • saveCurrentPatientProfile(): void
  • Saves the current session data to the patient profile.

    Returns void

sendSummaryEmail

  • sendSummaryEmail(recipients: string, customBody: string): void
  • Send an email with an attached pdf of a summary of the patient profile

    Parameters

    • recipients: string

      A list of email addresses that the email will be sent to

    • customBody: string

      The content of the email

    Returns void

setIntakeHealthHistory

  • Parameters

    • healthHistory: HealthHistoryData

      e.g. '{"allergies":"peanuts","medications":"tylenol","conditions":"asthma","medicalHistory":"The patient's medical history"}'

    Returns void

setMeasurement

  • Creates a generic measurement treated as if it was made by an external application

    Parameters

    Returns void

setNote

  • setNote(note: string): void
  • Parameters

    • note: string

      The note to be added to the patient profile

    Returns void

showSensor

  • showSensor(type: string): Promise<boolean>
  • Shows a sensor page of a given type.

    see

    BuiltinSensorTypes.

    Parameters

    • type: string

    Returns Promise<boolean>

signUp

  • Signs up a new user.

    Parameters

    Returns Promise<void>

submitHealthData

  • submitHealthData(): void
  • Produces email popup to send patient profile pdf summary

    Returns void

switchPatientProfile

  • Switch to a previously created patient profile.

    Parameters

    Returns void

unlisten

  • unlisten<T>(type: T, listener: (event: GaleEvent<T>) => any): void
  • Type parameters

    Parameters

    Returns void

updateIntake

  • updateIntake(intake: object): Promise<void>
  • Saves the intake data. The format of the intake data is not defined.

    Parameters

    • intake: object

    Returns Promise<void>

Generated using TypeDoc