OPD Doctor Working Times MarkIn MarkOut - hmislk/hmis GitHub Wiki
OPD Doctor Working Times — Mark In / Mark Out
OPD doctors work in shifts. Each shift is bracketed by a Mark In (start) and a Mark Out (end). The pair of records forms a Working Time that drives per-shift OPD doctor payment, attendance reports, and several other downstream features. This article covers how to mark in, mark out, view currently-working doctors, and review historic working times.
When to mark in and mark out
| Action | Typical trigger |
|---|---|
| Mark In | The doctor arrives and begins seeing OPD patients. The cashier or reception staff marks them in. |
| Mark Out | The doctor finishes the shift. The cashier or the doctor themselves marks them out. |
If your installation has the configuration option "Pay Doctors only After Marking In" enabled, the per-shift payment workflow refuses to pay until the doctor is marked in. If "Pay Doctors only After Marking Out" is enabled, payment also requires the mark-out. Without either option, the workflow uses whatever timestamps are available.
Mark In
Navigation
Top menu → OPD → Doctors → Mark In.
Path: /opd/markIn.xhtml.
Privilege required: Opd to see the form; OpdBilling for the wider OPD module.
Steps
- Select Doctor or Staff Member. Type at least the first letters of the doctor's name in the autocomplete. The dropdown shows two columns: Speciality and Doctor. Pick the doctor.
- Start Time. Defaults to now. The date picker uses the long date-time format from the application preference. You can edit the time if the doctor arrived earlier and you are catching up.
- Click the green Mark In button.
A new Working Time record is created with the chosen Start Time. The doctor now appears on the Currently Working list (Mark Out screen).
The autocomplete uses the
DoctorController.completeDoctorquery — it searches by name and by code. Non-doctor staff also appear if they match the query, because the underlying query searches allDoctorrecords, including consultants.
Mark Out
Navigation
Top menu → OPD → Doctors → Mark Out.
Path: /opd/marked_ins_current.xhtml.
Privilege required: OpdBilling.
Layout
The screen shows the Currently Working table — every doctor with a Mark-In but no Mark-Out, paginated 10 per page. Columns:
| Column | Content |
|---|---|
| Name | Doctor name with title. |
| Speciality | The doctor's speciality. |
| In at | The Mark-In timestamp. |
| Actions | Mark Out (orange) and View (green). |
Steps
- Find the doctor in the Currently Working table.
- Click Mark Out on the row. The screen treats this as the end of shift; the current time is recorded as the Mark-Out timestamp.
- Optionally click View instead to inspect that doctor's full working-time history (jumps to the Working Times screen filtered to the doctor).
There is no edit step before Mark Out commits — the timestamp is captured as soon as you click the button. If you need to adjust it afterwards, use the Working Times screen.
Working Times — historic view
The Working Times screen lists past shifts and lets you filter and inspect them.
Navigation
Top menu → OPD → Doctors → Working Times.
Path: /opd/workTimes.xhtml.
Privilege required: OpdBilling.
Filters
| Filter | Purpose |
|---|---|
| From / To | Date range. |
| Doctor or Staff Member | Autocomplete; leave blank for all doctors. |
| Institution | Dropdown of companies. All Institutions to ignore. |
The filtered list shows each Working Time with start, end, duration, and associated payment bill (if already paid). Use this view when:
- The doctor disputes the recorded shift times.
- You need to find a forgotten Mark-Out from yesterday before paying today.
- You are auditing attendance for an HR or finance review.
Relationship to OPD payment
Marking in / out is a prerequisite for the per-shift payment workflow described in OPD Doctor Payments — Per Shift. The payment screen finds the doctor's last Working Time and pays the bills falling within its window. Without a Mark In, the screen says "No Work Time Recorded".
The All-Due payment workflow (OPD Doctor Payments — All Due) does not depend on working-time records. It uses date filters instead. So if you skip Mark In / Mark Out, you can still pay the doctor — just not through the per-shift screen.
Practical advice
- Mark in early, mark out late — do not skip these unless you intentionally do not use per-shift payments. Many downstream reports filter by working-time bracket.
- Mark out before going home. A Working Time with no end is treated as "still working", and the doctor shows up on the Currently Working table indefinitely.
- Adjust historic times via the Working Times screen. Do not delete and recreate; that loses the link to existing OPD bill fees that were already paid against the shift.
- One doctor, one open shift. The screen does not strictly prevent a second Mark In before the first is closed, but doing so produces overlapping windows that confuse the payment workflow. Mark out before marking in again.
Limitations
- The current schema captures a single Mark In and Mark Out per Working Time — there are no nested breaks (lunch, etc.).
- The Mark In autocomplete uses the same query as channel doctor lookups; non-channelling-only doctors should still appear, but the autocomplete behaviour can feel slow if you have a very large doctor list.
- Mark Out's timestamp is "now". You cannot back-date the Mark Out from the row action; for back-dating, use the Working Times historical view.