An apparatus is specifically adapted for use with a dispensing container having a tray with one or more discrete cavities for receiving medication, and a seal. The tray includes a machine-readable marker that encodes a unique identifier for the tray and the seal includes a pre-defined area for thermal printing. The apparatus includes a reader adapted to read the marker on the tray and to obtain, from the marker, the unique identifier for the tray. The apparatus also includes a controller adapted to receive patient-specific information and to associate the patient-specific information with the unique identifier for the tray, and a medication dispenser for automatically filling one or more cavities of the tray with medication with reference to the patient-specific information. A sealing unit is adapted to automatically apply the seal to the tray. The thermally printed human-readable information is directly derived from at least some of the patient-specific information.