Hydromorphone, also known as dihydromorphinone, and sold under the brand name Dilaudid among others is in a class of medications…