Detecting early signs of clinical frailty and deterioration through shared care records