Notebooks: ViewDefinition + SQLQuery cell types#86
Merged
Conversation
- New cell type "view-definition": pick a ViewDefinition via ResourcePicker (kinds=["ViewDefinition"]), open it as a link (Title/Name/Id + description gray), Run hits POST /fhir/ViewDefinition/<id>/$run, response is decoded from Binary(base64) and shown as a table with dynamic columns. - New cell type "sql-query": same picker (kinds=["SQLQuery"]), Library opens as a link, Run hits POST /fhir/Library/<id>/$sqlquery-run with FHIR Parameters. Library.parameter[use=in] is rendered as uppercase-name + text input, values are persisted into cell.value (JSON with backward-compatible fallback to plain URL). - ResourcePicker accepts optional `kinds` and `placeholder`, so it can fetch only ViewDefinitions or only SQLQueries. - Editor: + dropdown gets ViewDefinition / SQLQuery entries, CellWrapper routes new types to the dedicated views, default description on a new notebook is "Description".
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.
Summary
ResourcePicker(now acceptskinds+placeholder) to choose a resource, shows the picked resource as a link with description, and provides aRunaction that returns a tabular result.Library.parameter[use=in]are rendered as labelled text inputs; their values are persisted insidecell.valueas{ url, params }JSON (with a backward-compatible fallback to a plain URL string).Details
POST /fhir/ViewDefinition/<id>/$runwith a Parameters body; response isBinarywith base64 JSON which is decoded into rows and rendered viaHSComp.Table.POST /fhir/Library/<id>/$sqlquery-runwith Parameters; parsesparameter[name=row]into columns + rows.kinds: CandidateKind[]controls which FHIR endpoints are fetched,placeholderoverrides the empty-state label.+dropdown grows two new entries;CellWrapperroutes the new types to dedicated views."Description".Test plan
/notebooks/new, hit+→ViewDefinition, pick a view, pressRun— table renders.+→SQLQuery, pick a query that has parameters, fill them, pressRun— table renders, parameters persist after Save/reload.Runstill works.ResourcePickeras before.