Looks very task dependent, requiring some tailored metric on your parameter (patient feature) space.
You could define some distance measure for each parameter (age, gender, weight, ...) and combine these using weights >= 0. For real numbers or vectors this could be based on the Lp-norm: d(x) = ((x1)^p + ... xn^p)^1/p. For classes this can be the discrete distance d(x,x) = 0, d(x,y) = 1 if x y.
The triangularity rule must hold for a metric: d(x,y)