Skip to content

Obligation CodeSystem: SHALLNOT/SHOULDNOT qualifiers, new MAY codes, strength hierarchy and fixes - #310

Draft
lmckenzi wants to merge 6 commits into
masterfrom
obligation-cs-cleanup
Draft

lmckenzi wants to merge 6 commits into
masterfrom
obligation-cs-cleanup

Conversation

@lmckenzi

@lmckenzi lmckenzi commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Editorial fixes to the Obligation CodeSystem, plus SHALLNOT/SHOULDNOT qualifiers, additional MAY codes, and a specialization hierarchy based on strength.

Explicit MAY codes support traceability: an element flagged MAY records that an external requirement was explicitly asserted at MAY strength. Unflagged elements still behave as MAY, but have no associated requirement.

A spreadsheet listing every candidate combination (with rationale) and every change to an existing concept is available for review.

New concepts

  • Qualifiers: SHALLNOT (SHALL NOT), SHOULDNOT (SHOULD NOT), both not-selectable
  • Generic: alter (exchanger obligation, not-selectable)
  • MAY: populate-if-known, populate, exclude-narrative, reject-invalid, accept-invalid, handle
  • SHALLNOT and SHOULDNOT: populate, in-narrative, user-input, persist, alter, handle, display, process, print

Other combinations were reviewed and excluded, mostly because they would duplicate an existing code (e.g. SHALLNOT:ignore = SHALL:handle) or because the negation is meaningless (e.g. SHALLNOT:no-error).

Deprecations

These use the standard status concept property (= deprecated) and, because this is an R5 IG, the codesystem-replacedby extension rather than the R6 replacedByCode property.

  • SHALL:exclude-narrative -> SHALLNOT:in-narrative; SHOULD:exclude-narrative -> SHOULDNOT:in-narrative. The generic exclude-narrative stays active to support MAY:exclude-narrative.
  • SHALL:no-alter -> SHALLNOT:alter; SHOULD:no-alter -> SHOULDNOT:alter. The generic no-alter is deprecated with no replacement code.

Hierarchy (relationship changes)

parent means specialization: whenever the child applies, the parent also applies, and a parent obligation can legitimately be tightened to the child.

  • Strength: MAY:x is the parent of SHOULD:x, which is the parent of SHALL:x. SHOULDNOT:x is the parent of SHALLNOT:x. The weakest qualified code is a child of the generic code.
  • Across generic codes: where generic A specializes B (e.g. display under handle), q:A is a child of q:B for positive qualifiers. For negative qualifiers the direction reverses: SHALLNOT:handle is a child of SHALLNOT:display, SHALLNOT:process and SHALLNOT:print.
  • ignore: SHALL:ignore is a child of SHALLNOT:handle, and SHOULD:ignore is a child of SHOULDNOT:handle.
  • MAY:handle is the parent of MAY:display, MAY:process and MAY:print.
  • MAY:alter is now under the new generic alter, and its converse is SHALLNOT:alter.
  • Redundant parents removed: a parent is no longer listed when it is already implied through another parent. For example, SHALL:display no longer lists display, because it inherits it through SHOULD:display.
  • display and print now carry a note that their relationship to handle assumes displaying or printing is a way of handling the value, which depends on how the specification describes the expected handling.

Security-dependent

A flag on a generic code means that obligations matching it might be overridden by privacy or security policy. A specialization can drop the flag where its narrower meaning is not affected, so most SHALLNOT/SHOULDNOT codes are not flagged.

  • alter, SHALLNOT:alter, SHOULDNOT:alter: flagged. Privacy, consent or security policy may require an intermediary to redact, mask or relabel a value in transit.
  • persist, SHALL:persist, SHOULD:persist, MAY:persist: flagged. Consent withdrawal, erasure rights or retention limits may override storage.
  • handle, SHALL:handle, SHOULD:handle, MAY:handle: flagged, because their specializations display, process and print already are.
  • v2-re, ihe-r2, std: flagged, because they include security-dependent component codes.
  • MAY:populate, MAY:populate-if-known: flagged, matching their SHALL and SHOULD forms.
  • able-to-populate is not flagged: populate inherits the flag through populate-if-known.

Definition changes

  • Generic definitions list every qualifier that has a qualified code, e.g. "SHALL/SHOULD/MAY/SHALL NOT/SHOULD NOT display".
  • in-narrative, user-input and persist were reworded from "ensure that X" to a plain verb so the negated forms read correctly. reject-invalid now says "reject" rather than "not accept". handle has wording for its negated forms.
  • exclude-narrative now lists only MAY.
  • SHALLNOT:alter keeps the no-alter note that changing the value moves an application from exchanger to consumer and producer. SHOULDNOT:alter and the generic alter omit it, because the rule only holds for SHALL NOT.
  • std: removed the note that referenced the non-existent use-dar codes.

Editorial

  • Typos and grammar: coverse, specifially, shold, assembles, "vague in that doesn't", missing period, persist notes wording
  • Closed an unbalanced parenthesis in the process definitions
  • accept-invalid: added the missing "Notes:" prefix and clarified "non-valid constraints"
  • no-error: the garbled "where (or equivalent), should either of these be allowed on the consumer obligations" is now "where such extensions are allowed"
  • MAY:alter: "obligations for resource producers" -> "exchangers"
  • MAY:ignore: "MAY not make any use" -> "MAY choose not to make any use"

No codes or display names were changed by the editorial fixes.

For discussion

  • explain is categorised under ResourceProducerObligations, but its example is about a consumer handling Patient.active.
  • MAY:able-to-populate and MAY:ignore still describe themselves as "a null statement", which sits awkwardly with the traceability use of MAY.
  • The IG has not been built yet to confirm the QA output.

🤖 Generated with Claude Code

- Fix typos and grammar (coverse, specifially, shold, assembles, etc.)
- Close unbalanced parenthesis in process definitions
- Repair garbled sentence in no-error definitions
- Clarify that leaf codes reference qualifiers via the qualifier property
- Correct MAY:alter to refer to exchangers, not producers
- Disambiguate MAY:ignore wording
- Remove references to non-existent use-dar codes in std
- Add SHALL:populate-if-known / SHOULD:populate-if-known parents to SHALL:populate / SHOULD:populate to match generic hierarchy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lmckenzi
lmckenzi marked this pull request as draft November 26, 2026 21:53
…es and 'generic' property

- Add SHALLNOT and SHOULDNOT qualifier concepts
- Add 22 qualified codes (6 MAY, 8 SHALLNOT, 8 SHOULDNOT)
- Add generic 'alter' code; deprecate no-alter
- Deprecate SHALL/SHOULD:no-alter (replaced by SHALLNOT/SHOULDNOT:alter) and SHALL/SHOULD:exclude-narrative (replaced by SHALLNOT/SHOULDNOT:in-narrative) using status and replacedByCode
- Add 'generic' property linking qualified codes to their generic code; 'parent' now used only for subsumption
- Add MAY:handle as parent of MAY:display/process/print; add SHALLNOT/SHOULDNOT display/process/print as parents of SHALL/SHOULD:ignore
- Update generic definitions to list the full set of permitted qualifiers
- Simplify no-error wording and drop the std note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lmckenzi lmckenzi changed the title Obligation CodeSystem: fix typos, garbled text and hierarchy gaps Obligation CodeSystem: SHALLNOT/SHOULDNOT qualifiers, new MAY codes, generic property and fixes Nov 27, 2026
- Remove the 'generic' property; qualified codes again inherit from their generic code
- MAY codes are parents of SHOULD codes, SHOULD of SHALL, SHOULDNOT of SHALLNOT
- Add SHALLNOT:handle and SHOULDNOT:handle (children of the corresponding display/process/print codes, since negation reverses specialization); SHALL/SHOULD:ignore now specialize them
- Remove redundant parents already implied through another parent
- Note on display and print that their relationship to handle depends on the specification's handling expectations
- Generic handle definition covers the negated forms

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lmckenzi lmckenzi changed the title Obligation CodeSystem: SHALLNOT/SHOULDNOT qualifiers, new MAY codes, generic property and fixes Obligation CodeSystem: SHALLNOT/SHOULDNOT qualifiers, new MAY codes, strength hierarchy and fixes Nov 27, 2026
lmckenzi and others added 3 commits November 26, 2026 21:57
…ption

The exchanger-to-producer/consumer note on the generic alter code only holds for SHALL NOT and SHOULD NOT; under MAY the application remains an exchanger. Removed the strength-hierarchy sentence from the CodeSystem description per review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flag as security-dependent: alter, SHALLNOT:alter, SHOULDNOT:alter (redaction in transit), persist and its SHALL/SHOULD/MAY forms (consent withdrawal, erasure, retention limits), handle and its SHALL/SHOULD/MAY forms (to match display/process/print), and the composites v2-re, ihe-r2 and std (security-dependent components). Drop the notes on alter and SHOULDNOT:alter and the deprecation sentence on exclude-narrative per review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… replacedByCode

replacedByCode is an R6 concept property; this is an R5 IG, so deprecated concepts point to their replacements with the R5 codesystem-replacedby extension. The status property is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant