Repository navigation
Intro:
This release adds flat and not-for-UI value set expansions, the lenient-display-validation parameter for
$validate-code, and more ways to build a DateTimeRange. It also makes IsValidValue stricter about FHIR
date/time and primitive literals, and fixes several parsing and base64Binary issues. There are no breaking API
changes.
Date and time ranges
DateTimeRangecan be built from two instants and a precision with a public constructor, and
TryBetween(start, end, out range)reports a reversed pair, or twonullarguments, instead of throwing.StartOrMinValue
andEndOrMaxValuegive the bounds withDateTimeOffset.MinValue/MaxValuefor an unbounded side,
for code that compares instants, andLastInstantis the last instant the range covers, one tick
beforeEnd. See issue #3657.
Terminology
-
ValueSetExpander.ExpandAsync(ValueSet, ExpandParameters)and a publicSupportedParameters.excludeNested=true
(or the newValueSetExpanderSettings.AlwaysExpandFlat) returns a flat, depth-first expansion, andexcludeNotForUI=true
leaves out not-selectable and abstract codes. Unsupported parameters are rejected; applied ones are echoed in
expansion.parameter. The size cap now counts nested codes, intersections keep nested codes, andTotalis recomputed
after excludes. TheExpandParametersbuilders forsystem-version,check-system-versionandforce-system-versionnow
use the OperationDefinition names. See issue #3632. -
$validate-codesupports thelenient-display-validationparameter of the
ValueSet/$validate-code OperationDefinition.
ValidateCodeParametersandCodeSystemValidateCodeParametershave aLenientDisplayValidationproperty and a
WithLenientDisplayValidation()builder method. When it isfalse,LocalTerminologyService(ValueSet$validate-code)
reports a display that does not match the code as aninvalid-displayerror and the code is not valid. Terminology services
that call a terminology server send the parameter along. When it istrueor absent, a wrong display stays
a warning and the code stays valid, as before. -
ValidateCodeResult.AddInvalidDisplay(details, lenient, expression)adds theinvalid-displayissue as a warning or an error.
The overload withoutlenientis obsolete. See issue #3640.Upcoming change: in the next major version, a missing
lenient-display-validationparameter will mean strict
validation, so a wrong display will be an error by default. The OperationDefinition says: "If the
'lenient-display-validation' parameter is false or absent, then an invalid display will cause the 'result' output
parameter to be 'false', i.e. the validation will fail." Passtrueto keep it a warning.
Blazor WebAssembly
TaskHelper.Awaitnow runs the delegate inline on the browser and WASI platforms instead of wrapping it inTask.Run, which cannot be blocked on in single-threaded WebAssembly ("Cannot wait on monitors on this runtime"). Resolvers that return an already completed task now work there; a task that is not complete throws aPlatformNotSupportedException. Other platforms are unchanged.
Performance
- Reading annotations from a POCO or an
AnnotationList(HasAnnotation,TryGetAnnotation,Annotations(type),RemoveAnnotations) no longer creates an empty annotation list, soDeepCopy()/CopyTo()no longer propagate one from elements that were only inspected. The list (and its dictionary) is now created on the first write only, and the dictionary is sized for a few annotation types. This removes aConcurrentDictionaryallocation per element that was only inspected, which speeds up work like snapshot generation. The public API is unchanged. See issue #3665. - FHIRPath
as/isandResourceIdentitydo less work per call.
Fixes
FhirDateTime.IsValidValueandTime.IsValidValuenow require seconds, as the FHIRdateTimeandtimeformats do.
Parsing and deserialization still accept a time without seconds. See issue #3650.IsValidValueand the element-model parsers for date/time,id,code,oid,uuidandQuantityno longer accept a
trailing line break. See issue #3659.- Validating a
Base64Binaryno longer rewrites a literal that contains whitespace. See issue #3648. - The JSON deserializer merges
xand_xwhen only one of them is an array, instead of throwing or dropping elements, and
reports the new non-fatalJSON136. Property-level validation errors are now reported at the element itself. See issue
#3655. - Building a POCO from an
ISourceNode(ToPoco()) stored abase64Binaryvalue as a decodedbyte[]inJsonValueinstead of keeping the base64 text, so validation reported an incorrect literal type (e.g. onBinary.data), and an invalid base64 literal threw aFormatExceptioninstead of being reported by validation. The literal is now kept as-is. This was broken since 6.2.1.
Changes:
- #3671: Keep accepting times without seconds when parsing
- #3650: FhirDateTime.IsValidValue: doc comment says "correctly formatted" but a time without seconds passes
- #3651: Require seconds in FhirDateTime and Time values
- #3682: Bump MSTest.TestFramework and Verify.MSTest
- #3679: Keep base64Binary literal when building POCOs from source nodes
- #3681: Bump the test-dependencies group with 1 update
- #3678: AI review loop: review-only mode when the author fixes
- #3676: ValueSetExpander: take ExpandParameters, support excludeNested and excludeNotForUI
- #3677: AI review loop: fix /ai-review more (round input type on dispatch)
- #3632: ValueSetExpander: take ExpandParameters, support excludeNested (flat) and excludeNotForUI, fix system-version parameter names
See More
- #3663: Add AI PR review loop (pilot)
- #3675: Bump Microsoft.SourceLink.GitHub from 10.0.403 to 11.0.100
- #3673: Bump the test-dependencies-major group with 2 updates
- #3666: Don't create or copy empty annotation lists on read (#3665)
- #3665: Optimize annotations: reading or copying an empty AnnotationList creates a locked Lazy and a ConcurrentDictionary
- #3667: Add rule that generated model classes are never edited by hand
- #3664: Bump the runtime-dependencies-minor group with 1 update
- #3661: Reject trailing line break in IsValidValue
- #3659: IsValidValue and the element-model parsers accept a trailing line break
- #3660: Bump the runtime-dependencies-minor group with 1 update
- #3653: Speed up FhirPath as/is and ResourceIdentity
- #3656: Merge 'x' and '_x' when only one is an array
- #3658: DateTimeRange: TryBetween, constructor, clamped bounds, LastInstant
- #3657: DateTimeRange: TryBetween, a public constructor, clamped bounds and the last instant
- #3655: JSON deserializer throws or drops values when 'x' and '_x' disagree on being an array
- #3652: FhirPath: duplicate binary.as entry forces dynamic dispatch, TypeOperators.Is walks base classes per call, ResourceIdentity uses culture-sensitive StartsWith
- #3649: Keep Base64Binary literal when validating
- #3648: Base64Binary validation drops whitespace from JsonValue
- #3647: Revert Microsoft.Extensions.Caching.Memory bump and exclude it from dependabot
- #3645: Run TaskHelper.Await inline on browser/WASI
- #3646: Bump the runtime-dependencies-minor group with 2 updates
- #3641: Support lenient-display-validation
- #3644: Release 6.8.0
- #3640: Support lenient-display-validation in $validate-code
This list of changes was auto generated.