Skip to content

[Social Work] - Enhance technical documentation#1705

Open
landonshumway-ia wants to merge 8 commits into
csg-org:mainfrom
InspiringApps:docs/sw-technical-documentation
Open

[Social Work] - Enhance technical documentation#1705
landonshumway-ia wants to merge 8 commits into
csg-org:mainfrom
InspiringApps:docs/sw-technical-documentation

Conversation

@landonshumway-ia

@landonshumway-ia landonshumway-ia commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

We received a request from the chair of the Social Work commission for further technical documentation. It was determined with @KbisonCSG to deliver technical documentation for the following elements of the request:

  • The Commission unique-identifier structure - RID and CUID identity management;
  • All-licensee data ingestion, including single-state licensees
  • MSL issuance and home-state confirmation, and remote-state Multistate Authorization to Practice
  • deactivation effects from adverse action processing
  • current significant investigative information
  • reissuance when a licensee changes home state, and one-home-state / one-active-MSL enforcement
  • automated notifications to the Commission and Member States
  • authenticated business-record auditability

This enhances our existing technical design documentation and ERD to cover these aspects of the system.

Closes #1702

Summary by CodeRabbit

  • Documentation
    • Expanded and clarified backend design documentation covering jurisdictions, user access terminology, license ingestion (including single-state licensees), privilege generation (home-state rules), notifications, investigations, and audit logging.
    • Updated provider data model documentation with revised provider identifier terminology and an added optional public-facing identifier concept (planned for CUID/UUID4).

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0a38b1fa-5221-4286-a72a-3fcfa3a3f851

📥 Commits

Reviewing files that changed from the base of the PR and between 33c9fb9 and de872fc.

📒 Files selected for processing (1)
  • backend/social-work-app/docs/design/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • backend/social-work-app/docs/design/README.md

📝 Walkthrough

Walkthrough

This PR updates backend design documentation to describe expanded system behavior: RID/CUID identifiers, provider data model changes, license ingestion for single-state licensees, home-state and privilege generation rules, adverse action and investigation effects, notification behavior, and audit logging distinctions.

Changes

Backend design documentation and ERD updates

Layer / File(s) Summary
Table of contents and navigation updates
backend/social-work-app/docs/design/README.md
TOC reordered and expanded to include Notifications, and supported-jurisdiction text was aligned with the authoritative mapping file.
User architecture and license ingestion
backend/social-work-app/docs/design/README.md
OAuth2/Cognito wording revised; new subsection added on single-state licensee ingestion, eligibility mismatch handling, and re-upload history writing.
Provider identifiers and data model
backend/social-work-app/docs/design/README.md, backend/social-work-app/docs/design/provider-data-model-erd.mmd
Practitioner/provider data model wording was updated; the ERD asset switched to SVG; providerId became a uuid in the ERD; planned publicCompactIdentifier notes were added; a RID/CUID subsection was introduced; and the OpenSearch note now includes publicCompactIdentifier.
Home-state selection and privilege generation
backend/social-work-app/docs/design/README.md
Documentation clarifies MSL issuance, home-state confirmation, privilege runtime generation, and home-state change effects and enforcement rules.
Adverse action, investigations, and notifications
backend/social-work-app/docs/design/README.md
Rewrite covering deactivation effects, investigation rules, and expanded notification paths and recipients.
Audit logging documentation
backend/social-work-app/docs/design/README.md
New subsection distinguishes CloudTrail auditing from application-level history attribution; surrounding audit overview text was adjusted.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: ChiefStief, jlkravitz

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lists scope and closes the issue, but it does not follow the required template sections. Add the required Requirements List, Description List, and Testing List sections, and include the template's testing and review details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main change: enhanced Social Work technical documentation.
Linked Issues check ✅ Passed The docs updates cover the requested technical behaviors for RID/CUID, ingestion, MSL, notifications, investigations, and auditability.
Out of Scope Changes check ✅ Passed The changes stay within documentation and ERD updates and do not introduce unrelated code or scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
backend/social-work-app/docs/design/README.md (1)

438-496: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the home-state rule internally consistent.

Lines 438-443 require an active/eligible paired single-state license before a multi-state license can become home, but lines 491-496 say the newest paired MSL wins even if it is inactive or ineligible. Those rules conflict; please split “selection” from “privilege generation” or tighten the wording so readers can tell which check actually governs behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/social-work-app/docs/design/README.md` around lines 438 - 496, The
home-state wording is inconsistent because one section says a paired multi-state
license must be active and eligible to become home, while the later
“One-home-state-per-license-type enforcement” says the newest paired MSL always
wins even if inactive or ineligible. Update the README to clearly separate
home-license selection in the ingest/home-state flow from privilege generation
in the runtime section, using the existing headings like Privilege Runtime
Generation for Multi-State Licenses and Home State Changes to make it explicit
which rule applies where. Tighten the selection language so the home-state rule
matches the actual behavior, and leave the eligibility requirement only for
generating privileges.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/social-work-app/docs/design/provider-data-model-erd.mmd`:
- Around line 11-12: `PROVIDER.providerId` is now defined as `uuid`, but related
ERD entities still declare the same field as `string`, creating an inconsistent
contract across the diagram. Update the `providerId` field type in the affected
entity definitions (`LICENSE`, `LICENSE_UPDATE`, `PROVIDER_UPDATE`,
`ADVERSE_ACTION`, `INVESTIGATION`, and `PRIVILEGE`) to match
`PROVIDER.providerId`, and verify the corresponding entity symbols stay aligned
everywhere the field is shown. If any relationship is intentionally different,
add an explicit note in the ERD near the affected entity name to make the
exception clear.

In `@backend/social-work-app/docs/design/README.md`:
- Line 125: Update the README summary for the re-upload behavior so it matches
the full `licenseUpdate` schema used elsewhere. In the description tied to the
existing license record update flow, expand the categorized history record types
beyond `renewal`, `deactivation`, and `other` to also include encumbrance,
investigation, and home-jurisdiction-change updates, using the same
`licenseUpdate` terminology as the record schema.
- Around line 347-358: The CUID issuance flow in the ingest design needs to be
constrained to eligible multistate licenses, not every multi-state upload.
Update the description around ingest.py and publicCompactIdentifier so it
explicitly says the handler must first verify the license qualifies for
multistate authorization before generating the CUID, and only then write it to
the Provider Record; keep the “generate once if unset” behavior tied to that
eligibility check.

---

Outside diff comments:
In `@backend/social-work-app/docs/design/README.md`:
- Around line 438-496: The home-state wording is inconsistent because one
section says a paired multi-state license must be active and eligible to become
home, while the later “One-home-state-per-license-type enforcement” says the
newest paired MSL always wins even if inactive or ineligible. Update the README
to clearly separate home-license selection in the ingest/home-state flow from
privilege generation in the runtime section, using the existing headings like
Privilege Runtime Generation for Multi-State Licenses and Home State Changes to
make it explicit which rule applies where. Tighten the selection language so the
home-state rule matches the actual behavior, and leave the eligibility
requirement only for generating privileges.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8f7cc88c-f79a-4cca-9378-f498db26be52

📥 Commits

Reviewing files that changed from the base of the PR and between a7d8d07 and 7167acc.

⛔ Files ignored due to path filters (3)
  • backend/social-work-app/docs/design/provider-data-model-erd.png is excluded by !**/*.png
  • backend/social-work-app/docs/design/provider-data-model-erd.svg is excluded by !**/*.svg
  • backend/social-work-app/docs/design/users-arch-diagram.pdf is excluded by !**/*.pdf
📒 Files selected for processing (2)
  • backend/social-work-app/docs/design/README.md
  • backend/social-work-app/docs/design/provider-data-model-erd.mmd

Comment thread backend/social-work-app/docs/design/provider-data-model-erd.mmd Outdated
Comment thread backend/social-work-app/docs/design/README.md
Comment thread backend/social-work-app/docs/design/README.md Outdated
@landonshumway-ia

Copy link
Copy Markdown
Collaborator Author

@jlkravitz This is now ready for your review. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Social Work - Enhance technical documentation to describe behavior of various system components

1 participant