A former SNP health secretary has admitted her own party is partially responsible for the state of Scotland's NHS.