gen.POSSUM: A function to compute POSSUM scores

Description Usage Arguments Value Converting to probability scale References Examples

Description

This function will parse a dataframe and produce POSSUM scores to predict perioperative mortality and morbidity. To use the function, you will need to manipulate your dataframe to have columns with the structure detailed below.

Usage

1

Arguments

x

A dataframe or tbl where each row is a patient observation, and the columns are POSSUM predictor variables.

x must contain the following column names (not necessarily in order):

Age

continuous variable, numeric or integer

JVP

binary variable, whether the patient has raised JVP or not

Cardiomegaly

binary variable, whether the patient has cardiomegaly on CXR or not

Oedema

binary variable, whether the patient has peripheral oedema or not

Warfarin

binary variable, whether the patient normally takes warfarin or not

Diuretics

binary variable, whether the patient normally takes a diuretic medication or not

AntiAnginals

binary variable, whether the patient normally takes anti-anginal medication or not

Digoxin

binary variable, whether the patient normally takes digoxin or not

AntiHypertensives

binary variable, whether the patient normally takes blood pressure meds or not

Dyspnoea

categorical variable, can be: "Non" = None; "OME" = On exertion; "L" = Limiting activities; "AR" = At rest

Consolidation

binary variable, whether the patient has consolidation on CXR

PulmonaryFibrosis

binary variable, whether the patient has a history of pulmonary fibrosis or imaging findings of fibrosis

COPD

binary variable, whether the patient has COPD or not

SysBP

continuous variable, pre-op systolic blood pressure (in mmHg)

HR

continuous variable, pre-op pulse/heart rate (in beats per min)

GCS

continuous variable, pre-op Glasgow Coma Scale (3-15)

Hb

continuous variable, pre-op Haemoglobin (in g/L), please note the units!

WCC

continuous variable, pre-op White Cell Count (in * 10^9cells/L)

Ur

continuous variable, pre-op Urea (in mmol/L)

Na

continuous variable, pre-op Sodium concentration (in mmol/L)

K

continuous variable, pre-op Potassium concentration (in mmol/L)

ECG

categorical variable, can be "ND" = Not done; "NOR" = Normal ECG; "AF6090" = AF 60-90; "AF>90" = AF>90; "QW" = Q-waves; "4E" = >4 ectopics; "ST" = ST or T wave changes; "O" = Any other abnormal rhythm

OpSeverity

categorical variable, the surgical severity, can be Min = Minor; Int = Intermediate; Maj = Major; Xma = Xmajor; Com = Complex

ProcedureCount

categorical variable, number of procedures patient underwent in the last 30 days including this one, can be "1" = 1; "2" = 2; "GT2" = >2

EBL

categorical variable, the estimated blood loss, can be "0" = 0-100ml; "101" = 101-500ml; "501" = 501-999ml; "1000" = >=1000

PeritonealContamination

categorical variable, whether there was peritoneal soiling, can be "NA" = Not applicable; "NS" = No soiling; "MS" = Minor soiling; "LP" = Local pus; "FBC" = Free bowel content pus or blood

Malignancy

categorical variable, whether the patient has malignant disease, can be "NM" = Not malignant; "PM" = Primary malignancy only; "MNM" = Malignancy + nodal metastases; "MDM" = Malignancy + distal metastases

OpUrgency

categorical variable, NCEPOD classifications of urgency, can be "Ele" = Elective; "Exp" = Expedited; "U" = Urgent; "I" = Immediate

Value

A dataframe (or tbl), which you can assign to an object, with the following variables:

PhysScore

The physiological score for POSSUM

OpScore

The operative score for POSSUM

POSSUMLogit

The log-odds for morbidity as calculated by POSSUM

pPOSSUMLogit

The log-odds for mortatlity as calculated by pPOSSUM

Converting to probability scale

The function will produce POSSUMLogit and pPOSSUMLogit values which are on the log-odds scale To convert to probabilities (0 to 1 scale), use arm::invlogit(). See: invlogit.

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## Not run: 
#Example of pre-processing to rename data variables to match expected column names
library(tidyverse)

test_data <- raw_data %>%
select(Age = S01Age,
        JVP = S03ElevatedJugularVenousPressureJvp,
        Cardiomegaly = S03RadiologicalFindingsCardiomegaly,
        Oedema = S03PeripheralOedema,
        Warfarin = S03DrugTreatmentWarfarin,
        Diuretics = S03DrugTreatmentDiureticTreatment,
        AntiAnginals = S03DrugTreatmentAntiAnginal,
        Digoxin = S03DrugTreatmentDigoxinTherapy,
        AntiHypertensives = S03DrugTreatmentAntiHypertensive,
        Dyspnoea = S03Dyspnoea,
        Consolidation = S03RadiologicalFindingsConsolidation,
        PulmonaryFibrosis = S03PastMedicalHistoryPulmonaryFibrosis,
        COPD = S03PastMedicalHistoryCOPD,
        SysBP = S03SystolicBloodPressureBpAtPreAssessment,
        HR = S03PulseRateAtPreoperativeAssessment,
        GCS = S03GlasgowComaScaleGcsPreInductionOfAnaesthesia,
        Hb = S03Hb,
        WCC = S03WhiteCellCountWcc,
        Ur = S03Urea,
        Na = S03Na,
        K = S03K,
        ECG = S03EcgFindings,
        OpSeverity = S02PlannedProcSeverity,
        ProcedureCount = S04ProcedureCount,
        EBL = S04BloodLoss,
        PeritonealContamination = S04PeritonealContamination,
        Malignancy = S04Malignancy,
        OpUrgency = S02OperativeUrgency)

## End(Not run)

test_data <- patients
test_output <- gen.POSSUM(test_data)
head(test_output)

dannyjnwong/HSRC documentation built on May 18, 2019, 2:37 a.m.