Skip to content

Initialize view config management through FHIR IG#45

Draft
ellykits wants to merge 5 commits into
ohs-foundation:mainfrom
ellykits:view-configuration-via-FHIR-IG
Draft

Initialize view config management through FHIR IG#45
ellykits wants to merge 5 commits into
ohs-foundation:mainfrom
ellykits:view-configuration-via-FHIR-IG

Conversation

@ellykits
Copy link
Copy Markdown
Collaborator

@ellykits ellykits commented May 19, 2026

This is the initial code generated as prototype for config management using coding agent. Will require further clean up to ready it for review and code merge, which will be done on subsequent commits. The implementation generates Kotlin classes (state and extractors) based on the resources defined in the FHIR Implementation Guide. The idea is such that implementers will define schema for configs and how to extract data from FHIR resources using SQL-on-FHIR ViewDefinition profile to represent the flattened structure.

The ViewDefinition is linked to a single FHIR resource and handling joins and relationship is left to the implementers of the SQL-on-FHIR IG to worry about. With that said the OHS Player IG defines a ViewJoinMap spec that allows joining more than one ViewDefintion. The output of the ViewDefinition and ViewJoinMap is a Kotlin model that can be used directly on the UI.

The IG code generator plug will generate the config schema, for the supported view types declared in the IG as codesystems. These configs will be used by the view renderer to configure how the view is rendered in the application. The code will also generated for every state extractor so that developers don't have to write the data extraction using ViewDefinition manually. This does a lot of heavy lifting on the dev side. The states can directly be consumed on the UI widgets to represent information as desired and to handle any business logic.

Fixes #27 #35

It's a good idea to open an issue first for discussion.

  • All CI build checks pass e.g. Tests
  • Appropriate changes to documentation are included in the PR

This is the initial code generated as prototype for config management
using coding agent. Will require further clean up to ready it for review
and code merge, which will be done on subsequent PRs. The implementation
generates Kotlin classes (state and extractors) based on the resources
defined in the FHIR Implementation Guide. The idea is such that implementers
will define schema for configs and how to extract data from FHIR resources
using SQL-on-FHIR ViewDefinition profile to represent the flattened structure.

The ViewDefinition is linked to a single FHIR resource and handling joins
and relationship is left to the implementers of the SQL-on-FHIR IG to worry
about. With that said the OHS Player IG defines a ViewJoinMap spec that
allows joining more than one ViewDefintion. The output of the ViewDefinition
and ViewJoinMap is a Kotlin model that can be used directly on the UI.

The IG code generator plug will generate the config schema, for the supported
view types declared in the IG as codesystems. These configs will be used by
the view renderer to configure how the view is rendered in the application.
The code will also generated for every state extractor so that developers
don't have to write the data extraction using ViewDefinition manually. This
does a lot of heavy lifting on the dev side. The states can directly be consumed
on the UI widgets to represent information as desired and to handle any business
logic.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
@ellykits
Copy link
Copy Markdown
Collaborator Author

I will push code on this PR to clean up the code and to make it ready for review. Created a draft for purposes of testing and providing visibility on the ongoing work on view configuration management.

ellykits added 4 commits May 19, 2026 18:37
Instead of falling back to an absolute path, require the property to
be set or fail.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
This was resulting to duplicating in classes affecting web builds

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
…ambda

This will fix kotlin.internal.IrLinkageError exception thrown by IOs and Wasm
platforms when you use lambda as default params.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
This will scale better in future to introduce extra events and
options to the Render function plus it fixes and issue with
bridging Kotlin code that was causing IOs app not to run.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
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.

Implement configuration management

1 participant