You need both your company(lawer) and yourself efforts!
medical exam Tuesday morning, then you can get the result by the earlier Thursday.
Tuesday to Wednesday, get all forms ready.
efile your i140 on Thursday, then you can get receipt right away, and file 485 with i140 receipt with the fastest service, so sure your 485 application can be received on 8/17.
Then within 7 work days, mail out your i140 materials
(Also ask your lawyer to call the center, to confirm they mail out your LC in time)