# Create PDFs from Forms/Assessments

## Overview

Welkin allows you to automatically generate PDF documents when care team members or patients complete assessments in the Care app. PDF templates enable you to create professional, branded documents that capture assessment responses, scores, and other relevant data in a portable format suitable for printing, sharing with patients, or storing in external medical records systems.

This guide explains how to create and configure PDF templates for your assessments using Microsoft Word documents.

## Key Benefits

* **Professional Documentation** – Generate standardized clinical documents
* **Patient Handouts** – Provide assessment results directly to patients
* **Records Management** – Create documentation for medical records
* **Care Plan References** – Attachment points for care planning meetings
* **Multi-Assessment PDFs** – Combine results from multiple assessments into a single document

## Prerequisites

1. You have already created an Assessment/Form in Designer
2. You have access to Microsoft Word to create the PDF template
3. Your CDTs (Custom Data Types) are published and used in the assessment
4. You have appropriate permissions to edit forms in Designer

## Step 1: Access the Form Template Configuration

1. Log into Designer
2. Click **Create Draft** to start a new configuration draft
3. Navigate to **Visual Components** > **Forms** in the left sidebar
4. Find and click on the form that needs a PDF template added

## Step 2: Open the Template Editor

1. In the form editor, locate the **Edit Form** section on the left side
2. Click on **Template** (or "PDF Template" depending on your version)
3. You should see:
   * **System Variables** list on the right sidebar
   * A template preview area
   * Instructions for template formatting

## Step 3: Review Available Variables

### System Variables

System Variables are standard data fields available for use in your PDF template. The right sidebar displays a complete list. Common system variables include:

* `{{patient_name}}` – Full name of the patient
* `{{patient_dob}}` – Date of birth
* `{{patient_mrn}}` – Medical record number
* `{{completion_date}}` – When the assessment was completed
* `{{completed_by}}` – Name of care team member who submitted
* `{{assessment_date}}` – Date assessment was started
* `{{encounter_date}}` – Related encounter date if applicable
* `{{assessment_title}}` – Name of the assessment form

**Important:** Use the exact format shown for all system variables (with double curly braces: `{{ }}`)

### Custom Data Type Variables

You can also reference CDT fields from the current assessment:

* `{{cdt_fieldname}}` – Single field values
* `{{cdt_fieldname_label}}` – Display label for a field (useful for list/select options)

**Example:**

* `{{depression_score}}` – Displays the numeric score
* `{{depression_assessment_date}}` – Displays the date the assessment was completed

### Cross-Assessment Variables

You can include System Variables and CDT fields from other assessments:

* `{{assessment_name.cdt_field}}` – Reference a field from a different assessment
* Example: `{{vital_signs.systolic_pressure}}` – Display systolic pressure from the vital signs assessment

## Step 4: Create Your Word Document Template

### Setup Instructions

1. **Open Microsoft Word** on your computer
2. **Create a new document** with your organization's branding:
   * Logo (top of document)
   * Organization name and contact information
   * Assessment title section
3. **Insert Variables** where you want data to appear:
   * Type or copy the variable syntax exactly as shown: `{{variable_name}}`
   * Variables will be replaced with actual data when the PDF is generated
4. **Organize Content** logically:
   * Header with patient information
   * Assessment title and date
   * Questions and answers
   * Scores or results
   * Footer with clinic information

### Template Example Structure

```
[Your Clinic Logo]

DEPRESSION SCREENING ASSESSMENT

Patient Name: {{patient_name}}
Date of Birth: {{patient_dob}}
Medical Record #: {{patient_mrn}}

Assessment Completed: {{completion_date}}
Completed by: {{completed_by}}

---

Question 1: Have you felt sad or depressed?
Patient Response: {{depression_q1_response}}

Question 2: Loss of interest in activities?
Patient Response: {{depression_q2_response}}

---

Depression Screening Score: {{depression_score}}/27
Result Interpretation: {{depression_score_interpretation}}

---

[Your Clinic Footer Information]
```

### Formatting Best Practices

1. **Use Clear Headings** – Organize sections with headers and subheaders
2. **Include Instructions** – Add explanatory text for care team or patient
3. **Add Interpretation Guides** – Include what scores mean (e.g., "0-5: Minimal, 6-10: Mild...")
4. **Professional Appearance** – Use consistent fonts, colors, and spacing
5. **White Space** – Leave adequate space for readability
6. **Page Breaks** – Control where section breaks occur for multi-page documents

### Special Formatting Options

You may be able to use:

* **Conditional sections** – Show some content only if certain fields have values
* **Tables** – Organize question/answer pairs in table format
* **Bullet lists** – For multiple response options
* **Bold/Italic** – For emphasis on important information
* **Page numbers** – Auto-inserted header/footer elements

## Step 5: Upload the Template

1. **Save your Word document** (use .docx format)
2. In Designer's Template section, locate the **Upload Template** button or file input
3. Click **Choose File** or **Upload**
4. Select your Word document from your computer
5. The file is processed and integrated with your form

### Verification

Once uploaded:

* The template is associated with the assessment
* The system validates that variables can be populated
* Any errors in variable syntax will be reported
* Click **Preview** (if available) to see a sample with test data

## Step 6: Test the PDF Generation

1. **Publish your configuration** in Designer
2. Go to the Care app
3. Navigate to the assessment for a test patient
4. Complete the assessment with sample data
5. Upon completion, look for a **Download PDF** option or confirmation message
6. Download and open the generated PDF to verify:
   * All variables populated correctly
   * Formatting appears as expected
   * Content is complete and accurate
   * Patient/provider information is correct

## Step 7: Adjust and Republish

If the PDF needs adjustments:

1. Go back to Designer
2. Create a new draft (based on current configuration)
3. Update the template by uploading a revised Word document
4. Re-test in Care
5. Publish when satisfied

## Multiple Assessment PDFs

### Combining Results from Multiple Assessments

Some PDFs may reference data from multiple assessments:

1. In your Word template, reference fields from multiple CDTs
2. Example: Show depression score AND vital signs on same document
3. Use the cross-assessment variable syntax: `{{assessment_name.field}}`
4. Organize logically with headers for each assessment section

## Troubleshooting

### Variables Not Populating

**Problem:** PDF shows `{{variable_name}}` instead of actual data

**Solutions:**

* Verify variable syntax is exactly correct (check spelling, spacing, braces)
* Confirm the CDT field exists and is published
* Check that data was actually entered for that field in the assessment
* Re-upload the template

### PDF Generation Fails

**Problem:** PDF doesn't generate when completing assessment

**Solutions:**

* Verify template was successfully uploaded
* Check browser console for error messages
* Try generating PDF for a different assessment to isolate the issue
* Contact support if problem persists

### Formatting Issues

**Problem:** PDF layout doesn't match the Word document

**Solutions:**

* Verify Word document uses standard fonts (Arial, Times New Roman, etc.)
* Check that graphics/images are embedded, not linked
* Simplify complex formatting (tables within tables, etc.)
* Test with a simpler template first

## Best Practices

1. **Test Thoroughly** – Use multiple test patients with various data entry patterns
2. **Keep Templates Simple** – Complex Word documents may not convert cleanly
3. **Regular Updates** – Review and update templates as assessment questions change
4. **Version Control** – Document which template version corresponds to which assessment version
5. **Patient-Friendly** – If distributing to patients, ensure language is clear and supportive
6. **Include Context** – Add interpretation guides so results are understood
7. **Brand Consistency** – Use organization logos and colors for professional appearance

## Related Topics

* [How to Create an Assessment or Form Template](/designer/documents-and-assessments/how-to-create-an-assessment-or-form-template.md) – Creating forms
* [How to Associate Assessments with Programs](/designer/documents-and-assessments/how-to-associate-assessments-with-programs.md) – Linking forms to care programs
* [Filtering With Message Template Variables](/designer/documents-and-assessments/filtering-message-template-variables.md) – Using variables in messages
* [Create Patient Facing Assessment (PFA) Folders](/designer/documents-and-assessments/create-pfa-folders.md) – Sending assessments to patients
* [Designer: How to Configure Scored Assessments](/designer/documents-and-assessments/designer-how-to-configure-scored-assessments.md) – Assessment scoring


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.welkinhealth.com/designer/documents-and-assessments/create-pdfs-from-forms-assessments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
