How did a national healthcare system address risky legacy applications?