Since it is a school project, the chance of anyone actually using this is next to impossible.
For this to ever be implemented as a real machine, there would be testing and regulations and such.
The laws and regulations would make mistakes next to impossible to make machine errors.
Besides, my local pharmacy has such a machine now.
Pharmacist enters the prescription. that is sent to the machine
the machine picks the bottle and puts it on a tray.
the pharmcist picks it up, reads the label, verifies that the prescription matches the drugs
checks the other drugs the patient is taking, verifys there is no drug interaction
looks at the pills, verifies that the square blue pills are not green triangles.
then puts them into the vile for the customer with label.
===========================
For any project, we suggest you make a simple drawing of flow lines and devices.
This help you organize your thoughts.
As I see your project, it is easy to break into bits.
Mechanically, you have a machine that moves jars to some point.
To know the jar is the correct jar, having the jar bar coded, maybe on the bottom
You can put a jar, scan it, verify it and then put it on the outbound side.
Or, retrieve it, and place in the storage rack.
So, you need a data base for the jars and a mechanical means to pick.
That is a great place for the Arduino.
Second you have the MMI or Man Machine Interface. or whatever they are calling it these days.
Think of the flow,
Pharmicist walks up to the display, fingerprint scan, I assume a PC interface ?
Password or whatever
Display allows some search type. possibly scan from prescription ?
Say, you want Plecibo-21
Then enter your drug name
The PC would then send the Arduino the code for that drug.
As I see this project, you have the pharmacist input unit and the machine operations unit
and they talk.
Are you part of a team ? this sounds like a great project for a very advanced robotics class.