Automation architecture
Automatic generation workflow
Interaction
The healthcare professional interacts with the SofIA SDK via voice or text during the consultation.
Transcription and context
The SDK captures the conversation and sends it along with patient context to the Cognitive Framework.
AI processing
Specialized agents process the information, generating structured clinical documentation.
System components
- Data capture: Audio transcription and patient contextual data
- Intelligent processing: Cognitive framework with specialized agents
- Structured generation: Reports conforming to predefined JSON schemas
- Automatic integration: Data delivery through callbacks for persistence
Types of automation
Automatic document generation
SofIA automatically generates structured clinical documentation based on:- Consultation transcription: Real-time processed doctor-patient conversation
- Patient contextual data: Information provided in
patientdata - Predefined schema: Structure defined in
templatethat specifies what information to generate - Automatic validation: Clinical coherence verification before report delivery
Structured report integration
SofIA’s automation focuses on report generation from consultation transcripts. The SDK generates structured JSON reports matching your template schema, which your application can then use to populate forms, update EHR fields, or create clinical documents. SofIA uses specialized AI agents for documentation generation and quality review.Automation configuration
Required properties for automation
To enable automation, SofIA SDK requires:template: JSON schema that defines what information to generate and how to structure ithandleReport: Callback function that receives the generated reportuseridandpatientid: Identifiers for traceability and contextpatientdata(optional): Patient contextual information to enrich generation
Complete automation example
handleReport callback operation
ThehandleReport callback is the main integration point:
- Data reception: Receives structured report according to defined schema
- JSON format: Data arrives in validated JSON format
- Execution timing: Executes when user requests documentation generation
- Persistence responsibility: Callback must manage saving in EHR/HIS system
Implementation best practices
Schema design
- Define fields relevant to the specific consultation type
- Provide detailed
descriptionvalues for each field to guide AI extraction - Use
referenceto enable automatic clinical coding (SNOMED CT, ICD-10, LOINC) - Include
requiredonly for fields that are essential to every consultation
Integration management
- Validate structure and content of received reports before persisting
- Implement error handling for network or save failures
- Maintain audit records of who generated what and when
- Control schema versions for backward compatibility
Quality considerations
- Establish professional review processes for generated documentation
- Start with partial automation and increase scope gradually
- Use feedback to refine schemas and improve output quality
Limitations and considerations
Technical limitations
- Schema dependency: Automation quality depends on JSON schema design
- Available context: Generation is based on information available during consultation
- Audio processing: Requires sufficient audio quality for accurate transcription
- Connectivity: Needs stable connection for real-time processing
Professional and legal responsibilities
- The healthcare professional maintains responsibility for all generated content and clinical decisions
- Review and validate information before final persistence in your EHR/HIS
- Ensure patient consent for AI-assisted documentation per applicable regulations
- Maintain traceability records for compliance audits
Next steps
- Clinical chat: Use the conversational assistant to complement automation
- Clinical data schemas: Design effective schemas for your practice
- Error Reference: Handle errors in automated workflows