Developers

Medical forms and an AI scribe you can embed

Two script tags from cdn.clara.care: Clara Form renders and exports the form, Clara Widget fills it by voice.

index.html
<script src="https://cdn.clara.care/form/latest.js"></script>

<clara-form lang="en" submit-label="Save visit"></clara-form>
const form = document.querySelector('clara-form');

// A template: sections and fields, the same JSON Clara Platform stores.
form.template = {
  sections: [
    { key: 'visit', label: 'Visit', fields: [
      { id: 'reason', type: 'text', label: 'Reason for visit', required: true },
      { id: 'blood_pressure', type: 'text', label: 'Blood pressure', placeholder: '120/80', pattern: '\\d{2,3}/\\d{2,3}' },
      { id: 'smoker', type: 'checkbox', label: 'Smoker' },
    ] },
  ],

Loading the preview…

Open in playground

How an integration works

  1. Install

    Load the CDN script or the npm package. No build step.

  2. Template

    Describe sections and fields in JSON, inline or by id.

  3. Events

    Listen to clara-change, clara-submit and the clara:* events.

  4. Export

    Save JSON or FHIR QuestionnaireResponse, or post to your server.

GuidesClara FormClara Widget

Frequently asked questions

Do I need an API key to try Clara Form?

No. With an inline template the form renders without any network call besides the script itself. A publishable key is only needed to load templates by id or to connect a live consultation.

Which frameworks does Clara Form support?

React 18 or newer through the npm package, and any other stack through the <clara-form> web component or the CDN script. The README includes Vue and Angular notes.

How does the widget write into my existing EHR fields?

Each field of the template has an htmlFieldId. The widget looks for an input with that id or name on the page and fills it as the clinician speaks. It also dispatches clara:field-filled on window so your app can react.

Is the data in these examples real?

No. Every name, value and transcript is synthetic. The playground keeps nothing: the code you edit lives in the page address when you share it.

Can I export to FHIR?

Yes. toFhirQuestionnaireResponse builds a FHIR R4 QuestionnaireResponse from the template and the values, with one group item per section. The form also exposes toFhir() and includes the resource in the submit event.

Where do I get a publishable key?

In Clara Platform, under Integrate. The key belongs to your organization, and the pages where you embed Clara must be registered there as widget sites so the API answers them.

Planning an integration?

Tell us about your system and your forms. We run small pilots with technology partners.

Cookie settings

Choose which optional cookies Clara Care may use. They stay off until you turn them on, and you can change your choice at any time from Cookie settings in the footer. Privacy policy