Skip to main content
The 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

The patientdata 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.
All patient data shown in the examples below is entirely fictional. Never use real patient information in configuration examples, testing environments, or source code.

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:
Include a url field in medical notes if you want SofIA to cite the data source when guiding the doctor. SofIA will reference the URL in its responses so the doctor can verify the original record.

Passing patientdata to the Component

As HTML Attribute

Since patientdata 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:
  • fullName
  • birthDate
  • phone
  • address
These values are replaced with neutral placeholders during AI processing and restored in the final output. This ensures that personally identifiable information (PII) never reaches the AI model directly.
Data inside extraData is not automatically anonymized. Avoid placing raw PII (social security numbers, government IDs, etc.) in extraData fields. Use anonymized identifiers when possible.

Next Steps

  1. Integrate with your framework
  2. Design clinical data schemas
  3. Test your integration