I think that a medical stretcher folding leg mechanism is more expensive and complete than you need -but I'll attach a document that could help.
I would consider a folding table leg design as follows and maybe add a simple supporting 4-wheel system to help roll the cabinet onto the table/structure.
695830GY_04.png
fbleg2.jpg
expo1.jpg
You can purchase these mechanisms pre-built.