I am designing a model of the Health Center. If I am deleting the prescribed medicines to a patient, then I want those medicines' quantity back in the total stock of that medicine.
e.g. Suppose I have total of 50 of medicine A in my stocks. If I prescribed 2 unit(quantity) of medicine A to a patient, then total remained in the stock will be 48, and suppose now I am deleting that entry, then I want total 50 stocks of medicine A back again.
How do I solve this problem. I am a beginner in Django. Any suggestions will be pra