Commit a126320
ICD-10 microservice, Docker stack, and CI improvements (#25)
# TLDR;
- New ICD-10 API + CLI microservice with semantic search via
pgvector/embeddings
- Docker Compose stack for running all healthcare samples together
- CI: added ICD-10 and Docker build jobs, Postgres service containers
for gatekeeper/samples jobs
- Clinical and Scheduling queries migrated from raw SQL to LQL
- Claude Code skills added for common dev workflows
- Dashboard: new ICD-10 clinical coding UI page
# Brief Details
**ICD-10 microservice** (`Samples/ICD10/`): Full ICD-10-AM/ACHI code
lookup API backed by PostgreSQL with pgvector. Includes a Python
embedding service (`embedding-service/`) using MedEmbed for semantic RAG
search, an import pipeline (`scripts/CreateDb/`) to seed codes and
generate embeddings, and an interactive CLI (`ICD10.Cli/`).
**Docker stack** (`Samples/docker/`): `docker-compose.yml` +
`Dockerfile.app`/`Dockerfile.dashboard` + `nginx.conf` for running
Clinical, Scheduling, ICD-10, Gatekeeper, Embedding Service, and
Dashboard behind a single compose stack. Scripts reorganised under
`Samples/scripts/`.
**CI** (`.github/workflows/ci.yml`): Added `icd10-tests` job (pgvector
Postgres + embedded Docker embedding service); `docker-build` job
(validates app and dashboard container builds); Postgres service
containers added to `gatekeeper-tests` and `sample-api-tests`;
`Dashboard.Web.Tests` removed from sample matrix (replaced by
`Dashboard.Integration.Tests`).
**LQL migrations**: Clinical and Scheduling `.sql` queries replaced with
equivalent `.lql` files; `filter_like` operator added to LQL grammar and
tested across SQLite, Postgres, and SQL Server.
**Dashboard** (`Dashboard.Web/`): `ClinicalCodingPage.cs` (1500+ lines)
adds ICD-10 code browsing/search UI; `ApiClient.cs` centralises HTTP
calls; new `Icons.cs` and CSS components.
**Tooling**: 7 Claude Code skills added under `.claude/skills/`;
`tasks.json` reorganised with labelled groups; `CLAUDE.md` updated with
clearer rules.
# How Do The Tests Prove This Works?
**`Samples/ICD10/ICD10.Api.Tests/`** (new, ~2300 LOC):
- `HealthEndpointTests` – asserts the `/health` endpoint returns 200 and
a healthy status, confirming the API boots and DB migrations ran.
- `ChapterEndpointTests` / `ChapterCategoryTests` – seed specific
chapters/blocks/categories, then assert the hierarchy endpoints return
the correct counts and codes, proving the schema and queries are
correct.
- `CodeLookupTests` – look up codes by exact code string, assert
properties like description and billability; verifies
`GetCodeByCode.lql` and the generated extension methods.
- `SearchEndpointTests` – full-text and semantic search against seeded
codes; asserts result ordering and relevance, exercising the pgvector
cosine-similarity path in `SearchIcd10Codes.sql`.
- `AchiEndpointTests` – same pattern for ACHI surgical codes including
block/chapter hierarchy.
**`Samples/ICD10/ICD10.Cli.Tests/CliE2ETests.cs`** (new, ~1170 LOC):
- Launches the real CLI against a live test database and sends commands;
asserts parsed output matches expected codes. Proves the CLI correctly
calls the API and formats responses.
**`Samples/Dashboard/Dashboard.Integration.Tests/Icd10E2ETests.cs`**
(new, ~588 LOC):
- Playwright E2E test that opens the Dashboard, navigates to Clinical
Coding, searches for ICD-10 codes, and asserts expected codes appear in
the UI. Proves the full front-to-back flow: Dashboard → ICD10 API →
Postgres.
**`Lql/Lql.Tests/LqlFileBasedTests.BasicOperations.cs`**:
- `filter_like` test case added with expected SQL output for all three
DB targets (`SQLite/filter_like.sql`, `PostgreSql/filter_like.sql`,
`SqlServer/filter_like.sql`), proving the new grammar rule transpiles
correctly and platform-independently.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a7f61a5 commit a126320
277 files changed
Lines changed: 47279 additions & 40983 deletions
File tree
- .claude/skills
- build
- container-logs
- format
- migrate
- run-samples
- submit-pr
- test
- .config
- .github/workflows
- .vscode
- DataProvider
- DataProvider.Example.FSharp
- DataProvider.Example.Tests
- DataProvider.Example
- DataProvider.Postgres.Cli
- DataProvider.SQLite.Cli
- DataProvider.SQLite.FSharp
- DataProvider.SQLite
- CodeGeneration
- DataProvider.Tests
- DataProvider/CodeGeneration
- Gatekeeper
- Gatekeeper.Api.Tests
- Gatekeeper.Api
- Properties
- Sql
- Lql
- Lql.Browser
- Lql.Postgres
- Lql.Tests
- TestData
- ExpectedSql
- PostgreSql
- SQLite
- SqlServer
- Lql
- Lql.TypeProvider.FSharp.Tests.Data
- Lql.TypeProvider.FSharp.Tests
- Lql.TypeProvider.FSharp
- LqlCli.SQLite
- LqlWebsite
- Lql
- Parsing
- Migration
- Migration.Cli
- Migration.Postgres
- Migration.SQLite
- Migration.Tests
- Migration
- Samples
- Clinical
- Clinical.Api.Tests
- Clinical.Api
- Properties
- Queries
- Clinical.Sync
- Dashboard
- Dashboard.Integration.Tests
- Dashboard.Web.Tests.Runner
- Dashboard.Web.Tests
- .config
- TestData
- TestLib
- Tests
- wwwroot
- Dashboard.Web
- .config
- Api
- Components
- Models
- Pages
- React
- wwwroot
- css
- ICD10
- ICD10.Api.Tests
- ICD10.Api
- Properties
- Queries
- Vocabularies
- ICD10.Cli.Tests
- ICD10.Cli
- embedding-service
- scripts
- CreateDb
- Dependencies
- Scheduling
- Scheduling.Api.Tests
- Scheduling.Api
- Properties
- Queries
- Scheduling.Sync
- docker
- init-db
- scripts
- Sync
- Sync.Http.Tests
- Sync.Http
- Sync.Integration.Tests
- Sync.Postgres.Tests
- Sync.Postgres
- Sync.SQLite.Tests
- Sync.SQLite
- Sync.Tests
- Sync
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments