Widget
SDK specification
Patient information

Patient Information

Heidi allows you to provide patient information for the current patient. When providing patient information as params to Heidi.open() or Heidi.setPatient(), you should use this format:

Please note, all fields are optional however providing them will add more contextual information when generating notes

PatientInfo

AttributeTypeRequired
idstringYes
namestringNo
firstNamestringNo
lastNamestringNo
gender"male" | "female" | "other" | "unknown"No
dobstring as YYYY-MM-DDNo

Note:

  1. When firstName and/or lastName are provided, they take precedence over parsing the name field. This is useful for EHR systems that provide structured name data or use formats like "LastName, FirstName" that are difficult to parse reliably.
  2. The dob field only accepts dates in YYYY-MM-DD format (e.g., "1990-05-15"). Other date formats are not supported and will be rejected.
  3. At runtime, gender values are parsed case-insensitively and trimmed; we recommend using lowercase literals to satisfy TypeScript.

TypeScript Interface

interface PatientInfo {
  id: string;
  name?: string;
  firstName?: string;
  lastName?: string;
  gender?: "male" | "female" | "other" | "unknown";
  dob?: string;
}