diff --git a/.github/workflows/publishdocs.yaml b/.github/workflows/publishdocs.yaml new file mode 100644 index 0000000000..d6c320aa76 --- /dev/null +++ b/.github/workflows/publishdocs.yaml @@ -0,0 +1,18 @@ +name: Publish docs via GitHub Pages +on: + push: + branches: + - refactor-1.0 + +jobs: + build: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - name: Checkout master + uses: actions/checkout@v1 + + - name: Deploy docs + uses: mhausenblas/mkdocs-deploy-gh-pages@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 2d375db3f8..122e9cd006 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -27,4 +27,4 @@ jobs: - name: Test with pyshacl run: | python tests/jsonParser.py - reproschema -l DEBUG validate --shapedir validation examples + reproschema -l DEBUG validate --shapefile validation/reproschema-shacl.ttl examples diff --git a/contexts/generic b/contexts/generic index a0713c7663..7ab9c3e156 100644 --- a/contexts/generic +++ b/contexts/generic @@ -12,12 +12,13 @@ "@container": "@language" }, "value": { - "@id": "schema:value", + "@id": "reproschema:value", + "@type": "@id", "@container": "@language" }, "image": { "@id": "schema:image", - "@type": "@vocab" + "@type": "@id" }, "citation": { "@id": "schema:citation", @@ -45,27 +46,29 @@ }, "valueType": { "@id": "reproschema:valueType", - "@type": "@vocab" + "@type": "@id", + "@container": "@set" }, "landingPage": { "@id": "reproschema:landingPage", - "@container": "@language" + "@container": "@set" }, "question": { "@id": "schema:question", "@container": "@language" }, "choices": { - "@id": "schema:itemListElement" + "@id": "reproschema:choices" }, - "valueRequired": "https://schema.org/valueRequired", + "valueRequired": "schema:valueRequired", "multipleChoice": { "@id": "reproschema:multipleChoice", "@type": "schema:Boolean" }, "responseOptions": { "@id": "reproschema:responseOptions", - "@type": "@vocab" + "@container": "@set", + "@type": "@id" }, "dataType": { "@id": "schema:DataType", @@ -77,6 +80,10 @@ "maxValue": { "@id": "schema:maxValue" }, + "unitCode": { + "@id": "schema:unitCode", + "@container": "@set" + }, "ui" : "@nest", "order": { "@id": "reproschema:order", @@ -106,11 +113,11 @@ "@nest": "ui" }, "readonlyValue": { - "@id": "https://schema.org/readonlyValue", + "@id": "schema:readonlyValue", "@nest": "ui" }, - "scoringLogic": { - "@id": "reproschema:scoringLogic", + "compute": { + "@id": "reproschema:compute", "@container": "@index" }, "jsExpression": { @@ -119,11 +126,6 @@ "isVis": { "@id": "reproschema:isVis" }, - "required": { - "@id": "reproschema:required", - "@container": "@index", - "@nest": "ui" - }, "variableName": "reproschema:variableName", "isAbout": { "@id": "reproschema:isAbout", @@ -141,6 +143,7 @@ "reproschema:AutoAdvance": {"@id": "reproschema:AutoAdvance"}, "reproschema:DisableBack": {"@id": "reproschema:DisableBack"}, "reproschema:AllowExport": {"@id": "reproschema:AllowExport"}, + "reproschema:AllowReplay": {"@id": "reproschema:AllowReplay"}, "timer": { "@id": "reproschema:timer", "@type": "@id", @@ -151,6 +154,18 @@ "@type": "@id", "@nest": "ui" }, + "additionalNotesObj": { + "@id": "reproschema:additionalNotesObj", + "@container": "@set" + }, + "source": { + "@id": "reproschema:source", + "@type": "xsd:string" + }, + "column": { + "@id": "reproschema:column", + "@type": "xsd:string" + }, "importedFrom": { "@id": "pav:importedFrom", "@type": "@id" diff --git a/docs/01_introduction.md b/docs/01_introduction.md index 38d06284a4..a62b705525 100644 --- a/docs/01_introduction.md +++ b/docs/01_introduction.md @@ -2,66 +2,103 @@ ??? example "Tl;DR - Advantages of the current schema representation" - Rich contexts for a questionnaire with JSON-LD rather than a "flat" csv file. - - A single source of curated assessments from [ReproNim](https://github.com/ReproNim) + - A single source of curated assessments from [ReproSchema Library](https://github.com/reproschema-library) - Each `item` (i.e question), `activity` (i.e questionnaire), and `protocol` (i.e set of questionnaires) provides unique and persistent identifiers. - Versions of a given questionnaire can be tracked (e.g., PHQ-9, PHQ-8). - Allows, supports, and tracks internationalization (e.g. ABCD requires Spanish and English forms). - Implementation agnostic – the schema can be used by several software - - Still a linked data graph that can be validated using [SHACL](https://www.w3.org/TR/shacl/). + - Uses a linked data graph that can be validated using [SHACL](https://www.w3.org/TR/shacl/). ## The problem -Cognitive and clinical questionnaires and assessments are used throughout neuroscience. Despite many efforts -([Cognitive Atlas](https://www.cognitiveatlas.org/), [Cognitive Paradigm Ontology](http://www.cogpo.org/), [OOve](???)...) -there is little consistency in assessment data acquisition or response representation across studies or laboratories. Each -project tends to use its own format and data collection tool (paper, form, ...). In the long run, this can the source of a -lot inefficiencies not only in terms data curation but also by diminishing the value of the data less inter-operable and reusable. -Imagine for example a researcher wanting to run a meta or mega-analysis across several studies, but having no way to find out -which version of a questionnaire was used or how exactly it was scored. - -This highlights the need for harmonization across projects. For example, the National institute for mental health (NIMH) -Data Archive (NDA) enforces harmonization during data submission. However, harmonizing data after acquisition is resource -intensive and this approach can create a mismatch between collected and submitted data due to human error during the -harmonization process. Another possibility would be to reverse engineer the data dictionaries to their original assessments: -this would mean figuring out the information describing the content, format, and structure of the questionnaire from the -data contained in the questionnaires themselves. This approach is potentially feasible using a tool like [Brainverse](???), but -it can be very tedious. - -## Goals and general description - -A simpler solution is to enforce consistency directly at the data acquisition stage by relying on a `schema` that encodes -how the different elements of the data and / or the metadata relate to one another. This way, all this relational -information between these elements is captured from the very start as it is already embedded in the formal description -of the assessment. - -This is the goal of the Reproschema project that covers: - -1. a schema that can be found [in the present repository](https://github.com/ReproNim/reproschema) that describes the content and relations of the different elements of a questionnaire or set of assessment tools, +Cognitive and clinical questionnaires and assessments are used throughout +neuroscience. There is little consistency in assessment data acquisition or response +representation across studies or laboratories. Each project tends to use its own +format and data collection tool (e.g., paper, survey tools, RedCap, LORIS). In the +long run, this can the source of a lot inefficiencies not only in terms data +curation but also by diminishing the value of the data less interoperable and +reusable. Imagine for example a researcher wanting to run a meta or mega-analysis +across several studies. To do this each one would not only need to know which +specific assessments were collected, but also to relate differing column names in +data spreadsheets to these assessments and across projects. + +Several efforts have focused on linking the assessments themselves +through consistent terminologies and relationships that map to human cognition +(e.g., ([Cognitive Atlas](https://www.cognitiveatlas.org/), +[Cognitive Paradigm Ontology](http://www.cogpo.org/)). Other efforts such as the +National Institute for Mental Health (NIMH) Data Archive (NDA) and the National +Library of Medicine (NLM) [Common Data Elements](https://www.nlm.nih.gov/cde/index.html) +have curated data elements corresponding to the items and calculated scores from +these questionnaires. However, these resources are often used to make data +consistent and reusable after, rather than during data collection. However, +harmonizing data after acquisition is resource intensive and this approach can +create a mismatch between collected and submitted data due to human error during +the harmonization process. To faciliate tedious harmonization efforts, several +projects, over the last two decades, have developed technologies to automatically +or interactively align and harmonize data elements (e.g., BIRN mediator, OpenRefine). + +Given the dynamic and evolving nature of scientific investigation, many +questionnaires are altered when used to suit the requirements of a particular +study (e.g., different language, selective and new questions). This information +linking the specific information used when asking a question is often decoupled +from the data element representing the response to the question. When questions +are changed, researchers often shoehorn the response into an existing data +element, thus creating additional noise. Another drawback to these data elements +is that there is often no way to find out which version of a questionnaire was +used or how exactly it was scored. + +## Our solution + +Our simpler solution is to enforce consistency directly at the data acquisition +stage by relying on a common `schema` that encodes how the different elements of +the data and / or the metadata relate to one another. This way, all this relational +information between these elements is captured from the very start as it is already +embedded in the formal description of the assessment. This solution was inspired +by the work of [CEDAR Metadata Model](https://more.metadatacenter.org/tools-training/outreach/cedar-template-model). + +In this project we provide a comprehensive set of tools to create and use the +schemas, while tracking the source of the schema, and changes to it over time. +The Reproschema project covers: + +1. a schema that can be found [in the present repository](https://github.com/ReproNim/reproschema) +that describes the content and relations of the different elements of a +questionnaire or set of assessment tools, 2. an [associated curated library of reusable common assessments and questionnaires](https://github.com/ReproNim/reproschema-library), -3. a [python package](https://github.com/ReproNim/reproschema-py) to help create and validate the schemas of new assessments, -4. a [user interface](https://github.com/ReproNim/reproschema-ui) to visualize questionnaire and collect data. - -In brief, Reproschema offers a way to standardize the underlying representation of assessment tools. It comes with an open -and accessible library of questionnaire with appropriate conversion (e.g., to [RedCap](https://www.project-redcap.org/)) and data collection -tools (e.g., [MindLogger](https://mindlogger.org/), LORIS, [RedCap](https://www.project-redcap.org/)) to enable a more consistent acquisition across projects, with results being harmonized by design. +3. a [python package](https://github.com/ReproNim/reproschema-py) to help create +and validate the schemas of new assessments, +4. a [user interface](https://github.com/ReproNim/reproschema-ui) to visualize +questionnaire and collect data locally, +5. a [backend server](https://github.com/sensein/voice-backend) to capture the +data remotely. + +In brief, Reproschema offers a way to standardize the underlying representation +of assessment tools. It comes with an open and accessible library of questionnaires +with appropriate conversion (e.g., from/to [RedCap](https://www.project-redcap.org/)) +and data collection tools (e.g., [MindLogger](https://mindlogger.org/), +[RedCap](https://www.project-redcap.org/), [LORIS - future work](https://loris.ca)) +to enable a more consistent acquisition across projects, with data being +harmonized by design. ## General description With this schema we can represent: -- at the `item` level, the elements of an individual assessment, like the questions in a questionnaire -- at the `activity` level, an individual assessment that contains a set of `items`, like for example a whole questionnaire - with a several questions. -- at the `protocols` level, a collection of `activities` performed by a participant, e.g a set of questionnaires used in - a study. +- at the `item` level, the elements of an individual assessment, like the questions +in a questionnaire +- at the `activity` level, an individual assessment that contains a set of `items`, +like for example a whole questionnaire with a several questions. +- at the `protocols` level, a collection of `activities` performed by a participant, + e.g a set of questionnaires used in a study. -All those elements are specified text files in a `JSON-LD` format (JavaScript Object Notation for Linked Data) and each -`item`, `activity`, and `protocol` provides unique and persistent identifiers. +All those elements are specified text files in a `JSON-LD` format (JavaScript +Object Notation for Linked Data) and each `item`, `activity`, and `protocol` provides +unique and persistent identifiers. -Below we show an example of one of the possible ways a questionnaire with 3 question for a study could be organized -with a `protocol` for that study, one `activity` and 3 `items`. +Below we show an example of one of the possible ways a questionnaire with 3 questions +for a study could be organized with a `protocol` for that study, one `activity` +and 3 `items`. ```json ├── activities @@ -74,17 +111,22 @@ with a `protocol` for that study, one `activity` and 3 `items`. └── protocol1.jsonld ``` -The Reproschema can also easily and flexibly specify details about how the schema for an assessment should be implemented. -Independently of what solution is chosen in the end by a researcher, a lab, or an institute to display the assessment to -their participants or patients (for example whether using an web-app written in javascript or a mobile app written in -python), the schema can already specify: - -- the `input type` to choose among several user-interface rendering options e.g if an item should be displayed as a - Likert scale, a dropdown menu, a multiple choice... -- the `visibility` to decide whether a given `item` or `activity` should be displayed to the user and under which conditions, -- the `scoring logic` of how the total score to the responses on a questionnaire should be computed - -The Reproschema also allows for internationalization and multiple languages support by making it very easy to keep everything -the same about a questionnaire and only specify which language should be displayed by the user interface. - -Finally Reproschema allows tracking of variations and version of different assessments tools (e.g., PHQ-9, PHQ-8). \ No newline at end of file +The Reproschema can also easily and flexibly specify details about how the schema +for an assessment should be used. Independently of what solution is chosen in the +end by a researcher, a lab, or an institute to display the assessment to their +participants or patients (for example whether using an Web-app written in javascript +or a mobile app written in React-native), the schema can already specify: + +- the `input type` to choose among several user-interface rendering options e.g +if an item should be displayed as a Likert scale, a dropdown menu, a multiple choice... +- the `visibility` to decide whether a given `item` or `activity` should be +displayed to the user and under which conditions, +- the `compute logic` of how the total score to the responses on a questionnaire +should be computed + +The Reproschema also allows for internationalization and multiple languages support +by making it very easy to keep everything the same about a questionnaire and only +specify which language should be displayed by the user interface. + +Finally Reproschema allows tracking of variations and version of different assessments +tools (e.g., PHQ-9, PHQ-8). \ No newline at end of file diff --git a/docs/20_project_structure.md b/docs/20_project_structure.md index 305694e472..9a74e791a5 100644 --- a/docs/20_project_structure.md +++ b/docs/20_project_structure.md @@ -13,31 +13,48 @@ A brief description of how they all interact could be along the following lines: ## [Reproschema](https://github.com/ReproNim/reproschema) -This repository contains the actual Reproschema with the [`contexts`](https://github.com/ReproNim/reproschema/tree/master/contexts) of the schema and the [`terms`](https://github.com/ReproNim/reproschema/tree/master/terms) that define its different elements and how they relate to each other and to other external entities. +This repository contains the actual Reproschema with the [`contexts`](https://github.com/ReproNim/reproschema/tree/master/contexts) +of the schema and the [`terms`](https://github.com/ReproNim/reproschema/tree/master/terms) +that define its different elements and how they relate to each other and to other +external entities. -This repository also contains some [`validation`](https://github.com/ReproNim/reproschema/tree/master/validation) tools that can allow you to ensure that any new `protocol`, `activity` or `item` you create conforms to the specifications of the schema. +This repository also contains SHACL-based validation information in [`validation`](https://github.com/ReproNim/reproschema/tree/master/validation), +which allows you to ensure that any new `protocol`, `activity` or `item` you create +conforms to the specifications of the schema. -There is also an [`example`](https://github.com/ReproNim/reproschema/tree/master/example) schema that can help give you a quick overview of what the protocol for a study might look like. +There is also an [`example`](https://github.com/ReproNim/reproschema/tree/master/example) +schema that can help give you a quick overview of what the protocol for a study +might look like. ## [Reproschema-library](https://github.com/ReproNim/reproschema-library) -This [repository](https://github.com/ReproNim/reproschema-library) hosts all the assessments an questionnaires that support the Reproschema standard. +This [repository](https://github.com/ReproNim/reproschema-library) hosts all the +community curated assessments and questionnaires that support the Reproschema +standard. -Imagine this as curated library of reusable assessments and questionnaires, from where you can easily pull a copy from rather than having to photocopy a new questionnaire for your next participant or patient. +Imagine this as curated library of reusable assessments and questionnaires, from +where you can easily pull a copy from rather than having to photocopy a new +questionnaire for your next participant or patient. Also you can mix and match +items from this library, knowing that the information is tracked in your protocol. -All the currently supported tools are listed in [the `activity` folder](https://github.com/ReproNim/reproschema-library/tree/master/activities) and are served [here](https://schema.repronim.org/rl/) if you want to visualize them. +All assessments are listed in [the `activity` folder](https://github.com/ReproNim/reproschema-library/tree/master/activities) +and are served [here](https://schema.repronim.org/rl/) if you want to visualize +them. ## [Reproschema-ui](https://github.com/ReproNim/reproschema-ui) -This repository contains the code for the user-interface for the ReproSchema to visualize questionnaires and collect data. +This repository contains the code for the user-interface for the ReproSchema to +visualize questionnaires and collect data. You can see it in action [here](https://schema.repronim.org/ui/) ## [Reproschema-py](https://github.com/ReproNim/reproschema-py) -This is the Reproschema python library. This is a python Command Line Interface (CLI) that allows you to help create and validate the schemas of new assessments +This is the Reproschema python library. This is a python Command Line Interface (CLI) +that allows you to help create and validate the schemas of new assessments. -- test that a schema for a `protocol`, `activity` or `item` is valid and matches the specificatiof the Reproschema +- test that a schema for a `protocol`, `activity` or `item` is valid and matches +the specification of the Reproschema - convert a csv file of a questionnaire into its equivalent Reproschema ## Other repositories @@ -48,8 +65,11 @@ This repository contain a full fledge protocol that can be used as demonstration ### [Reprolib-server](https://github.com/ReproNim/reprolib-server) -This contains some additional information on how the activities are served on [https://schema.repronim.org/rl/](https://schema.repronim.org/rl/). +This contains some additional information on how the activities are served on +[https://schema.repronim.org/rl/](https://schema.repronim.org/rl/). ### [Reproschema-builder](https://github.com/ReproNim/reproschema-builder) -This repository contains now mostly obsolete python and javascript conversion tools that have been used to create some of our activities. \ No newline at end of file +This repository contains a javascript conversion tool that have been used to +create some of our activities, and can be used to convert RedCap data +dictionaries to Reproschema. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index e818de065c..221b243e76 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,17 +7,17 @@ style="width: 350px; height: auto; display: block; margin-left: auto; margin-ri ## How to use this documentation -- If you want to know more about the Reproschema project, its goals and the problems it tries to solve: check out our [introduction](./01_introduction.md). +- If you want to know more about the Reproschema project, its goals and the problems +it tries to solve: check out our [introduction](./01_introduction.md). -- The Reproschema is related to the `semantic web` and relies on `linked data` and the `JSON-LD` format. If you are unfamiliar with such things, head over to our [FAQ](./98_FAQ.md). You do not need an in depth understanding of what those things are to use the Reproschema but some "big picture" conceptual understanding could save you from a lot of confusion. 😉 +- The Reproschema is related to the `semantic web` and relies on `linked data` +and the `JSON-LD` format. If you are unfamiliar with such things, head over to +our [FAQ](./98_FAQ.md). You do not need an in depth understanding of what those +things are to use the Reproschema but some "big picture" conceptual understanding +could save you from a lot of confusion. 😉 -- Not sure how the project is organized? Check out the [project structure](./20_project_structure) page. - -## 3.0: Advantages of current representation - -## 4.0: Schema - -Schema overall structure: +- Not sure how the project is organized? Check out the [project structure](./20_project_structure) +page. ## Licence @@ -25,8 +25,10 @@ Schema overall structure: ## Contributing and feedback -We are looking for people to give us feedback on this documentation if anything is unclear by [opening an issue on our repository](???). +We are looking for people to give us feedback on this documentation if anything +is unclear by [opening an issue on our repository](https://github.com/ReproNim/reproschema/issues). -You can also get in touch on [our channel on the mattermost Brainhack](???). +You can also get in touch on [our channel on the mattermost Brainhack](https://mattermost.brainhack.org/brainhack/channels/repronim-reproschema). -If you want to get started right away and contribute directly to this documentation,you can find references and how-to in the [about section](./100_about_this_doc.md). +If you want to get started right away and contribute directly to this +documentation,you can find references and how-to in the [about section](./100_about_this_doc.md). diff --git a/examples/activities/activity1.jsonld b/examples/activities/activity1.jsonld index e6679bd65a..4abd69a18b 100644 --- a/examples/activities/activity1.jsonld +++ b/examples/activities/activity1.jsonld @@ -2,7 +2,7 @@ "@context": "../../contexts/generic", "@type": "reproschema:Activity", "@id": "activity1.jsonld", - "skos:prefLabel": "Example 1", + "prefLabel": "Example 1", "description": "Activity example 1", "schemaVersion": "0.0.1", "version": "0.0.1", @@ -11,6 +11,12 @@ "en": "Over the last 2 weeks, how often have you been bothered by any of the following problems?", "es": "Durante las últimas 2 semanas, ¿con qué frecuencia le han molestado los siguintes problemas?" }, + "compute": [ + { + "variableName": "phq9_total_score", + "jsExpression": "phq9_1 + phq9_2 + phq9_3 + phq9_4 + phq9_5 + phq9_6 + phq9_7 + phq9_8 + phq9_9" + } + ], "ui": { "addProperties": [ { "isAbout": "items/item1.jsonld", diff --git a/examples/activities/activity1_embed.jsonld b/examples/activities/activity1_embed.jsonld new file mode 100644 index 0000000000..bb021750d5 --- /dev/null +++ b/examples/activities/activity1_embed.jsonld @@ -0,0 +1,76 @@ +{ + "@context": "../../contexts/generic", + "@type": "reproschema:Activity", + "@id": "activity1.jsonld", + "prefLabel": "Example 1", + "description": "Activity example 1", + "schemaVersion": "0.0.1", + "version": "0.0.1", + "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", + "preamble": { + "en": "Over the last 2 weeks, how often have you been bothered by any of the following problems?", + "es": "Durante las últimas 2 semanas, ¿con qué frecuencia le han molestado los siguintes problemas?" + }, + "ui": { + "addProperties": [ + { "isAbout": "items/item1.jsonld", + "variableName": "item1", + "requiredValue": true, + "isVis": true} + ], + "order": [ + { + "@type": "reproschema:Field", + "@id": "items/item1.jsonld", + "prefLabel": "item1", + "description": "Q1 of example 1", + "schemaVersion": "0.0.1", + "version": "0.0.1", + "question": { + "en": "Little interest or pleasure in doing things", + "es": "Poco interés o placer en hacer cosas" + }, + "ui": { + "inputType": "radio" + }, + "responseOptions": { + "valueType": "xsd:integer", + "minValue": 0, + "maxValue": 3, + "multipleChoice": false, + "choices": [ + { + "name": { + "en": "Not at all", + "es": "Para nada" + }, + "value": 0 + }, + { + "name": { + "en": "Several days", + "es": "Varios días" + }, + "value": 1 + }, + { + "name": { + "en": "More than half the days", + "es": "Más de la mitad de los días" + }, + "value": 2 + }, + { + "name": { + "en": "Nearly everyday", + "es": "Casi todos los días" + }, + "value": 3 + } + ] + } + } + ], + "shuffle": false + } +} \ No newline at end of file diff --git a/examples/activities/items/item1.jsonld b/examples/activities/items/item1.jsonld index c0553b76c5..5f4fd303fa 100644 --- a/examples/activities/items/item1.jsonld +++ b/examples/activities/items/item1.jsonld @@ -2,7 +2,7 @@ "@context": "../../../contexts/generic", "@type": "reproschema:Field", "@id": "item1.jsonld", - "skos:prefLabel": "item1", + "prefLabel": "item1", "description": "Q1 of example 1", "schemaVersion": "0.0.1", "version": "0.0.1", @@ -48,6 +48,13 @@ "value": 3 } ] - } + }, + "additionalNotesObj": [ + { + "source": "redcap", + "column": "notes", + "value": "some extra note" + } + ] } \ No newline at end of file diff --git a/examples/protocols/protocol1_embed.jsonld b/examples/protocols/protocol1_embed.jsonld new file mode 100644 index 0000000000..0959dfff76 --- /dev/null +++ b/examples/protocols/protocol1_embed.jsonld @@ -0,0 +1,110 @@ +{ + "@context": "../../contexts/generic", + "@type": "reproschema:Protocol", + "@id": "protocol1.jsonld", + "prefLabel": { + "en": "Protocol1", + "es": "Protocol1_es" + }, + "description": "example Protocol", + "schemaVersion": "0.0.1", + "version": "0.0.1", + "ui": { + "addProperties": [ + { + "isAbout": "../activities/activity1.jsonld", + "variableName": "activity1", + "prefLabel": { + "en": "Screening", + "es": "Screening_es" + }, + "isVis": true + } + ], + "order": [ + { + "@type": "reproschema:Activity", + "@id": "../activities/activity1.jsonld", + "prefLabel": "Example 1", + "description": "Activity example 1", + "schemaVersion": "0.0.1", + "version": "0.0.1", + "citation": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/", + "preamble": { + "en": "Over the last 2 weeks, how often have you been bothered by any of the following problems?", + "es": "Durante las últimas 2 semanas, ¿con qué frecuencia le han molestado los siguintes problemas?" + }, + "ui": { + "addProperties": [ + { + "isAbout": "../activities/items/item1.jsonld", + "variableName": "item1", + "requiredValue": true, + "isVis": true + } + ], + "order": [ + { + "@type": "reproschema:Field", + "@id": "../activities/items/item1.jsonld", + "prefLabel": "item1", + "description": "Q1 of example 1", + "schemaVersion": "0.0.1", + "version": "0.0.1", + "question": { + "en": "Little interest or pleasure in doing things", + "es": "Poco interés o placer en hacer cosas" + }, + "ui": { + "inputType": "radio" + }, + "responseOptions": { + "valueType": "xsd:integer", + "minValue": 0, + "maxValue": 3, + "multipleChoice": false, + "choices": [ + { + "name": { + "en": "Not at all", + "es": "Para nada" + }, + "value": 0 + }, + { + "name": { + "en": "Several days", + "es": "Varios días" + }, + "value": 1 + }, + { + "name": { + "en": "More than half the days", + "es": "Más de la mitad de los días" + }, + "value": 2 + }, + { + "name": { + "en": "Nearly everyday", + "es": "Casi todos los días" + }, + "value": 3 + } + ] + } + } + ], + "shuffle": false + } + } + ], + "shuffle": false, + "allow": [ + "reproschema:AutoAdvance", + "reproschema:DisableBack", + "reproschema:AllowExport" + ] + } +} diff --git a/terms/AdditionalNoteObj b/terms/AdditionalNoteObj new file mode 100644 index 0000000000..9127ce02ec --- /dev/null +++ b/terms/AdditionalNoteObj @@ -0,0 +1,29 @@ +{ + "@context": "../contexts/base", + "@graph": [ + { + "@id": "reproschema:source", + "schema:domainIncludes": { + "@id": "reproschema:AdditionalNoteObj" + } + }, + { + "@id": "reproschema:column", + "schema:domainIncludes": { + "@id": "reproschema:AdditionalNoteObj" + } + }, + { + "@id": "reproschema:value", + "schema:domainIncludes": { + "@id": "reproschema:AdditionalNoteObj" + } + }, + { + "@id": "reproschema:AdditionalNoteObj", + "@type": "rdfs:Class", + "rdfs:comment": "A set of objects to define notes in a field. For example, most Redcap and NDA data dictionaries have notes for each item which needs to be captured in reproschema", + "rdfs:label": "Additional Notes Object" + } + ] +} diff --git a/terms/AdditionalProperty b/terms/AdditionalProperty index 176584d5f0..8989e7ac16 100644 --- a/terms/AdditionalProperty +++ b/terms/AdditionalProperty @@ -11,15 +11,7 @@ "@id": "reproschema:isAbout", "schema:domainIncludes": { "@id": "reproschema:AdditionalProperty" - }, - "schema:rangeIncludes": [ - { - "@id": "reproschema:Activity" - }, - { - "@id": "reproschema:Field" - } - ] + } }, { "@id": "schema:valueRequired", diff --git a/terms/AllowReplay b/terms/AllowReplay new file mode 100644 index 0000000000..4ab2fd94b0 --- /dev/null +++ b/terms/AllowReplay @@ -0,0 +1,7 @@ +{ + "@context": "../contexts/base", + "@id": "reproschema:AllowReplay", + "@type": "rdfs:Class", + "rdfs:comment": "Indicates (by boolean) if items can be replayed or not.", + "rdfs:label": "Allow replay" +} diff --git a/terms/Scoring b/terms/ComputeSpecification similarity index 65% rename from terms/Scoring rename to terms/ComputeSpecification index 62aa0cfd70..aaaf0c9751 100644 --- a/terms/Scoring +++ b/terms/ComputeSpecification @@ -7,7 +7,7 @@ "rdfs:comment": "The name used to represent an item.", "rdfs:label": "variableName", "schema:domainIncludes": { - "@id": "reproschema:Scoring" + "@id": "reproschema:ComputeSpecification" }, "schema:rangeIncludes": { "@id": "schema:Text" @@ -16,14 +16,14 @@ { "@id": "reproschema:jsExpression", "schema:domainIncludes": { - "@id": "reproschema:Scoring" + "@id": "reproschema:ComputeSpecification" } }, { - "@id": "reproschema:Scoring", + "@id": "reproschema:ComputeSpecification", "@type": "rdfs:Class", - "rdfs:comment": "An object indicating score in an activity or protocol and the score Field item ", - "rdfs:label": "Scoring logic" + "rdfs:comment": "An object to define computations in an activity or protocol.", + "rdfs:label": "Compute Specification" } ] } diff --git a/terms/Field b/terms/Field index 22cd711868..d43fef3987 100644 --- a/terms/Field +++ b/terms/Field @@ -43,6 +43,15 @@ "@id": "reproschema:Field" } }, + { + "@id": "schema:image", + "@type": "rdf:Property", + "rdfs:comment": "An image of the item. This can be a URL or a fully described ImageObject.", + "rdfs:label": "image", + "schema:domainIncludes": { + "@id": "reproschema:Field" + } + }, { "@id": "reproschema:inputType", "schema:domainIncludes": { diff --git a/terms/additionalNotesObj b/terms/additionalNotesObj new file mode 100644 index 0000000000..9518897bb1 --- /dev/null +++ b/terms/additionalNotesObj @@ -0,0 +1,11 @@ +{ + "@context": "../contexts/base", + "@type": "rdf:Property", + "@id": "reproschema:additionalNotesObj", + "rdfs:comment": "A set of objects to define notes in a field. For example, most Redcap and NDA data dictionaries have notes for each item which needs to be captured in reproschema.", + "rdfs:label": "additional notes", + "schema:rangeIncludes": { + "@id": "reproschema:AdditionalNoteObj" + } +} + diff --git a/terms/column b/terms/column new file mode 100644 index 0000000000..2cd38ce940 --- /dev/null +++ b/terms/column @@ -0,0 +1,11 @@ +{ + "@context": "../contexts/base", + "@type": "rdf:Property", + "@id": "reproschema:column", + "rdfs:comment": "An element to define the column name where the note was taken from.", + "rdfs:label": "column", + "schema:rangeIncludes": { + "@id": "rdf:langString" + } +} + diff --git a/terms/compute b/terms/compute new file mode 100644 index 0000000000..d32479910c --- /dev/null +++ b/terms/compute @@ -0,0 +1,10 @@ +{ + "@context": "../contexts/base", + "@id": "reproschema:compute", + "@type": "rdf:Property", + "rdfs:comment": "An array of objects indicating computations in an activity or protocol and maps it to the corresponding Field item. scoring logic is a subset of all computations that could be performed and not all computations will be scoring. For example, one may want to do conversion from one unit to another. ", + "rdfs:label": "computation", + "schema:rangeIncludes": { + "@id": "reproschema:ComputeSpecification" + } +} diff --git a/terms/scoringLogic b/terms/scoringLogic deleted file mode 100644 index cadf799218..0000000000 --- a/terms/scoringLogic +++ /dev/null @@ -1,10 +0,0 @@ -{ - "@context": "../contexts/base", - "@id": "reproschema:scoringLogic", - "@type": "rdf:Property", - "rdfs:comment": "An array of objects indicating score in an activity or protocol and maps it to the score Field item ", - "rdfs:label": "Scoring logic objects", - "schema:rangeIncludes": { - "@id": "reproschema:Scoring" - } -} diff --git a/terms/source b/terms/source new file mode 100644 index 0000000000..0345551f03 --- /dev/null +++ b/terms/source @@ -0,0 +1,11 @@ +{ + "@context": "../contexts/base", + "@type": "rdf:Property", + "@id": "reproschema:source", + "rdfs:comment": "An element to define the source (eg. RedCap, NDA) where the note was taken from.", + "rdfs:label": "source", + "schema:rangeIncludes": { + "@id": "rdf:langString" + } +} + diff --git a/terms/value b/terms/value new file mode 100644 index 0000000000..8d3baf5f0c --- /dev/null +++ b/terms/value @@ -0,0 +1,27 @@ +{ + "@context": "../contexts/base", + "@id": "reproschema:value", + "@type": "rdf:Property", + "rdfs:comment": "The value for each option in choices or in additionalNotesObj", + "rdfs:label": "value", + "http://schema.org/rangeIncludes": [ + { + "@id": "schema:Boolean" + }, + { + "@id": "schema:StructuredValue" + }, + { + "@id": "schema:Number" + }, + { + "@id": "schema:Text" + }, + { + "@id": "schema:URL" + } + ], + "schema:sameAs": { + "@id": "schema:value" + } +} \ No newline at end of file diff --git a/validation/ActivityShape.ttl b/validation/ActivityShape.ttl deleted file mode 100644 index 0138285cda..0000000000 --- a/validation/ActivityShape.ttl +++ /dev/null @@ -1,131 +0,0 @@ -@prefix dash: . -@prefix rdf: . -@prefix rdfs: . -@prefix schema: . -@prefix sh: . -@prefix xsd: . -@prefix dash: . -@prefix reproschema: . -@prefix skos: . - - -reproschema:ActivityShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:targetClass reproschema:Activity ; - sh:property [ - sh:path schema:description; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path schema:schemaVersion; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path schema:version ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path schema:citation ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path skos:prefLabel ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path reproschema:preamble; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path reproschema:scoringLogic ; - sh:node reproschema:ScoringShape ; - ] ; - sh:property [ - sh:path reproschema:order ; - sh:node dash:ListShape ; - sh:maxCount 1 ; - sh:property [ - sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; - sh:nodeKind sh:IRI ; - sh:minCount 1 ; - ] - ] ; - sh:property [ - sh:path reproschema:addProperties ; - sh:node reproschema:AddPropertiesShape ; - ] ; - sh:property [ - sh:path reproschema:inputType ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path reproschema:shuffle ; - sh:datatype schema:Boolean ; - ] ; - sh:property [ - sh:path reproschema:allow ; - sh:nodeKind sh:IRI ; - ] . - -reproschema:AddPropertiesShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ - sh:path reproschema:variableName ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path reproschema:isAbout ; - sh:nodeKind sh:IRI ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path reproschema:requiredValue ; - sh:datatype schema:Boolean ; - ] ; - sh:property [ - sh:path reproschema:isVis ; - sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ]) ; - ] ; - sh:property [ - sh:path skos:prefLabel ; - sh:datatype rdf:langString ; - ] . - -reproschema:ScoringShape - a sh:NodeShape ; - sh:closed true ; - sh:property [ - sh:path reproschema:variableName ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:jsExpression ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] . - -reproschema:IsVisShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ - sh:path schema:method ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path reproschema:payload ; - sh:datatype rdf:langString ; - ] . \ No newline at end of file diff --git a/validation/FieldShape.ttl b/validation/FieldShape.ttl deleted file mode 100644 index 622646e052..0000000000 --- a/validation/FieldShape.ttl +++ /dev/null @@ -1,114 +0,0 @@ -@prefix dash: . -@prefix rdf: . -@prefix rdfs: . -@prefix schema: . -@prefix sh: . -@prefix xsd: . -@prefix dash: . -@prefix skos: . -@prefix reproschema: . - -reproschema:FieldShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:targetClass reproschema:Field ; - sh:property [ - sh:path skos:prefLabel; - sh:datatype rdf:langString ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path skos:altLabel; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:description ; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:schemaVersion ; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:version ; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:question ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path reproschema:preamble; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:inputType ; - sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path reproschema:readOnly ; - sh:datatype xsd:boolean ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:responseOptions ; - sh:node reproschema:ResponseOptionsShape ; - ] . - -reproschema:ResponseOptionsShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ - sh:path reproschema:multipleChoice ; - sh:datatype schema:Boolean ; - ] ; - sh:property [ - sh:path schema:minValue ; - sh:datatype xsd:integer ; - ] ; - sh:property [ - sh:path schema:maxValue ; - sh:datatype xsd:integer ; - ] ; - sh:property [ - sh:path reproschema:valueType ; - sh:nodeKind sh:IRI ; - ] ; - sh:property [ - sh:path schema:itemListElement ; - sh:node reproschema:ChoicesShape ; - ] . - -reproschema:ChoicesShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ - sh:path schema:name ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path schema:value ; - sh:datatype xsd:integer ; - ] ; - sh:property [ - sh:path schema:image ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path reproschema:dontKnow ; - sh:nodeKind sh:IRI ; - ] ; - sh:property [ - sh:path reproschema:skipped ; - sh:nodeKind sh:IRI ; - ] . \ No newline at end of file diff --git a/validation/ProtocolShape.ttl b/validation/ProtocolShape.ttl deleted file mode 100644 index 8b0f945cdc..0000000000 --- a/validation/ProtocolShape.ttl +++ /dev/null @@ -1,130 +0,0 @@ -@prefix dash: . -@prefix rdf: . -@prefix rdfs: . -@prefix schema: . -@prefix sh: . -@prefix xsd: . -@prefix dash: . -@prefix reproschema: . -@prefix skos: . - - -reproschema:ProtocolShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:targetClass reproschema:Protocol ; - sh:property [ - sh:path schema:description; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:schemaVersion; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:version ; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:image ; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:landingPage ; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path skos:prefLabel ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path reproschema:preamble; - sh:datatype rdf:langString ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:scoringLogic ; - sh:node reproschema:ScoringShape ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:order ; - sh:node dash:ListShape ; - sh:minCount 1 ; - sh:property [ - sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ; - sh:nodeKind sh:IRI ; - sh:minCount 1 ; - ] - ] ; - sh:property [ - sh:path reproschema:addProperties ; - sh:node reproschema:AddPropertiesShape ; - ] ; - sh:property [ - sh:path reproschema:shuffle ; - sh:datatype schema:Boolean ; - ] ; - sh:property [ - sh:path reproschema:allow ; - sh:nodeKind sh:IRI ; - ] . - -reproschema:AddPropertiesShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ - sh:path reproschema:variableName ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path reproschema:isAbout ; - sh:nodeKind sh:IRI ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path reproschema:isVis ; - sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ]) ; - ] ; - sh:property [ - sh:path skos:prefLabel ; - sh:datatype rdf:langString ; - ] . - -reproschema:IsVisShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ - sh:path schema:method ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path schema:url ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path reproschema:payload ; - sh:datatype rdf:langString ; - ] . - -reproschema:ScoringShape - a sh:NodeShape ; - sh:closed true ; - sh:property [ - sh:path reproschema:variableName ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path reproschema:jsExpression ; - sh:datatype rdf:langString ; - ] . diff --git a/validation/ResponseOptionShape.ttl b/validation/ResponseOptionShape.ttl deleted file mode 100644 index 08e5809466..0000000000 --- a/validation/ResponseOptionShape.ttl +++ /dev/null @@ -1,75 +0,0 @@ -@prefix dash: . -@prefix rdf: . -@prefix rdfs: . -@prefix schema: . -@prefix sh: . -@prefix xsd: . -@prefix dash: . -@prefix skos: . -@prefix reproschema: . - -reproschema:ResponseOptionsShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:targetClass reproschema:ResponseOptions ; - sh:property [ - sh:path reproschema:valueType; - sh:nodeKind sh:IRI ; - sh:minCount 1 ; - ] ; - sh:property [ - sh:path schema:minValue ; - sh:datatype xsd:integer ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:maxValue ; - sh:datatype xsd:integer ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:multipleChoice; - sh:datatype schema:Boolean ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path reproschema:datumType ; - sh:datatype xsd:string ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:unitCode ; - sh:or ( [ sh:datatype schema:URL ] [ sh:datatype rdf:langString ] ) ; - sh:maxCount 1 ; - ] ; - sh:property [ - sh:path schema:itemListElement ; - sh:node reproschema:ChoicesShape ; - ] . - - -reproschema:ChoicesShape - a sh:NodeShape ; - sh:closed true ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ - sh:path schema:name ; - sh:datatype rdf:langString ; - ] ; - sh:property [ - sh:path schema:value ; - sh:datatype xsd:integer ; - ] ; - sh:property [ - sh:path schema:image ; - sh:datatype xsd:string ; - ] ; - sh:property [ - sh:path reproschema:dontKnow ; - sh:nodeKind sh:IRI ; - ] ; - sh:property [ - sh:path reproschema:skipped ; - sh:nodeKind sh:IRI ; - ] . \ No newline at end of file diff --git a/validation/reproschema-shacl.ttl b/validation/reproschema-shacl.ttl new file mode 100644 index 0000000000..3803647cff --- /dev/null +++ b/validation/reproschema-shacl.ttl @@ -0,0 +1,255 @@ +@prefix dash: . +@prefix rdf: . +@prefix reproschema: . +@prefix schema: . +@prefix sh: . +@prefix skos: . +@prefix xsd: . + +reproschema:ActivityShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:path schema:description ], + + [ sh:datatype rdf:langString ; + sh:path schema:schemaVersion ], + + [ sh:datatype rdf:langString ; + sh:path schema:version ], + + [ sh:datatype rdf:langString ; + sh:path schema:citation ], + + [ sh:nodeKind sh:IRI ; + sh:path schema:image ], + + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path skos:prefLabel ], + + [ sh:datatype rdf:langString ; + sh:path reproschema:preamble ], + + [ sh:node reproschema:ComputeSpecificationShape ; + sh:path reproschema:compute ], + + [ sh:maxCount 1 ; + sh:node dash:ListShape ; + sh:path reproschema:order ; + sh:property [ sh:minCount 1 ; + sh:nodeKind sh:IRI ; + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ], + + [ sh:node reproschema:AddPropertiesShape ; + sh:path reproschema:addProperties ], + + [ sh:datatype xsd:string ; + sh:path reproschema:inputType ], + + [ sh:datatype schema:Boolean ; + sh:path reproschema:shuffle ], + + [ sh:nodeKind sh:IRI ; + sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + sh:path reproschema:allow ] ; + sh:targetClass reproschema:Activity . + +reproschema:FieldShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path skos:prefLabel ], + + [ sh:datatype rdf:langString ; + sh:path skos:altLabel ], + + [ sh:datatype rdf:langString ; + sh:path schema:description ], + + [ sh:datatype rdf:langString ; + sh:path schema:schemaVersion ], + + [ sh:datatype rdf:langString ; + sh:path schema:version ], + + [ sh:datatype rdf:langString ; + sh:path schema:question ], + + [ sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:path schema:image ], + + [ sh:datatype rdf:langString ; + sh:path reproschema:preamble ], + + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:path reproschema:inputType ], + + [ sh:datatype xsd:boolean ; + sh:maxCount 1 ; + sh:path schema:readonlyValue ], + + [ sh:node reproschema:AdditionalNoteObj ; + sh:path reproschema:additionalNotesObj ], + + [ sh:or ( [ sh:nodeKind sh:IRI ] [ sh:node reproschema:ResponseOptionsShape ] ) ; + sh:path reproschema:responseOptions ] ; + sh:targetClass reproschema:Field . + +reproschema:ProtocolShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:path schema:description ], + + [ sh:datatype rdf:langString ; + sh:path schema:schemaVersion ], + + [ sh:datatype rdf:langString ; + sh:path schema:version ], + + [ sh:nodeKind sh:IRI ; + sh:maxCount 1 ; + sh:path schema:image ], + + [ sh:nodeKind sh:IRI ; + sh:path reproschema:landingPage ], + + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path skos:prefLabel ], + + [ sh:datatype rdf:langString ; + sh:path reproschema:preamble ], + + [ sh:node reproschema:ComputeSpecificationShape ; + sh:path reproschema:compute ], + + [ sh:minCount 1 ; + sh:node dash:ListShape ; + sh:path reproschema:order ; + sh:property [ sh:minCount 1 ; + sh:nodeKind sh:IRI ; + sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ] ], + + [ sh:node reproschema:AddPropertiesShape ; + sh:path reproschema:addProperties ], + + [ sh:datatype schema:Boolean ; + sh:path reproschema:shuffle ], + + [ sh:nodeKind sh:IRI ; + sh:in ( reproschema:AllowExport reproschema:DisableBack reproschema:AutoAdvance reproschema:AllowReplay reproschema:Skipped reproschema:DontKnow reproschema:TimedOut ) ; + sh:path reproschema:allow ] ; + sh:targetClass reproschema:Protocol . + +reproschema:ResponseOptionsShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype schema:Boolean ; + sh:maxCount 1 ; + sh:path reproschema:multipleChoice ], + + [ sh:nodeKind sh:IRI ; + sh:path reproschema:valueType ], + + [ sh:datatype xsd:integer ; + sh:maxCount 1 ; + sh:path schema:minValue ], + + [ sh:datatype xsd:integer ; + sh:maxCount 1 ; + sh:path schema:maxValue ], + + [ sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:path reproschema:datumType ], + + [ sh:or ( [ sh:datatype schema:URL ] [ sh:datatype rdf:langString ] ) ; + sh:path schema:unitCode ], + + [ sh:node reproschema:ChoicesShape ; + sh:path reproschema:choices ] ; + sh:targetClass reproschema:ResponseOptions . + +reproschema:AddPropertiesShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:variableName ], + + [ sh:minCount 1 ; + sh:nodeKind sh:IRI ; + sh:path reproschema:isAbout ], + + [ sh:or ( [ sh:datatype rdf:langString ] [ sh:datatype xsd:boolean ] [ sh:node reproschema:IsVisShape ] ) ; + sh:path reproschema:isVis ], + + [ sh:datatype rdf:langString ; + sh:path skos:prefLabel ], + + [ sh:datatype xsd:boolean ; + sh:path schema:valueRequired ] . + +reproschema:ChoicesShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:nodeKind sh:IRI ; + sh:path schema:image ], + + [ sh:nodeKind sh:IRI ; + sh:path reproschema:DontKnow ], + + [ sh:nodeKind sh:IRI ; + sh:path reproschema:Skipped ], + + [ sh:datatype rdf:langString ; + sh:path schema:name ], + + [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype schema:Text ]) ; + sh:path reproschema:value ] . + +reproschema:IsVisShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path schema:method ], + + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path schema:url ], + + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:payload ] . + +reproschema:ComputeSpecificationShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:variableName ], + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:jsExpression ] . + +reproschema:AdditionalNoteObjShape a sh:NodeShape ; + sh:closed true ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:source ], + + [ sh:datatype rdf:langString ; + sh:minCount 1 ; + sh:path reproschema:column ], + + [ sh:or ( [ sh:datatype xsd:integer ] [ sh:nodeKind sh:IRI ] [ sh:datatype schema:Boolean ] [ sh:datatype schema:StructuredValue ] [ sh:datatype schema:Text ]) ; + sh:path reproschema:value ] . +