neurobagel / annotation_tool

https://annotate.neurobagel.org/
MIT License
3 stars 7 forks source link

User-Configured Dynamic Initialization of Annotation Tool #286

Open jarmoza opened 1 year ago

jarmoza commented 1 year ago

Up until this point we have initialized a few store fields in the nuxtServerInit function as this appeared to be the most logical place to put them, particularly with our usage of Nuxt (where other startup functions are not as publicly available).

As of the latest refactor of the store, we are moving to put these hardcoded initial values directly in the state object definition.

However, in the near future we would like to return to programmatically initializing some of these fields (i.e. annotationDetails) with the introduction of editable config files for the annotation tool.

Below is some pseudocode as to how and where this would work.

nuxtServerInit({ commit }) {

    // 1. Load up app configuration values from a config file
    commit("loadAppSettings");

    // App config file contents
    /*
        {
            categories: [

                "Subject ID",
                "Age",
                "Sex",
                "Diagnosis",
                "Assessment Tool"
            ],
            annotationDetails: [

                {
                    id: 0,
                    category: "Age",
                    dataType: "continuous",
                    explanation: "This is an explanation for how to annotate age.",
                    options: {},
                    specializedComponent: "annot-age-values"
                },
                {
                    id: 1,
                    category: "Sex",
                    dataType: "categorical",
                    explanation: "This is an explanation for how to annotate sex.",
                    options: ["male", "female", "other"],
                    specializedComponent: "annot-discrete-choices"
                },
                {
                    id: 2,
                    category: "Diagnosis",
                    dataType: "string",
                    explanation: "This is an explanation for how to annotate diagnosis.",
                    options: {},
                    specializedComponent: "annot-vocabulary"
               }
            ]
         };

        // 2. Set up the rest of the app

        // A. Set the current page as the landing page
        commit("setCurrentPage", "home");
    */
}
github-actions[bot] commented 1 year ago

We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 30 days. We have applied the stale-issue label to indicate that this issue should be reviewed again and then either prioritized or closed.

github-actions[bot] commented 11 months ago

We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 30 days. We have applied the stale-issue label to indicate that this issue should be reviewed again and then either prioritized or closed.