You have no recourse against your boss unless he physically restrained your or locked the door so you could not exit or used threats of violence. Otherwise, while he told you not to leave, you *could* have left--you could have put your health ahead of your job and walked out and gone to the ER. By choosing to stay because your boss asked you to, you made a voluntarily choice to prioritize staying in your boss's good graces over protecting your health; having made that voluntary choice, you cannot hold your employer accountable for the consequences.