The software does not delete data, instead medicines/items are moved from the patient's active data area to thier inactive data area. When a patient no longer takes a medicine, that medicine should be inactivated.
Medicines and medical items are added to the clinical chart as active data. Typically the clinical chart only shows active data. Some clients allow optional display of inactive data too.