Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have the following situation:
I have a stable table "Overview" with different values for different symptoms.
I now want to calculate an overall score for each patient. the score shall multiply all LR+/LR- scores of all symptoms of each patient. If a patient has a symptom, it shall multiply LR+, otherwise LR-.
Some examples:
Patient A has symptoms 'Hypertension' and 'Obesity' => Score(A) = 1,126*1,333 = 1.5
Patient B has no symptoms => Score(B) = 0,857*0,5 = 0,42
Patient C has symptom 'Obesity', but no 'Hypertension' = > Score(C) = 1,126 * 0,5 = 0,563
The formula I search for, needs to do something like this:
for eachPatient in Patient:
score(eachPatient) = 1
for symptom in symptoms:
if symptom in PatientSymptoms:
score = score*LR+
else:
score = score*LR-
The output table shall look like this:
A;1.5
B;0.42
C;0.563
...
Does somebody know how to do this and could give me advise on it?
Thanks a lot for your help
Philipp