The Emergency Command Hologram (ECH) is a group of additional subroutines tacked onto the Emergency Medical Hologram, allowing the hologram to take command of a Starfleet starship or space station in cases where the senior crew are incapacitated or unable to remain aboard for any reason.
In 2376, USS Voyager's EMH dreamed up the extension and made a request to Voyager captain Kathryn Janeway, who initially denied the request. After seeing the Doctor's abilities in action, Janeway reconsidered, and research and development of the ECH extension started. (VOY: "Tinker, Tenor, Doctor, Spy")
By 2377, the ECH subroutines were active, and the remaining Voyager crew activated the ECH to take command while Chakotay, Harry Kim and Neelix attempted to rescue the other Voyager crew members. While being programmed with an extensive knowledge of Starfleet tactics, the Doctor realized experience was also part of the ability to take command, and, therefore, handed back command to Janeway once she was aboard. (VOY: "Workforce, Part I", "Workforce, Part II")
Following the return of the Voyager, Starfleet Research and Development initiated an ECH study group, headed by Doctor Lewis Zimmerman and aided by the cooperation of Voyager's EMH, following Voyager's return to explore the possibility of developing a dedicated Emergency Command Hologram.
To this end the study group first selected, at random, a Mark I EMH and approached it with the ECTH upgrade proposal. Upon its acceptance the EMH was outfitted with autonomy protocols, like Voyager's EMH, and its medical database was replaced with an advanced tactical database resulting in the creation of the Mark One Emergency Command and Tactical Hologram.
By stardate 57465 the ECTH had been installed onboard the USS Prometheus for testing since that vessel's shipwide holo-emitters would give the ECTH free reign of the ship. Upon its installation protocols were developed governing when the ECTH could be given and/or assume command.