FHIR / FHIR/fhir-codegen

Add Source generation for custom resources

Open
#140 2 comments 0 reactions 0 assignees View on GitHub
core enhancement
Dominant language
TypeScript
Stars
154
Forks
57
Avg merge
1m
Merged PRs (30d)
1

Description

My company is looking into using more and more custom FHIR resources, So I'm looking to develop a source generator to auto generate the resource code based on the structure definition. My idea is that it will look for files with a name that ends with `.StructureDefinition.json` and then generate code from those files.

I tried my hand in this but I think this could work.
![image](https://github.com/microsoft/fhir-codegen/assets/2035340/3ece92b5-07c6-4a82-8971-76080393c04b)

I'm currently working on this branch:
https://github.com/almostchristian/fhir-codegen/tree/feature/sourcegen

Some issues that I'm looking to resolving:
- ~~change namespace to be the same as the `.` instead of the constant namespace. This should be a simple change.~~ supported in latest change
- ~~nested enum and generic `Code` property generation, I'm still trying to figure out how to get this to work.~~ supported in latest change

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.