Skip to content

Transformers

kevtokev edited this page Nov 16, 2020 · 14 revisions

The following section details every transformers, the list of ready to transform Events.

Patients Transformer

This transformer provides filter patients by age, gender and death date.

ObservationPeriod Transformer

It takes the events dataset and apply the following algorithm:

    1. Filter by category equal to "molecule" and start date of the event is before of start date of the study.
    1. Calculate the min of start date of events for each patient.
Event field PatientID category groupID value weight start end
Mapping patientID observation_period "NA" "NA" 0.0 start studyEnd

Trackloss Transformer

This transformer provides have events which take place after observation period.

Event field PatientID category groupID value weight start end
Mapping patientID trackloss "NA" trackloss 0.0 start + tracklossMonthDelay (by default : 2 months) null(non used)

FollowUp Transformer

This transformer provides have follow up events. It takes as input Patients, ObservationPeriod Events and Trackloss Events.

Event field PatientID category groupID value weight start end
Mapping patientID follow_up "NA" endReason (death or trackloss or observationEnd) 0.0 start end

It applies the following algorithm for each patient :

  • For endReason, it compares the DeathDate with TracklossDate and ObservationPeriodEnd,
    • If dates are different, it takes min date (end) with the corresponding reason.
    • If they are the same, then compare the end reasons to return the correct according to priority.
    • If two reasons are the same date, Death is the first option, if Death is not present, the second one is Trackloss and the third option is ObservationEnd.
  • For startDate, it calculates minimum of ObservationPeriodStart + delayMonths.

Exposure Transformer

This transformer provides have exposures. It takes as input FollowUp and Drug Delivery Events. cf DCIR Events

Event field PatientID category groupID value weight start end
Mapping patientID exposure prescription id drug id 1.0 start end

It applies the following algorithm for each patient :

  • For startDate, it makes Exposure start as earliest as FollowUp start.
    Furthermore, startDate of drug_purchase + purchaseWindow is after or equal startDate of the last drug purchase.
  • For endDate, it makes Exposure end as latest as FollowUp end.

BroadBladderCancer Transformer

This transformer provides have BroadBladderCancer events. It takes as input Diagnosis Events.

Event field PatientID category groupID value weight start end
Mapping patientID outcome "NA" broad_bladder_cancer 0.0 start (ENT_DAT from MCO_C) null(non used)

It's a broad_bladder_cancer event if :

  • category = (mco_main_diagnosis or mco_linked_diagnosis or had_main_diagnosis or ssr_main_diagnosis or ssr_associated_diagnosis or ssr_linked_diagnosis) and value = "C67"
    or
  • for the group (patientID, Concatenation of ETA_NUM+RSA_NUM+SOR_ANN from MCO_C, ENT_DAT from MCO_C) :
    • There is an event with category != (mco_main_diagnosis and mco_linked_diagnosis and had_main_diagnosis and ssr_main_diagnosis and ssr_associated_diagnosis and ssr_linked_diagnosis) and category = mco_associated_diagnosis and value = "C67"
    • And an another event with category = (mco_main_diagnosis or mco_linked_diagnosis) and value = "C77" or "C78" or "C79"

NaiveBladderCancer Transformer

This transformer provides have NaiveBladderCancer events. It takes as input Diagnosis Events.

Event field PatientID category groupID value weight start end
Mapping patientID outcome "NA" naive_bladder_cancer 0.0 start (ENT_DAT from MCO_C) null(non used)

It's a naive_bladder_cancer event if :

  • diagnosis(DGN) = "C67"

NarrowBladderCancer Transformer

This transformer provides have NaiveBladderCancer events. It takes as input Diagnosis Events.

Event field PatientID category groupID value weight start end
Mapping patientID outcome "NA" narrow_bladder_cancer 0.0 start (ENT_DAT from MCO_C) null(non used)

It's a narrow_bladder_cancer event if :

  • For a patient and his hospital stay, all events have the same start dates.
    and
  • (category = mco_main_diagnosis and value = "C67") or (category = mco_linked_diagnosis and value = "C67") or (for the same patientID and the same hospital stay, there are one event with category = mco_associated_diagnosis and value = "C67" and another event with category = (mco_main_diagnosis or mco_linked_diagnosis and value = "C77" or "C78" or "C79".
    and for the same patientID and the same hospital stay, there is another event with
    • (category = mco_cim10_act and value = ("Z511" or "Z510")) or (category = mco_ccam_act and value is in the list of codes).
      or
    • category = dcir_act and value is in list of codes and start of this event is between start of the hospital stay - 3 months and start of the hospital stay + 3 months).

Infarctus Transformer

This transformer provides have Infarctus events. It takes as input Diagnosis Events.

Event field PatientID category groupID value weight start end
Mapping patientID outcome "NA" infarctus 0.0 startDate null(non used)

It's a infarctus event if :

  • diagnosis(DGN) is in the list of infarctus Diagnosis Codes.

HeartFailure Transformer

This transformer provides have Heart Failure events. It takes as input Diagnosis Events.

Event field PatientID category groupID value weight start end
Mapping patientID outcome "NA" heart_failure 0.0 startDate null(non used)

For each patient and each hospital stay, it's a heart failure event if :

  • category = mco_main_diagnosis and value = "I50".
    or
  • category = mco_main_diagnosis and value is in the list of Heart Complication codes and there is another event with same patientID and same hospital stay with category = mco_linked_diagnosis or mco_associated_diagnosis and value = "I50"

DrugPrescription Transformer

This transformer provides have Drug Prescription events. It takes as input Drug Delivery Events.

Event field PatientID category groupID value weight start end
Mapping patientID drug_prescription prescription id Concatenation of the passed Drugs weight start null(non used)

For the same prescriptionID, patientID and startDate, value is the concatenation of the values of the passed Drugs (ex: value = drug1_drug2).

FallStudyFollowUps Transformer

This transformer provides have Drug Prescription events. It takes as input Patients. It's a variant of FollowUp Transformer.

Event field PatientID category groupID value weight start end
Mapping patientID follow_up "NA" endReason (death or study_end) 0.0 studyStart + startDelay(months) end(deathDate or studyEnd)

The endReason of FallStudyFollowUps Transformer is different from endReason of FollowUp Transformer. If the death date of patient is before the study end so endReason is death. Otherwise endReason is study end.

NLevelInteraction Transformer

This transformer provides have Interaction events. It takes as input Exposure Events.

Event field PatientID category groupID value weight start end
Mapping patientID "interaction" "NA" Concatenation of the passed Drugs Number of drugs Period Start Period End

The value is concatenation of the values of the passed Drugs (ex: value = drug1_drug2).

LiberalActs Transformer

This transformer provides have liberal acts events. It takes as input Medical Acts Events of DCIR. cf DCIR Events

Event field PatientID category groupID value weight start end
Mapping patientID category "liberal" value weight start end

It filters Medical Acts Events which groupID = liberal and value is not in the list of CCAM Exceptions Codes.

Fractures Transformers

This transformer provides have fractures events. It combines four transformers listed below.

Hospitalized Fractures Transformers

This transformer provides have hospitalized fractures events. It takes as input Medical Acts Events, Diagnosis Events and Hospital Stay Events.

Event field PatientID category groupID value weight start end
Mapping patientID "outcome" fracture site "hospitalized_fall" severity start null(not used)

Fracture Site is determined by diagnosis code.
The algorithm of severity is :
1 if the patient was not hospitalized.
2 if the patient had a hospitalization without surgery.
3 if the patient had a hospitalization and a surgery for fracture.
4 if the patient is died after hospitalization.

Liberal Fractures Transformers

This transformer provides have liberal fractures events. It takes as input Liberal Act Events.

Event field PatientID category groupID value weight start end
Mapping patientID "outcome" fracture site "liberal" 1.0 start null(not used)

Fracture Site is determined by diagnosis code.

Public Ambulatory Fractures Transformers

This transformer provides have public ambulatory fractures events. It takes as input Medical Act Events.

Event field PatientID category groupID value weight start end
Mapping patientID "outcome" fracture site "public_ambulatory_fall" 1.0 start null(not used)

It filters category = "mco_ce_act" and diagnosis code is not in the list of Non Hospitalized Fractures Ccam Codes.
Fracture Site is determined by diagnosis code.

Private Ambulatory Fractures Transformers

This transformer provides have private ambulatory fractures events. It takes as input Medical Act Events.

Event field PatientID category groupID value weight start end
Mapping patientID "outcome" fracture site "private_ambulatory_fall" 1.0 start null(not used)

It filters groupID = "private_ambulatory" and diagnosis code is not in the list of Non Hospitalized Fractures Ccam Codes.
Fracture Site is determined by diagnosis code.

  1. DCIR
  2. PMSI
  1. Referentials

Clone this wiki locally