cqlplay: support multiple library execution#112
Open
suyashkumar wants to merge 2 commits intogoogle:mainfrom
Open
cqlplay: support multiple library execution#112suyashkumar wants to merge 2 commits intogoogle:mainfrom
suyashkumar wants to merge 2 commits intogoogle:mainfrom
Conversation
suyashkumar
commented
Apr 19, 2025
| elm, err := cql.Parse(req.Context(), []string{evalCQLReq.CQL, fhirHelpers}, cql.ParseConfig{DataModels: [][]byte{fhirDM}}) | ||
| // Combine main CQL with additional libraries and FHIRHelpers | ||
| cqlInputs := append([]string{evalCQLReq.CQL}, evalCQLReq.Libraries...) | ||
| cqlInputs = append(cqlInputs, fhirHelpers) |
Collaborator
Author
There was a problem hiding this comment.
we may not want to always add fhirHelpers, and/or try to detect if the user has added a version of fhirHelpers already
310c9bc to
7628dba
Compare
Collaborator
Author
|
Going to mark this ready for review for now, since these changes were requested and seemed useful for people doing experimentation and prototyping. |
This file contains hidden or 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
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.
Regarding the discussion on #111, here's a quick working example illustrating one way we could support multiple library execution without saving any files on the server as per my comment (the server code is much simpler as well). This includes auto saving on the client side as well using localstorage, which we could also extend to the CQL/Data if we wanted (and have more robust ui around this).
There's a larger question of what should the playground become in the future (e.g. how can we host this somewhere central, or better yet can we compile to webassembly and run everything 100% locally for playground like activities, do we care about supporting "collaboration" and link sharing, etc).
For now, this should add a requested feature somewhat expediently.
Demo:
Screen.Recording.2025-04-19.at.5.59.49.PM.mov