Skip to content

Instantly share code, notes, and snippets.

View niquola's full-sized avatar

Nikolai Ryzhikov niquola

View GitHub Profile
@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
*/
@niquola
niquola / 1-spec.md
Last active May 6, 2026 14:08
Agent Relay Protocol - Draft Spec

Agent Relay Protocol

Статус: Draft Дата: 2026-03-07


1. Problem Statement

Агенты всё чаще работают не в изоляции, а вместе с людьми — в общем коде, общих документах, общих задачах. Индустрия уже построила работающие продукты: Devin, GitHub Copilot coding agent, Cursor Cloud Agents, Factory Droids, Replit Agent. Каждый из них реализует один и тот же паттерн — shared human/agent workspace — но делает это по-своему, с проприетарными API и закрытыми моделями.

@niquola
niquola / hl7v2-mapping-prep.md
Created March 6, 2026 12:23
HL7v2 Mapping Preparation — data-driven methodology for v2-to-FHIR mappings

HL7v2 Mapping Preparation — Methodology

A data-driven methodology for preparing HL7v2-to-FHIR mappings. Core principle: look at the data first, then read the spec.

Input

  • Directory with raw HL7v2 messages (.txt / .hl7)
  • Target: FHIR R4
@niquola
niquola / final-report.md
Last active March 3, 2026 06:53
Consilium: bun-tsx-server-library deliberation — round summaries & final report

Consilium Report: Minimalistic Bun TSX SSR Library

Problem

Design and implement a minimalistic single-file library for building simple web apps with Bun using server-side TSX rendering — a lightweight JSX-to-HTML rendering layer that works with Bun.serve(), kept as small and simple as possible.

Idea Provenance

Idea Proposed (R1) Adopted (R2) Defended/Yielded (R3) Final Status
@niquola
niquola / db.ts
Created March 1, 2026 12:48
PostgreSQL database tool — migrations, CRUD, type generation, psql wrapper. Single file, zero deps, Bun runtime.
// PostgreSQL database tool — migrations & SQL CLI, single file, zero dependencies, Bun runtime.
//
// Env:
// DATABASE_URL (required) — PostgreSQL connection string.
// Loaded automatically by Bun from .env file in project root.
// Example .env:
// DATABASE_URL=postgres://user:pass@localhost:5432/mydb
//
// CLI (default = dev, --test = test database):
// bun src/db.ts [--test] up [count] — apply pending migrations