-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fhir 4 typescript #964
Draft
josephjclark
wants to merge
40
commits into
main
Choose a base branch
from
fhir-4-typescript
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fhir 4 typescript #964
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Core fhir definitions seem use a different bundle structure to the regular IG definitions. Basically the folder structure is a bit different and the resources are all captured in a single bundle. This commit adds a solution which seems to work in fhir 4 at least
Put each profile in its own file, and just the entrypoints in builders.js
We need these for the docsite anyway - but they're not a good solution for driving ts
A good way to sketch out the value of the builder APIs. Not sure we're coming out ahead yet
Accidentally used an overly restrictive mapping
this includes referneces to @types/fhir with _ props removed works in unit tests now, hurrah!
…le imported fhir types
plus some tool tidyups
now we get instant type tracking in the builders
But profiles are now failing to generated d.ts files. Maybe globals are broken?
…lems I think this is all working now?
This comment was marked as resolved.
This comment was marked as resolved.
don't bundle everything into one file, just bundle the fhir types
This was referenced Feb 7, 2025
Closed
Spun out a nice solution for docs in #987 . I don't think it's a big fix and I'll probably take a swing real soon. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FHIR r4 adaptor with auto-generated typescript.
Replaces #909
This is a fully typescript implementation, so we get really good type definitions out of it, which gives us great code-assist support.
I am not using the npm
fhir
package for typings. It just doesn't work very well for us, and introduces a problem bundling for Monaco. Also it exposes_
variants of each property, for extensions. Which really pollutes the code assist.Code assist is now provided in test files (which makes writing unit tests easier AND more lightning-like) as well as in Lightning. I've tested it locally, works great.
Major changes:
b.patient('Patient', { ...})
orb.patient({ ... })
. Profile names aren't actually needed or useful here, but I want to keep API consistency with the IG adaptors. It works well.Still do to before release:
datatypes
stuff into builders, so you can dob.concept
,b.identifier
.Properly extract meta and text properties from the generator, and let uses provide extension hooks for this in the mappings fileDONEdeceased[x]
.Also note that this totally breaks the implementation guide generator. I'm tracking that in #955
Spin out issues to do later: