Skip to content

Update docs to reflect licenseNumber field as required#1231

Merged
isabeleliassen merged 5 commits intocsg-org:mainfrom
InspiringApps:docs/required-license-number
Dec 29, 2025
Merged

Update docs to reflect licenseNumber field as required#1231
isabeleliassen merged 5 commits intocsg-org:mainfrom
InspiringApps:docs/required-license-number

Conversation

@landonshumway-ia
Copy link
Collaborator

@landonshumway-ia landonshumway-ia commented Dec 15, 2025

Previously, we were asked to allow the licenseNumber field to be optional. The system was launched with that field set as optional. We have been asked to document that this field is required by compact rule, and the license number field should be included in every license upload. Although we cannot change the API spec to force this field to be required as this would be a breaking change to the states that are already live, we have been asked to update the documentation to reflect this compact rule requirement so that new onboarding states will be aware the compacts expect license numbers to always be present with every license uploaded into the system.

Closes #1182

Summary by CodeRabbit

  • Documentation
    • Added an OTCC‑mandated "licenseNumber" field to the public data documentation (marked as required by OTCC but not enforced by the API).
    • Updated CSV examples to include the new licenseNumber column with sample value "OT12345" positioned between homeAddressStreet2 and middleName.
    • Clarified guidance on handling missing required fields to reflect the API non‑enforcement.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Warning

Rate limit exceeded

@landonshumway-ia has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 51 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 30ea58c and 0022d1c.

📒 Files selected for processing (1)
  • backend/compact-connect/docs/README.md (2 hunks)

Walkthrough

Added OTCC-mandated licenseNumber** to the CSV schema in backend/compact-connect/docs/README.md; field descriptions, CSV header, example rows, and narrative updated to show the new column (required by OTCC but not enforced by the API).

Changes

Cohort / File(s) Summary
Docs: CSV schema & examples
backend/compact-connect/docs/README.md
Inserted licenseNumber** into the Field Descriptions table (noted as OTCC-required, not API-enforced). Updated CSV header and example rows to include licenseNumber** between homeAddressStreet2 and middleName (example value OT12345), and adjusted missing-field examples and related narrative accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single documentation file; textual edits and example alignment.
  • Review focus: placement of licenseNumber**, clear OTCC vs API enforcement wording, and CSV example formatting.

Suggested reviewers

  • jlkravitz
  • isabeleliassen
  • jusdino

Poem

🐰 I hopped through docs with a pen so bright,
A license slipped in between street and name tonight,
OT12345 snug in row and line,
The compact calls — I made it shine,
A tiny hop to keep the schema right.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description explains the context and rationale well, but does not follow the repository's required template structure with explicit Requirements, Description, and Testing sections. Reorganize the description to match the template: separate Requirements List, Description List, and Testing List sections. Include testing commands and specify what was changed in the documentation.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: updating documentation to reflect that licenseNumber is a required field per compact rules.
Linked Issues check ✅ Passed The changes directly address the requirement in issue #1182 by updating documentation to indicate that licenseNumber is required per compact rule, with examples showing the field in CSV examples.
Out of Scope Changes check ✅ Passed All changes are scoped to documentation updates reflecting licenseNumber as required per compact rule, with no unrelated modifications to code or API specifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (1)
backend/compact-connect/docs/README.md (1)

38-40: Clarify the distinction between * and ** notation in the field descriptions table.

The table header explains that asterisk marks required fields, but doesn't distinguish between API-enforced required fields (*) and OTCC-mandated fields (**) that aren't API-enforced. This distinction is critical for state integration and compliance understanding.

Suggest updating the explanation to:

 The following table describes all available fields for the license CSV file. Required fields are marked with an asterisk
-(*). Note that our API does not accept `NULL` values - if some of your licenses have no value for an optional field,
-leave the field entirely empty. If some of your licenses are missing a required field, those licenses will be rejected.
+(*) or double asterisk (**). Fields marked with * are enforced by the API; fields marked with ** are required by OTCC
+compact rule but not API-enforced—states are responsible for enforcing these. Note that our API does not accept `NULL`
+values - if some of your licenses have no value for an optional field, leave the field entirely empty. If some of your
+licenses are missing an API-required field (*), those licenses will be rejected.
🧹 Nitpick comments (1)
backend/compact-connect/docs/README.md (1)

94-102: Consider adding clarity to the "missing optional fields" example.

The example at line 101 shows licenseNumber with data while optional fields are empty. Since licenseNumber is now required (marked with **), readers might benefit from explicit guidance in this section clarifying that required fields must always be present even when optional fields are missing.

Consider updating the section introduction (line 94-96) to clarify:

 If data is not available for an optional field, it must be left empty in the case of CSV data (or omit the CSV column entirely if none of the license records contain that field). In the case of JSON uploads, the key must be excluded from the object. Please do not include NULL or similar N/A type values for missing data.

+Note that required fields (marked with * or **) must always include data—they cannot be left empty. The example below shows optional fields omitted while all required fields are present.
+
 **CSV Example with missing optional fields:**
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e3c161 and 4f334dc.

📒 Files selected for processing (1)
  • backend/compact-connect/docs/README.md (2 hunks)
🧰 Additional context used
🧠 Learnings (11)
📓 Common learnings
Learnt from: jsandoval81
Repo: csg-org/CompactConnect PR: 1019
File: webroot/src/network/licenseApi/data.api.ts:256-276
Timestamp: 2025-08-19T19:39:47.790Z
Learning: The backend API for CompactConnect will accept and require the new `encumbranceType` field in encumbrance requests, even though this field may not appear in the current (incomplete) API documentation.
📚 Learning: 2025-08-21T19:17:21.038Z
Learnt from: rmolinares
Repo: csg-org/CompactConnect PR: 1025
File: webroot/src/models/Licensee/Licensee.model.ts:276-312
Timestamp: 2025-08-21T19:17:21.038Z
Learning: In CompactConnect, address information should only come from License objects, not from top-level Licensee fields. The API no longer returns top-level licensee address fields, so all address data flows through individual license objects that contain fields like homeAddressStreet1, homeAddressCity, etc. The bestLicense() and bestLicenseMailingAddress() methods are used to access the most appropriate address from a licensee's collection of licenses.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-08-19T19:39:47.790Z
Learnt from: jsandoval81
Repo: csg-org/CompactConnect PR: 1019
File: webroot/src/network/licenseApi/data.api.ts:256-276
Timestamp: 2025-08-19T19:39:47.790Z
Learning: The backend API for CompactConnect will accept and require the new `encumbranceType` field in encumbrance requests, even though this field may not appear in the current (incomplete) API documentation.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-10-15T19:56:58.050Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 1135
File: backend/compact-connect/lambdas/python/common/cc_common/data_model/schema/privilege/record.py:60-0
Timestamp: 2025-10-15T19:56:58.050Z
Learning: In the CompactConnect codebase, when migrating from a single field to a list field (e.g., clinicalPrivilegeActionCategory to clinicalPrivilegeActionCategories), both fields are intentionally kept as optional during the migration period to support backwards compatibility. Mutual exclusivity validation is not enforced during this phase, as the deprecated field will be removed in a follow-up PR with migration scripts.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-08-21T19:17:21.038Z
Learnt from: rmolinares
Repo: csg-org/CompactConnect PR: 1025
File: webroot/src/models/Licensee/Licensee.model.ts:276-312
Timestamp: 2025-08-21T19:17:21.038Z
Learning: In CompactConnect's License model, address data is correctly mapped from server fields like homeAddressStreet1, homeAddressCity, homeAddressState, homeAddressPostalCode to a structured mailingAddress object via LicenseSerializer.fromServer(). The top-level Licensee address fields were removed because the API no longer returns them, but License objects retain their address field mappings. Address information should be accessed through bestLicense() and bestLicenseMailingAddress() helper methods rather than top-level licensee properties.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-11-13T22:13:48.430Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 1188
File: backend/compact-connect/tests/smoke/rollback_license_upload_smoke_tests.py:354-372
Timestamp: 2025-11-13T22:13:48.430Z
Learning: In the CompactConnect codebase, privilege records use datetime fields (not date fields) for dateOfIssuance, dateOfRenewal, and dateOfExpiration, which is intentionally different from license records that use date fields for these same attributes.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-09-11T20:06:40.709Z
Learnt from: ChiefStief
Repo: csg-org/CompactConnect PR: 1036
File: backend/compact-connect/lambdas/python/common/cc_common/data_model/provider_record_util.py:370-383
Timestamp: 2025-09-11T20:06:40.709Z
Learning: The EncumbranceDetailsSchema in backend/compact-connect/lambdas/python/common/cc_common/data_model/schema/privilege/record.py does not contain a 'note' field. It only has clinicalPrivilegeActionCategory (String, optional), adverseActionId (UUID, required), and licenseJurisdiction (Jurisdiction, optional).

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-06-26T16:42:00.781Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 882
File: backend/compact-connect/lambdas/python/migration/compact_configured_states_871/main.py:127-130
Timestamp: 2025-06-26T16:42:00.781Z
Learning: In the compact_configured_states_871 migration, existing jurisdiction configurations that have licenseeRegistrationEnabled: true are migrated with isLive: true for backwards compatibility. This prevents breaking existing live functionality since those states are already operational. The migration preserves the current live state of jurisdictions to maintain service continuity, while new states added after migration can start with isLive: false and be controlled by compact admins.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-06-18T21:57:02.978Z
Learnt from: jusdino
Repo: csg-org/CompactConnect PR: 864
File: backend/compact-connect/tests/smoke/encumbrance_smoke_tests.py:256-262
Timestamp: 2025-06-18T21:57:02.978Z
Learning: The `licenseJurisdiction` field is a required field in the provider data API response from the `/v1/providers/users/me` endpoint, so it can be accessed directly without defensive programming checks.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-08-29T19:41:38.201Z
Learnt from: jusdino
Repo: csg-org/CompactConnect PR: 1005
File: backend/compact-connect/app_clients/README.md:178-187
Timestamp: 2025-08-29T19:41:38.201Z
Learning: In the CompactConnect system, "state" and "jurisdiction" are functionally synonymous and can be used interchangeably in documentation and code. Users consider consistency between these terms to be a non-issue.

Applied to files:

  • backend/compact-connect/docs/README.md
📚 Learning: 2025-04-29T02:52:40.532Z
Learnt from: landonshumway-ia
Repo: csg-org/CompactConnect PR: 769
File: backend/compact-connect/lambdas/python/provider-data-v1/tests/function/test_handlers/test_encumbrance.py:138-147
Timestamp: 2025-04-29T02:52:40.532Z
Learning: In CompactConnect tests, hardcoded values (like license type abbreviations 'slp') in test queries are sometimes used intentionally rather than using dynamic lookups. This is a deliberate design decision to make tests fail if default test data changes, requiring developers to consciously update related tests.

Applied to files:

  • backend/compact-connect/docs/README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: TestApp
🔇 Additional comments (1)
backend/compact-connect/docs/README.md (1)

54-54: Field description is clear and comprehensive.

The explanation correctly addresses the OTCC requirement, API non-enforcement, and state responsibility. This aligns with the PR objectives and past feedback.

@landonshumway-ia
Copy link
Collaborator Author

@jlkravitz This is ready for your review. Thanks

Copy link
Collaborator

@jlkravitz jlkravitz left a comment

Choose a reason for hiding this comment

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

This seems like something that will come back to bite us in the long-term: what's stopping us from enforcing licenseNumber on upload, even if the rest of the codebase treats it as optional? Or do existing 'live' states not always upload these numbers?

@landonshumway-ia
Copy link
Collaborator Author

@jlkravitz We have multiple states already uploading license data into production, and they are not guaranteed to be uploading license numbers, so to force this requirement anywhere would be a backwards incompatible change that could break existing integrations. This project initially had the requirement to set the license number as optional (before I even joined the project), and we launched with it still as optional. It wasn't until the last month or so that anyone said anything about it needing to be required. The unfortunate reality is once you release a field as optional in an external facing API, you can't make it required unless you either break your existing clients or you create a new version of the API. Neither of those are desirable at this point, so we are at least updating the documentation to reflect this.

@jlkravitz
Copy link
Collaborator

@landonshumway-ia That makes sense– I guess I still wonder why we can't prod/encourage inclusion of that field in the API, even if we don't fully require it across-the-board. e.g., in CSV uploads. Or, we could support warnings in validation emails – warnings don't stop the upload, but they do generate an email notification. I'm not saying we should do this or that the time would be worth the outcome, but just throwing ideas out there.

Regardless, this shouldn't slow down the merging of this PR, so @isabeleliassen feel free to merge whenever!

@isabeleliassen isabeleliassen merged commit b038313 into csg-org:main Dec 29, 2025
2 of 6 checks passed
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.

add license number required to documentation

4 participants