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

Generate extension classes from IG #146

Open
bschaffh opened this issue Aug 15, 2023 · 2 comments
Open

Generate extension classes from IG #146

bschaffh opened this issue Aug 15, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bschaffh
Copy link

bschaffh commented Aug 15, 2023

I am currently using the fhir-codegen to generate the vallue sets frome the FrCore Project.

I would like to know if it would be possible to generate the classes that represents the extension. From what i've read, i've understood that for the moment it is not possible to generate classes for the profiles according to their structure definition, but what about the extensions and the slices (for example the Identifiers for Patient ) ? It would make me avoid to write the extensions classes manually and generate them from the tool..

Thank's for reading and for your attention !

@GinoCanessa
Copy link
Contributor

Hi @bschaffh! This looks like a duplicate of #145 , but to be sure - are you asking for those classes in C#, or another language (e.g., one you are exporting yourself)?

The core software already supports loading everything we should need for the extensions, so it is mostly a function of what we want the exports to look like. I have a pretty good handle on the 'first cut' planned for interop with the Firely Net SDK, but if this is for another language I am happy to work through what it would look like with you.

Cheers!

@GinoCanessa GinoCanessa added the enhancement New feature or request label Aug 15, 2023
@bschaffh
Copy link
Author

bschaffh commented Aug 15, 2023

Hi ! Thank you for you answer.

I want to generate the classes in C# as you said, but I didn't find a way to generate the extensions and slices in a way that I wouldn't have to populate a Extension object in C# with the fields that are fixed in the IG.

For example, in the FrCorePatient profile, some values are defined and fixed for the slices of the Identifier (URL, Use, etc). These values are defined in the StructureDefinition.json, so I was expecting the tool to generate a class (for example Identifier INS-C, wich is a slice of Identifier) where the fixed fields values are already set, that would avoid me to fill the fields manually.

For the moment, I can only use the valueSets classes coming from the FrCore project, but I would like to use the values defined in Profiles, Extensions and slices too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants