overture-stack / lectern

Data Schema / Dictionary management system
GNU Affero General Public License v3.0
0 stars 1 forks source link

Feature Request: Allow an array of values to be selected from a list. #61

Closed rosibaj closed 4 years ago

rosibaj commented 4 years ago

Detailed Description

There have been some fields added in the "extended clinical" that have > 1 value per field For example, presenting symptom(s) is an array of possible items. image

On input for the clinical system, the tsv this would look like a comma separated list with and the restriction is that each value must be part of the field codelist.

Implementation

Change the metaschema to allow is array as an optional property of a field default to false if not provided

rosibaj commented 4 years ago

tested on Overture QA with:

{
    "name": "primary_diagnosis2",
    "description": "The collection of data elements related to a donor's primary diagnosis. The primary diagnosis is the first diagnosed case of cancer in a donor.",
    "fields": [{
        "name": "presenting_symptoms",
        "description": "Indicate presenting symptoms at time of primary diagnosis.",
        "valueType": "string",
        "isArray": true,
        "restrictions": {
            "codeList": [
                "Pruritus/Itchiness",
                "Steatorrhea",
                "Unknown",
                "Vomiting",
                "Weight Loss"
            ]
        },
        "meta": {
            "displayName": "Presenting Symptoms"
        }
    }]
}

was able to successfult upload a schema with the isArray feature identified

rosibaj commented 4 years ago

taged on overture