---
# System prepended metadata

title: 問卷Json Format Sample

---

# 問卷Json Format Sample

 ```javascript
 // 問卷本體
{
  "id": "xxxxxx",
  "name": "問卷標題",
  "language": "zh-CHT", //zh-CHT:繁體中文, en-US:英文, ja-JP:日文, id-ID:印尼文, vi-VN:越南文, th-TH:泰文
  "description": "問卷說明",
  "remark": "v1",
  "scoreType": "SECTION", //NONE:不計分, NO_SECTION:不分區段計分、SECTION:分區段計分
  "generalScoreRule": null, // 不分區段計分規則
  "status": "ON", // NONE:未啟用、ON:啟用、OFF:停用
  "dispatched": false,
  "createTime": "2022-06-30 11:11",
  "updateTime": "2022-06-30 12:11",
  "tenantName": "緯緯醫學",
  "tenantShortName": "緯醫",
  "sections": [
    {
      "id": "yyyyyy",
      "seq":1,  //排列序號, 以1啟始
      "title": "區段名稱",
      "description": "區段說明",
      "scoreRule": { // 分區段計分規則
        "id": "xxxxxxxx",
        "showScore": true,  //顯示分數
        "showLevel": true,  //顯示分級
        "showDescription": true,  //顯示說明
        "levels": [
          {
            "id": "gggggg",
            "seq": 1,  //排列序號, 以1啟始
            "scoreType": "SECTION", //NO_SECTION:不分區段計分、SECTION:分區段計分
            "leftScore": null,
            "rightScore": 15,
            "op": "GE",  //LT:小於, LE:小於等於, EQ:等於, GT:大於, GE:大於等於, BTW:between
            "level": "輕微",
            "description": "沒事啦"
          },
          {
            "id": "gggggg1",
            "seq": 2,  //排列序號, 以1啟始
            "scoreType": "SECTION", //NO_SECTION:不分區段計分、SECTION:分區段計分
            "leftScore": null,
            "rightScore": 15,
            "op": "LT",  //LT:小於, LE:小於等於, EQ:等於, GT:大於, GE:大於等於, BTW:between
            "level": "輕微",
            "description": "沒事啦"
          },
          {
            "id": "gggggg2",
            "seq": 3,  //排列序號, 以1啟始
            "scoreType": "SECTION", //NO_SECTION:不分區段計分、SECTION:分區段計分
            "leftScore": null,
            "rightScore": 12,
            "op": "GT", //LT:小於, LE:小於等於, EQ:等於, GT:大於, GE:大於等於, BTW:between
            "level": "輕微",
            "description": "沒事啦"
          },
          {
            "id": "gggggg3",
            "seq": 4,  //排列序號, 以1啟始
            "scoreType": "SECTION", //NO_SECTION:不分區段計分、SECTION:分區段計分
            "leftScore": null,
            "rightScore": 12,
            "op": "GE",  //LT:小於, LE:小於等於, EQ:等於, GT:大於, GE:大於等於, BTW:between
            "level": "輕微",
            "description": "沒事啦",
          },
          {
            "id": "gggggg4",
            "seq": 5,  //排列序號, 以1啟始
            "scoreType": "SECTION", //NO_SECTION:不分區段計分、SECTION:分區段計分
            "leftScore": 12,
            "rightScore": 15,
            "op": "BTW",  //LT:小於, LE:小於等於, EQ:等於, GT:大於, GE:大於等於, BTW:between
            "level": "輕微",
            "description": "沒事啦"
          },
          {
            "id": "gggggg5",
            "seq": 6,  //排列序號, 以1啟始
            "scoreType": "SECTION", //NO_SECTION:不分區段計分、SECTION:分區段計分
            "leftScore": null,
            "rightScore": 15,
            "op": "EQ",  //LT:小於, LE:小於等於, EQ:等於, GT:大於, GE:大於等於, BTW:between
            "level": "輕微",
            "description": "沒事啦"
          }
        ]
      },
      "image": {
        "base64": "xxxxxxxxxxxxxxxxxxxxx"
      },
      "objectKey": "xxxxxxxxxxx",  //圖檔objectKey
      "url": "https://.....",      //圖檔url
      "questionData": [
        {
          "id": "xxxxxxxxxxxx",
          "seq": 1,  //排列序號, 以1啟始
          "title": "輸入問題",
          "description": "說明",
          "questionType": "SINGLE", //題目類型, SINGLE:單選, MULTIPLE:多選, DROPDOWN:下拉選單, TEXT:文字, DATE:日期, TIME:時間
          "required": true, // true: 必填, false: 非必填
          "requireScored": true, // true: 計分, false: 不計分
          "objectKey": "xxxxxxxxxxx",  //圖檔objectKey
          "url": "https://.....",      //圖檔url
          "options": [ // 文字、日期、時間： []
            {
              "id": "kkkkk",
              "seq": 1,  //排列序號, 以1啟始
              "name": "選項1",
              "score": 0
            },
            {
              "id": "kkkkk",
              "seq": 2,  //排列序號, 以1啟始
              "name": "選項2",
              "score": 2
            },
            {
              "id": "kkkkk",
              "seq": 3,  //排列序號, 以1啟始
              "name": "選項3",
              "score": 3
            }
          ]
        }
      ]
    }
  ]
}

// 答案本體
{
  "id": "xxxxxx", // 答案ID
  "questionnaireId": "xxxxxx", // 問卷ID
  "generalRuleId": "ggggggg",
  "generalScore": 20,
  "createTime": "2022-06-30 11:11",
  "section": [
    {
      "id": "yyyyyy", // 區段ID
      "ruleId": "ggggggg",
      "sectionScore": 10,
      "questionData": [
        {
          "id": "xxxxxxxxxxxx", // 問題ID
          "isFreeText": true, // 文字、日期、時間
          "answers": [],
          "value": "content",
        },
        {
          "id": "xxxxxxxxxxxx", // 問題ID
          "isFreeText": false,
          "answers": [ // 選項ID
            "jjjjjj",
            "iiiiiii",
          ],
          "value": null,
        },
      ]
    },
  ],
}
 ```