rcpch / rcpch-audit-engine

Epilepsy12 Audit Platform
https://e12.rcpch.ac.uk/
GNU Affero General Public License v3.0
5 stars 5 forks source link

Updating MRI KPI criteria #1016

Closed nikyraja closed 2 weeks ago

nikyraja commented 1 month ago

Please could the calculation for the MRI KPI be updated to:

Numerator= Number of children and young people diagnosed with epilepsy at first year AND who are NOT (JME OR JAE OR CAE OR Generalised tonic clonic seizures only OR self-limited epilepsy with centrotemporal spikes ~(SELECT)) AND who had an MRI within 6 weeks of referral. Denominator= Number of children and young people diagnosed with epilepsy at first year AND who are NOT (JME OR JAE OR CAE OR Generalised tonic clonic seizures only OR self-limited epilepsy with centrotemporal spikes ~(SELECT))

For info, the current methodology is: "Current methodology:

Numerator= Number of children and young people diagnosed with epilepsy at first year AND who are NOT JME or JAE or CAE or CECTS/Rolandic OR number of children aged 2 years and under at first assessment with a diagnosis of epilepsy at first year AND who had an MRI within 6 weeks of referral. Denominator= Number of children less than 2 years old at first assessment with a diagnosis of epilepsy at first year OR children with a diagnosis of epilepsy at first year who are NOT JME or JAE or CAE or BECTS/Rolandic"

Let me know if you have any questions?

eatyourpeas commented 1 month ago

Sure Niky. A couple of questions.

  1. I am guessing we are using CECTS/Rolandic and Self-limited epilepsy with centrotemporal spikes interchangeably? In the audit platform we have stored the term: "Self-limited epilepsy with centrotemporal spikes". We would not normally scan children presenting with this if the history and EEG on their own were diagnostic. We currently exclude all this cohort of children in the nominator and denominator of measure 5. It looks like this is not changing?
  2. We are nolonger interested in scanning the under 2s, is that right? So this would be removed from the denominator and numerator?
  3. We are now stipulating we should not be scanning those with generalized epilepsy only - how do we define only? Would it be that be defined as having one or more episodes which are defined as epileptic and having generalized onset, and then also have no epilepsy syndromes?

This would leave - hoping this makes but let me know if not and we can walk through together.

# define eligibility criteria 1
ineligible_syndrome_present = Syndrome.objects.filter(
      Q(multiaxial_diagnosis=multiaxial_diagnosis)
      &
      # ELECTROCLINICAL SYNDROMES: BECTS/JME/JAE/CAE currently not included
      Q(
          syndrome__syndrome_name__in=[
              "Self-limited epilepsy with centrotemporal spikes",
              "Juvenile myoclonic epilepsy",
              "Juvenile absence epilepsy",
              "Childhood absence epilepsy",
          ]
      )
  ).exists()

# define eligibility criteria 2
    generalised_epilepsy_only_present = (
        Episode.objects.filter(
            multiaxial_diagnosis=multiaxial_diagnosis,
            epilepsy_or_nonepilepsy_status=EPILEPSY_DIAGNOSIS_STATUS[0][0],
            epileptic_seizure_onset_type=EPILEPSY_SEIZURE_TYPE[0][0],
        ).count()
        > 0  # epilepsy which is generalised onset
        and multiaxial_diagnosis.syndrome_present is False
    )

# check eligibility criteria 1 & 2
    # 1 = none of the specified syndromes present
    # 2 = epilepsy is not simple generalised
   if not (ineligible_syndrome_present or generalised_epilepsy_only_present):
        # not scored
        mri_dates_are_none = [
            (investigations.mri_brain_requested_date is None),
            (investigations.mri_brain_reported_date is None),
        ]

        if investigations.mri_indicated is not None:
            if any(mri_dates_are_none) and investigations.mri_indicated is True:
                return KPI_SCORE["NOT_SCORED"]
            elif investigations.mri_indicated is False:
                return KPI_SCORE["FAIL"]

        # eligible for this measure - score kpi
        if (
            investigations.mri_brain_requested_date is not None
            and investigations.mri_brain_reported_date is not None
        ):
            passing_criteria_met = ( # MRI performed within 6 weeks
                abs(
                    (
                        investigations.mri_brain_requested_date
                        - investigations.mri_brain_reported_date
                    ).days
                )
                <= 42
            )
        else:
            passing_criteria_met = 0

        if passing_criteria_met:
            return KPI_SCORE["PASS"]
        else:
            return KPI_SCORE["FAIL"]

    # ineligible
    else:
        return KPI_SCORE["INELIGIBLE"]
eatyourpeas commented 1 month ago

Sorry I have edited this comment a few times so not sure what happens to your emails each time. My questions particular centre on the definition of simple generalized epilepsy. This I guess can be convulsive or non-convulsive, so the best way I can find a way to construct a query is to look at all episodes for a given child which are defined as epileptic of generalized onset. I have updated the comment above and the code snippet to illustrate.

Let me know if this captures what you and the data group intended.

nikyraja commented 1 month ago

Thanks Simon.

  1. Yes, SeLECTs is the newer term for CECTs/Rolandic. So, the code probably doesn't need to be changed for this, more the documentation perhaps or how we label?
  2. Correct, we can remove the age criteria from the numerator and denominator completely.
  3. There is an option in the syndrome drop down for 'Epilepsy with generalised tonic-clonic seizures alone' - could we just exclude all CYP that have this option?

@coldunk could you help confirm Q3?

nikyraja commented 4 weeks ago

Spoken to Colin and he's confirmed we can exclude CYP with 'Epilepsy with generalised tonic-clonic seizures alone' selected for the syndrome.

The confirmed criteria is: Numerator= Number of children and young people diagnosed with epilepsy at first year AND who are NOT (JME OR JAE OR CAE OR Epilepsy with generalised tonic clonic seizures alone OR self-limited epilepsy with centrotemporal spikes ~(SELECT)) AND who had an MRI within 6 weeks of referral.

Denominator= Number of children and young people diagnosed with epilepsy at first year AND who are NOT (JME OR JAE OR CAE OR Epilepsy with generalised tonic clonic seizures alone OR self-limited epilepsy with centrotemporal spikes ~(SELECT))