toolsArgs property defines the structure of clinical data that SofIA should generate. It must be a complete JSON Schema Draft-07 schema that specifies the fields, types, and validations required for medical documentation.
Required structure
The schema must obligatorily include:- $schema: Reference to the JSON Schema Draft-07 standard
- title: Identifier of the clinical document type
- type: Must be “object” for structured documents
- required: Array with mandatory fields
- properties: Detailed definition of each field
Basic example
Specialized fields
Medical terminology sources
Use thesource property to enable normalization with standard terminologies:
Structured vital signs
Supported data types
Basic types
- string: Free or controlled text
- number: Numeric values (integers or decimals)
- boolean: True/false values
- array: Lists of elements
- object: Complex nested structures
Advanced validations
Technical limitations
- Maximum size: 100 KB per schema
- Depth: Maximum 10 nesting levels
- Complexity: Avoid overly complex schemas that may affect performance
Best practices
Detailed descriptions
Provide clear and specific descriptions for each field:Appropriate validations
Implement validations that reflect clinical reality:Flexible structures
Design schemas that allow for clinical variability:Property Customization
Enabling/Disabling User Customization
Use theisConfigurable: false property to disable user customization:
Validation and testing
Before deploying a schema in production:- Validate JSON syntax using linting tools
- Test with real data to verify correct generation
- Review with medical professionals the clinical relevance of fields
- Verify references to standard medical terminologies