Awell Health Developer Hub
Dev Hub

Request

Mutation

01

Variables

Have a look at the validation section of the createPatient mutation to learn more about in what format values for certain variables should be passed.

01

Update patient identifiers

Providing patient identifier object in UpdatePatient mutation will replace any existing identifiers. If you wish to add a new identifier you can use the AddIdentifierToPatient mutation instead. Learn more about identifiers.

Mutation

01

Variables

01

Update patient language

Update the preferred language for a patient. This mutation is particularly useful when you need to change a patient's language preference independently from other profile updates.

Mutation

01

Variables

Languages should be passed as an ISO 639-1 shortcode.

01

Upsert patient

The upsertPatient mutation creates a new patient if one doesn't exist with the provided identifier, or updates the existing patient if a match is found. This is useful when you're not sure whether a patient record already exists in Awell.

The patient is identified using a business identifier (system-value pair). Learn more about identifiers.

Mutation

01

Variables

01

Required fields

  • patient_identifier.system: The identifier system configured in your tenant
  • patient_identifier.value: The patient's identifier value in your system
  • profile.first_name: Patient's first name (required if profile is provided)
  • profile.last_name: Patient's last name (required if profile is provided)

Clearing field values

When updating an existing patient, passing null or an empty string for optional profile fields will clear those values from the patient record. This allows you to remove data that is no longer relevant or accurate.

For example, to clear a patient's email address:

01

Validation

This mutation uses the same validation rules as the createPatient mutation:

  • Preferred language: Must be an ISO 639-1 shortcode
  • Phone numbers: Must be in E.164 format (see E.164 phone validation)
  • Birth date: Must be a valid ISO8601 date string
  • Timezone: Must be a valid IANA timezone identifier

Errors

Unknown identifier system

If you pass in an identifier system that is not configured in your organization, Awell will throw an INVALID_IDENTIFIER error with a message that the identifier system is not known.

How to use