cqframework / cqframework/cqf-tooling

ModelInfo for singular elements derived from plural ones

Open
#427 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
22
Forks
26
PR merge metrics
No merged PRs in 30d

Description

When a profile changes cardinality of a plural element to singular, the ModelInfo outputs the element in the profile as a singular element, rather than as a List of elements. This results in run-time errors because the underlying classes still have the plural modeling based on the ancestor profile and ultimately resource definition.

The issue was reported on the translator here (for QICore 4.1.1):
https://github.com/cqframework/clinical_quality_language/issues/1136

The issue was addressed there by manually updating the MedicationNotRequested.reasonCode element to be plural, but the tooling in general should not reduce cardinality of derived elements to avoid this runtime issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the ModelInfo generation for derived elements whose cardinality changes from plural to singular, using the linked translator issue for the QICore 4.1.1 example. Done means derived elements retain plural cardinality when their underlying classes remain plural, preventing the reported runtime error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.