From 6cc30006c21995a1920326eb48a3a8a871ff10ca Mon Sep 17 00:00:00 2001 From: Yibei Chen Date: Wed, 10 Jan 2024 21:32:42 +0000 Subject: [PATCH] remove indent for code blocks --- docs/41_create_new_protocol.md | 6 +- docs/42_adopt_assessments.md | 154 ++++++++++++++++----------------- docs/43_create_new_assess.md | 50 +++++------ docs/45_finalize_protocol.md | 14 +-- 4 files changed, 112 insertions(+), 112 deletions(-) diff --git a/docs/41_create_new_protocol.md b/docs/41_create_new_protocol.md index c5aff6c06..f5f8a63e5 100644 --- a/docs/41_create_new_protocol.md +++ b/docs/41_create_new_protocol.md @@ -7,9 +7,9 @@ Ready for your first ReproSchema project?! We are going to use the [Reproschema 1. Prerequisite: Ensure you have Git and Cookiecutter installed on your system. If not, please refer to the installation guides for Git and Cookiecutter. 2. Generate Your Repository: Use the Reproschema Protocol Cookiecutter to create a new repository for your research protocol. Run the following command in your terminal: - ```bash - cookiecutter gh:ReproNim/reproschema-protocol-cookiecutter - ``` +```bash +cookiecutter gh:ReproNim/reproschema-protocol-cookiecutter +``` 3. Follow the prompts to customize your new protocol, more details see [here](https://github.com/ReproNim/reproschema-protocol-cookiecutter#step-1-generate-the-protocol-files) diff --git a/docs/42_adopt_assessments.md b/docs/42_adopt_assessments.md index 5366aaece..9a7ee3690 100644 --- a/docs/42_adopt_assessments.md +++ b/docs/42_adopt_assessments.md @@ -28,9 +28,9 @@ This step involves precise modifications, particularly in the `@context` and `ad In addition to the standard ReproSchema context, we've added a specific link in the "@context" section for demographics: - ```javascript - "demo": "https://raw.githubusercontent.com/ReproNim/reproschema-library/[commitID]/demographics_and_background_information_v1/items/" - ``` +```javascript +"demo": "https://raw.githubusercontent.com/ReproNim/reproschema-library/[commitID]/demographics_and_background_information_v1/items/" +``` Labeling this link as "demo" directs the schema to the location in the ReproSchema-library where items for demographics and background information are defined. We use the link with a specific commit ID to ensure the consistency of the assessment version. This contextual link allows the schema to access the detailed structures and definitions needed for each demographic item. @@ -38,12 +38,12 @@ This step involves precise modifications, particularly in the `@context` and `ad In the "addProperties" section, we define each variable that corresponds to a demographic question. For example: - ```javascript - { - "variableName": "year_of_birth", - "isAbout": "demo:year_of_birth" - } - ``` +```javascript +{ +"variableName": "year_of_birth", +"isAbout": "demo:year_of_birth" +} +``` The `"variableName": "year_of_birth"` is where you specify the variable as the participant's year of birth. The `"isAbout": "demo:year_of_birth"` part establishes a link to the detailed structure of this item in the ReproSchema-library. The "demo:" prefix references the additional context you've added, guiding the schema to the correct location for the structure and details of the "year_of_birth" item. @@ -58,15 +58,15 @@ Different from `demograpgics`, `psychological_questionnaire_schema` combines ass The @context section is expanded to include not only the generic ReproSchema context but also specific links to the ReproSchema-library. This enables the schema to access a broader range of predefined items and assessments. For the psychological questionnaire, two context links are established: - ```javascript - "@context": [ - "https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc4/contexts/generic", - { - "activities": "https://raw.githubusercontent.com/ReproNim/reproschema-library/[commitID]/activities/", - "demo": "https://raw.githubusercontent.com/ReproNim/reproschema-library/[commitID]/activities/demographics_and_background_information_v1/items/" - } - ] - ``` +```javascript +"@context": [ +"https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc4/contexts/generic", + { + "activities": "https://raw.githubusercontent.com/ReproNim/reproschema-library/[commitID]/activities/", + "demo": "https://raw.githubusercontent.com/ReproNim/reproschema-library/[commitID]/activities/demographics_and_background_information_v1/items/" + } + ] +``` A link to the activities in the reproschema-library (`activities`: ) and a link for demographics items (`demo`: ), both are commit-specific. This indicates that we will combine different assessments from those two parts. 2. **Defining the activity (@type, @id, prefLabel, etc.)**: @@ -75,71 +75,71 @@ Different from `demograpgics`, `psychological_questionnaire_schema` combines ass 3. **UI configuration and integration of multiple assessments (ui)**: - ```javascript - "ui": { - "addProperties": [ - { - "variableName": "phq-9", - "isAbout": "activities:PHQ-9/PHQ9_schema" - }, - { - "variableName": "gad-7", - "isAbout": "activities:GAD7/GAD7_schema" - }, - { - "variableName": "pc-ptsd-5", - "isAbout": "activities:PC-PTSD-5/PC-PTSD-5_schema" - }, - { - "variableName": "clinical_history_psychiatry", - "isAbout": "demo:clinical_history_psychiatry" - }, - { - "variableName": "clinical_history_psychiatry_other", - "isAbout": "demo:clinical_history_psychiatry_other" - }, - { - "variableName": "clinical_history_psychiatry_current", - "isAbout": "demo:clinical_history_psychiatry_current" - }, - { - "variableName": "clinical_history_psychiatry_current_only_some", - "isAbout": "demo:clinical_history_psychiatry_current_only_some" - }, - { - "variableName": "clinical_history_psychiatry_current_only_some_other", - "isAbout": "demo:clinical_history_psychiatry_current_only_some_other" - } - ], - "order": [ - "activities:PHQ-9/PHQ9_schema", - "activities:GAD7/GAD7_schema", - "activities:PC-PTSD-5/PC-PTSD-5_schema", - "demo:clinical_history_psychiatry", - "demo:clinical_history_psychiatry_other", - "demo:clinical_history_psychiatry_current", - "demo:clinical_history_psychiatry_current_only_some", - "demo:clinical_history_psychiatry_current_only_some_other" - ], - "shuffle": false, - "allow": [ - "reproschema:AutoAdvance", - "reproschema:AllowExport" - ] - } - ``` +```javascript +"ui": { + "addProperties": [ + { + "variableName": "phq-9", + "isAbout": "activities:PHQ-9/PHQ9_schema" + }, + { + "variableName": "gad-7", + "isAbout": "activities:GAD7/GAD7_schema" + }, + { + "variableName": "pc-ptsd-5", + "isAbout": "activities:PC-PTSD-5/PC-PTSD-5_schema" + }, + { + "variableName": "clinical_history_psychiatry", + "isAbout": "demo:clinical_history_psychiatry" + }, + { + "variableName": "clinical_history_psychiatry_other", + "isAbout": "demo:clinical_history_psychiatry_other" + }, + { + "variableName": "clinical_history_psychiatry_current", + "isAbout": "demo:clinical_history_psychiatry_current" + }, + { + "variableName": "clinical_history_psychiatry_current_only_some", + "isAbout": "demo:clinical_history_psychiatry_current_only_some" + }, + { + "variableName": "clinical_history_psychiatry_current_only_some_other", + "isAbout": "demo:clinical_history_psychiatry_current_only_some_other" + } + ], + "order": [ + "activities:PHQ-9/PHQ9_schema", + "activities:GAD7/GAD7_schema", + "activities:PC-PTSD-5/PC-PTSD-5_schema", + "demo:clinical_history_psychiatry", + "demo:clinical_history_psychiatry_other", + "demo:clinical_history_psychiatry_current", + "demo:clinical_history_psychiatry_current_only_some", + "demo:clinical_history_psychiatry_current_only_some_other" + ], + "shuffle": false, + "allow": [ + "reproschema:AutoAdvance", + "reproschema:AllowExport" + ] +} +``` In the addProperties section, we define each variable that corresponds to a specific assessment. For instance: - `"variableName": "phq-9"` is linked to `"isAbout": "activities:PHQ-9/PHQ9_schema"`. This implies that the PHQ-9 schema (an assessment for depressive symptoms) from the reproschema-library is used in the current psychological questionnaire schema. - Similarly, other assessments like `GAD-7` and `PC-PTSD-5` are included using their respective variable names and links to their schemas in the activities context. - Additional variables related to clinical history in psychiatry are linked using the demo context, pointing to specific items within the demographics and background information section of the reproschema-library. - ```javascript - { - "variableName": "clinical_history_psychiatry", - "isAbout": "demo:clinical_history_psychiatry" - } - ``` +```javascript +{ + "variableName": "clinical_history_psychiatry", + "isAbout": "demo:clinical_history_psychiatry" +} +``` - The `order` array specifies the sequence in which these assessments will appear in the questionnaire, ensuring a logical flow for participants. - The `shuffle` setting is `false`, maintaining the defined order, and allow includes functionalities like auto-advance between assessments and data export. diff --git a/docs/43_create_new_assess.md b/docs/43_create_new_assess.md index 46dc7226f..c1fb2de30 100644 --- a/docs/43_create_new_assess.md +++ b/docs/43_create_new_assess.md @@ -14,13 +14,13 @@ The structure of an item within the `items` folder of a ReproSchema activity is 4. **UI configuration (ui)**: The ui section in the item template differs from the schema template. It specifies how the question will be presented to the user. The inputType is set to "selectCountry", indicating that the user interface will provide a country selection method. 5. **Response options (responseOptions)**: This section defines the nature and structure of the responses allowed for the item. In this example, it specifies the valueType as "xsd:string" and a maxLength of 50 characters. It also provides a URL to a list of choices, in this case, a JSON file containing country names. This link allows the questionnaire to dynamically fetch and display a list of countries as response options. - ```javascript - "responseOptions": { - "valueType": "xsd:string", - "maxLength": 50, - "choices": "https://raw.githubusercontent.com/samayo/country-json/master/src/country-by-name.json" - } - ``` +```javascript +"responseOptions": { + "valueType": "xsd:string", + "maxLength": 50, + "choices": "https://raw.githubusercontent.com/samayo/country-json/master/src/country-by-name.json" +} +``` ## Step 1: Specifying `inputType` and `responseOption` to gather precise data @@ -64,16 +64,16 @@ Take 'alcohol_consumption' as an example. The UI configuration and response opti - For the speech task in our demo project, the configuration of ui `inputType` and `responseOptions` is distinctively tailored to facilitate audio data collection: - ```javascript - "ui": { - "inputType": "audioPassageRecord" - }, - "responseOptions": { - "valueType": "schema:AudioObject", - "minValue": 0, - "maxValue": 60000 - } - ``` +```javascript +"ui": { + "inputType": "audioPassageRecord" +}, +"responseOptions": { + "valueType": "schema:AudioObject", + "minValue": 0, + "maxValue": 60000 +} +``` - In the ui section, the `inputType` is set to `"audioPassageRecord"`. This specific input type is designed to enable participants to record an audio passage directly within the questionnaire interface. - The `responseOptions` are configured to accommodate the nature of audio data. @@ -91,14 +91,14 @@ We can integrate additional components tailored to the unique requirements of sp 2. Contextual and properties configuration for audio check - ```javascript - "@context": [ - "https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc4/contexts/generic", - { - "voice": "https://raw.githubusercontent.com/ReproNim/reproschema-library/43e7afab312596708c0ad4dfd45b69c8904088ae/activities/VoiceTask/items/" - } - ] - ``` +```javascript + "@context": [ + "https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc4/contexts/generic", + { + "voice": "https://raw.githubusercontent.com/ReproNim/reproschema-library/43e7afab312596708c0ad4dfd45b69c8904088ae/activities/VoiceTask/items/" + } +] +``` The @context section includes a specific context link under "voice", pointing to the repository with items relevant to voice and audio tasks: "" This targeted link ensures that the audio check activity aligns with the specific requirements of voice-related tasks. diff --git a/docs/45_finalize_protocol.md b/docs/45_finalize_protocol.md index 634a6c5b1..319e0dd51 100644 --- a/docs/45_finalize_protocol.md +++ b/docs/45_finalize_protocol.md @@ -10,13 +10,13 @@ After setting up individual activities, we return to the main [protocol schema]( The ui section's addProperties array is crucial. Here, each activity schema we've created is referenced under `isAbout`, with its respective `variableName` and `prefLabel`. For example, the `audio` activity is linked as - ```javascript - { - "isAbout": "../activities/0_audio/audio_check_schema", - "variableName": "audio_check_schema", - "prefLabel": {"en": "Audio Check"} - } - ``` +```javascript +{ + "isAbout": "../activities/0_audio/audio_check_schema", + "variableName": "audio_check_schema", + "prefLabel": {"en": "Audio Check"} +} +``` This structure is repeated for each activity, including audio check, demographics, psychological questions, clinical questions, speech task, and feedback.