I guess I'm a bit confused. You work for company A, which hired company B to manage the work at company A, and now has fired company B and hired company C to do so? Company C is telling you that they are going to terminate you if you are not able to pass their physical within the next eight days?
Are you a member of a union? If so, talk to your union.
Are you already represented by a workers compensation attorney? If so, talk to your lawyer right away. If not, go have a free consultation with an experienced workers comp attorney. You can find good ones on this site or at www.CAAA.org, the organization for attorneys who represent injured workers in California. You might also want to talk to an employment law attorney. You can fine them on this site as well, and at www.CELA.org.
The answer to your question is "it depends." If your employer has more than 50 employees, you may be eligible for up to 12 weeks of protected job leave under the CFRA/FMLA. Even after 12 weeks, your employer has a duty under the Fair Employment & Housing Act to "reasonably accommodate" your medical condition. Accommodations may include additional protected time off or a modification of your job duties so your job is less physically exerting.
Consultation with a local employment attorney is strongly advised.
This answer is a general interpretation of the law and is not fact specific to your case. Likewise it does not create an attorney-client relationship. You should seek an attorney for a review of your specific facts and documents.
Sign up to receive a 3-part series of useful information and advice about personal injury law.