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

Migrate SearchParamDefinition into the Base versionless level #2531

Open
brianpos opened this issue Jul 13, 2023 · 2 comments
Open

Migrate SearchParamDefinition into the Base versionless level #2531

brianpos opened this issue Jul 13, 2023 · 2 comments
Labels
breaking change This issue/commit causes a breaking change, and requires a major version upgrade enhancement

Comments

@brianpos
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
The SearchParamDefinition class is an internal class used in each of the versions ModelInfo classes to hold the code generated search parameter code.
I'd love to have this definitional class in Base so that it can be used in generic services that handle more than one version.
My specific case is for a versionless Search Expression validator - It will be using this class for it's information, and likely have an extension method to take the version specific SearchParameter and produce this class for validations (and also be able to scan any allready pre-generated.
As shown in this code:
https://github.com/brianpos/UploadFIG/blob/98408a0d8ad33993d57e90905f8ed22e0c360a77/UploadFIG/ObjectValidator.cs#L88

Describe the solution you'd like
Migrate the class into the Base assembly

Describe alternatives you've considered
The only other alternatives for me are to replicate the code in my validator to each version, or have my own generic class and request project users provide the mapping.

@marcovisserFurore
Copy link
Member

I am afraid that is not possible without a breaking change. The class SearchParamDefinition contains a property Target of type ResourceType[], which is bound to a specific FHIR version. So that type is not available in Base.

@ewoutkramer
Copy link
Member

ewoutkramer commented Jul 19, 2023

So, for 6.x, we could change this to this new enum that has all historical types and was introduced in R5 (sorry, forgot the name)?

This one: http:https://hl7.org/fhir/valueset-version-independent-all-resource-types.html

@ewoutkramer ewoutkramer added the breaking change This issue/commit causes a breaking change, and requires a major version upgrade label Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue/commit causes a breaking change, and requires a major version upgrade enhancement
Projects
None yet
Development

No branches or pull requests

4 participants