Share via


Configure the session

Use the DAX.shared.session() method to configure DAXKit for the encounter selected by the user.

public func session(
    withIdentifier: String,
    ehrData: EHRData(
        appointmentId: ehrAppointmentId,
        encounterId: ehrEncounterId,
        mrn: mrn,
        patient: Patient(
            id: patientId,
            firstName: firstName,
            middleName: middleName,
            lastName: lastName,
            dateOfBirth: dateOfBirth,
            gender: administrativeGender
        ),
        reasonForVisit: reasonForVisit
    ),
    workflow: WorkflowSettings = WorkflowSettings(),
    reportLocale: Locale? = nil,
    uxLocale: Locale? = nil
) -> DAXSession

Parameters

  • withIdentifier

    Required; the correlation ID.

  • ehrData

    Optional; an object that provides information about the encounter that's being documented. It contains the following:

  • appointmentId

    The ID of the appointment.

  • encounterId

    The ID of the encounter.

  • mrn

    The patient's medical record number (MRN).

  • patient

    Object that provides information about the patient associated with the encounter. It contains the following:

    id - the patient's ID in the EHR.

    firstName - the patient's first name.

    middleName - the patient's middle name.

    lastName - the patient's last name.

    dateOfBirth - the patient's date of birth.

    gender - the patient's administrative gender. Possible values: unspecified, male, female, other, unknown.

    reasonForVisit - the reason for the patient's visit at the healthcare facility.

  • workflow

    Optional; deprecated.

  • reportLocale

    Optional; the language of the AI-generated report. If not set, this defaults to "en-us".

  • uxLocale

    Optional; the language of the user interface. If not set, this defaults to "en-us".

Returns