IAW with FM 7-22 a Soldier must be given twice the length of the profile prior to taking a record APFT.
Extract of FM 7-22
6-6. Soldiers recovering from injury, illness, or other medical conditions must train within the limits of their medical profiles (DA Form 3349 [Physical Profile]) and be afforded a minimum train-up period of twice the length of the profile. Prescribed train-up periods must not exceed 90 days before APFT administration or other unit physical readiness goal requirements according to AR 350-1.
So to answer your question a Soldier can only take a record APFT after they have received twice the length of their profile for recovery. The command could consider providing the Soldier a diagnostic APFT during the recovery peroid however they could risk causing injury to the Soldier by testing too soon so they should exercise caution if they choose to do this.