rcpch / national-paediatric-diabetes-audit

A django application to audit the care of children and young people with diabetes in England and Wales.
0 stars 1 forks source link

KPI measures for individual patient #320

Open eatyourpeas opened 3 weeks ago

eatyourpeas commented 3 weeks ago

This is now an initial implementation of the KPI summary page for an individual PDU with tests in place (thank you @anchit-chandran !) None of these measures though are labelled or calculated currently in a way that they can meaningfully apply to a single patient. @AmaniKrayemRCPCH @cillian-rcpch @richardshepherd45 @FrancescaAnnan - how would you like to indicated to users at the patient level that they have passed/failed/are ineligible for a given measure? image

anchit-chandran commented 2 weeks ago

Commenting on here just so we keep it all in 1 place.

I've implemented an output for a single patient that simply excludes KPIs 1-12, however @eatyourpeas makes a good point:

Thank you @anchit-chandran
This is related to https://github.com/rcpch/national-paediatric-diabetes-audit/issues/320
I am not sure that any of the KPIs as they stand are relevant to the individual patient.
First of all, the labels/titles all reflect counts of the different measures, rather than text meaningful to single patients, but also on a more fundamental level the measures need organising differently for individuals. For example - these measures related to treatment. If a patient has T1DM they will be on any one of 13-18. But if they are are on a pump, it should not be that they pass 15 but fail 13/14/16/17/18. In fact, I am not clear how it should be scored, since they will all be on one of these - if there is no value, then the audit would be incomplete.

13: "Number of patients on one to three injections per day",
14: "Number of patients on four or more injections per day",
15: "Number of patients on insulin pump",
16: "Number of patients on one to three injections plus other medication",
17: "Number of patients on four or more injections plus other medication",
18: "Number of patients on insulin pump plus other medication",
19: "Number of patients on dietary management alone",

I can output whatever we wish but need clear instructions on what we want? bump @AmaniKrayemRCPCH @cillian-rcpch @richardshepherd45 @FrancescaAnnan

anchit-chandran commented 1 week ago

Linking @AmaniKrayemRCPCH 's reply here just for ease of access

https://github.com/rcpch/national-paediatric-diabetes-audit/pull/316#issuecomment-2427026619

On the current platform, patient-level KPIs are shown in a big table for that PDU (one row per patient) for some measures.

image *no real patient data in the screenshot. This is dummy data.

It's most useful for the care processes (e.g the core health checks, additional care processes, checks at diagnosis). Can also provide the median HbA1c per patient, the number of admissions, albuminuria stage, and requiring additional psych support.

There may also be further items you would find useful to report on at patient-level. Let's discuss at the sprint call

anchit-chandran commented 1 week ago

Initially just for care processes, plan for data will look something like:

@dataclass
class KPIResults:
    kpi_25_hba1c: bool
    kpi_26_bmi: bool
    kpi_27_thyroid_screen: Optional[bool]
    kpi_28_blood_pressure: Optional[bool]
    kpi_29_urinary_albumin: Optional[bool]
    kpi_30_retinal_screening: Optional[bool]
    kpi_31_foot_examination: Optional[bool]

@dataclass
class Record:
    nhs_number: str
    total_passed: int
    expected_total: int
    gte_12yo: bool
    kpi_results: KPIResults
    transfer: Dict[int, Optional[str]]

[
    {
        'nhs_number': '123',
        'total_passed': 5,
        'expected_total': 7,
        "gte_12yo": True,
        'kpi_results': {
            "kpi_25_hba1c" : True,
            'kpi_26_bmi' : True,
            'kpi_27_thyroid_screen': False,
            'kpi_29_urinary_albumin': True,
            'kpi_30_retinal_screening' : True,
            'kpi_31_foot_examination': False,
        },
        # Data on transfer within each quarter
        'transfer': {
            1: 'REMAINED',
            2: 'REMAINED',
            3: 'LEFT',
        }
    },
    {
        'nhs_number': '456',
        'total_passed': 3,
        'expected_total': 3,
        "gte_12yo": False,
        'kpi_results': {
            "kpi_25_hba1c" : True,
            'kpi_26_bmi' : True,
            'kpi_27_thyroid_screen': None,
            'kpi_29_urinary_albumin': None,
            'kpi_30_retinal_screening' : None,
            'kpi_31_foot_examination': None,
        },
        # Data on transfer within each quarter
        'transfer': {
            1: 'REMAINED',
            2: 'DIED',
            3: None,
        }
    }
]

@AmaniKrayemRCPCH does a period refer to a quarter? Assuming that's why there's only 3 bars in that column on the right (with Q4 being end of audit so omitted?)

AmaniKrayemRCPCH commented 5 days ago

period refers to the audit year. The three bars refer to 3 different things - the first bar is if they're diagnosed in the audit year, second is if they left the service, and third is if they died.