Skip to content
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

(feat) Add remote-select question type and migrate data sources to o3 schema format #157

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

donaldkibet
Copy link
Member

@donaldkibet donaldkibet commented Jan 10, 2025

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

Implements two changes:

  1. Updates dataSources schema to align with o3 format while maintaining backwards compatibility
  2. Adds support for remote-select question type control

Sample Schema

{
    "id": "admitToLocation",
    "type": "obs",
    "required": true,
    "label": "Admit to location",
    "questionOptions": {
        "rendering": "remote-select",
        "required": true,
        "concept": "CIEL:169403",
        "datasource": {
            "name": "location_datasource",
            "config": {
                "tag": "Admission Location"
            }
        }
    }
}

Screenshots

Kapture 2025-01-10 at 18 03 16

Related Issue

Other

@donaldkibet donaldkibet force-pushed the feat/dataSource branch 2 times, most recently from e3c3676 to 81507c6 Compare January 13, 2025 06:24
@donaldkibet donaldkibet changed the title (feat) : Adapt data sources to new schema specification and add remote-select Question (feat) : Add remote-select and migrate data sources to o3 schema Jan 23, 2025
@donaldkibet donaldkibet force-pushed the feat/dataSource branch 5 times, most recently from ec3b217 to 4987018 Compare January 23, 2025 09:17
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

Generally LGTM. Thanks, @donaldkibet! I've left some nitpicky suggestions around error handling and type annotations.

@denniskigen denniskigen changed the title (feat) : Add remote-select and migrate data sources to o3 schema (feat) Add remote-select question type and migrate data sources to o3 schema format Jan 23, 2025
Copy link
Contributor

@makombe makombe left a comment

Choose a reason for hiding this comment

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

Thanks @donaldkibet LGTM!

Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

LGTM

@denniskigen denniskigen merged commit 13fbeda into main Jan 24, 2025
3 checks passed
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.

4 participants