Overview
The unified note template endpoint supports two modes of operation:- Generation Mode: Analyzes provider notes to automatically create customized note templates from scratch
- Refinement Mode: Improves existing templates based on instructions or before/after note comparisons
Request Body
The request body varies depending on the operation mode:Generation Mode (Default)
Set to “generate” (default) to create a template from provider notes
Array of provider notes to analyze (minimum 1, maximum 5 notes per request)
Optional instructions for the template generation process
Refinement Mode
Set to “refine” to improve an existing template
The existing note template to refine (must be a complete NoteTemplate object)
Instructions for how to refine the template
Before/after note comparison to guide refinement
Response
The created note template job
Status Codes
Note template job created successfully and is being processed
Invalid request body, missing required fields, or validation errors
- Generation Mode: Missing notes array, too many notes (maximum 5), empty note content, description too long (maximum 1000 characters)
- Refinement Mode: Missing template object, invalid template structure, note comparison validation errors
- Both Modes: Invalid mode value, malformed request structure
Invalid or missing API key
Server error occurred while processing the request
Validation Rules
Input Validation: The following validation rules apply:Generation Mode:
- Notes: Minimum 1, maximum 5 notes per request
- Content: Required for each note, cannot be empty
- Description: Optional, maximum 1000 characters per note
- Instructions: Optional
- Template: Required, must be a valid NoteTemplate object
- Instructions: Optional
- Note Comparison: Optional, both before and after content required if provided
- Description: Optional, maximum 1000 characters for note comparison
Next Steps
After creating a note template job:- Poll for results: Use the Get Note Template endpoint with the returned ID to check status and retrieve results
- Use webhooks: Configure webhooks to get notified when processing completes (recommended)
- Clean up: Use the Delete Note Template endpoint to remove jobs you no longer need
Best Practices
Generation Mode
Note Selection:- Quality over quantity: Use your best, most representative notes
- Consistency: Include notes with similar structure and style
- Completeness: Use complete notes rather than fragments
- Variety: Include different types of cases within the same specialty
- Be specific: “Focus on cardiology consultations” vs. “Make a good template”
- Mention priorities: “Emphasize differential diagnosis section”
- Include preferences: “Use bullet points for assessment and plan”
Refinement Mode
Template Preparation:- Use existing templates: Start with a working template that needs improvement
- Identify specific issues: Know what aspects need refinement
- Be precise: “Add severity scoring to assessment section”
- Reference sections: “Modify the plan section to include follow-up timeframes”
- Specify changes: “Change from paragraph to bullet point format”
- Use real examples: Provide actual before/after note content
- Show clear differences: Highlight specific improvements needed
- Include context: Explain why the changes are desired
Example Instructions
Generation Mode
Refinement Mode
Related Endpoints
- Get Note Template - Retrieve a template job and results
- Delete Note Template - Delete a template job