Skip to content

Instantly share code, notes, and snippets.

@stabgan
stabgan / Renal replacement therapy.md
Created June 19, 2025 17:13
RRT using ontologies

Generating a Comprehensive, Multi-Modal, Ontology-Driven Value Set for Renal Replacement Therapy (RRT) Identification in Critical Care Databases

Introduction and Strategic Overview

This document outlines a comprehensive, multi-modal strategy for the creation of a definitive value set to identify all instances of Renal Replacement Therapy (RRT) within the MIMIC-IV and eICU-CRD databases. The accurate and exhaustive identification of RRT is paramount for the integrity of the Sepsis-Associated Acute Kidney Injury (SA-AKI) cohort, where the initiation of RRT within the first 24 hours of ICU admission is a critical exclusion criterion that fundamentally alters the natural history of the disease.

The primary challenge in this task is the fragmented nature of RRT evidence in electronic health records (EHRs). RRT is not documented in a single, standardized field but is scattered across disparate data sources, including procedure records, charted machine parameters, specific fluid and medication inputs

@stabgan
stabgan / Vasopressor medication.md
Created June 19, 2025 17:11
Extracting vassopressors using ontologies

A Comprehensive, Ontology-Driven Strategy for Vasopressor and Inotrope Value Set Generation

Introduction: The Imperative for an Ontology-Driven Value Set

The accurate calculation of the Sequential Organ Failure Assessment (SOFA) score is a cornerstone of modern critical care research, particularly in defining cohorts for conditions like sepsis-associated acute kidney injury (SA-AKI). A critical and often challenging component of this score is the cardiovascular assessment, which quantifies the level of pharmacological support required to maintain hemodynamic stability. The reliance on a manually curated, hardcoded list of vasopressor and inotrope medications to identify these interventions is scientifically untenable. Such static lists are inherently fragile; they are prone to omissions, fail to account for the continuous introduction of new drug formulations and brand names, and lack the fundamental scientific principles of transparency and reproducibility.1 An incomplete value set directly le

@stabgan
stabgan / antibiotic.md
Created June 19, 2025 17:10
Use ontologies to extract antibiotic

A Multi-Ontology Strategy for the Generation of a Systemic Antibiotic Value Set for Sepsis Cohort Identification

Executive Summary

The accurate identification of a sepsis cohort from electronic health record (EHR) data is critically dependent on the ability to comprehensively detect all instances of systemic antibiotic administration. Relying on small, hardcoded lists of common antibiotics is a methodologically flawed approach that leads to under-ascertainment and significant selection bias, thereby compromising the scientific validity of the research. This report outlines a robust, reproducible, and exhaustive strategy for programmatically generating a definitive value set for systemic antibiotic medications. By leveraging the rich semantic structures and relational data within multiple standard ontologies—including the Anatomical Therapeutic Chemical (ATC) classification, RxNorm, SNOMED CT, and the Unified Medical Language System (UMLS)—this multi-modal approach transcends simple lexical sear

@stabgan
stabgan / saaki.md
Created June 18, 2025 17:57
Extract Sepsis Associated AKI cohort from MIMIC and eICU

A Comprehensive Framework for Sepsis-Associated Acute Kidney Injury (SA-AKI) Cohort Extraction and Staging from MIMIC-IV and eICU-CRD Databases

I. Executive Summary

Sepsis-Associated Acute Kidney Injury (SA-AKI) represents a formidable clinical challenge within intensive care, profoundly increasing patient mortality and long-term morbidity.1 The accurate and reproducible identification of this specific patient cohort is a foundational step for developing effective predictive models and advancing clinical research in critical care. This report delineates a rigorous, ontology-driven methodology for defining SA-AKI patient cohorts within two prominent critical care databases: MIMIC-IV v3.1 and eICU-CRD. The framework integrates internationally recognized clinical criteria for sepsis and acute kidney injury with advanced data mapping techniques, ensuring high data fidelity and reproducibility across these heterogeneous electronic health record (EHR) systems. The ultimate output includes the SQL D

@stabgan
stabgan / Software Engineering DR.md
Last active April 8, 2025 10:12
OpenAi Deep Research on software engineering and system desing
@stabgan
stabgan / 3col_heart.ipynb
Created January 31, 2021 10:15
3col_heart.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stabgan
stabgan / index.html
Created June 17, 2019 13:24
JSON API testing
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>JSON JavaScript Course</title>
</head>
<body>
<div id="addButton">Get User</div>
@stabgan
stabgan / dodger.js
Created June 14, 2019 08:13
Javascript dodger browser game
const DODGER = document.getElementById('dodger')
const GAME = document.getElementById('game')
const GAME_HEIGHT = 400
const GAME_WIDTH = 400
const LEFT_ARROW = 37 // use e.which!
const RIGHT_ARROW = 39 // use e.which!
const START = document.getElementById('start')
const ROCKS = []
var SCORE = 0
@stabgan
stabgan / check.py
Created June 13, 2019 08:09
Checking condition in an infinitely nested loop with BFA search , implemented in python
a = [[1,2,[3,4,5]],6,[7,[8,9,10,[11,12,13]]]]
def qq(a) :
current = a
next = []
while (current or current == 0) :
if(type(current) is int and current > 7) :
return current
@stabgan
stabgan / pca.ipynb
Created October 12, 2018 13:22
pca
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.