Repository navigation
Concept codes comparison adjusted - #115
Merged
Merged
Conversation
Two conflicts, both fallout from #109 landing on main. src/shared/results-utils.ts: the conflict presents as a docblock, but main's side carries the whole longEquals function (#106, Long returned as valueString) and the auto-merged body below already calls it. Taking either side alone breaks the build. Kept longEquals together with this branch's expanded resultsEqual docblock. Concept comparison normalization is unchanged. src/test-results/cql-test-results.ts: #109 added a module-level formatActualValue that duplicated CQLTestResults.formatActualValue and its seven private statics. Resolved to one implementation: keep main's (recursive lists, quantities, interval boundary recursion), fold in this branch's Code and Concept rendering, and drop the duplicate statics. Arrays of Codes now render as CQL rather than falling back to JSON. Carried over the try/catch so a nested Long or a circular value no longer throws, and exported the function so displayFixes converges on the same one.
Both branches independently reworded this docblock and the equalizeValueTypes comment, which made them conflict with each other for no functional reason. Use wording that is accurate on either branch (no enumeration of the specific shapes each one handles) so whichever lands on main second merges cleanly.
normalizeForComparison rebuilds objects to collapse singleton Concept.codes and drop undefined-valued keys, but it walks Object.entries, which does not see the non-enumerable Symbol property the extractors use to record a numeric interval's point type and quantity-precision (#110/FHIR-56226). Rebuilding therefore stripped that metadata, intervalsEqual fell back to the decimal step for every interval, and 11 comparison tests failed once main was merged in. Carry the metadata onto the rebuilt object. This forwards only what the wire already declared, so it cannot create a false match. Covered by a regression test that fails without the carry-forward, since the failure mode is otherwise silent.
This was referenced Aug 17, 2026
raleigh-g-thompson
approved these changes
Aug 18, 2026
raleigh-g-thompson
left a comment
Contributor
There was a problem hiding this comment.
No comments. Looks good.
#113 landed the try/catch and export in formatActualValue, which this branch also carries. The only real difference is this branch's Concept and Code rendering, which main has no counterpart for, so git flagged the insertion purely because it sits adjacent to the shared try/catch. Resolved by keeping this branch's version of cql-test-results.ts, which is a strict superset of main's: identical docblock, identical bigint/circular guard, plus the isConceptShaped/isCodeShaped branches and their helpers. Nothing from main is dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Server returning correct code, but test is failing due to format and test evaluation.
To duplicate the test that fails, run the following
Moved from #100, which was raised from a fork before I had committer access on this repository. Same work, same branch name, now hosted here so CI and reviews run against
cqframeworkdirectly.This branch has moved on since #100:
mainis merged in, and it carries an additional fix.normalizeForComparisonrebuilds objects viaObject.entries, which does not see the non-enumerable Symbol property #110 uses to record a numeric interval's point type andquantity-precision. Rebuilding stripped that metadata, sointervalsEqualfell back to the decimal step and 11 comparison tests failed once #110 landed. The metadata is now carried across, with a regression test that fails without it. 185 passing,tsc --noEmitclean.