# Report Formats A **report format** is a named template that controls how a lab report looks when printed. It defines the overall layout — which columns appear, where they are positioned on the page, what fonts and sizes are used, and how the header, footer, and signature areas are arranged. Each investigation is linked to one report format. This article explains how to create and manage report formats. --- ## How Report Formats Work A report format contains one or more **report items** — each item corresponds to a visual element on the printed report (a column header, a result value cell, a reference range cell, a flag indicator, etc.). Items are positioned using percentage-based coordinates (top, left, width, height relative to the page), so the layout scales to different paper sizes. The report format is attached to an investigation. When a report is printed for that investigation, the system renders each result parameter using the positions and styles defined in the format. --- ## Accessing Report Format Management Go to **Administration → Manage Lab Services → Report Templates tab → Report Format Templates** (or **Administration → Manage Lab Services → Manage Investigations tab → Manage Investigations → Manage Format - Single Item**). ![Report Format Templates screen: format dropdown, item list, item details, positioning and font settings, with a live preview of the common template on the right](images/23529-report-format-templates.png) *The Report Format Templates screen. The right-hand panel is a live preview of the common template — the patient-details block at the top and the signature block lower down — and the Positioning and Font panels on the left edit whichever row is selected.* --- ## Creating a New Report Format 1. Click **Add Format**. 2. Enter a **Format Name** (e.g., "Biochemistry A4 Standard", "FBC Landscape", "Microbiology C&S"). 3. Enter a **Description** (optional — for your own reference). 4. Click **Save**. The format is created and appears in the list. After creating the format, add report items to define the layout. See [Report Items & Layout](https://github.com/hmislk/hmis/wiki/LIMS-Admin-Report-Items). --- ## Linking a Report Format to an Investigation 1. Go to **Administration → Manage Lab Services → Manage Investigations tab → Manage Investigations**. 2. Open the investigation. 3. In the **Report Format** field, select the format from the dropdown. 4. Save the investigation. All new reports generated for this investigation will use the selected format. Previously approved reports retain their original layout. --- ## The Common Template Every report format also carries a **common template** — the rows that print on *every* report produced in that format, whichever investigation it is. These are edited on the same **Report Format Templates** screen, and they are separate from the per-investigation result rows described under [Report Items & Layout](https://github.com/hmislk/hmis/wiki/LIMS-Admin-Report-Items). The common template holds: - the **patient-details block** — patient name, age, gender, referring doctor, reference/bill number, collected and approved dates, sample type, BHT - the **signature block** - the **footer**, including any separator lines Each row is positioned the same way as a report item: **Left**, **Top**, **Width** and **Height** as percentages of the page, with **Font Size** in points. Because the coordinates are percentages, the block keeps its shape when the paper size changes. ### Pre-printed stationery This block is what has to move when reports are printed onto **pre-printed stationery** — paper that already carries the hospital's letterhead, a coloured band, or a footer. If the patient-details block lands on top of a pre-printed band, select each row of the block in turn and increase its **Top** value by the same amount, so the whole block moves down together and stays aligned. Work through the block one row at a time and change only the value you mean to change. Moving a single row on its own leaves it out of line with the rest of the block. ### Changing the common template through the API The common template can also be read and updated through the `/api/report-formats` REST endpoints, which is the practical way to shift a whole block: list the rows, then send one small update per row. Support engineers should use this rather than editing the database directly — a direct database change is not picked up until the application is restarted, whereas a change made through the screen or the API takes effect immediately. --- ## Standard Report Columns A typical lab report format contains these column types, each implemented as a separate report item: | Column | Purpose | |---|---| | **Test / Parameter header** | Column heading "Test" | | **Test / Parameter label** | The name of each investigation item (e.g., "Haemoglobin") | | **Value header** | Column heading "Result" | | **Value** | The patient's result value | | **Unit header** | Column heading "Unit" | | **Unit label** | The measurement unit (e.g., g/dL) | | **Reference header** | Column heading "Reference Range" | | **Reference label** | The normal range for this parameter and this patient | | **Flag / Comment** | H / L indicator or flag message | Each of these is a separate report item with its own position and style settings. --- ## Reusing a Format for Multiple Investigations The same report format can be used by multiple investigations if their printed layouts are identical. For example, all basic biochemistry tests might share a single "Biochemistry Standard" format. To reuse: simply select the same format in each investigation's **Report Format** field. --- ## Previewing a Format After adding report items, use the **Preview** function (if available) or create a test report for a sample patient to see how the printed output looks before going live. --- ## Reports With More Than One Page A report can have a second page, for example results on page 1 and analyzer graphics on page 2. See [Two-Page Lab Reports](https://github.com/hmislk/hmis/wiki/LIMS-Two-Page-Lab-Reports). --- ## Tips - Start with a simple format (two or three columns) and test it before adding complex positioning. - Keep format names descriptive — include the paper orientation and type of test (e.g., "Haematology A4 Portrait"). - When introducing a new analyzer, create a new format variant if the new method produces different parameters or a different column layout than the existing format. --- [Back to LIMS Administration](https://github.com/hmislk/hmis/wiki/LIMS-Administration)