Clara Form
Informed consent form: a digital template with declarations, signature and FHIR export
A generic informed consent form with Clara Form: patient and procedure, information given, required declarations and signature, exported as FHIR.
Loading the preview…
<script src="https://cdn.clara.care/form/latest.js"></script>
<main class="demo">
<p class="demo-note">
Texto de ejemplo con fines de demostración. Adapta el contenido a la normativa de tu país y
revísalo con tu equipo clínico y legal antes de usarlo.
</p>
<clara-form lang="es" submit-label="Registrar consentimiento"></clara-form>
<section class="demo-out" aria-labelledby="salida-h">
<h2 id="salida-h">FHIR QuestionnaireResponse</h2>
<pre id="salida" aria-live="polite">Completa las declaraciones y registra el consentimiento para ver aquí el recurso FHIR.</pre>
</section>
</main>
// Formato de consentimiento informado genérico. Las declaraciones son casillas obligatorias:
// el formulario no se envía mientras alguna siga sin marcar.
const template = {
id: 'consentimiento-demo',
name: 'Consentimiento informado',
sections: [
{
key: 'paciente',
label: 'Paciente',
fields: [
{ id: 'nombre', type: 'text', label: 'Nombre completo', required: true },
{ id: 'documento', type: 'text', label: 'Documento de identidad', required: true },
],
},
{
key: 'procedimiento',
label: 'Procedimiento',
description: 'El profesional explica en qué consiste el procedimiento, su finalidad, los beneficios esperados, los riesgos más frecuentes y las alternativas disponibles, en un lenguaje comprensible para el paciente.',
fields: [
{ id: 'procedimiento', type: 'select', label: 'Procedimiento', options: ['Exodoncia simple', 'Endodoncia', 'Colocación de implante', 'Blanqueamiento dental'], required: true },
{ id: 'informacion', type: 'textarea', label: 'Información entregada al paciente', helpText: 'Resumen de lo explicado: finalidad, beneficios, riesgos, alternativas y cuidados posteriores.' },
],
},
{
key: 'declaraciones',
label: 'Declaraciones del paciente',
fields: [
{ id: 'informado', type: 'checkbox', label: 'He recibido información clara sobre el procedimiento, sus beneficios, riesgos y alternativas.', required: true, validationMessage: 'Esta declaración es necesaria para registrar el consentimiento.' },
{ id: 'preguntas', type: 'checkbox', label: 'He podido hacer preguntas y fueron respondidas de forma satisfactoria.', required: true, validationMessage: 'Esta declaración es necesaria para registrar el consentimiento.' },
{ id: 'retiro', type: 'checkbox', label: 'Entiendo que puedo retirar este consentimiento en cualquier momento antes del procedimiento.', required: true, validationMessage: 'Esta declaración es necesaria para registrar el consentimiento.' },
{ id: 'acepto', type: 'checkbox', label: 'Autorizo la realización del procedimiento descrito.', required: true, validationMessage: 'Sin esta autorización no hay consentimiento.' },
],
},
{
key: 'firma',
label: 'Firma',
fields: [
{ id: 'firma_nombre', type: 'text', label: 'Nombre de quien firma', required: true },
{ id: 'firma_relacion', type: 'select', label: 'Firma en calidad de', options: ['Paciente', 'Representante legal', 'Acudiente'], required: true },
{ id: 'profesional', type: 'text', label: 'Profesional que informa', required: true },
{ id: 'fecha', type: 'text', label: 'Fecha', placeholder: 'AAAA-MM-DD', pattern: '\\d{4}-\\d{2}-\\d{2}', required: true },
],
},
],
};
const form = document.querySelector('clara-form');
form.template = template;
// Valores iniciales sintéticos para la demostración (bórralos en tu integración).
form.defaultValues = { fecha: new Date().toISOString().slice(0, 10) };
const salida = document.querySelector('#salida');
// Solo con todas las declaraciones marcadas: QuestionnaireResponse con status "completed".
form.addEventListener('clara-submit', (e) => {
salida.textContent = JSON.stringify(e.detail.fhir, null, 2);
});
form.addEventListener('clara-invalid', (e) => {
console.log('Faltan declaraciones o datos:', Object.keys(e.detail.errors));
});
Every value on this page is synthetic. Never paste real patient data into a public page.
How it works
Identify patient and procedure
Text fields for the patient and a select with the procedures your service offers. The section description carries the generic information text.
Collect the declarations
Each statement the patient must accept is a required checkbox. An unchecked required checkbox blocks the submission with an inline message.
Record who signs
Name and relationship of the person signing, and the clinician who informed. Add a date field or take it from your server at save time.
Export as FHIR
clara-submit returns a QuestionnaireResponse with status completed; store it next to the encounter in your record system.
An informed consent form records that a patient received clear information about a procedure, its benefits, risks and alternatives, had the chance to ask questions, and agrees to it. This example renders a generic consent template with Clara Form: the required declarations are checkboxes the form will not submit without, and the result is a completed FHIR QuestionnaireResponse your record system can store.
The wording is an example. Consent requirements depend on the country, the institution and the procedure: review and adapt the text with your clinical and legal teams before using it.
Parts of an informed consent form
Most formats share the same parts: identification of the patient and of the professional who informs; the procedure, in plain language, with its purpose, benefits, risks and alternatives; the patient's declarations (informed, questions answered, free to withdraw, agrees); and the signatures with date. Digital versions add a record of when and where the form was completed.
The template below keeps those parts as sections. Rename, add or remove fields as your institution requires; the ids you choose become the keys of the stored JSON and the linkIds of the FHIR resource.
What this example does not do
It does not capture a handwritten or electronic signature image, does not time-stamp on a server and does not claim legal validity in any jurisdiction. Those are decisions of your product and your legal advisors. The form gives you the structured data; your system adds the evidence it needs.
Questions about this example
Can I use this informed consent text as is?
No. It is a generic example written to show the structure. Consent requirements change by country, institution and procedure; have your clinical and legal teams adapt the wording before any real use.
How do I make a declaration mandatory?
Mark the checkbox field with required true. The form refuses to submit while it is unchecked, shows the validation message under the field and fires clara-invalid with the list of errors.
Can the consent be read in another language?
The form's own texts follow the lang attribute. The declarations and the information text are part of your template, so you decide which languages to publish; one template per language is the simplest approach.
How is a signature recorded?
This example stores the typed name of the person signing and the relationship to the patient. If your process needs an electronic signature image or a certificate, add it in your own code around the form and store it with the FHIR resource.
Where should the completed form be stored?
Wherever your record system keeps consents, usually next to the encounter. The submit event gives you the values, a labeled JSON and a FHIR QuestionnaireResponse; with submit-url the form posts them to your server for you.
Planning an integration?
Tell us about your system and your forms. We run small pilots with technology partners.


