Skip to main content
This example shows how to map Form filling results to your EHR. When a session completes, onSubmit delivers a FormFillingResult with filled forms in structured_data.generated_values. The example routes each form by form_template_id and maps the data object to your EHR fields. Use ambient_session_id to avoid duplicate saves and correlation_id to match results to your encounter. For production, run this mapping in your Webhook handler. Use SDK callbacks for in-app preview only.
TypeScript
Templates with no output appear in non_generated_values. Log or skip them in your handler:
TypeScript

Available tutorials

Form filling

Build a Form Filling Session with EHR Handoff

Open a Form filling session and map structured_data to your EHR using correlation_id.

20 minIntermediate

Next steps

Refer to Webhook handler for server-side persistence Refer to Get Form filling structured data when your webhook payload does not include full output Refer to Callbacks for FormFillingResult field details
Last modified on August 13, 2026