Skip to content

Conversation

@Momo1502
Copy link

Hi Dheshan,

Sorry for cancelling the last pull request, I still had to add additional antipsychotics first.
I have (i) updated the constants.py file to incorporate a new constant for the conversion of antipsychotics to haloperidol 1 mg equivalences based on the Leucht table provided by Scott Woods and (ii) updated the formsdb/runners/compute/compute_medication_effects.py file to calculate the equivalences based on the constants.
Please let me know if another script also uses the constants / calculated values so that I can update them as well.

Best,
Moritz

Incorporate the calculations based on the Leucht equivalences in the compute_medication_effects.py script
Added the equivalent dose calculations based on the Leucht table provided by Scott. They are listed as a new constant (med_idx_drug_equivalent_dose_leucht) .
@dheshanm
Copy link
Member

dheshanm commented Nov 14, 2025

Hi Moritz,

Other scripts that use the outputs from this script are:

The scripts run in the following order:

  1. compute_medication.py - Imports the medication data. (Already feature complete)
  2. compute_medication_effects.py - This has already beed addgressed by this PR
  3. compute_medication_effects_by_class.py - This 'flattens' the Dataframe from table two for each participant's by 'med_class'. i.e., we get only 1 row per (subject, timepoint, event, med_class)

Please let me know if you can modify this script as well as part of this PR, if not I can work on this too!

Thanks,
Dheshan

Momo1502 added a commit to Momo1502/ampscz-formsdb-leucht-ed that referenced this pull request Nov 16, 2025
Hi Dheshan,

I have updated the compute_medication_effects_by_class.py to take your feedback in Pull req AMP-SCZ#10 into account.
Hi Dheshan,

I have updated the compute_medication_effects_by_class.py to take your feedback in Pull req AMP-SCZ#10 into account.
@Momo1502
Copy link
Author

Hi Dheshan,

thanks for your feedback! I went through the compute_medication_effects_by_class.py script as well and implemented the relevant changes. This hopefully addresses all relevant scripts that use the equivalent doses.

Best,
Moritz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants