Skip to content

feat(documents): bind form responses to clinical document instances (CYN-39) - #35

Merged
SiddharthaGF merged 4 commits into
mainfrom
pablosantiago/cyn-39-bind-form-responses-to-clinical-document-instances
Aug 6, 2026
Merged

feat(documents): bind form responses to clinical document instances (CYN-39)#35
SiddharthaGF merged 4 commits into
mainfrom
pablosantiago/cyn-39-bind-form-responses-to-clinical-document-instances

Conversation

@SiddharthaGF

@SiddharthaGF SiddharthaGF commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add tenant-scoped clinical document aggregate that binds a form response to a patient and encounter (start, detail, list)
  • Enforce active catalog definition, open encounter, exact published form-version pinning, actor attribution, and the single/multiple-instance policy per encounter
  • Emit document.started audit events and commit the bound draft form response plus its first revision in the same unit-of-work transaction

Test plan

  • dotnet cake --target=Check (format + lint + tests) — 293 tests, 0 warnings
  • Start document for open encounter + active definition → 201, status=inProgress, bound draft response at the pinned published version, document.started audit
  • Duplicate start for a single-instance catalog entry → 409; second start allowed when allowsMultipleInstancesPerEncounter
  • Retired definition or non-open encounter → 409; unknown or cross-tenant references → 404
  • Missing actor on a catalog entry that requires one → 400

Linear:

Sonar cleanup (same branch)

  • refactor(documents): resolve reference checks via dedicated resolver — S107 on ClinicalDocumentService (9→7 ctor params) via new IClinicalDocumentReferenceResolver port + Application impl
  • refactor(patients): group search filters into PatientSearchQuery — S107 on PatientsController.SearchAsync
  • chore(api): pragma-suppress deliberate allow-any CORS (S5122) with justification
  • Verified: dotnet cake --target=Check green (293 tests, 0 warnings); SonarScan reports 0 unresolved issues

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Neon branch ready.

@SiddharthaGF
SiddharthaGF temporarily deployed to pablosantiago/cyn-39-bind-form-responses-to-clinical-document-instances - cynara-api PR #35 August 6, 2026 01:42 — with Render Destroyed
@SiddharthaGF
SiddharthaGF merged commit 757d045 into main Aug 6, 2026
4 checks passed
@SiddharthaGF
SiddharthaGF deleted the pablosantiago/cyn-39-bind-form-responses-to-clinical-document-instances branch August 6, 2026 01:47
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