Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

570 Choice Types #608

Draft
wants to merge 54 commits into
base: develop-2.0
Choose a base branch
from
Draft

570 Choice Types #608

wants to merge 54 commits into from

Conversation

baseTwo
Copy link
Collaborator

@baseTwo baseTwo commented Oct 16, 2024

Work in Progress for #570
Continuation of PR #571 and #577
Follow discussion #604
⚠️PR #610 must be merged first
This should be considered conceptual and used for discussion only at this stage

While developing I found a lot of conversions don't exist, for example in MATGlobalCommonFunctionsFHIR4.Patient.Normalize Interval

Could not resolve on or more case expressions for Choice type Choice<{http://hl7.org/fhir}dateTime, {http://hl7.org/fhir}Period, {http://hl7.org/fhir}Timing, {http://hl7.org/fhir}instant, {http://hl7.org/fhir}string, {http://hl7.org/fhir}Age, {http://hl7.org/fhir}Range>.
These conversions could not be resolved:
- Hl7.Fhir.Model.Period to Hl7.Fhir.Model.FhirDateTime
- Hl7.Fhir.Model.Timing to Hl7.Fhir.Model.FhirDateTime
- Hl7.Fhir.Model.Instant to Hl7.Fhir.Model.FhirDateTime
- Hl7.Fhir.Model.FhirString to Hl7.Fhir.Model.FhirDateTime
- Hl7.Fhir.Model.Age to Hl7.Fhir.Model.FhirDateTime
- Hl7.Fhir.Model.Range to Hl7.Fhir.Model.FhirDateTime

A setting was added in ExpressionBuilderOptions to either throw or ignore these cases. If it is ignored, the C# code will show in a comment which types were missing.

CqlDateTime g_ = f_ switch { null => null , CqlDateTime a => a/* , FhirDecimal => ??? */, _ => throw new System.Diagnostics.UnreachableException() };

@baseTwo baseTwo changed the title 570 choice type 570 Choice Types Oct 16, 2024
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