The question will best be understood with an example.
I have Hospital One who have 3 main pharmacies called; Central Pharmacy, Ward Pharmacy, and Private Suite.
These pharmacies can be added, deleted, and extended at will. While these go on i would love to know from my code when we are talking about a Central Pharmacy or a Ward Pharmacy without hard-coding the id.
Can someone help me on how i could go about solving this problem?
I’ll present a different scenario when this is answered. Thank you everyone in advance.
Edit #1
I think there will be some kind of table design & code design pattern to enable this sort of flexibility.
My initial table design would be
This allows for generic pharmacies to be added as well as the types you mention.
At one point in time, one way or another you will have to hardcode either the PharmacyTypeID of Central Pharmacy (et all) or their names.