Skip to main content
SofIA SDK enables automation of clinical documentation workflows, from information capture during consultations to structured report generation. This guide explains how automation works and how to integrate it effectively.

Automation architecture

Automatic generation workflow

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 toolsArgs that specifies what information to generate
  • Automatic validation: Clinical coherence verification before report delivery

Automatic form completion

The system can be used to automatically complete existing forms:
  • Fill mode: Functionality that allows filling specific fields
  • Data mapping: Correspondence between generated information and EHR fields
  • Field validation: Verification that data meets form requirements

Specialized agents

Clinical documentation agent

Responsible for generating structured clinical notes:
  • Transcription analysis: Processing of medical content from the consultation
  • Contextualization: Integration with previous patient data
  • Coherent structure: Information organization according to defined schema
  • Medical validation: Clinical coherence verification of content

Medical coding agent

Specialized in assigning standard codes:
  • Supported terminologies: ICD-10, SNOMED CT, LOINC as configured in the schema
  • Automatic analysis: Identification of codifiable diagnoses and procedures
  • Code suggestions: Proposals based on clinical content
  • Code validation: Verification of suggested code appropriateness

Review and quality agent

Ensures documentation quality and coherence:
  • Coherence control: Internal consistency verification in the report
  • Error detection: Identification of possible clinical inconsistencies
  • Schema validation: Confirmation of compliance with required JSON structure
  • Quality improvement: Content refinement before final delivery

Automation configuration

Required properties for automation

To enable automation, SofIA SDK requires:
  • toolsArgs: JSON schema that defines what information to generate and how to structure it
  • handleReport: Callback function that receives the generated report
  • userId and patientId: Identifiers for traceability and context
  • patientData (optional): Patient contextual information to enrich generation

handleReport callback operation

The handleReport 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

Effective schema design

To optimize automation:
  • Specific schemas: Define relevant fields for consultation type
  • Clear descriptions: Provide detailed descriptions for each field
  • Appropriate validations: Include restrictions that reflect clinical reality
  • Terminology references: Use reference to enable automatic coding

Integration management

For successful integration:
  • Data validation: Verify structure and content of received reports
  • Error handling: Implement failure management in saving process
  • Traceability: Maintain records of who, when, and what was generated
  • Versioning: Control schema versions for compatibility

Quality considerations

To maintain high automation quality:
  • Human review: Establish professional validation processes when necessary
  • Progressive configuration: Start with partial automation and gradually increase
  • Monitoring: Supervise quality and accuracy of generated reports
  • Feedback: Use feedback to improve schemas and configurations

Typical use cases

General medicine consultation

  • Symptom documentation: Automatic capture of reported symptomatology
  • Examination recording: Documentation of physical findings and vital signs
  • Therapeutic plan: Automatic generation of discussed treatment plan
  • Follow-up: Automatic scheduling of control appointments

Medical specialties

  • Specialized consultations: Schema adaptation to each specialty’s needs
  • Procedures: Automatic documentation of performed interventions
  • Specific follow-ups: Generation of evolution reports according to protocols

Administrative documentation

  • Discharge reports: Automatic generation of hospital discharge documents
  • Medical certificates: Creation of certifications based on consultation
  • Interconsultation reports: Documentation for referrals to other specialists

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 responsibilities

  • Medical supervision: Professional maintains responsibility for generated content
  • Clinical validation: Review and validate information before final persistence
  • Medical decisions: Clinical decisions remain the professional’s responsibility
  • Regulatory compliance: Ensure usage complies with applicable regulations
  • Patient consent: Ensure patient is informed about AI usage
  • Data privacy: Maintain confidentiality according to applicable regulations
  • Traceability: Record automation usage for future audits
  • Quality of care: Do not compromise care quality for efficiency gains

Monitoring and continuous improvement

Important metrics

  • Documentation accuracy: Evaluate precision of generated reports
  • Processing time: Monitor latency from capture to delivery
  • Utilization rate: Measure what percentage of consultations use automation
  • User satisfaction: Evaluate healthcare professionals’ perception

Improvement processes

  • Quality analysis: Periodic review of generated reports
  • Schema optimization: Schema adjustment based on real usage
  • Training: Continuous education on usage best practices
  • Source updates: Maintenance of system knowledge sources

Next steps