Skip to main content

HarmoniCA - Harmonizing Clinical Assessments

Background

Diversity in the design of clinical assessment instruments creates fundamental incompatibilities when attempting to use them in a retrospective collaborative research setting (retrospective multi-site consortia, machine learning analyses, federated learning settings etc.). Previous harmonization approaches for questionnaire data have primarily relied on psychometric linking methods such as Item Response Theory (IRT) or Principal Component Analysis (PCA). While valuable, these methods require overlapping response data between questionnaires, which is often unavailable in retrospective multi-site analyses.

Functionality of the tool

This tool offers mapping of individual questionnaire items from multiple instruments to pre-defined symptom dimensions. Dimension scores are subsequently transformed to allow comparability across different clinical instruments.

img

How to use

Step 1: Clone this repo:

git clone git@github.com:julia-pfarr/HarmoniCA.git

Step 2: Install requirements:

python -m venv /your-path/harmonica pip install -r requirements.txt

Step 3: Run harmonization:

python harmonize.py -i <items.csv> 

Your items.csv needs to look like this:

construct,questionnaire,item_id,item_text
depression,CES-D,CES-D_01,I was bothered by things that usually don’t bother me.
depression,CES-D,CES-D_02,I did not feel like eating; my appetite was poor.
anxiety,DASS,DASS_02,I was aware of dryness of my mouth.,
anxiety,DASS,DASS_04,"I experienced breathing difficulty",
...

Models for each construct are pulled from Huggingface during the harmonization process, so make sure to have an internet connection and enough local space (~1.5GB per model/construct).

Step 4: Open a PR to contribute new harmonized questionnaires

The harmonized_inventory.csv get's updated automatically. We appreciate a Pull Request on this repo with your updated harmonized_inventory.csv so that we can have an ever growing inventory! :-)

You can try everything first with the test-items.csv from this repo!

The research behind this tool

Symptom dimensions were chosen based on the convergence of evidence across original scale publications, validation studies, expert recommendations, diagnostic manuals, and neuroimaging applications, along with practical considerations regarding dimension homogeneity and sample characteristics (see our OSF project for the full literature review and consensus pipeline).

Clinicians and researchers assigned items to dimensions through a structured survey. Through semantic similarity analysis using different embedding models and computation of embeddings for both questionnaire items and dimension descriptions, the best performing embedding model for each construct was chosen (maximum cosine similarity between item and to dimension description embedding).

The best performing model for each construct was fine-tuned with the probability distribution of the expert mappings using contrastive learning.

Results

Cross validation results:

Construct Folds Mean accuracy SD
Depression 14 86.9% ±11.9%
Anxiety 13 93.7% ±10.7%
Sleep 17 93.4% ±12.1%
Apathy 11 77.9% ±25.0%

Final models

All fine-tuned models can be found on Huggingface

Questionnaires mapped by experts

Abbreviation Full Name Construct
BDI-I Beck's Depression Inventory I Depression
HDRS/HAM-D Hamilton Depression Rating Scale Depression
GDS Geriatric Depression Scale Depression
MADRS Montgomery-Åsberg Depression Rating Scale Depression
PHQ-9 Patient Health Questionnaire-9 Depression
SDS Zung Self-Rating Depression Scale Depression
DSI Depressive Symptom Inventory Depression
MFQ Mood and Feelings Questionnaire Depression
BAI Beck's Anxiety Inventory Anxiety
HARS/HAM-A Hamilton Anxiety Rating Scale Anxiety
STAI State-Trait Anxiety Inventory Anxiety
PAS Parkinson Anxiety Scale Anxiety
GAD-7 Generalized Anxiety Disorder Scale Anxiety
PSWQ Penn State Worry Questionnaire Anxiety
SMGAD Severity Measure for Generalized Anxiety Disorder Anxiety
ASensI Anxiety Sensitivity Index Anxiety
AES Apathy Evaluation Scale Apathy
SAS Starkstein's Apathy Scale Apathy
AMI Apathy and Motivation Index Apathy
LARS Lille Apathy Rating Scale Apathy
DAS Dimensional Apathy Scale Apathy
SHAPS Snaith-Hamilton Pleasure Scales Apathy
TEPS Temporal Experience of Pleasure Scale Apathy
QUIP-C Questionnaire for Impulsive-Compulsive Disorders in Parkinson's Disease Impulse Control Disorders
QUIP-RS Quetionnaire for Impulsive-Compulsive Disorders in Parkinson's Disease - Rating Scale Impulse Control Disorders
ESS Epworth Sleepiness Scale Sleep
PDSS Parkinson's Disease Sleep Scale Sleep
PSQI Pittsburgh Sleep Quality Index Sleep
RBDSQ REM Sleep Behavior Disorder Screening Questionnaire Sleep
ISI Insomnia Severity Index Sleep
SCOPA-sleep Scales for Outcomes in Parkinson's Disease - sleep Sleep
AIS Athens Insomnia Scale Sleep
MSQ Mayo Sleep Questionnaire Sleep
SDQ Sleep Disorders Questionnaire Sleep
PPRS Parkinson's Psychosis Rating Scale Psychosis
SCOPA-PC Scales for Outcomes in Parkinson's Disease - Psychiatric Complications Psychosis
SAPS-PD Scale for the Assesment of Positive Symptoms - Parkinson's Disease Psychosis
UMD-PDHQ University of Miami Parkinson's Disease Hallucinations Questionnaire Psychosis
CAPE-P15 Community Assessment of Psychic Experiences, Positive scale, 15-item version Psychosis
PQ-B Prodromal Questionnaire, Brief version Psychosis
HADS Hopsital Anxiety and Depression Scale Multi-category
SCL-90 Symptom Checklist-90 Multi-category
ASBPD Ardouin Scale of Behavior in Parkinson's Disease Multi-category
NPI Neuropsychiatric Inventory Multi-category
MDS-UPDRS I Unified Parkinson's Disease Rating Scale - Part I Multi-category
NMSS Non-Motor Symptoms Scale for Parkinson's Disease Multi-category
NMSQuest Non-Motor Symptoms Questionnaire Multi-category

Metadata

Release files for pyHarmoniCA 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyHarmoniCA 0.0.1
File Size Uploaded Provenance
pyharmonica-0.0.1.tar.gz 53.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyHarmoniCA 0.0.1
File Interpreter ABI Platform
pyharmonica-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 109.9 kB

Release files / pyharmonica-0.0.1.tar.gz

Download URL pyharmonica-0.0.1.tar.gz
Size 53.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f9629710e7e75865df72933ec42995c56ddcb8dd9b6bb4a89be95e19e445b43a
BLAKE2b-256 checksum
How to use checksums
13855d13cf3245687e3d11a7f78feee94c02362a3459a302643b4ae99a278e0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / pyharmonica-0.0.1-py3-none-any.whl

Download URL pyharmonica-0.0.1-py3-none-any.whl
Size 56.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48b56db377b2c1c04e09051a1361b508f1d839b62ce81582cc1b54e4ed69a3a2
BLAKE2b-256 checksum
How to use checksums
86cccef74b6cbb30ae3949be96c9a9abc85285b9e01738415c04a9e0a154ba0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Security for pyHarmoniCA 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyharmonica-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page