Nurse Bigelow could have replaced Margaret
This is my idea for how Loretta Swit could have left MASH and went to Cagney and Lacey.
Enid Kent AKA Nurse Bigelow could have been promoted to series regular. She was already starting to appear in many episodes. Bigelow could have been promoted to Captain and been made asst. Head Nurse.
Margaret gets promoted to Lt. Colonel and becomes head nurse for the US 8th Army in Korea ( basically the writers create the position for her). Margaret then becomes a recurring character. She visits every so often making inspection trips around the various MASH units/evac hospitals.
The newly promoted Captain Bigelow becomes new top nurse for the 4077th. Maybe have Kellye get promoted to asst. head nurse.
Margaret comes back for the final episode. She visits Hawkeye in the mental ward. Later she comes to the 4077th final goodbye dinner/Klinger's wedding.