temetro

Prescriptions

The clinic's prescription ledger.

MethodPathPermission
GET/api/prescriptionsprescription:read
POST/api/prescriptionsprescription:write
PUT/api/prescriptions/{id}prescription:write
DELETE/api/prescriptions/{id}prescription:delete

Reception has no access to prescriptions — they are clinical data.

The prescription object

FieldTypeNotes
idstringAssigned by the server
fileNumberstringPatient's file number
namestringRequired. Patient name
initialsstringRequired. 1–4 characters
medicationstringRequired
dosestringe.g. "500 mg"
frequencystringRequired. e.g. "3× daily"
prescriberstringDefaults to the signed-in user
prescribedAtstringYYYY-MM-DD; defaults to today
statusenumactive (default) | completed | expired
durationstring | nulle.g. "7 days"
notesstring | nullFree text

Example

curl -b cookies.txt -X POST http://localhost:4000/api/prescriptions \
  -H "Content-Type: application/json" \
  -d '{
    "fileNumber": "1042",
    "name": "Hodan Warsame",
    "initials": "HW",
    "medication": "Amoxicillin",
    "dose": "500 mg",
    "frequency": "3x daily",
    "duration": "7 days"
  }'

Create returns 201 with the prescription (prescriber filled in); PUT updates with the same payload shape; DELETE returns 204. Changes appear in the activity log.

On this page