Skip to main content
Version: 3.1

Report template

A report template is a reusable document layout that Care fills with real data to produce a report, such as a discharge summary or an account report. A facility authors the template once. Care then generates a report from it for each patient, encounter, or account.

Definition

A report template holds the layout of a printable document and the rules that decide which data Care puts into it. The template stays separate from the reports it produces.

A report template is specific to Care. It has no equivalent FHIR resource.

The important distinction: a template is a layout, not a document. Care creates a separate report file each time a user generates a report. A change to the template does not change a report that Care generated before the change.

A template belongs to one facility, or to the whole deployment. A facility template is visible only inside that facility. A deployment-wide template is visible in every facility.

Key Attributes

ComponentsWhat it captures
Template NameThe name that users see in the template list.
SlugA short, unique text identifier for the template inside the facility.
DescriptionA short note about the purpose of the template.
StatusThe stage of the template. See the status table below.
Report TypeThe kind of report the template produces, such as Discharge Summary.
ContextThe record that supplies the data, such as an encounter or a patient.
Default FormatThe output format of the report, PDF or HTML.
Template HTMLThe layout of the document, with placeholders for the data fields.

Report Type and Context

The Report Type and the Context must agree with each other. Each report type applies to one kind of record, and the context must supply data for that same kind of record. For example, a Discharge Summary applies to an encounter, so it needs an encounter context. Care refuses a template that pairs a report type with an unrelated context.

Status

StatusDescription
DraftThe template is in preparation. Users cannot generate reports from the template.
ActiveThe template is published. Users can generate reports from the template.
RetiredThe template is withdrawn. Users cannot generate reports from the template.

Permissions

Care grants a permission through a role. A user gets a role in a facility organization, and the permission applies to the facilities under that organization.

PermissionDescriptionSystem Roles
Can Read TemplateSee the template list and open a template.Facility Admin, Administrator, Admin, Staff, Doctor, Nurse, Volunteer, Pharmacist
Can Create Template on FacilityCreate a template, and change a template.Facility Admin, Admin, Doctor, Nurse
Can Preview TemplateSee a preview of a template with sample data.Facility Admin, Admin
Can View Template SchemaSee the list of data fields that a context supplies.Facility Admin, Admin
Can generate report from templateGenerate a report from an Active template.Facility Admin, Administrator, Admin, Staff, Doctor, Nurse, Volunteer, Pharmacist

Only a superuser can create or change a deployment-wide template.

A user who generates a report also needs read access to the record that supplies the data. For a discharge summary, the user needs access to the encounter.