The problem is in the design of the Refills table. It needs to have the ID of the prescription in there or in a bridge table. For something like this, I'll recommend not using a bridge table.
The refill absolutely must be linked to the prescription which must be linked back to the customer. That's the only way this is ever going to work.
I also would NOT call the RefillNumber that. It should be named the same as the prescription ID column so that no one has to guess or rely on esoteric knowledge to know what it is. You DID have to parenthetically explain to us what it was.
To wit, I also wouldn't include the ID of the customer in the Refills table.
--Jeff Moden
Change is inevitable... Change for the better is not.