# Practitioner — Bulk Upload from Spreadsheet Use the bulk-upload screens to create many doctor, consultant, or staff records in one operation from an Excel spreadsheet. Each upload screen is dedicated to one record type; they all follow the same two-step pattern: **upload the file → review the preview → click Save**. ## Choosing the right uploader | Spreadsheet purpose | Open… | Path | |---|---|---| | Doctors who are not channelling consultants | **Manage Staff → (Setup) → Upload Doctors** | `/admin/staff/upload_doctors.xhtml` | | Channelling consultants | **Manage Staff → (Setup) → Upload Consultants** | `/admin/staff/upload_consultants.xhtml` | | All other staff (nurses, technicians, admin, etc.) | **Manage Staff → (Setup) → Upload Staff** | `/admin/staff/upload_staff.xhtml` | Privilege required: `AdminStaff`. ## Pattern (all three uploaders work the same way) 1. Click **Choose File** and pick an `.xlsx` file. 2. Click **Upload** (orange). The system parses the file and shows a preview table. 3. Review the preview. If a row looks wrong, fix the spreadsheet, then re-upload. 4. Click **Save**. The records are created. > The Upload step is non-destructive — it only loads the file into a preview list. Nothing is saved until you click **Save**. ## Doctor upload — spreadsheet format The file must have **eight columns**, in this order, starting at column A: | Column | Field | Required? | |---|---|---| | A | Code | Optional — short internal code. Leave blank to let the system derive one. | | B | Title | Required — `Dr.`, `Prof.`, `Mr.`, `Ms.`, etc. Must match a title HMIS recognises. | | C | Name | Required — display name. | | D | Registration Number | Optional — SLMC / regulatory ID. Free text. | | E | Description | Optional — free text notes. | | F | Sex | Required — `M` or `F`. | | G | Mobile Number | Optional — used for SMS. | | H | Speciality | Required — must match a speciality name in the **All Specialities** catalog (case-sensitive). | > If a Speciality value does not match any entry in the catalog, the row will appear in the preview without a speciality and the system will not save the row. ## Consultant upload — spreadsheet format The first eight columns are identical to the doctor upload. The screen header is *"Upload Consultants"* and the action button calls `dataUploadController.uploadConsultants`. The Speciality column must match a value in the **Doctor Specialities** catalog (this is the catalog used by channelling), not the All Specialities catalog. | Column | Field | Required? | |---|---|---| | A | Code | Optional | | B | Title | Required | | C | Name | Required | | D | Registration Number | Optional | | E | Description | Optional | | F | Sex | Required (`M` / `F`) | | G | Mobile Number | Optional | | H | Speciality | Required (Doctor Specialities catalog) | The preview grid columns are: Code, Title, Name, Registration Number, Description, Sex, Mobile Number, Speciality. ## Staff upload — spreadsheet format The Staff upload has fifteen columns. Use it for nurses, technicians, cashiers, and other non-doctor staff. | Column | Field | Required? | |---|---|---| | A | Code | Optional — short internal code. | | B | EPF No | Required — payroll EPF number. | | C | Title | Required — `Mr.`, `Ms.`, etc. | | D | Name | Required — display name. | | E | Full Name | Required — full legal name. | | F | Name with Initials | Required — `X. Y. Surname` form. | | G | Address | Required. | | H | Sex | Required — `M` / `F`. | | I | NIC No | Required — national identity card number. | | J | DOB | Required — date of birth. | | K | Date of Retired | Optional. | | L | Department | Optional. | | M | Branch | Optional. | | N | Account No | Optional — salary account number. | | O | Bank | Optional — bank name (must match an institution of type Bank). | The Staff upload uses a **polling background process**: the screen shows a status dialog and refreshes the preview every 10 seconds while the file is being parsed. This is normal for larger Staff uploads. ## Preview before saving After Upload (and after the polling completes for the Staff upload), a paginated grid appears at the bottom of the screen showing the parsed rows. The grid columns mirror the spreadsheet columns. Use this preview to spot: - Rows with a missing required field — they will appear blank in the corresponding column. - Speciality mismatches — the Speciality column will be empty if the name did not match the catalog. - Title mismatches — the Title column will be empty if the value did not match a recognised title. If you spot issues, fix the spreadsheet and re-upload. The preview replaces, not appends. ## Saving the upload Click the **Save** button below the preview grid. The system iterates the rows and creates one `Doctor`, `Consultant`, or `Staff` record per row. If the same name was already in the system, a new record is created — there is **no automatic duplicate check**. If you re-upload an existing roster, you will end up with duplicates that must be retired manually ([Practitioner — Deactivate and Bulk Delete](Practitioner-Deactivate-and-Bulk-Delete)). ## Practical advice - **Always do a small test upload first.** Create a spreadsheet with two or three rows and run through Upload → Save end-to-end on a non-production environment before importing a full roster. - **Pre-create the catalog entries.** Make sure every Speciality value, Department, Bank, etc., already exists in HMIS before you upload. The uploader does not auto-create catalog entries. - **Save the spreadsheet** that produced an upload. The system does not retain the source file. - **Stagger Staff uploads.** Large Staff files (hundreds of rows) take several minutes; let the polling complete before you click Save. ## Limitations - No duplicate detection. - No mid-file failure recovery — if a row fails, you will see it missing in the preview but no error report is exported. Examine the preview carefully. - The Doctor upload always creates plain `Doctor` records; you cannot promote one to a consultant through the upload. Use the Consultant uploader, or register manually afterwards. - The Date of Birth and Date of Retired columns must use a date format Excel and the system both recognise. Avoid free-text dates. ## Related articles - [Practitioner Module Overview](Practitioner-Module-Overview) - [Admin — Practitioner Bulk Upload Format](Admin-Practitioner-Bulk-Upload-Format) — administrator-side reference for required catalogs and validation behaviour. - [Admin — Specialities Catalog](Admin-Specialities-Catalog) - [Admin — Doctor Specialities Catalog](Admin-Doctor-Specialities-Catalog) [Back to Practitioner Module Overview](Practitioner-Module-Overview)