← Knowledge library

Access & administration

Build a report template, preview sample data and control its lifecycle

Recover required metadata, choose a matching report context, save a Draft, inspect HTML/PDF previews and verify Active or Retired state.

12 min read · Source baseline f6e9f05f

Verification and applicability

Actual full 1920 × 1080 Chrome screenshots and independent normal template detail readbacks. Clearly labeled synthetic template; sample preview is explicitly distinguished from generated report output. No clinical advice or all-role/facility claim. Exact Draft→Active/PDF→Retired lifecycle independently read back. One generated artifact is retained; retirement prevents further generation in the pictured template card.

Check your installed version, permissions and local configuration.

Before you begin

1. Recover required metadata before saving

Normal Save Template rejects missing Template Name, Slug, Report Type and Select Context. Enter an approved name and a permitted unique slug. The pinned schema accepts 5–25 slug characters although its displayed length error says 36, so this example uses the shorter valid synthetic-report-teaching.

Recover required report-template metadata before saving. Actual wide MANSOQ synthetic Report template lifecycle and associated synthetic PDF output view.1234
Recover required report-template metadata before saving · 2026-10-18Recorded baseline screen · 1920 × 1080
Capture details

Actual 1920 × 1080 Chrome pixels; pinned source f6e9f05f. Report template lifecycle and associated synthetic PDF output

  1. Required Template Name: Provide a clearly synthetic training name.
  2. Required slug: Use the installed schema’s accepted length and permitted characters.
  3. Choose Report Type: Report type determines the associated resource and authorizer.
  4. Choose matching context: Context provides the fields used by the template.

2. Choose a report type and matching context, then inspect an HTML sample

The example selects Discharge Summary, Encounter Report context, Draft and HTML. Preview Template renders the supplied HTML against schema sample data. The visible John Doe, In Progress, Outpatient and City Health Center are preview values, not the intended patient or a generated report record.

Distinguish template sample preview from a real encounter report. Actual wide MANSOQ synthetic Report template lifecycle and associated synthetic PDF output view.12345
Distinguish template sample preview from a real encounter report · 2026-10-18Recorded baseline screen · 1920 × 1080
Capture details

Actual 1920 × 1080 Chrome pixels; pinned source f6e9f05f. Report template lifecycle and associated synthetic PDF output

  1. Draft template: Draft is configuration, not generated clinical output.
  2. Encounter Report context: Context determines the available data fields.
  3. Schema sample patient: John Doe is preview sample data, not the saved synthetic patient.
  4. Clear Preview: Return to editable source after reviewing the sample.
  5. Save Template: Save the reviewed template configuration separately from generating a report.

3. Save the Draft and confirm its stable saved route

Use Save Template and confirm the editor opens the saved slug route. The slug is locked. An independent normal template detail GET200 confirms the same synthetic name, Draft status, HTML format, discharge_summary type, encounter_base context and template content. The sample pane still does not constitute patient-linked output.

Verify saved Draft template configuration separately from report generation. Actual wide MANSOQ synthetic Report template lifecycle and associated synthetic PDF output view.1234
Verify saved Draft template configuration separately from report generation · 2026-10-18Recorded baseline screen · 1920 × 1080
Capture details

Actual 1920 × 1080 Chrome pixels; pinned source f6e9f05f. Report template lifecycle and associated synthetic PDF output

  1. Saved synthetic template name: Normal detail read independently confirms this exact configuration.
  2. Saved slug locked in editor: Distinguish this saved definition from a new unsaved form.
  3. Draft and HTML retained: A saved Draft definition is not an active generated report.
  4. Preview still uses sample data: This is not the actual completed synthetic encounter.

4. Save Active PDF and preview the sample output

Change Status to Active and Default Format to PDF, then Save Template. An independent normal detail GET200 confirms both persisted settings. Preview Template now displays a one-page PDF with the same schema sample patient and facility; this checks rendering and does not generate a report for the completed synthetic encounter.

Active PDF template with sample preview. Actual wide MANSOQ synthetic Report template lifecycle and associated synthetic PDF output view.1234
Active PDF template with sample preview · 2026-10-18Recorded baseline screen · 1920 × 1080
Capture details

Actual 1920 × 1080 Chrome pixels; pinned source f6e9f05f. Report template lifecycle and associated synthetic PDF output

  1. Active template: Active template
  2. PDF format: PDF format
  3. Sample patient only: Sample patient only
  4. One-page preview: One-page preview

5. Inspect the three lifecycle choices

The Status menu offers Draft, Active and Retired. This example used Active for one independently verified synthetic report, then retires only its own training template. Status controls generation eligibility; changing the output format does not activate a Draft or Retired template.

Inspect Draft Active and Retired template statuses. Actual wide MANSOQ synthetic Report template lifecycle and associated synthetic PDF output view.1234
Inspect Draft Active and Retired template statuses · 2026-10-18Recorded baseline screen · 1920 × 1080
Capture details

Actual 1920 × 1080 Chrome pixels; pinned source f6e9f05f. Report template lifecycle and associated synthetic PDF output

  1. Template status: Lifecycle status is separate from output format.
  2. Draft: Draft cannot generate output.
  3. Active: Generation requires Active plus authorization.
  4. Retired: Retire only the intended template.

6. Save retirement and verify the same template

Select Retired, use Save Template, then verify the saved configuration. Normal detail GET200 confirms the same ID and slug, Retired status, PDF format and unchanged report type, context and content. The generated artifact is still stored.

Verify saved Retired state for the synthetic template. Actual wide MANSOQ synthetic Report template lifecycle and associated synthetic PDF output view.1234
Verify saved Retired state for the synthetic template · 2026-10-18Recorded baseline screen · 1920 × 1080
Capture details

Actual 1920 × 1080 Chrome pixels; pinned source f6e9f05f. Report template lifecycle and associated synthetic PDF output

  1. Retired persisted: Independent normal template detail read verifies retirement.
  2. PDF unchanged: Lifecycle status and format are distinct.
  3. Same locked slug: The example updates the same template, not a new one.
  4. Save Template: Save completes the selected lifecycle change.

7. Recognize the disabled generation action after retirement

Return to the correct encounter Reports, open Generate Report and identify the exact synthetic template. It now shows Retired and a disabled Generate Report button. The unrelated active Treatment Summary is a different template and was not used. No new generation was submitted after retirement.

Recognize disabled generation for the retired synthetic template. Actual wide MANSOQ synthetic Report template lifecycle and associated synthetic PDF output view.1234
Recognize disabled generation for the retired synthetic template · 2026-10-18Recorded baseline screen · 1920 × 1080
Capture details

Actual 1920 × 1080 Chrome pixels; pinned source f6e9f05f. Report template lifecycle and associated synthetic PDF output

  1. Retired teaching template: This is the intended synthetic template, not the active row below.
  2. Generation disabled: No new generation was submitted for the retired template.
  3. Correct template identity: Confirm the exact name and slug.
  4. Other active template untouched: Do not choose an unrelated template to bypass lifecycle.

Template configuration, preview and generated reports are separate

A Draft or Retired template is configuration. The generation endpoint requires an Active template, a valid associated resource and the appropriate template and resource write authorizers. Preview uses sample context. A successful output additionally requires a stored upload-completed report and its real associated resource values.

Authorization and lifecycle boundaries

Template list, write, schema, preview and report-generation permissions are separate. On this source pin, facility template writes use the root organization authorization path, while completed encounters have an additional report-generation permission. This existing synthetic superuser example does not certify Doctor, Nurse, delegated administrator or every facility access.

Troubleshooting

The PDF preview shows a sample patient

This is expected for Preview Template. Generate through the intended patient's correct encounter Reports page and verify the associated output independently.

Generation fails or remains in progress

Inspect the actual error and the saved report list. Do not treat a toast or initial progress indicator as completed output, and avoid repeated generation until the previous attempt's persisted state is understood.

Source evidence

References are pinned to the private MANSOQ source repository. Repository access is required to open these links.