Ramshackle community groups have a remarkable record in talent competitions. You've seen Brassed Off. You've seen Sister Act. Feelgood factor kicks in. A fractious group pulls together and triumphs against the odds.

Not here, they don't. Patrick Jones' play about a Cardiff choir made up of Alzheimer's patients is a knowing subversion - one that resists the idea of easy, singular success to put the case for care as a process. By the time they arrive on the Britain's Got Talent stage, with a camp, egotist in charge and a stash of hash brownies inside them, they're in complete disarray. Three buzzers never sounded so sharpish.

Grown out of a corresponding community project, something at the heart of National Theatre Wales, Before I Leave shows the choir coming together under the dedicated direction of Oliver Wood's Scott. Using popular hits, lodged deep inside these disintegrating memories, he gets them singing from the same songsheet despite some deep-rooted divisions. Retired copper Evan (Desmond Barrit) and ex-miner Rocky (Dafydd Hywel) cling to their old rivalry. Opera singers and rockers sit side by side. Whatever else it might be, dementia's nothing if not indiscriminate.

Around rehearsals, Jones threads together the choristers' lives - often quite clumsily - to show the impact on individuals and families. They're stock stories in some ways - a miner with nowhere to go, always returning to the Seven Bells memorial; an opera star who can no longer sing - but they've power regardless, plugged into the emotional mains. We see a careless care system and families pulling apart at the seams. Martin Marquez's Joe, a fiftysomething whose vacant early-onset glaze is at odds with his strength, needs constant, patient care from his wife Dyanne (Melanie Walters). So does Evan, though his hard-up daughter can't provide it. His speedy deterioration is shocking.

It's a show about failing bodies, faltering minds and fracturing communities; in essence, a hymn to the welfare state - almost an elegy. Jones draws a poignant parallel with the mining industry. As with memories, once something is lost, it can never be recovered, and there's no doubt here that the welfare state is being wound up. Not only is the choir itself at risk from cuts, so is the local library that hosts its rehearsals; so are the care homes that house its members, the support groups that keep their carers afloat, the unions that protect employees against unfair dismissal. To borrow from Paul Weller: Something really is happening here today - and Jones argues that a failure of collective memory has, in part, allowed it to happen.

For all the drag of its predictable plots, Matthew Dunster's staging gradually brings your blood to the boil, charged with heart, civic pride and feeling. Every time the choir sings, together, community members alongside professional actors, their naked voices both vulnerable and robust, it sends a shockwave up your spine. It's a blunt instrument - too angry for subtlety - but an effective one, and one that might just have a real effect as communities come together and sing up for the state.

Before I Leave runs at the Sherman Theatre until 11 June.