Skip to content
Sami Bentaleb Independent software engineerContact

SigBase n., prescription directions

Prescription directions read into fields a pharmacist can approve.

SigBase reads the shorthand directions on a prescription into 18 fields, sends anything it can’t read for certain to a pharmacist, and exports the approved result to FHIR and NCPDP.

My part
Design and build
Built with
TypeScript
For
Pharmacists

The problem

what arrives at the pharmacy

The directions on a prescription arrive as shorthand, such as “take 1 tab po bid prn pain”. Before a pharmacy system can check a dose or print a label, someone has to turn each line into structured fields.

Plate to comeA line and its fields, waiting for review.

Plate I. The review queue, once its screen ships.

Constraints

what it has to work within

A wrong field can hurt someone, so a pharmacist approves every line and each approval is recorded. No patient details may come in. The output has to fit the formats pharmacy systems already read.

Plate to comeAn approval and its audit trail.

Plate II. The audit trail, once its screen ships.

What I built

the decisions, in order

  1. Grammar first

    A written grammar reads each line. A language model may suggest a reading only for the parts the grammar leaves open, and it never writes to the database.

    See Plate III.

  2. It declines on purpose

    When the grammar can’t read a part for certain, it marks that part as unread and hands it to a pharmacist.

    See Plate III.

  3. Eighteen fields to approve

    Each line becomes 18 fields, from dose and route to frequency and indication. The pharmacist checks and approves them, and every approval goes into an audit trail.

    See Plate II.

  4. No patient details, by design

    Every imported file is checked for patient identifiers, and the whole file is rejected if one turns up.

A MADE-UP LINE, AS WRITTENtake1tabpobidprnpainACTIONtakeDOSE1FORMtabletROUTEby mouthFREQUENCYtwice a dayAS NEEDEDyesINDICATIONpainwhat is takenhow and whenwhyAnything it can’t read for certain goes to a pharmacist.A MADE-UP LINE, AS WRITTENtake1tabpobidprnpaintakeACTIONtake1DOSE1tabFORMtabletpoROUTEby mouthbidFREQUENCYtwice a dayprnAS NEEDEDyespainINDICATIONpainwhat is takenhow and whenwhyAnything it can’t read for certaingoes to a pharmacist.
Plate III. A diagram of how SigBase reads a made-up line.
Architecture Portfolio n., the next entry