Intermediate · 30 min · 4 steps
Checking every medicine against the doctor's prescription
Dr. Varun Kulkarni, Clinical Systems Engineer at CareRx
Dr. Varun Kulkarni is a pharmacist and software engineer at CareRx, an online pharmacy that delivers medicines to 40 Indian cities. At 10:15 AM on a Wednesday, the state Drug Control Administration (DCA) sends CareRx a serious notice and sends inspectors to the main warehouse in Bengaluru.
The question
How do we write a Python check that looks at each medicine in a cart on its own, so that prescription-only drugs are never sent without a valid doctor's prescription?
- Boolean gatekeeping
- Regulatory compliance
- Cart validation
- Prescription verification
The rest of this case study is locked
The data, every step with its code and result, and the final answer open with a pass. A few case studies stay free so you can see how they work.