# Mapping Items to a Department ## Overview Department item mapping gives fine-grained control over which services appear when a particular department opens a new bill. Where institution mapping makes items available hospital-wide, department mapping refines that further — ensuring, for example, that the Radiology counter only sees imaging services, while the OPD General counter sees general consultation and procedure services. ## When to Use - Restricting a specialist department's billing to only its relevant services - Adding a new service to the list of items a specific department can bill - Removing a service from a department's billing catalogue - Auditing exactly what a department can currently bill ## Navigating to Department Item Mapping 1. Click **Administration** → **Manage Items** 2. In the item management index, navigate to **Manage Department Item Mappings** > **Required privilege:** AdminItems ## The Screen Layout The screen is split into two columns: **Left column — All Items:** - A table showing all items with columns: Name, Created At, Institution, Department, Base Value - Filter by name, institution, or department using the column filter boxes - Select items using checkboxes for adding to a department **Right column — Items Mapped (to selected department):** - Shows items currently mapped to the selected department - Columns: Name, Item Department, Mapped Institution, Mapped Department, Base Value - **Mapped Institution** is the institution that owns the mapped department - Select rows to remove them from the mapping ## Adding Items to a Department 1. In the **Department** field (autocomplete), type to search and select the target department - The autocomplete shows both institution name and department name in a two-column popup 2. Click **Fill Items Added For Department** to load the current mapping in the right column 3. In the left table, select the items you want to add (use the checkboxes — multiple rows allowed) 4. Click **Add Items to Department** (green button) 5. The selected items appear in the right "Items Mapped" table ## Removing Items from a Department 1. Load the current mapping using **Fill Items Added For Department** 2. In the right table, select the items to remove 3. Click **Remove Selected** (red button) > **Warning:** Removing a mapping means the service disappears from that department's billing interface immediately. Billing staff will no longer be able to select it. Confirm this is intentional before removing. ## Understanding the "Item Department" vs "Mapped Department" Columns In the right-column table: - **Item Department** — the department the service "belongs to" (set when the service was created) - **Mapped Department** — the department you mapped the service **to** (the billing department) These can be different. For example, a "Cardiac Ultrasound" service may belong to the Cardiology department but be mapped for billing to the General OPD Counter. ## Filtering and Bulk Operations Use the **Name** or **Institution** filter on the left table to narrow the view: - Filter by institution to see all services from a particular branch - Filter by department to see services that "belong to" a specific department - Then select all and bulk-add to your target department ## Checking Department Coverage Use **Item Counts by Department** from the item management index to see a summary of how many items are currently mapped to each department. ## Technical Notes (Admin/Developer) Department mappings are stored as `ItemMapping` entities with only `department` set — `institution` stays empty. An `ItemMapping` row has exactly one target (department, institution, or outside-charge site); filling `institution` on a department row would make it behave as an institution-wide mapping in institution-level item lists. The **Mapped Institution** column on the page shows the mapped department's institution (issue #24105). `itemMappingController.fillItemMappingsForSelectedDepartment()` loads the current mappings; `addAllSelectedItemsToDepartment()` creates `ItemMapping(department=X, item=Y)` records (or reactivates a retired one); `removeSelectedItemMappingForDepartment()` retires them. The billing engine filters items by matching `ItemMapping.department == currentDepartment` before showing them to the cashier. ## Related Features - [How OPD Item Listing Works — Overview](Admin-OPD-Item-Listing-Overview) - [Mapping Items to an Institution](Admin-Mapping-Items-to-Institution) - [Default Service Departments](Admin-Default-Service-Departments) - [Department-Level Fees](Admin-Department-Level-Fees)