temetro is in beta and under active development. Expect things to change.
temetro

Dispenses

The pharmacy's dispensing ledger.

The record of medications actually handed to patients at the pharmacy — distinct from prescriptions (the order) and inventory (standing stock). A new dispense is written when the pharmacy dispenses a course from the dispensing queue, and the feed appears under Pharmacy → Recently dispensed.

MethodPathPermission
GET/api/dispensesinventory:read
POST/api/dispensesinventory:write
DELETE/api/dispenses/{id}inventory:write

Gated on the inventory statement (no new role): Pharmacy holds inventory:read / inventory:write, as do full clinicians (owner / admin / doctor / member). Reception and Lab have no access. Entries can be deleted to correct the ledger (the medication itself isn't un-dispensed), but never updated.

The dispense object

FieldTypeNotes
idstringAssigned by the server
fileNumberstringPatient's file number
namestringRequired. Patient name
initialsstring1–4 characters
medicationstringRequired
dosestringe.g. "500 mg"
quantitynumberWhole units dispensed; defaults to 0
unitstringe.g. "tablets"
prescriptionIdstring | nullLinks back to the source prescription
dispensedBystring | nullUser id of the dispenser (set on the server)
dispensedByNamestringDispenser's display name (set on the server)
dispensedAtstringISO timestamp; defaults to now
notesstring | nullFree text

The dispenser identity (dispensedBy / dispensedByName) and dispensedAt are filled from the signed-in user on the server and ignored if sent by the client.

Example

curl -b cookies.txt -X POST http://localhost:4000/api/dispenses \
  -H "Content-Type: application/json" \
  -d '{
    "fileNumber": "1042",
    "name": "Hodan Warsame",
    "initials": "HW",
    "medication": "Amoxicillin",
    "dose": "500 mg",
    "prescriptionId": "…"
  }'

GET returns the ledger newest-first. Create returns 201 with the dispense and writes to the activity log.

curl -b cookies.txt -X DELETE http://localhost:4000/api/dispenses/{id}

DELETE returns 204; 404 if the id doesn't exist. Removing a ledger entry is a correction, also written to the activity log.

On this page