# schemas/samples/data/ — real-payload test data The files in this directory are **not** wire-format examples (those live one level up — `samples/*.json` for canonical envelope shapes, `samples/failing/` for negative examples). These are **realistic case data** — the actual SPIGES XML payloads + BFS .dat dumps you can feed through your integration end-to-end without making up your own test fixtures. Same data we use internally on the CodingUI public test page and the installer's sample SPIGES bundle, copied here so partners get them in the same portal section as the schemas. CI populates this directory at build time from the canonical sources (`KodeMed.CodingUI/public/` + `installer/samples/`); the files are NOT separately tracked in git, so they cannot silently drift from the originals. ## Files | File | Source | Shape | Use case | |---|---|---|---| | `sample-spiges.xml` | `installer/samples/sample-spiges.xml` | SPIGES 1.4 / 1.5, 3 cases | Minimal demo, fits on one screen. The "Sample SpiGes" button in `KodeMed.Test.UI/MainForm.cs` loads this. | | `test-data-full.xml` | `KodeMed.CodingUI/public/test-data-full.xml` | SPIGES 1.5, 4 realistic Swiss cases | The "Load realistic test data" link on the CodingUI public landing page (`/` while not signed in). All codes valid ICD-10-GM (CH) + CHOP for 2026. Use this as the wire payload for a full end-to-end Apply → webhook → grouping check. | | `test-data-anonymized.bfs.dat` | `KodeMed.CodingUI/public/test-bfs-anonym.dat` | BFS pipe-delimited (MX/MB/MD lines) | The BFS-format equivalent of the realistic dataset. Pipe through the `BfsTransformer` (or set `format=bfs` on REST) to exercise the BFS reader. Validates the `KodeMed.Interface/Transformers/BfsTransformer.cs` path. | | `session-create-request.json` | This directory | JSON wrapper around `sample-spiges.xml` | A complete `POST /api/v1/coding/session` REQUEST BODY ready to `curl` against your KodeMed deployment. Canonical wire shape — validates against `schemas/his_rest/SessionCreate-1.0.schema.json` (R6 round-trip on every CI build). | ## Try it end-to-end ```bash # 1. POST the realistic request body curl -X POST https://server.kodemed.ch/api/v1/coding/session \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d @session-create-request.json # 2. Open the redirectUrl from the response in your iframe / browser # 3. After Apply, retrieve the coded SPIGES + grouping result: curl https://server.kodemed.ch/api/v1/coding/session//result/data \ -H "Authorization: Bearer " ``` The webhook receiver (if configured on your `IntegrationProfile`) will also receive a body that validates against `schemas/his_rest/WebhookPayload-1.0.schema.json` — see `schemas/samples/webhook-payload.json` for the expected webhook shape.