Skip to content

Transformers

kevtokev edited this page Oct 20, 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 before of study start date.
    1. Calculate the min of start date
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 + 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 they 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(https://github.com/X-DataInitiative/SCALPEL-Extraction/wiki/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 are one 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).
  1. DCIR
  2. PMSI
  1. Referentials

Clone this wiki locally