cqf-tooling icon indicating copy to clipboard operation
cqf-tooling copied to clipboard

ModelInfo for singular elements derived from plural ones

Open brynrhodes opened this issue 1 year ago • 1 comments

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.

brynrhodes avatar Mar 28 '23 18:03 brynrhodes