Skip to content

Conversation

@suyashkumar
Copy link
Contributor

@suyashkumar suyashkumar commented Apr 19, 2025

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

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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may not want to always add fhirHelpers, and/or try to detect if the user has added a version of fhirHelpers already

@suyashkumar suyashkumar force-pushed the s/explore-libraries branch from 310c9bc to 7628dba Compare May 23, 2025 22:33
@suyashkumar
Copy link
Contributor Author

Going to mark this ready for review for now, since these changes were requested and seemed useful for people doing experimentation and prototyping.

@suyashkumar suyashkumar marked this pull request as ready for review May 23, 2025 23:07
@suyashkumar suyashkumar changed the title Quick example supporting multiple library execution cqlplay: support multiple library execution Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant