Skip to content

[Bug] - Fix histopathology modifier values not being imported in CIM-11#45

Open
Xusifob wants to merge 1 commit into
stagingfrom
feature/fix-modifier-value
Open

[Bug] - Fix histopathology modifier values not being imported in CIM-11#45
Xusifob wants to merge 1 commit into
stagingfrom
feature/fix-modifier-value

Conversation

@Xusifob

@Xusifob Xusifob commented Jun 11, 2026

Copy link
Copy Markdown
Member

Block-type entries (no code) in modifiers.csv were silently skipped, so diseases referencing histopathology block IDs had empty modifiers. The import now builds a parent→children tree and expands block IDs into their coded leaf descendants. A new category column stores the direct parent block name for grouping, and a --force-modifiers flag allows re-importing modifiers on already-processed diseases.

Block-type entries (no code) in modifiers.csv were silently skipped,
so diseases referencing histopathology block IDs had empty modifiers.
The import now builds a parent→children tree and expands block IDs
into their coded leaf descendants. A new `category` column stores
the direct parent block name for grouping, and a --force-modifiers
flag allows re-importing modifiers on already-processed diseases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Xusifob

Xusifob commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

@codex, can you review this PR ?

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08e07d6f68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

$this->output->writeln("Modifier {$case->value} already set in $cim11Disease");
continue;
}
$cim11Disease->removeModifier($case);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Delete replaced modifiers on the owning side

When --force-modifiers is used for a disease that already has this modifier type, this call only removes the old Cim11Modifier from Cim11::$modifiers, which is the inverse side of the OneToMany(mappedBy: 'cim11') association; the owning Cim11Modifier::$cim11 still points at the disease and there is no orphan removal, so flush keeps the old row and adds the new one. Reloading the disease then returns duplicate modifiers of the same type instead of replacing the existing values, so the force re-import does not actually clean up stale modifiers.

Useful? React with 👍 / 👎.

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