Skip to content

CogStack/fde-tech-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

FDE Technical Task: Patient Smoking Status Extraction

Timebox: ~2 hours

Overview

Extract smoking status for each given patient from MIMIC-III data. Each patient may have smoking-related information spread across multiple sources (clinical notes, diagnosis codes, etc.). Your job is to work with the provided dataset, run NLP extraction with MedCAT, review outputs in MedCATtrainer, and present your findings.

This task exercises the CogStack clinical NLP stack:

Component Purpose
Provided MIMIC-IV subset Filtered cohort of ICD-9 diagnoses for 1,000 hospital admissions
MedCAT Named-entity recognition + linking (NER+L) — finds medical concepts in text and maps them to SNOMED-CT / UMLS
MedCATtrainer Web UI to load a model, inspect MedCAT annotations on a document, and familiarise yourself with the review workflow

Smoking status is the example phenotype. This is a simple but good example of a type of 'project' that our real clients typically use the platform to do.

We are not concerned with getting to exactly 'correct' smoking status per patient, but more in your working, how you approach the problem(s) and how you present your findings. Imagine you're presenting this work to real customer who wants to use this data to inform tobacco dependency advisors and for public health research.

Task steps

  1. Load the provided dataset — download from the Google Drive folder and place files as described in data/README.md.
    • data/DIAGNOSES_ICD_1000HADM_IDs.csv — ICD-9 rows for 1,000 admissions
    • data/NOTEEVENTS.csv — clinical note text for the same 1,000 admissions
    • smoking_findings_only model pack (zip) — extract locally; do not commit to your repo
  2. Install MedCAT and apply it to the clinical text using the provided smoking_findings_only model pack, which is filtered to tobacco/smoking SNOMED CT concepts.
  3. Install MedCATtrainer locally and follow the annotator guide:
    • Load the model and annotate at least one document.
    • You do not need to retrain or improve the model from your annotations.
  4. Produce smoking status per patient — write results to outputs/patient_smoking_status.csv. Remember to join with any smoking status codes also available in 'structured data'. Do not spend too much time on getting this result perfect or even that 'correct', but spend time understanding:
    • what it is currently getting right
    • where smoking status is missing, or getting things wrong or where are contradictions
    • what can be done to improve the overall extraction
  5. Produce a ~3-page presentation covering what data you extracted, what tools you used, and what you found (including limitations).
  6. Record a short walkthrough (PowerPoint recording, Loom, or screenshare) presenting your 3-page presentation.

Submission format

Submit the following:

1. GitHub repository (required)

Create a new public GitHub repo and include its URL in your submission.

The repo must contain:

  • Your code (scripts, notebooks, config)
  • A PDF of your presentation (presentation.pdf)
  • Output smoking status per patient (outputs/patient_smoking_status.csv)

The repo must not contain:

  • MedCAT model packs (including smoking_findings_only)
  • Raw MIMIC-IV source extracts or full note text dumps
  • Credentials (.env, passwords, API keys)

2. Short video recording (required)

Send alongside the repo link a short recording (PowerPoint, Loom, or screenshare) walking through your thinking, approach, and results.

Suggested output schema

Column Description
patient_id SUBJECT_ID from the provided data
smoking_status e.g. current, former, never, unknown
confidence (Optional) — your confidence or method used
source_doc_count (Optional) — number of documents / evidence sources
notes (Optional) — brief rationale or conflicting-evidence flag

Provided data & model

Download everything from the FDE Task Google Drive folder:

File Place in repo Description
DIAGNOSES_ICD_1000HADM_IDs.csv data/ ICD-9 diagnosis rows for 1,000 hospital admissions
NOTEEVENTS.csv data/ Clinical note events (raw text) for the same admissions
smoking_findings_only_a7554ffe6df0f97f.zip place in root of project folder or in ./models, no need to unzip MedCAT model pack filtered to tobacco/smoking SNOMED CT concepts

NOTEEVENTS.csv and DIAGNOSES_ICD_1000HADM_IDs.csv share the same 1,000 HADM_IDs. See data/README.md for column schemas.

Do not commit the model pack zip or extracted model files to your submission repo.

MedCAT

Docs: https://medcat.readthedocs.io/

Apply the downloaded smoking_findings_only model pack to the clinical note text to locate the smoking statuses from the text.

MedCATtrainer

Follow the official setup guide: https://medcattrainer.readthedocs.io/

Load the smoking_findings_only model pack, open a project, and annotate at least one document.

Try to get an understanding of where the model works, does not work and what can be done to improve the output.

If you're having issues running the Trainer locally, reach out with questions or queries to hiring@cogstack.org

Evaluation focus

Given the ~2-hour timebox, we are looking for:

  • Ability to work with a provided clinical dataset
  • Practical installation and use of MedCAT and MedCATtrainer
  • Sensible approach to a multi-source extraction problem
  • Clear communication of results, limitations, and next steps

Perfect accuracy is not the goal. Showing your reasoning matters more than production outputs.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors