Exploring the relationship between cognitive function and frailty in middle-aged and older adults Chinese adults: evidence from the CHARLS database | Synapse