Skip to content

feat(api): implement encounter domain API and persistence (CYN-51) - #34

Merged
SiddharthaGF merged 3 commits into
mainfrom
pablosantiago/cyn-51-implement-encounter-domain-api-and-persistence
Aug 5, 2026
Merged

feat(api): implement encounter domain API and persistence (CYN-51)#34
SiddharthaGF merged 3 commits into
mainfrom
pablosantiago/cyn-51-implement-encounter-domain-api-and-persistence

Conversation

@SiddharthaGF

Copy link
Copy Markdown
Owner

Summary

  • Add tenant-scoped encounter aggregate with create, detail, list, and terminal transitions (complete / cancel / enter-in-error)
  • Enforce hospital isolation, reject retired/cross-tenant references, emit audit events, and honor optimistic concurrency
  • Keep completed, canceled, and entered-in-error encounters historically queryable; cover valid, invalid, stale, and cross-tenant paths in tests

Test plan

  • dotnet cake --target=Check (format + lint + tests)
  • Create encounter with patient + facility + clinical area → 201, status=open, encounter.created audit
  • Complete / cancel / enter-in-error from open → terminal status + endedAt; second transition → 409
  • Stale rowVersion on transition → 409 concurrency conflict
  • Retired facility or cross-tenant patient reference → 409 / 404
  • List/get still returns completed and entered-in-error encounters

Linear:

Add tenant-scoped encounter lifecycle with create, list, detail, and
terminal transitions, including audit, concurrency, and integration tests.
Suppress S5122 on maquette CORS so FormatCheck (severity=warn) can pass.
@SiddharthaGF
SiddharthaGF temporarily deployed to pablosantiago/cyn-51-implement-encounter-domain-api-and-persistence - cynara-api PR #34 August 5, 2026 22:33 — with Render Destroyed
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Neon branch ready.

Support page/pageSize with totalCount, and match diacritic-folded
name tokens across the full normalized name.
Also apply IDE0001 CultureInfo usings left by format-staged.
@SiddharthaGF
SiddharthaGF temporarily deployed to pablosantiago/cyn-51-implement-encounter-domain-api-and-persistence - cynara-api PR #34 August 5, 2026 23:16 — with Render Destroyed
@SiddharthaGF
SiddharthaGF merged commit 61c7b15 into main Aug 5, 2026
4 checks passed
@SiddharthaGF
SiddharthaGF deleted the pablosantiago/cyn-51-implement-encounter-domain-api-and-persistence branch August 5, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant