Skip to content

Instantly share code, notes, and snippets.

View niquola's full-sized avatar

Nikolai Ryzhikov niquola

View GitHub Profile
@niquola
niquola / wsjet-ru.md
Last active April 4, 2026 18:02
Wsjet: гипермедиа-виджеты для взаимодействия агента и человека

Wsjet: гипермедиа-виджеты для агентных воркспейсов

TL;DR

Агент создаёт скрипт → в UI появляется ⚡ виджет → пользователь взаимодействует → всё в браузере, без серверов. Скрипт на любом языке, который говорит HTML через stdout. CGI 2026.

Архитектура

graph TB
@niquola
niquola / wsjet.md
Last active April 4, 2026 14:12
Wsjet: CGI-style widgets for agentic workspaces

Wsjet: Hypermedia Widgets for Human-Agent Collaboration

The Insight

In agentic workflows, communication between human and AI is mostly text — chat messages back and forth. But many interactions are better served by structured UI: a form to fill, a table to review, a dashboard to monitor, a diff to approve.

What if the agent could create UI as easily as it creates files?

What is Wsjet?

@niquola
niquola / cql-to-omop.md
Last active March 27, 2026 11:58
Translating CQL to OMOP CDM SQL: Chlamydia Screening Measure (CMS153)

Translating CQL to OMOP CDM SQL: Chlamydia Screening (CMS153)

This document demonstrates how Clinical Quality Language (CQL) artifacts — both quality measures (CQM) and clinical decision support (CDS) — can be expressed as SQL against the OMOP Common Data Model.

The example uses two versions of the same clinical logic: the Chlamydia Screening for Women measure (CMS153 / NQF0033).


@niquola
niquola / SKILL.md
Last active March 23, 2026 10:34
OMOP CDM Knowledge Graph — Claude Code skill (omop-kg)
name omop-kg
description OMOP CDM Knowledge Graph — ontology of 643 canonical concepts, 1067 relationships, 1099 doc chunks with embeddings. Extracted from CommonDataModel docs + The Book of OHDSI. Use when user asks about OMOP CDM tables, fields, concepts, ETL, cohorts, vocabularies, or needs to search OMOP documentation.
allowed-tools Bash(curl *https://omop-kg.apki.dev*)

OMOP CDM Knowledge Graph

643 canonical concepts, 1057 raw extractions, 1067 canonical relationships, 1099 chunks, 66 pages, 1666 embeddings.

@niquola
niquola / additional-resources-full-report.md
Last active March 19, 2026 15:23
FHIR Additional Resources: Knowledge Graph vs Web Search Evaluation

FHIR Additional Resources: Comprehensive Report

1. What Are Additional Resources?

Additional Resources is a formal extensibility mechanism introduced in FHIR R6 that allows new resource types to be defined outside the core FHIR specification while still functioning as first-class FHIR resources. They are defined in Implementation Guides (called "Incubator IGs"), published on their own release cycles, and are expected to eventually migrate back into the core specification once stable.

The mechanism exists because R6 is the first fully normative FHIR release — once published, no breaking changes are allowed. Resources that are still immature (FMM 0-2) cannot be frozen normatively, so they need an alternative development pathway.

"Our market feedback is very strong that further change to the FHIR resources is getting very expensive, and one of the few incentives for the market to move to R6 is stability." — Grahame Grieve, FMG communication to committees (Aug 2025)

Сравнение двух описаний SMART on FHIR

Сравнение файлов smart-on-fhir.md (оригинал, основан на спецификации) и smart-on-fhir-detailed.md (обзорный, основан на знаниях модели).

Общая характеристика

smart-on-fhir.md (оригинал) smart-on-fhir-detailed.md (обзорный)
Объём ~450 строк ~380 строк
Разделов 14 15
@niquola
niquola / Consent_based_healthcare_data_export_review.md
Created March 16, 2026 14:23
Consent based healthcare data export review

Обзор подходов к структурно-семантическому RAG на базе графов знаний и онтологий

Обычный RAG хорошо решает поиск близких фрагментов текста, но плохо держит связи между сущностями, документами и шагами рассуждения. Поэтому в инженерной практике все чаще строят не только векторный индекс, но и структурированный слой знаний: граф сущностей, граф чанков, онтологию домена или гибрид этих представлений. Этот сдвиг не отменяет классический RAG [Lew20]. Он добавляет к нему явную память о связях, типах и путях, что особенно важно для многошаговых запросов, обзорных вопросов по корпусу и доменных систем, где важны точность и трассируемость [Edg24, Gut24, Zhu25, Wu25].

Литература показывает, что GraphRAG не является одной техникой. Это семейство систем с разными инженерными целями. Одни строят граф поверх самих документов и чанков, чтобы улучшить навигацию по корпусу [Edg24, Guo24, Zhu25, Xia24]. Другие подключают внешний граф знаний или доменную онтологию, чтобы опереться на уже нормализованные сущности и отношени

@niquola
niquola / approach.md
Last active March 14, 2026 20:58
ER Physician Scheduling: Algorithm & Literature Review (110 references). Finnish healthcare context (Työaikalaki, SOTE, Lääkärisopimus).

Подход к расписанию ER: финальная формулировка

Одним абзацем

Система — дизайнер паттернов. Она генерирует набор совместимых паттернов ротации (общих и персональных) на конкретный квартал, с учётом покрытия, отпусков, праздников, болезней (статистически), предпочтений и резервов. Верифицирует что всё сходится по каждой неделе. Потом врачи разбирают заготовки — выбирают паттерн и отпуск, получают расписание. Система не составляет расписание — она проектирует паттерны из которых расписание собирается автоматически.


Две фазы

@niquola
niquola / c2c.ts
Last active March 13, 2026 16:32
Claude Code vs Codex CLI: Session JSONL Format Comparison
#!/usr/bin/env bun
/**
* Convert session JSONL between Claude Code and Codex CLI formats.
*
* Usage:
* bun c2c.ts claude2codex <input.jsonl> [output.jsonl]
* bun c2c.ts codex2claude <input.jsonl> [output.jsonl]
* bun c2c.ts claude2codex # interactive session picker
* bun c2c.ts codex2claude # interactive session picker
*/