Harmon's military service file will contain authoritative information on this subject. That can be ordered here. Almost any post-Gettysburg hospital admission would appear in this file.
It's important to understand exactly what happened to Confederates wounded in this battle. Many of those wounded and left on the field fell into Federal hands before the Army of Northern Virginia left Gettysburg. After the fighting ended, others who could not be moved were captured in Confederate field hospitals. Federal cavalry raids targeting South Mountain passes seized hundreds more of the seriously wounded in army wagon trains.
Most of the Confederate wounded who managed to make it south of the Potomac received treatment in Confederate hospitals in north-central Virginia. When the army finally went into camp in northern Virginia, Richmond was still some distance away.
Yhe roll for July-August 1863 will state Harmon's status to the best of the company clerk knowledge. If he fell into Federal hands at some point, prisoner-of-war and Federal hospital records should provide evidence. If Harmon actually was admitted to a Confederate military hospital, that should be present in the file as well.
Last point -- whenever an officer died, the officer promoted to fill his position would be commissioned to rank from that exact date.