{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the Questionnaire." }, "form_type": { "type": "string", "enum": ["QUES", "SA", "EXAM", "ROS"], "description": "Specifies the use case: QUES (Questionnaire), SA (Structured Assessment), EXAM (Physical Exam), or ROS (Review of Systems)." }, "code_system": { "type": "string", "enum": ["SNOMED", "LOINC", "ICD-10", "INTERNAL", "CPT"], "description": "The coding system used for the questionnaire." }, "code": { "type": "string", "description": "The assigned code for the questionnaire.", "examples": ["72109-2"] }, "can_originate_in_charting": { "type": "boolean", "description": "Specifies if the questionnaire can be initiated from charting." }, "prologue": { "type": "string", "description": "Text displayed at the beginning of the questionnaire to provide context to the user." }, "display_results_in_social_history_section": { "type": "boolean", "description": "Determines if completion information should be displayed in the Social History (SHX) section.", "default": false }, "questions": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "code_system": { "type": "string", "enum": ["SNOMED", "LOINC", "ICD-10", "INTERNAL", "CPT"], "description": "The coding system used for the question." }, "code": { "type": "string", "description": "The assigned code for the question. Codes should be unique within the same questionnaire." }, "code_description": { "type": "string", "description": "A description of the assigned code." }, "content": { "type": "string", "description": "The text displayed when the command is printed." }, "responses_code_system": { "type": "string", "enum": ["SNOMED", "LOINC", "ICD-10", "INTERNAL", "CPT"], "description": "The coding system for responses." }, "responses_type": { "type": "string", "enum": ["SING", "MULT", "TXT"], "description": "Response type: SING (Single Select), MULT (Multi Select), TXT (Free Text)." }, "display_result_in_social_history_section": { "type": "boolean", "description": "Determines if the response should be shown in the Social History (SHX) section.", "default": false }, "enabled_behavior": { "type": "string", "enum": ["all", "any"], "description": "Specifies if all or any of the conditions must be met to enable this question." }, "enabled_conditions": { "type": "array", "description": "List of conditions that enable this question.", "items": { "type": "object", "properties": { "question_code": { "type": "string", "description": "Code of the question to check." }, "operator": { "type": "string", "enum": ["=", "!=", "exists", "not_exists"], "description": "Operator for condition." }, "value_code": { "type": ["string", "null"], "description": "Response option code to match, if applicable." }, "value_string": { "type": ["string", "null"], "description": "Free text value to match, if applicable." } }, "required": ["question_code", "operator"] } }, "responses": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "For SING/MULT, this is the text that will be displayed for each response. For TXT, use 'TXT'." }, "code": { "type": "string", "description": "The assigned code for the response. No response codes should be reused within the same question." }, "code_description": { "type": "string", "description": "A description of the assigned code." }, "value": { "type": "string", "description": "For SING/MULT, leave blank if no scoring is desired. If scoring is desired, insert the numerical value assigned." } }, "required": ["name", "code"] } } }, "required": ["code_system", "code", "content", "responses_code_system", "responses_type", "responses"] } } }, "required": ["name", "form_type", "code_system", "code", "can_originate_in_charting", "questions"] }