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 bug on handling conversion from a choice type 2 #577

Closed

Conversation

baseTwo
Copy link
Collaborator

@baseTwo baseTwo commented Sep 26, 2024

Work in Progress for #570
Continuation for PR #571
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 mentioned this pull request Oct 16, 2024
@baseTwo
Copy link
Collaborator Author

baseTwo commented Oct 16, 2024

Work continues in #608

@baseTwo baseTwo closed this 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.

Bug on handling conversion from a choice type
1 participant