patientdata property allows you to provide the patient’s clinical history and context to SofIA. While optional, it is strongly recommended — it enables SofIA to reference the patient’s background when generating reports and answering clinical questions.
Data Structure
Thepatientdata prop accepts a JSON object with the following structure:
The fields
fullName, birthDate, phone, and address are automatically anonymized in AI processing. SofIA replaces these values with placeholders before sending data to the AI engine, then restores them in the final output. This ensures HIPAA/GDPR compliance.Usage Examples
Minimal Example
The simplest usage with just the patient’s identity:Standard Example
A typical usage including contact information and medical history:Comprehensive Example
Full usage with multiple clinical data sources:The extraData Field
The extraData field is a flexible Record<string, unknown> that accepts any key-value structure. This is where you provide the clinical context that SofIA will use during the consultation.
Common fields used in extraData:
Passing patientdata to the Component
As HTML Attribute
Sincepatientdata is a JSON type, it is automatically parsed by the SDK:
Programmatically (JavaScript)
React
Limits and Validation
Automatic Anonymization
SofIA automatically anonymizes the following personal fields before sending data to the AI engine:fullNamebirthDatephoneaddress