Timebox: ~2 hours
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.
- 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 admissionsdata/NOTEEVENTS.csv— clinical note text for the same 1,000 admissionssmoking_findings_onlymodel pack (zip) — extract locally; do not commit to your repo
- Install MedCAT and apply it to the clinical text using the provided
smoking_findings_onlymodel pack, which is filtered to tobacco/smoking SNOMED CT concepts. - 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.
- 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
- Produce a ~3-page presentation covering what data you extracted, what tools you used, and what you found (including limitations).
- Record a short walkthrough (PowerPoint recording, Loom, or screenshare) presenting your 3-page presentation.
Submit the following:
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)
Send alongside the repo link a short recording (PowerPoint, Loom, or screenshare) walking through your thinking, approach, and results.
| 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 |
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.
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.
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
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.