{
  "openapi": "3.1.0",
  "info": {
    "title": "Poieti × HIS integration example",
    "version": "0.1.0",
    "description": "供院方調整的合成介接範例；不是已部署的 Poieti API。欄位、路徑與認證可沿用院方規格。此範例採同步寫入；評估紀錄新增、更正與作廢的 clientRequestId 在機構內唯一，至少保留 7 天，按方法、路徑與內容判斷重送並回原回執。"
  },
  "servers": [
    {
      "url": "https://his.example.org/integration/v1",
      "description": "請替換為院方測試環境"
    }
  ],
  "security": [
    {
      "hospitalAuth": []
    }
  ],
  "paths": {
    "/patients/{patientId}": {
      "get": {
        "operationId": "getPatient",
        "summary": "查詢病人",
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "找到有權存取的病人",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Patient"
                },
                "example": {
                  "patientId": "P-DEMO-001",
                  "medicalRecordNumber": "DEMO-001",
                  "displayName": "測試病人"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/encounters/{encounterId}": {
      "get": {
        "operationId": "getEncounter",
        "summary": "查詢本次就醫",
        "parameters": [
          {
            "name": "encounterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "有權存取的就醫資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Encounter"
                },
                "example": {
                  "encounterId": "V-DEMO-001",
                  "patientId": "P-DEMO-001",
                  "type": "inpatient",
                  "status": "active"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admission-assessments": {
      "post": {
        "operationId": "createAdmissionAssessment",
        "summary": "新增入院護理評估",
        "description": "入院護理評估的合成範例。驗證病人與本次住院關聯、操作者權限及是否允許新增。操作者由認證身分決定。clientRequestId 在機構內去重，至少保留 7 天；同方法、路徑與內容重送回原 201 回執，任一不同回 409。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdmissionAssessmentInput"
              },
              "example": {
                "clientRequestId": "REQ-ADMISSION-DEMO-001",
                "patientId": "P-DEMO-001",
                "encounterId": "V-DEMO-001",
                "assessedAt": "2026-09-23T09:20:00+08:00",
                "assessment": {
                  "basic": {
                    "education": "senior_high",
                    "languages": [
                      "mandarin",
                      "taiwanese_hokkien"
                    ],
                    "religions": [
                      "none"
                    ]
                  },
                  "alerts": {
                    "antithromboticUse": "none",
                    "drugAllergy": "yes",
                    "drugAllergyNote": "合成案例：曾使用盤尼西林後出現皮疹。",
                    "drugAllergens": [
                      "penicillin"
                    ],
                    "foodAllergy": "none",
                    "transfusionReaction": "unknown",
                    "bloodType": "o_positive",
                    "recentForeignTravel": "none",
                    "treatmentRestrictions": [
                      "none"
                    ],
                    "tubes": [
                      "none"
                    ],
                    "rapidTestDate": {
                      "year": 2026,
                      "month": 9,
                      "day": 23
                    },
                    "rapidTestResult": "negative",
                    "pcrDate": {
                      "month": 9,
                      "day": 22
                    },
                    "pcrResult": "negative"
                  },
                  "health": {
                    "familyHistoryStatus": "yes",
                    "familyHistory": [
                      {
                        "relation": "father",
                        "diseases": [
                          "hypertension"
                        ]
                      }
                    ],
                    "maritalStatus": "married",
                    "livingStatus": "with_family",
                    "familyInteraction": "caring",
                    "primaryCaregivers": [
                      "spouse"
                    ],
                    "occupation": "commerce",
                    "financialStatus": "comfortable",
                    "smokingStatus": "none",
                    "alcoholUse": "occasional",
                    "betelNutStatus": "none",
                    "medicalHistory": [
                      "hypertension"
                    ],
                    "surgeryExperience": "none",
                    "recentEmergencyOrAdmissionCount": "none",
                    "currentMedications": [
                      "antihypertensive"
                    ]
                  },
                  "nutrition": {
                    "heightCm": 168,
                    "weightKg": 65,
                    "edemaStatus": "none",
                    "feedingRoutes": [
                      "oral"
                    ],
                    "feedingStatus": [
                      "normal"
                    ],
                    "oralConditions": [
                      "normal"
                    ],
                    "dentures": [
                      "none"
                    ],
                    "dietTypes": [
                      "regular"
                    ],
                    "foodRestriction": "none",
                    "otherSymptoms": [
                      "none"
                    ]
                  },
                  "sleep": {
                    "conditions": [
                      "normal"
                    ],
                    "usualHours": 7
                  },
                  "activity": {
                    "mobility": "walks_with_person_assistance",
                    "needsMobilityAid": true,
                    "mobilityAids": [
                      "walker"
                    ],
                    "leftUpperMuscleStrength": "5",
                    "rightUpperMuscleStrength": "5",
                    "leftLowerMuscleStrength": "5",
                    "rightLowerMuscleStrength": "4",
                    "limbAppearance": "normal",
                    "gait": "stable",
                    "selfCareAbility": "independent",
                    "fallInPastYear": "no"
                  },
                  "respiratory": {
                    "chestSymmetry": "normal",
                    "patterns": [
                      "normal"
                    ],
                    "coughFrequency": "none",
                    "sputumClearance": "normal",
                    "sputumStatus": "none",
                    "breathSounds": [
                      "normal"
                    ],
                    "oxygenTherapies": [
                      "none"
                    ]
                  },
                  "circulation": {
                    "implantStatus": "none",
                    "peripheralCirculation": "warm",
                    "symptoms": [
                      "none"
                    ]
                  },
                  "cognition": {
                    "leftVision": [
                      "clear"
                    ],
                    "rightVision": [
                      "clear"
                    ],
                    "leftHearing": [
                      "clear"
                    ],
                    "rightHearing": [
                      "clear"
                    ],
                    "orientation": "fully_oriented",
                    "behaviors": [
                      "appropriate"
                    ],
                    "painStatus": "present",
                    "painFindings": [
                      {
                        "site": "lower_limb",
                        "score": "4"
                      }
                    ],
                    "speech": "normal",
                    "skinAppearance": "normal"
                  },
                  "elimination": {
                    "stoolConditions": [
                      "normal"
                    ],
                    "stoolColor": "normal",
                    "urinationConditions": [
                      "normal"
                    ],
                    "urineColor": "normal"
                  },
                  "reproduction": {
                    "maleGenitalAppearance": [
                      "normal"
                    ]
                  },
                  "contacts": {
                    "decisionMakerName": "測試病人",
                    "decisionMakerPhone": "0000000000",
                    "decisionMakerRelation": "本人",
                    "informationProviderName": "測試病人",
                    "informationProviderPhone": "0000000000",
                    "informationProviderRelation": "本人",
                    "contactName": "測試配偶",
                    "contactPhone": "0000000000",
                    "contactRelation": "配偶"
                  },
                  "admission": {
                    "wardDate": "2026-09-23",
                    "wardTime": "09:00",
                    "reason": "合成案例：因右膝疼痛住院，預計接受進一步檢查。"
                  },
                  "family": {
                    "members": [
                      {
                        "role": "self",
                        "sex": "male",
                        "age": 62,
                        "maritalStatus": "married",
                        "isDecisionMaker": "yes",
                        "familyHistory": [
                          "hypertension"
                        ]
                      },
                      {
                        "role": "spouse",
                        "sex": "female",
                        "age": 60,
                        "aliveStatus": "alive",
                        "livesTogether": "yes",
                        "familyHistory": [
                          "none"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "已寫入；重送回傳相同回執",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                },
                "example": {
                  "clientRequestId": "REQ-ADMISSION-DEMO-001",
                  "recordId": "R-ADMISSION-DEMO-001",
                  "version": 1,
                  "status": "committed",
                  "recordState": "valid",
                  "recordedAt": "2026-09-23T09:21:00+08:00"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "請求內容或資料版本衝突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "欄位或關聯驗證失敗",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "請檢查欄位格式。",
                    "fields": [
                      {
                        "path": "assessment.admission.wardDate",
                        "message": "請使用 YYYY-MM-DD 字串，例如 \"2026-09-23\"。"
                      }
                    ]
                  },
                  "requestId": "TRACE-ADMISSION-DEMO-001"
                }
              }
            }
          }
        }
      }
    },
    "/admission-assessments/{recordId}": {
      "get": {
        "operationId": "getAdmissionAssessment",
        "summary": "查回入院護理評估",
        "description": "回傳目前版本、紀錄狀態及完整評估內容。",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "正式紀錄",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdmissionAssessmentRecord"
                },
                "example": {
                  "clientRequestId": "REQ-ADMISSION-DEMO-001",
                  "patientId": "P-DEMO-001",
                  "encounterId": "V-DEMO-001",
                  "assessedAt": "2026-09-23T09:20:00+08:00",
                  "assessment": {
                    "basic": {
                      "education": "senior_high",
                      "languages": [
                        "mandarin",
                        "taiwanese_hokkien"
                      ],
                      "religions": [
                        "none"
                      ]
                    },
                    "alerts": {
                      "antithromboticUse": "none",
                      "drugAllergy": "yes",
                      "drugAllergyNote": "合成案例：曾使用盤尼西林後出現皮疹。",
                      "drugAllergens": [
                        "penicillin"
                      ],
                      "foodAllergy": "none",
                      "transfusionReaction": "unknown",
                      "bloodType": "o_positive",
                      "recentForeignTravel": "none",
                      "treatmentRestrictions": [
                        "none"
                      ],
                      "tubes": [
                        "none"
                      ],
                      "rapidTestDate": {
                        "year": 2026,
                        "month": 9,
                        "day": 23
                      },
                      "rapidTestResult": "negative",
                      "pcrDate": {
                        "month": 9,
                        "day": 22
                      },
                      "pcrResult": "negative"
                    },
                    "health": {
                      "familyHistoryStatus": "yes",
                      "familyHistory": [
                        {
                          "relation": "father",
                          "diseases": [
                            "hypertension"
                          ]
                        }
                      ],
                      "maritalStatus": "married",
                      "livingStatus": "with_family",
                      "familyInteraction": "caring",
                      "primaryCaregivers": [
                        "spouse"
                      ],
                      "occupation": "commerce",
                      "financialStatus": "comfortable",
                      "smokingStatus": "none",
                      "alcoholUse": "occasional",
                      "betelNutStatus": "none",
                      "medicalHistory": [
                        "hypertension"
                      ],
                      "surgeryExperience": "none",
                      "recentEmergencyOrAdmissionCount": "none",
                      "currentMedications": [
                        "antihypertensive"
                      ]
                    },
                    "nutrition": {
                      "heightCm": 168,
                      "weightKg": 65,
                      "edemaStatus": "none",
                      "feedingRoutes": [
                        "oral"
                      ],
                      "feedingStatus": [
                        "normal"
                      ],
                      "oralConditions": [
                        "normal"
                      ],
                      "dentures": [
                        "none"
                      ],
                      "dietTypes": [
                        "regular"
                      ],
                      "foodRestriction": "none",
                      "otherSymptoms": [
                        "none"
                      ]
                    },
                    "sleep": {
                      "conditions": [
                        "normal"
                      ],
                      "usualHours": 7
                    },
                    "activity": {
                      "mobility": "walks_with_person_assistance",
                      "needsMobilityAid": true,
                      "mobilityAids": [
                        "walker"
                      ],
                      "leftUpperMuscleStrength": "5",
                      "rightUpperMuscleStrength": "5",
                      "leftLowerMuscleStrength": "5",
                      "rightLowerMuscleStrength": "4",
                      "limbAppearance": "normal",
                      "gait": "stable",
                      "selfCareAbility": "independent",
                      "fallInPastYear": "no"
                    },
                    "respiratory": {
                      "chestSymmetry": "normal",
                      "patterns": [
                        "normal"
                      ],
                      "coughFrequency": "none",
                      "sputumClearance": "normal",
                      "sputumStatus": "none",
                      "breathSounds": [
                        "normal"
                      ],
                      "oxygenTherapies": [
                        "none"
                      ]
                    },
                    "circulation": {
                      "implantStatus": "none",
                      "peripheralCirculation": "warm",
                      "symptoms": [
                        "none"
                      ]
                    },
                    "cognition": {
                      "leftVision": [
                        "clear"
                      ],
                      "rightVision": [
                        "clear"
                      ],
                      "leftHearing": [
                        "clear"
                      ],
                      "rightHearing": [
                        "clear"
                      ],
                      "orientation": "fully_oriented",
                      "behaviors": [
                        "appropriate"
                      ],
                      "painStatus": "present",
                      "painFindings": [
                        {
                          "site": "lower_limb",
                          "score": "4"
                        }
                      ],
                      "speech": "normal",
                      "skinAppearance": "normal"
                    },
                    "elimination": {
                      "stoolConditions": [
                        "normal"
                      ],
                      "stoolColor": "normal",
                      "urinationConditions": [
                        "normal"
                      ],
                      "urineColor": "normal"
                    },
                    "reproduction": {
                      "maleGenitalAppearance": [
                        "normal"
                      ]
                    },
                    "contacts": {
                      "decisionMakerName": "測試病人",
                      "decisionMakerPhone": "0000000000",
                      "decisionMakerRelation": "本人",
                      "informationProviderName": "測試病人",
                      "informationProviderPhone": "0000000000",
                      "informationProviderRelation": "本人",
                      "contactName": "測試配偶",
                      "contactPhone": "0000000000",
                      "contactRelation": "配偶"
                    },
                    "admission": {
                      "wardDate": "2026-09-23",
                      "wardTime": "09:00",
                      "reason": "合成案例：因右膝疼痛住院，預計接受進一步檢查。"
                    },
                    "family": {
                      "members": [
                        {
                          "role": "self",
                          "sex": "male",
                          "age": 62,
                          "maritalStatus": "married",
                          "isDecisionMaker": "yes",
                          "familyHistory": [
                            "hypertension"
                          ]
                        },
                        {
                          "role": "spouse",
                          "sex": "female",
                          "age": 60,
                          "aliveStatus": "alive",
                          "livesTogether": "yes",
                          "familyHistory": [
                            "none"
                          ]
                        }
                      ]
                    }
                  },
                  "recordId": "R-ADMISSION-DEMO-001",
                  "version": 1,
                  "status": "committed",
                  "recordState": "valid",
                  "recordedAt": "2026-09-23T09:21:00+08:00"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/patients/{patientId}/wounds": {
      "get": {
        "operationId": "listPatientWounds",
        "summary": "查詢既有傷口",
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "上一頁回傳的 nextCursor；首次省略。每頁最多 50 筆，按 woundId 升冪。"
          }
        ],
        "responses": {
          "200": {
            "description": "既有傷口清單",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "nextCursor"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "maxItems": 50,
                      "items": {
                        "type": "object",
                        "required": [
                          "woundId",
                          "patientId",
                          "site"
                        ],
                        "properties": {
                          "woundId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "傷口識別碼"
                          },
                          "patientId": {
                            "type": "string",
                            "minLength": 1,
                            "description": "所屬病人"
                          },
                          "site": {
                            "type": "string",
                            "minLength": 1,
                            "description": "部位"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "woundId": "W-DEMO-001",
                      "patientId": "P-DEMO-001",
                      "site": "左小腿"
                    }
                  ],
                  "nextCursor": null
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/attachments": {
      "post": {
        "operationId": "uploadAttachment",
        "summary": "上傳待關聯照片",
        "description": "範例僅接受 JPEG／PNG，最多 10 MiB；24 小時內未綁定的檔案清除。伺服器驗證病人權限與實際檔案格式。此上傳範例不去重，重送可能建立新檔案；未綁定檔案依期限清除。",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "patientId",
                  "file"
                ],
                "properties": {
                  "patientId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "所屬病人"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "照片已上傳，尚未建立評估紀錄",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                },
                "example": {
                  "attachmentId": "F-DEMO-001",
                  "patientId": "P-DEMO-001",
                  "contentType": "image/jpeg"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "檔案超過 10 MiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "不支援的檔案格式",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "欄位或關聯驗證失敗",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/wound-assessments": {
      "post": {
        "operationId": "createWoundAssessment",
        "summary": "新增傷口評估",
        "description": "院方驗證權限及 patientId、encounterId、woundId、attachmentIds 關聯。clientRequestId 在同一機構內去重，至少保留 7 天；同方法、路徑與內容重送回原 201 回執，任一不同回 409。操作者由認證身分決定。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssessmentInput"
              },
              "example": {
                "clientRequestId": "REQ-DEMO-001",
                "patientId": "P-DEMO-001",
                "encounterId": "V-DEMO-001",
                "woundId": "W-DEMO-001",
                "observedAt": "2026-09-23T09:30:00+08:00",
                "assessment": {
                  "length": {
                    "value": 2,
                    "unit": "cm"
                  },
                  "width": {
                    "value": 1,
                    "unit": "cm"
                  },
                  "careNote": "本次已清潔並更換敷料。"
                },
                "attachmentIds": [
                  "F-DEMO-001"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "已寫入；重送回傳相同回執",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                },
                "example": {
                  "clientRequestId": "REQ-DEMO-001",
                  "recordId": "R-DEMO-001",
                  "version": 1,
                  "status": "committed",
                  "recordState": "valid",
                  "recordedAt": "2026-09-23T09:31:00+08:00"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "請求內容或資料版本衝突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "欄位驗證失敗",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "VALIDATION_FAILED",
                    "message": "請檢查欄位格式。",
                    "fields": [
                      {
                        "path": "observedAt",
                        "message": "請使用含時區的 ISO 8601 時間，例如 2026-09-23T09:30:00+08:00。"
                      }
                    ]
                  },
                  "requestId": "TRACE-DEMO-001"
                }
              }
            }
          }
        }
      }
    },
    "/wound-assessments/{recordId}": {
      "get": {
        "operationId": "getWoundAssessment",
        "summary": "查回正式紀錄",
        "description": "回傳目前版本及 recordState。作廢後仍可查回；作廢原因保留於院方稽核紀錄。",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "正式紀錄",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssessmentRecord"
                },
                "example": {
                  "clientRequestId": "REQ-DEMO-001",
                  "patientId": "P-DEMO-001",
                  "encounterId": "V-DEMO-001",
                  "woundId": "W-DEMO-001",
                  "observedAt": "2026-09-23T09:30:00+08:00",
                  "assessment": {
                    "length": {
                      "value": 2,
                      "unit": "cm"
                    },
                    "width": {
                      "value": 1,
                      "unit": "cm"
                    },
                    "careNote": "本次已清潔並更換敷料。"
                  },
                  "attachmentIds": [
                    "F-DEMO-001"
                  ],
                  "recordId": "R-DEMO-001",
                  "version": 1,
                  "status": "committed",
                  "recordState": "valid",
                  "recordedAt": "2026-09-23T09:31:00+08:00"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateWoundAssessment",
        "summary": "更正評估描述",
        "description": "本例僅允許更正 careNote。省略欄位不變，不接受 null；病人及傷口關聯不可修改。使用目前 version；過期回 409 VERSION_CONFLICT，已作廢回 409 RECORD_STATE_CONFLICT。clientRequestId 依同機構去重規則處理，先回原提交回執，再檢查新操作的版本。",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssessmentUpdate"
              },
              "example": {
                "clientRequestId": "REQ-DEMO-002",
                "version": 1,
                "changes": {
                  "careNote": "本次已清潔並更換敷料，敷料固定完整。"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "已更正；版本加一",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                },
                "example": {
                  "clientRequestId": "REQ-DEMO-002",
                  "recordId": "R-DEMO-001",
                  "version": 2,
                  "status": "committed",
                  "recordState": "valid",
                  "recordedAt": "2026-09-23T09:40:00+08:00"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "請求內容或資料版本衝突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "欄位或關聯驗證失敗",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/wound-assessments/{recordId}/void": {
      "post": {
        "operationId": "voidWoundAssessment",
        "summary": "作廢評估紀錄",
        "description": "保留原紀錄及作廢原因，recordState 變為 voided；GET 仍可查回。使用目前 version；過期版本或新請求再次作廢回 409。原 clientRequestId 重送回原成功回執，不受版本改變影響。本例不支援永久刪除或復原。",
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssessmentVoid"
              },
              "example": {
                "clientRequestId": "REQ-DEMO-003",
                "version": 2,
                "reason": "重複登錄"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "已作廢；版本加一",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                },
                "example": {
                  "clientRequestId": "REQ-DEMO-003",
                  "recordId": "R-DEMO-001",
                  "version": 3,
                  "status": "committed",
                  "recordState": "voided",
                  "recordedAt": "2026-09-23T09:45:00+08:00"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "請求內容或資料版本衝突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "欄位或關聯驗證失敗",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/attachments/{attachmentId}/content": {
      "get": {
        "operationId": "downloadAttachment",
        "summary": "下載照片",
        "parameters": [
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "驗證權限後回傳原始檔案；Content-Type 對應實際格式。",
            "content": {
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/requests/{clientRequestId}": {
      "get": {
        "operationId": "getSubmissionResult",
        "summary": "查詢寫入結果",
        "parameters": [
          {
            "name": "clientRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "院方穩定識別碼"
            }
          }
        ],
        "description": "此範例為同步寫入。完成後回原回執；找不到回 404（不表示可換新 ID 重送）。查詢需有原紀錄權限。",
        "responses": {
          "200": {
            "description": "原寫入回執",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                },
                "example": {
                  "clientRequestId": "REQ-DEMO-001",
                  "recordId": "R-DEMO-001",
                  "version": 1,
                  "status": "committed",
                  "recordState": "valid",
                  "recordedAt": "2026-09-23T09:31:00+08:00"
                }
              }
            }
          },
          "401": {
            "description": "憑證無效或過期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "沒有此資料的操作權限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "找不到資料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "hospitalAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "範例認證；實際使用院方核發且可對應使用者與機構權限的憑證。"
      }
    },
    "schemas": {
      "Encounter": {
        "type": "object",
        "required": [
          "encounterId",
          "patientId",
          "type",
          "status"
        ],
        "properties": {
          "encounterId": {
            "type": "string",
            "minLength": 1,
            "description": "本次就醫的穩定 ID"
          },
          "patientId": {
            "type": "string",
            "minLength": 1,
            "description": "所屬病人 ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "inpatient",
              "outpatient",
              "emergency"
            ],
            "description": "範例代碼：住院、門診、急診；實際依院方定義"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "closed",
              "cancelled"
            ],
            "description": "範例代碼：進行中、已結束、已取消"
          }
        }
      },
      "AdmissionAssessmentInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "clientRequestId",
          "patientId",
          "encounterId",
          "assessedAt",
          "assessment"
        ],
        "properties": {
          "clientRequestId": {
            "type": "string",
            "minLength": 1,
            "description": "同一次提交重試時保持不變"
          },
          "patientId": {
            "type": "string",
            "minLength": 1,
            "description": "院方病人 ID"
          },
          "encounterId": {
            "type": "string",
            "minLength": 1,
            "description": "本例必填；必須是該病人的本次住院"
          },
          "assessedAt": {
            "type": "string",
            "format": "date-time",
            "description": "實際評估時間，含時區"
          },
          "assessment": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "basic": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "education": {
                    "type": "string",
                    "enum": [
                      "illiterate",
                      "elementary",
                      "junior_high",
                      "senior_high",
                      "college",
                      "university_or_above"
                    ],
                    "title": "教育程度",
                    "description": "教育程度",
                    "x-field-id": "basic.education",
                    "x-options": [
                      {
                        "value": "illiterate",
                        "label": "不識字"
                      },
                      {
                        "value": "elementary",
                        "label": "小學"
                      },
                      {
                        "value": "junior_high",
                        "label": "初中"
                      },
                      {
                        "value": "senior_high",
                        "label": "高中"
                      },
                      {
                        "value": "college",
                        "label": "專科"
                      },
                      {
                        "value": "university_or_above",
                        "label": "大學以上"
                      }
                    ]
                  },
                  "languages": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "mandarin",
                        "taiwanese_hokkien",
                        "hakka",
                        "amis",
                        "atayal",
                        "rukai",
                        "yami",
                        "english",
                        "indonesian",
                        "japanese",
                        "thai",
                        "filipino",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "溝通語言",
                    "description": "溝通語言",
                    "x-field-id": "basic.languages",
                    "x-options": [
                      {
                        "value": "mandarin",
                        "label": "國語"
                      },
                      {
                        "value": "taiwanese_hokkien",
                        "label": "閩南語"
                      },
                      {
                        "value": "hakka",
                        "label": "客家語"
                      },
                      {
                        "value": "amis",
                        "label": "原住民語－阿美"
                      },
                      {
                        "value": "atayal",
                        "label": "原住民語－泰雅"
                      },
                      {
                        "value": "rukai",
                        "label": "原住民語－魯凱"
                      },
                      {
                        "value": "yami",
                        "label": "原住民語－雅美"
                      },
                      {
                        "value": "english",
                        "label": "外國語－英語"
                      },
                      {
                        "value": "indonesian",
                        "label": "外國語－印尼語"
                      },
                      {
                        "value": "japanese",
                        "label": "外國語－日本"
                      },
                      {
                        "value": "thai",
                        "label": "外國語－泰國語"
                      },
                      {
                        "value": "filipino",
                        "label": "外國語－菲律賓語"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "religions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "buddhism",
                        "taoism",
                        "christianity",
                        "catholicism",
                        "islam",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "宗教信仰",
                    "description": "宗教信仰",
                    "x-field-id": "basic.religions",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "buddhism",
                        "label": "佛教"
                      },
                      {
                        "value": "taoism",
                        "label": "道教"
                      },
                      {
                        "value": "christianity",
                        "label": "基督教"
                      },
                      {
                        "value": "catholicism",
                        "label": "天主教"
                      },
                      {
                        "value": "islam",
                        "label": "回教"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "alerts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "antithromboticUse": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes",
                      "uncertain"
                    ],
                    "title": "抗血栓藥物使用",
                    "description": "抗血栓藥物使用",
                    "x-field-id": "alerts.antithromboticUse",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      },
                      {
                        "value": "uncertain",
                        "label": "不詳"
                      }
                    ]
                  },
                  "drugAllergy": {
                    "type": "string",
                    "enum": [
                      "none",
                      "unknown",
                      "yes"
                    ],
                    "title": "藥物過敏",
                    "description": "藥物過敏",
                    "x-field-id": "alerts.drugAllergy",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "drugAllergyNote": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "title": "藥物過敏說明",
                    "description": "藥物過敏說明",
                    "x-field-id": "alerts.drugAllergyNote",
                    "x-required-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "drugAllergens": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "contrast_media",
                        "blood_transfusion",
                        "nsaid",
                        "sulfonamides",
                        "penicillin",
                        "g6pd",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "藥物過敏種類",
                    "description": "藥物過敏種類",
                    "x-field-id": "alerts.drugAllergens",
                    "x-options": [
                      {
                        "value": "contrast_media",
                        "label": "顯影劑過敏"
                      },
                      {
                        "value": "blood_transfusion",
                        "label": "輸血過敏"
                      },
                      {
                        "value": "nsaid",
                        "label": "NSAID"
                      },
                      {
                        "value": "sulfonamides",
                        "label": "Sulfonamides"
                      },
                      {
                        "value": "penicillin",
                        "label": "Penicillin"
                      },
                      {
                        "value": "g6pd",
                        "label": "G6PD"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "otherDrugAllergen": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其他藥物過敏",
                    "description": "其他藥物過敏",
                    "x-field-id": "alerts.otherDrugAllergen",
                    "x-required-when": {
                      "fieldId": "alerts.drugAllergens",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.drugAllergens",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "foodAllergy": {
                    "type": "string",
                    "enum": [
                      "none",
                      "unknown",
                      "yes"
                    ],
                    "title": "食物過敏",
                    "description": "食物過敏",
                    "x-field-id": "alerts.foodAllergy",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "foodAllergens": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "seafood",
                        "mushroom",
                        "beef",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "食物過敏種類",
                    "description": "食物過敏種類",
                    "x-field-id": "alerts.foodAllergens",
                    "x-options": [
                      {
                        "value": "seafood",
                        "label": "海鮮類"
                      },
                      {
                        "value": "mushroom",
                        "label": "菇類"
                      },
                      {
                        "value": "beef",
                        "label": "牛肉"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "alerts.foodAllergy",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.foodAllergy",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "transfusionReaction": {
                    "type": "string",
                    "enum": [
                      "none",
                      "unknown",
                      "yes"
                    ],
                    "title": "輸血反應",
                    "description": "輸血反應",
                    "x-field-id": "alerts.transfusionReaction",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "bloodType": {
                    "type": "string",
                    "enum": [
                      "o_positive",
                      "a_positive",
                      "b_positive",
                      "ab_positive",
                      "o_negative",
                      "a_negative",
                      "b_negative",
                      "ab_negative",
                      "unknown"
                    ],
                    "title": "血型",
                    "description": "血型",
                    "x-field-id": "alerts.bloodType",
                    "x-options": [
                      {
                        "value": "o_positive",
                        "label": "O+"
                      },
                      {
                        "value": "a_positive",
                        "label": "A+"
                      },
                      {
                        "value": "b_positive",
                        "label": "B+"
                      },
                      {
                        "value": "ab_positive",
                        "label": "AB+"
                      },
                      {
                        "value": "o_negative",
                        "label": "O-"
                      },
                      {
                        "value": "a_negative",
                        "label": "A-"
                      },
                      {
                        "value": "b_negative",
                        "label": "B-"
                      },
                      {
                        "value": "ab_negative",
                        "label": "AB-"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      }
                    ]
                  },
                  "recentForeignTravel": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "近 3 個月外國旅遊史",
                    "description": "近 3 個月外國旅遊史",
                    "x-field-id": "alerts.recentForeignTravel",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "travelLocation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "旅遊地點",
                    "description": "旅遊地點",
                    "x-field-id": "alerts.travelLocation",
                    "x-required-when": {
                      "fieldId": "alerts.recentForeignTravel",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.recentForeignTravel",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "treatmentRestrictions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "left_hand",
                        "right_hand",
                        "left_foot",
                        "right_foot",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "禁做治療",
                    "description": "禁做治療",
                    "x-field-id": "alerts.treatmentRestrictions",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "left_hand",
                        "label": "左手"
                      },
                      {
                        "value": "right_hand",
                        "label": "右手"
                      },
                      {
                        "value": "left_foot",
                        "label": "左腳"
                      },
                      {
                        "value": "right_foot",
                        "label": "右腳"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "tubes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "ng",
                        "foley",
                        "tracheostomy",
                        "pigtail",
                        "port_a",
                        "av_shunt",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "管路",
                    "description": "管路",
                    "x-field-id": "alerts.tubes",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "ng",
                        "label": "NG"
                      },
                      {
                        "value": "foley",
                        "label": "Foley"
                      },
                      {
                        "value": "tracheostomy",
                        "label": "氣切"
                      },
                      {
                        "value": "pigtail",
                        "label": "pigtail"
                      },
                      {
                        "value": "port_a",
                        "label": "port-A"
                      },
                      {
                        "value": "av_shunt",
                        "label": "AV shunt"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "rapidTestDate": {
                    "type": "object",
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "year": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9999
                      },
                      "month": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "day": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 31
                      }
                    },
                    "allOf": [
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "enum": [
                                4,
                                6,
                                9,
                                11
                              ]
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 30
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 29
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "year",
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            },
                            "year": {
                              "not": {
                                "anyOf": [
                                  {
                                    "multipleOf": 400
                                  },
                                  {
                                    "allOf": [
                                      {
                                        "multipleOf": 4
                                      },
                                      {
                                        "not": {
                                          "multipleOf": 100
                                        }
                                      }
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 28
                            }
                          }
                        }
                      }
                    ],
                    "title": "快篩日期",
                    "description": "快篩日期",
                    "x-field-id": "alerts.rapidTestDate"
                  },
                  "rapidTestResult": {
                    "type": "string",
                    "enum": [
                      "positive",
                      "negative"
                    ],
                    "title": "快篩結果",
                    "description": "快篩結果",
                    "x-field-id": "alerts.rapidTestResult",
                    "x-options": [
                      {
                        "value": "positive",
                        "label": "Positive"
                      },
                      {
                        "value": "negative",
                        "label": "Negative"
                      }
                    ]
                  },
                  "pcrDate": {
                    "type": "object",
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "year": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9999
                      },
                      "month": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "day": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 31
                      }
                    },
                    "allOf": [
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "enum": [
                                4,
                                6,
                                9,
                                11
                              ]
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 30
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 29
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "year",
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            },
                            "year": {
                              "not": {
                                "anyOf": [
                                  {
                                    "multipleOf": 400
                                  },
                                  {
                                    "allOf": [
                                      {
                                        "multipleOf": 4
                                      },
                                      {
                                        "not": {
                                          "multipleOf": 100
                                        }
                                      }
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 28
                            }
                          }
                        }
                      }
                    ],
                    "title": "PCR 日期",
                    "description": "PCR 日期",
                    "x-field-id": "alerts.pcrDate"
                  },
                  "pcrResult": {
                    "type": "string",
                    "enum": [
                      "positive",
                      "negative"
                    ],
                    "title": "PCR 結果",
                    "description": "PCR 結果",
                    "x-field-id": "alerts.pcrResult",
                    "x-options": [
                      {
                        "value": "positive",
                        "label": "Positive"
                      },
                      {
                        "value": "negative",
                        "label": "Negative"
                      }
                    ]
                  },
                  "pcrCtValue": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 50,
                    "title": "CT 值",
                    "description": "CT 值",
                    "x-field-id": "alerts.pcrCtValue",
                    "x-required-when": {
                      "fieldId": "alerts.pcrResult",
                      "operator": "equals",
                      "value": "positive"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.pcrResult",
                      "operator": "equals",
                      "value": "positive"
                    }
                  }
                }
              },
              "health": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "familyHistoryStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes",
                      "uncertain"
                    ],
                    "title": "家族病史",
                    "description": "家族病史",
                    "x-field-id": "health.familyHistoryStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      },
                      {
                        "value": "uncertain",
                        "label": "不詳"
                      }
                    ]
                  },
                  "familyHistory": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "relation": {
                          "type": "string",
                          "enum": [
                            "father",
                            "mother",
                            "son",
                            "daughter",
                            "paternal_grandfather",
                            "paternal_grandmother",
                            "other"
                          ],
                          "title": "發病親屬",
                          "description": "發病親屬",
                          "x-field-id": "relation",
                          "x-options": [
                            {
                              "value": "father",
                              "label": "父"
                            },
                            {
                              "value": "mother",
                              "label": "母"
                            },
                            {
                              "value": "son",
                              "label": "子"
                            },
                            {
                              "value": "daughter",
                              "label": "女"
                            },
                            {
                              "value": "paternal_grandfather",
                              "label": "祖父"
                            },
                            {
                              "value": "paternal_grandmother",
                              "label": "祖母"
                            },
                            {
                              "value": "other",
                              "label": "其他"
                            }
                          ]
                        },
                        "diseases": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "hypertension",
                              "heart_disease",
                              "diabetes",
                              "liver_cancer",
                              "colorectal_cancer",
                              "asthma",
                              "blood_disease",
                              "cancer",
                              "cerebrovascular_disease",
                              "mental_illness",
                              "other"
                            ]
                          },
                          "minItems": 1,
                          "title": "疾病",
                          "description": "疾病",
                          "x-field-id": "diseases",
                          "x-options": [
                            {
                              "value": "hypertension",
                              "label": "高血壓"
                            },
                            {
                              "value": "heart_disease",
                              "label": "心臟病"
                            },
                            {
                              "value": "diabetes",
                              "label": "糖尿病"
                            },
                            {
                              "value": "liver_cancer",
                              "label": "肝癌"
                            },
                            {
                              "value": "colorectal_cancer",
                              "label": "大腸直腸癌"
                            },
                            {
                              "value": "asthma",
                              "label": "氣喘"
                            },
                            {
                              "value": "blood_disease",
                              "label": "血液病"
                            },
                            {
                              "value": "cancer",
                              "label": "癌症"
                            },
                            {
                              "value": "cerebrovascular_disease",
                              "label": "腦血管疾病"
                            },
                            {
                              "value": "mental_illness",
                              "label": "精神疾病"
                            },
                            {
                              "value": "other",
                              "label": "其它"
                            }
                          ]
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "relation"
                          ],
                          "properties": {
                            "relation": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "diseases"
                          ],
                          "properties": {
                            "diseases": {}
                          }
                        }
                      ]
                    },
                    "title": "各親屬家族病史",
                    "description": "各親屬家族病史",
                    "x-field-id": "health.familyHistory",
                    "x-required-when": {
                      "fieldId": "health.familyHistoryStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "health.familyHistoryStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "maritalStatus": {
                    "type": "string",
                    "enum": [
                      "single",
                      "married",
                      "divorced",
                      "separated",
                      "cohabiting",
                      "widowed"
                    ],
                    "title": "婚姻狀況",
                    "description": "婚姻狀況",
                    "x-field-id": "health.maritalStatus",
                    "x-options": [
                      {
                        "value": "single",
                        "label": "未婚"
                      },
                      {
                        "value": "married",
                        "label": "已婚"
                      },
                      {
                        "value": "divorced",
                        "label": "離婚"
                      },
                      {
                        "value": "separated",
                        "label": "分居"
                      },
                      {
                        "value": "cohabiting",
                        "label": "同居"
                      },
                      {
                        "value": "widowed",
                        "label": "喪偶"
                      }
                    ]
                  },
                  "livingStatus": {
                    "type": "string",
                    "enum": [
                      "spouse_only",
                      "with_family",
                      "alone_family_support",
                      "alone_friend_support",
                      "alone_independent",
                      "alone_dependent",
                      "care_facility",
                      "other"
                    ],
                    "title": "居住狀況",
                    "description": "居住狀況",
                    "x-field-id": "health.livingStatus",
                    "x-options": [
                      {
                        "value": "spouse_only",
                        "label": "僅有配偶同住"
                      },
                      {
                        "value": "with_family",
                        "label": "與家人同住"
                      },
                      {
                        "value": "alone_family_support",
                        "label": "獨居且有家屬協助"
                      },
                      {
                        "value": "alone_friend_support",
                        "label": "獨居且有朋友協助"
                      },
                      {
                        "value": "alone_independent",
                        "label": "獨居且無人協助但能自理"
                      },
                      {
                        "value": "alone_dependent",
                        "label": "獨居且無人協助且無法自理"
                      },
                      {
                        "value": "care_facility",
                        "label": "住護理之家或療養機構"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "familyInteraction": {
                    "type": "string",
                    "enum": [
                      "caring",
                      "distant",
                      "no_contact",
                      "other"
                    ],
                    "title": "與家人互動關係",
                    "description": "與家人互動關係",
                    "x-field-id": "health.familyInteraction",
                    "x-options": [
                      {
                        "value": "caring",
                        "label": "互相關懷"
                      },
                      {
                        "value": "distant",
                        "label": "疏離"
                      },
                      {
                        "value": "no_contact",
                        "label": "不相往來"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ]
                  },
                  "otherFamilyInteraction": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它互動關係",
                    "description": "其它互動關係",
                    "x-field-id": "health.otherFamilyInteraction",
                    "x-required-when": {
                      "fieldId": "health.familyInteraction",
                      "operator": "equals",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "health.familyInteraction",
                      "operator": "equals",
                      "value": "other"
                    }
                  },
                  "primaryCaregivers": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "spouse",
                        "parents",
                        "children",
                        "friends",
                        "caregiver",
                        "foreign_caregiver",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "住院期間主要照顧者",
                    "description": "住院期間主要照顧者",
                    "x-field-id": "health.primaryCaregivers",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "spouse",
                        "label": "配偶"
                      },
                      {
                        "value": "parents",
                        "label": "父母"
                      },
                      {
                        "value": "children",
                        "label": "子女"
                      },
                      {
                        "value": "friends",
                        "label": "朋友"
                      },
                      {
                        "value": "caregiver",
                        "label": "看護"
                      },
                      {
                        "value": "foreign_caregiver",
                        "label": "外傭"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ]
                  },
                  "otherPrimaryCaregiver": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它主要照顧者",
                    "description": "其它主要照顧者",
                    "x-field-id": "health.otherPrimaryCaregiver",
                    "x-required-when": {
                      "fieldId": "health.primaryCaregivers",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "health.primaryCaregivers",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "occupation": {
                    "type": "string",
                    "enum": [
                      "none",
                      "military",
                      "civil_service",
                      "education",
                      "industrial",
                      "commerce",
                      "agriculture",
                      "student",
                      "healthcare",
                      "service",
                      "other"
                    ],
                    "title": "職業別",
                    "description": "職業別",
                    "x-field-id": "health.occupation",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "military",
                        "label": "軍人"
                      },
                      {
                        "value": "civil_service",
                        "label": "公"
                      },
                      {
                        "value": "education",
                        "label": "教"
                      },
                      {
                        "value": "industrial",
                        "label": "工"
                      },
                      {
                        "value": "commerce",
                        "label": "商"
                      },
                      {
                        "value": "agriculture",
                        "label": "農"
                      },
                      {
                        "value": "student",
                        "label": "學生"
                      },
                      {
                        "value": "healthcare",
                        "label": "醫護"
                      },
                      {
                        "value": "service",
                        "label": "服務業"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "otherOccupation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它職業",
                    "description": "其它職業",
                    "x-field-id": "health.otherOccupation",
                    "x-required-when": {
                      "fieldId": "health.occupation",
                      "operator": "equals",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "health.occupation",
                      "operator": "equals",
                      "value": "other"
                    }
                  },
                  "financialStatus": {
                    "type": "string",
                    "enum": [
                      "affluent",
                      "comfortable",
                      "barely_sustaining",
                      "low_income"
                    ],
                    "title": "經濟狀況",
                    "description": "經濟狀況",
                    "x-field-id": "health.financialStatus",
                    "x-options": [
                      {
                        "value": "affluent",
                        "label": "富裕"
                      },
                      {
                        "value": "comfortable",
                        "label": "小康"
                      },
                      {
                        "value": "barely_sustaining",
                        "label": "勉強維持生活"
                      },
                      {
                        "value": "low_income",
                        "label": "低收入戶"
                      }
                    ]
                  },
                  "smokingStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "current",
                      "quitting_under_six_months",
                      "quit_six_months_or_more"
                    ],
                    "title": "抽菸狀態",
                    "description": "抽菸狀態",
                    "x-field-id": "health.smokingStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "current",
                        "label": "有"
                      },
                      {
                        "value": "quitting_under_six_months",
                        "label": "持續戒菸中未達半年"
                      },
                      {
                        "value": "quit_six_months_or_more",
                        "label": "已戒達半年以上"
                      }
                    ]
                  },
                  "smokingAmount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000,
                    "title": "抽菸量",
                    "description": "抽菸量",
                    "x-field-id": "health.smokingAmount",
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "smokingAmountUnit": {
                    "type": "string",
                    "enum": [
                      "packs_per_day",
                      "cigarettes_per_day"
                    ],
                    "title": "抽菸量單位",
                    "description": "抽菸量單位",
                    "x-field-id": "health.smokingAmountUnit",
                    "x-options": [
                      {
                        "value": "packs_per_day",
                        "label": "包／天"
                      },
                      {
                        "value": "cigarettes_per_day",
                        "label": "支／天"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "smokingYears": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 120,
                    "title": "開始吸菸至今",
                    "description": "開始吸菸至今；單位：年",
                    "x-field-id": "health.smokingYears",
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "quitSmokingExperience": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "戒菸經驗",
                    "description": "戒菸經驗",
                    "x-field-id": "health.quitSmokingExperience",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "quitSmokingWillingness": {
                    "type": "string",
                    "enum": [
                      "yes",
                      "no"
                    ],
                    "title": "戒菸意願",
                    "description": "戒菸意願",
                    "x-field-id": "health.quitSmokingWillingness",
                    "x-options": [
                      {
                        "value": "yes",
                        "label": "是"
                      },
                      {
                        "value": "no",
                        "label": "否"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "alcoholUse": {
                    "type": "string",
                    "enum": [
                      "none",
                      "quit",
                      "occasional",
                      "frequent",
                      "daily"
                    ],
                    "title": "喝酒",
                    "description": "喝酒",
                    "x-field-id": "health.alcoholUse",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "quit",
                        "label": "已戒"
                      },
                      {
                        "value": "occasional",
                        "label": "偶爾（應酬）"
                      },
                      {
                        "value": "frequent",
                        "label": "經常"
                      },
                      {
                        "value": "daily",
                        "label": "每天"
                      }
                    ]
                  },
                  "betelNutStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "quit",
                      "current"
                    ],
                    "title": "檳榔狀態",
                    "description": "檳榔狀態",
                    "x-field-id": "health.betelNutStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "quit",
                        "label": "已戒"
                      },
                      {
                        "value": "current",
                        "label": "有"
                      }
                    ]
                  },
                  "betelNutAmount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000,
                    "title": "檳榔量",
                    "description": "檳榔量；單位：包／天",
                    "x-field-id": "health.betelNutAmount",
                    "x-required-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "betelNutYears": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 120,
                    "title": "開始嚼檳榔至今",
                    "description": "開始嚼檳榔至今；單位：年",
                    "x-field-id": "health.betelNutYears",
                    "x-required-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "medicalHistory": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "breast_cancer",
                        "blood_disease",
                        "mental_illness",
                        "hypertension",
                        "liver_cancer",
                        "cancer",
                        "heart_disease",
                        "colorectal_cancer",
                        "suicide",
                        "diabetes",
                        "asthma",
                        "cerebrovascular_disease",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "過去病史",
                    "description": "過去病史",
                    "x-field-id": "health.medicalHistory",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "breast_cancer",
                        "label": "乳癌"
                      },
                      {
                        "value": "blood_disease",
                        "label": "血液病"
                      },
                      {
                        "value": "mental_illness",
                        "label": "精神疾病"
                      },
                      {
                        "value": "hypertension",
                        "label": "高血壓"
                      },
                      {
                        "value": "liver_cancer",
                        "label": "肝癌"
                      },
                      {
                        "value": "cancer",
                        "label": "癌症"
                      },
                      {
                        "value": "heart_disease",
                        "label": "心臟病"
                      },
                      {
                        "value": "colorectal_cancer",
                        "label": "大腸直腸癌"
                      },
                      {
                        "value": "suicide",
                        "label": "自殺"
                      },
                      {
                        "value": "diabetes",
                        "label": "糖尿病"
                      },
                      {
                        "value": "asthma",
                        "label": "氣喘"
                      },
                      {
                        "value": "cerebrovascular_disease",
                        "label": "腦血管病變"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "surgeryExperience": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "手術經驗",
                    "description": "手術經驗",
                    "x-field-id": "health.surgeryExperience",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "surgeryNote": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "手術說明",
                    "description": "手術說明",
                    "x-field-id": "health.surgeryNote",
                    "x-required-when": {
                      "fieldId": "health.surgeryExperience",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "health.surgeryExperience",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "recentEmergencyOrAdmissionCount": {
                    "type": "string",
                    "enum": [
                      "none",
                      "one",
                      "two",
                      "more_than_two"
                    ],
                    "title": "近 3 個月急診或住院次數",
                    "description": "近 3 個月急診或住院次數",
                    "x-field-id": "health.recentEmergencyOrAdmissionCount",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "沒有"
                      },
                      {
                        "value": "one",
                        "label": "1 次"
                      },
                      {
                        "value": "two",
                        "label": "2 次"
                      },
                      {
                        "value": "more_than_two",
                        "label": ">2 次"
                      }
                    ]
                  },
                  "currentMedications": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "antidepressant_or_antipsychotic",
                        "cardiac",
                        "laxative_or_stool_softener",
                        "antihypertensive",
                        "antiepileptic",
                        "anticoagulant",
                        "anesthetic_analgesic",
                        "glucose_lowering",
                        "anti_parkinson",
                        "erythropoietin",
                        "muscle_relaxant",
                        "diuretic",
                        "oral_anticancer",
                        "sedative_hypnotic",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "現在用藥",
                    "description": "現在用藥",
                    "x-field-id": "health.currentMedications",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "antidepressant_or_antipsychotic",
                        "label": "抗憂鬱／抗精神病藥"
                      },
                      {
                        "value": "cardiac",
                        "label": "心臟用藥"
                      },
                      {
                        "value": "laxative_or_stool_softener",
                        "label": "瀉藥／軟便劑"
                      },
                      {
                        "value": "antihypertensive",
                        "label": "降血壓"
                      },
                      {
                        "value": "antiepileptic",
                        "label": "抗癲癇藥"
                      },
                      {
                        "value": "anticoagulant",
                        "label": "抗凝血劑"
                      },
                      {
                        "value": "anesthetic_analgesic",
                        "label": "麻醉止痛藥"
                      },
                      {
                        "value": "glucose_lowering",
                        "label": "降血糖"
                      },
                      {
                        "value": "anti_parkinson",
                        "label": "抗帕金森氏症藥"
                      },
                      {
                        "value": "erythropoietin",
                        "label": "紅血球生成素"
                      },
                      {
                        "value": "muscle_relaxant",
                        "label": "肌肉鬆弛劑"
                      },
                      {
                        "value": "diuretic",
                        "label": "利尿劑"
                      },
                      {
                        "value": "oral_anticancer",
                        "label": "口服抗癌藥物"
                      },
                      {
                        "value": "sedative_hypnotic",
                        "label": "鎮靜安眠藥"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "nutrition": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "heightCm": {
                    "type": "number",
                    "minimum": 20,
                    "maximum": 250,
                    "title": "身高",
                    "description": "身高；單位：公分",
                    "x-field-id": "nutrition.heightCm"
                  },
                  "weightKg": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 500,
                    "title": "體重",
                    "description": "體重；單位：Kg",
                    "x-field-id": "nutrition.weightKg"
                  },
                  "measurementUnavailableReason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "身高體重無法測量原因",
                    "description": "身高體重無法測量原因",
                    "x-field-id": "nutrition.measurementUnavailableReason",
                    "x-required-when": {
                      "any": [
                        {
                          "fieldId": "nutrition.heightCm",
                          "operator": "isPresent",
                          "value": false
                        },
                        {
                          "fieldId": "nutrition.weightKg",
                          "operator": "isPresent",
                          "value": false
                        }
                      ]
                    },
                    "x-visible-when": {
                      "any": [
                        {
                          "fieldId": "nutrition.heightCm",
                          "operator": "isPresent",
                          "value": false
                        },
                        {
                          "fieldId": "nutrition.weightKg",
                          "operator": "isPresent",
                          "value": false
                        }
                      ]
                    }
                  },
                  "edemaStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "present"
                    ],
                    "title": "水腫情形",
                    "description": "水腫情形",
                    "x-field-id": "nutrition.edemaStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "present",
                        "label": "有"
                      }
                    ]
                  },
                  "edemaFindings": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "site": {
                          "type": "string",
                          "enum": [
                            "left_upper_limb",
                            "right_upper_limb",
                            "left_lower_limb",
                            "right_lower_limb",
                            "both_upper_limbs",
                            "both_lower_limbs",
                            "all_limbs"
                          ],
                          "title": "部位",
                          "description": "部位",
                          "x-field-id": "site",
                          "x-options": [
                            {
                              "value": "left_upper_limb",
                              "label": "左上肢"
                            },
                            {
                              "value": "right_upper_limb",
                              "label": "右上肢"
                            },
                            {
                              "value": "left_lower_limb",
                              "label": "左下肢"
                            },
                            {
                              "value": "right_lower_limb",
                              "label": "右下肢"
                            },
                            {
                              "value": "both_upper_limbs",
                              "label": "雙上肢"
                            },
                            {
                              "value": "both_lower_limbs",
                              "label": "雙下肢"
                            },
                            {
                              "value": "all_limbs",
                              "label": "四肢"
                            }
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "grade_1",
                            "grade_2",
                            "grade_3",
                            "grade_4"
                          ],
                          "title": "程度",
                          "description": "程度",
                          "x-field-id": "severity",
                          "x-options": [
                            {
                              "value": "grade_1",
                              "label": "1+"
                            },
                            {
                              "value": "grade_2",
                              "label": "2+"
                            },
                            {
                              "value": "grade_3",
                              "label": "3+"
                            },
                            {
                              "value": "grade_4",
                              "label": "4+"
                            }
                          ]
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "site"
                          ],
                          "properties": {
                            "site": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "severity"
                          ],
                          "properties": {
                            "severity": {}
                          }
                        }
                      ]
                    },
                    "title": "水腫部位與程度",
                    "description": "水腫部位與程度",
                    "x-field-id": "nutrition.edemaFindings",
                    "x-required-when": {
                      "fieldId": "nutrition.edemaStatus",
                      "operator": "equals",
                      "value": "present"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.edemaStatus",
                      "operator": "equals",
                      "value": "present"
                    }
                  },
                  "feedingRoutes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "oral",
                        "ng_feeding",
                        "gastrostomy",
                        "enterostomy",
                        "tpn_ppn",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "進食方式",
                    "description": "進食方式",
                    "x-field-id": "nutrition.feedingRoutes",
                    "x-options": [
                      {
                        "value": "oral",
                        "label": "由口進食"
                      },
                      {
                        "value": "ng_feeding",
                        "label": "N-G Feeding"
                      },
                      {
                        "value": "gastrostomy",
                        "label": "胃造"
                      },
                      {
                        "value": "enterostomy",
                        "label": "腸造"
                      },
                      {
                        "value": "tpn_ppn",
                        "label": "TPN/PPN"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "feedingStatus": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "decreased_appetite",
                        "dysphagia",
                        "chewing_difficulty",
                        "npo",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "進食情況",
                    "description": "進食情況",
                    "x-field-id": "nutrition.feedingStatus",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "decreased_appetite",
                        "label": "食慾減低"
                      },
                      {
                        "value": "dysphagia",
                        "label": "吞嚥困難"
                      },
                      {
                        "value": "chewing_difficulty",
                        "label": "咀嚼困難"
                      },
                      {
                        "value": "npo",
                        "label": "禁食"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "oralConditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "mucosal_damage",
                        "oral_odor",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "口腔狀況",
                    "description": "口腔狀況",
                    "x-field-id": "nutrition.oralConditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "mucosal_damage",
                        "label": "黏膜破損"
                      },
                      {
                        "value": "oral_odor",
                        "label": "口腔異味"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "dentures": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "upper",
                        "lower"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "假牙",
                    "description": "假牙",
                    "x-field-id": "nutrition.dentures",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "upper",
                        "label": "上"
                      },
                      {
                        "value": "lower",
                        "label": "下"
                      }
                    ]
                  },
                  "upperDentureType": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "removable"
                    ],
                    "title": "上假牙類型",
                    "description": "上假牙類型",
                    "x-field-id": "nutrition.upperDentureType",
                    "x-options": [
                      {
                        "value": "fixed",
                        "label": "固定"
                      },
                      {
                        "value": "removable",
                        "label": "活動"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "upper"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "upper"
                    }
                  },
                  "lowerDentureType": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "removable"
                    ],
                    "title": "下假牙類型",
                    "description": "下假牙類型",
                    "x-field-id": "nutrition.lowerDentureType",
                    "x-options": [
                      {
                        "value": "fixed",
                        "label": "固定"
                      },
                      {
                        "value": "removable",
                        "label": "活動"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "lower"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "lower"
                    }
                  },
                  "dietTypes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "regular",
                        "tube_feeding",
                        "vegetarian",
                        "special",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "飲食種類",
                    "description": "飲食種類",
                    "x-field-id": "nutrition.dietTypes",
                    "x-options": [
                      {
                        "value": "regular",
                        "label": "普通飲食"
                      },
                      {
                        "value": "tube_feeding",
                        "label": "管灌"
                      },
                      {
                        "value": "vegetarian",
                        "label": "素食"
                      },
                      {
                        "value": "special",
                        "label": "特殊飲食"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ]
                  },
                  "vegetarianDietDetails": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "soft",
                        "liquid",
                        "diabetic",
                        "low_fat",
                        "low_salt"
                      ]
                    },
                    "minItems": 1,
                    "title": "素食細項",
                    "description": "素食細項",
                    "x-field-id": "nutrition.vegetarianDietDetails",
                    "x-options": [
                      {
                        "value": "soft",
                        "label": "軟質"
                      },
                      {
                        "value": "liquid",
                        "label": "流質"
                      },
                      {
                        "value": "diabetic",
                        "label": "糖尿病"
                      },
                      {
                        "value": "low_fat",
                        "label": "低油"
                      },
                      {
                        "value": "low_salt",
                        "label": "低鹽"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "vegetarian"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "vegetarian"
                    }
                  },
                  "specialDietDetails": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "soft",
                        "liquid",
                        "diabetic",
                        "low_fat",
                        "low_salt"
                      ]
                    },
                    "minItems": 1,
                    "title": "特殊飲食細項",
                    "description": "特殊飲食細項",
                    "x-field-id": "nutrition.specialDietDetails",
                    "x-options": [
                      {
                        "value": "soft",
                        "label": "軟質"
                      },
                      {
                        "value": "liquid",
                        "label": "流質"
                      },
                      {
                        "value": "diabetic",
                        "label": "糖尿病"
                      },
                      {
                        "value": "low_fat",
                        "label": "低油"
                      },
                      {
                        "value": "low_salt",
                        "label": "低鹽"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "special"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "special"
                    }
                  },
                  "otherDiet": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它飲食",
                    "description": "其它飲食",
                    "x-field-id": "nutrition.otherDiet",
                    "x-required-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "foodRestriction": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "食物禁忌",
                    "description": "食物禁忌",
                    "x-field-id": "nutrition.foodRestriction",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "foodRestrictionNote": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "食物禁忌說明",
                    "description": "食物禁忌說明",
                    "x-field-id": "nutrition.foodRestrictionNote",
                    "x-required-when": {
                      "fieldId": "nutrition.foodRestriction",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.foodRestriction",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "otherSymptoms": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "nausea",
                        "vomiting",
                        "hiccups",
                        "bloating"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "其它症狀",
                    "description": "其它症狀",
                    "x-field-id": "nutrition.otherSymptoms",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "nausea",
                        "label": "噁心"
                      },
                      {
                        "value": "vomiting",
                        "label": "嘔吐"
                      },
                      {
                        "value": "hiccups",
                        "label": "打嗝"
                      },
                      {
                        "value": "bloating",
                        "label": "腹脹"
                      }
                    ]
                  }
                }
              },
              "sleep": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "conditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "day_night_reversal",
                        "insomnia",
                        "fatigue",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "休息睡眠狀況",
                    "description": "休息睡眠狀況",
                    "x-field-id": "sleep.conditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "day_night_reversal",
                        "label": "日夜顛倒"
                      },
                      {
                        "value": "insomnia",
                        "label": "失眠"
                      },
                      {
                        "value": "fatigue",
                        "label": "倦怠"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "usualHours": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 24,
                    "title": "平時約入睡幾小時",
                    "description": "平時約入睡幾小時；單位：小時",
                    "x-field-id": "sleep.usualHours"
                  }
                }
              },
              "activity": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "mobility": {
                    "type": "string",
                    "enum": [
                      "unable_to_walk",
                      "walks_with_person_assistance",
                      "independent"
                    ],
                    "title": "活動能力",
                    "description": "活動能力",
                    "x-field-id": "activity.mobility",
                    "x-options": [
                      {
                        "value": "unable_to_walk",
                        "label": "無法自行走動"
                      },
                      {
                        "value": "walks_with_person_assistance",
                        "label": "可走動需他人協助"
                      },
                      {
                        "value": "independent",
                        "label": "自己可走動"
                      }
                    ]
                  },
                  "needsMobilityAid": {
                    "type": "boolean",
                    "title": "可走動需輔助協助",
                    "description": "可走動需輔助協助",
                    "x-field-id": "activity.needsMobilityAid"
                  },
                  "mobilityAids": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "cane",
                        "walker",
                        "wheelchair",
                        "prosthesis",
                        "mobile_commode",
                        "mobile_iv_stand",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "行動輔具",
                    "description": "行動輔具",
                    "x-field-id": "activity.mobilityAids",
                    "x-options": [
                      {
                        "value": "cane",
                        "label": "拐杖"
                      },
                      {
                        "value": "walker",
                        "label": "助行器"
                      },
                      {
                        "value": "wheelchair",
                        "label": "輪椅"
                      },
                      {
                        "value": "prosthesis",
                        "label": "義肢"
                      },
                      {
                        "value": "mobile_commode",
                        "label": "活動便盆椅"
                      },
                      {
                        "value": "mobile_iv_stand",
                        "label": "活動點滴架"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "activity.needsMobilityAid",
                      "operator": "equals",
                      "value": true
                    },
                    "x-visible-when": {
                      "fieldId": "activity.needsMobilityAid",
                      "operator": "equals",
                      "value": true
                    }
                  },
                  "otherMobilityAid": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它行動輔具",
                    "description": "其它行動輔具",
                    "x-field-id": "activity.otherMobilityAid",
                    "x-required-when": {
                      "fieldId": "activity.mobilityAids",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.mobilityAids",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "leftUpperMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "左上肢肌肉張力",
                    "description": "左上肢肌肉張力",
                    "x-field-id": "activity.leftUpperMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "rightUpperMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "右上肢肌肉張力",
                    "description": "右上肢肌肉張力",
                    "x-field-id": "activity.rightUpperMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "leftLowerMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "左下肢肌肉張力",
                    "description": "左下肢肌肉張力",
                    "x-field-id": "activity.leftLowerMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "rightLowerMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "右下肢肌肉張力",
                    "description": "右下肢肌肉張力",
                    "x-field-id": "activity.rightLowerMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "limbAppearance": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "abnormal"
                    ],
                    "title": "外觀－肢體",
                    "description": "外觀－肢體",
                    "x-field-id": "activity.limbAppearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "abnormal",
                        "label": "異常"
                      }
                    ]
                  },
                  "gait": {
                    "type": "string",
                    "enum": [
                      "stable",
                      "unstable"
                    ],
                    "title": "步態",
                    "description": "步態",
                    "x-field-id": "activity.gait",
                    "x-options": [
                      {
                        "value": "stable",
                        "label": "穩定"
                      },
                      {
                        "value": "unstable",
                        "label": "不穩定"
                      }
                    ]
                  },
                  "unstableGaitDetails": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "left_hemiplegia",
                        "right_hemiplegia",
                        "limp",
                        "unable_to_assess",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "不穩定步態細項",
                    "description": "不穩定步態細項",
                    "x-field-id": "activity.unstableGaitDetails",
                    "x-options": [
                      {
                        "value": "left_hemiplegia",
                        "label": "偏癱（左側）"
                      },
                      {
                        "value": "right_hemiplegia",
                        "label": "偏癱（右側）"
                      },
                      {
                        "value": "limp",
                        "label": "跛行"
                      },
                      {
                        "value": "unable_to_assess",
                        "label": "暫無法評估"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "activity.gait",
                      "operator": "equals",
                      "value": "unstable"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.gait",
                      "operator": "equals",
                      "value": "unstable"
                    }
                  },
                  "otherGait": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它步態",
                    "description": "其它步態",
                    "x-field-id": "activity.otherGait",
                    "x-required-when": {
                      "fieldId": "activity.unstableGaitDetails",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.unstableGaitDetails",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "selfCareAbility": {
                    "type": "string",
                    "enum": [
                      "independent",
                      "needs_help"
                    ],
                    "title": "自我照顧能力",
                    "description": "自我照顧能力",
                    "x-field-id": "activity.selfCareAbility",
                    "x-options": [
                      {
                        "value": "independent",
                        "label": "日常生活獨立"
                      },
                      {
                        "value": "needs_help",
                        "label": "需他人協助"
                      }
                    ]
                  },
                  "selfCareAssistance": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "eating",
                        "dressing",
                        "bathing",
                        "toileting",
                        "transfer",
                        "medication",
                        "cooking",
                        "finances",
                        "shopping",
                        "going_out"
                      ]
                    },
                    "minItems": 1,
                    "title": "需協助項目",
                    "description": "需協助項目",
                    "x-field-id": "activity.selfCareAssistance",
                    "x-options": [
                      {
                        "value": "eating",
                        "label": "進食"
                      },
                      {
                        "value": "dressing",
                        "label": "穿衣"
                      },
                      {
                        "value": "bathing",
                        "label": "沐浴"
                      },
                      {
                        "value": "toileting",
                        "label": "如廁"
                      },
                      {
                        "value": "transfer",
                        "label": "移位"
                      },
                      {
                        "value": "medication",
                        "label": "服藥"
                      },
                      {
                        "value": "cooking",
                        "label": "煮飯"
                      },
                      {
                        "value": "finances",
                        "label": "處理財物"
                      },
                      {
                        "value": "shopping",
                        "label": "購物"
                      },
                      {
                        "value": "going_out",
                        "label": "外出"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "activity.selfCareAbility",
                      "operator": "equals",
                      "value": "needs_help"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.selfCareAbility",
                      "operator": "equals",
                      "value": "needs_help"
                    }
                  },
                  "fallInPastYear": {
                    "type": "string",
                    "enum": [
                      "yes",
                      "no",
                      "uncertain"
                    ],
                    "title": "最近一年內曾發生跌倒",
                    "description": "最近一年內曾發生跌倒",
                    "x-field-id": "activity.fallInPastYear",
                    "x-options": [
                      {
                        "value": "yes",
                        "label": "是"
                      },
                      {
                        "value": "no",
                        "label": "否"
                      },
                      {
                        "value": "uncertain",
                        "label": "不詳"
                      }
                    ]
                  }
                }
              },
              "respiratory": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "chestSymmetry": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "abnormally_symmetric"
                    ],
                    "title": "胸廓對稱性",
                    "description": "胸廓對稱性",
                    "x-field-id": "respiratory.chestSymmetry",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "abnormally_symmetric",
                        "label": "不正常對稱"
                      }
                    ]
                  },
                  "patterns": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "labored",
                        "orthopnea",
                        "accessory_muscle_use",
                        "ventilator_use"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "呼吸型態",
                    "description": "呼吸型態",
                    "x-field-id": "respiratory.patterns",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "labored",
                        "label": "費力"
                      },
                      {
                        "value": "orthopnea",
                        "label": "端坐喘息"
                      },
                      {
                        "value": "accessory_muscle_use",
                        "label": "使用呼吸輔助肌"
                      },
                      {
                        "value": "ventilator_use",
                        "label": "使用呼吸器"
                      }
                    ]
                  },
                  "coughFrequency": {
                    "type": "string",
                    "enum": [
                      "none",
                      "occasional",
                      "frequent"
                    ],
                    "title": "咳嗽",
                    "description": "咳嗽",
                    "x-field-id": "respiratory.coughFrequency",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "occasional",
                        "label": "偶爾"
                      },
                      {
                        "value": "frequent",
                        "label": "經常"
                      }
                    ]
                  },
                  "sputumClearance": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "needs_assistance",
                      "suction"
                    ],
                    "title": "咳痰能力",
                    "description": "咳痰能力",
                    "x-field-id": "respiratory.sputumClearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "needs_assistance",
                        "label": "需協助咳痰"
                      },
                      {
                        "value": "suction",
                        "label": "抽痰"
                      }
                    ]
                  },
                  "sputumStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "痰液",
                    "description": "痰液",
                    "x-field-id": "respiratory.sputumStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "sputumColor": {
                    "type": "string",
                    "enum": [
                      "yellow",
                      "white",
                      "red",
                      "rust"
                    ],
                    "title": "痰液顏色",
                    "description": "痰液顏色",
                    "x-field-id": "respiratory.sputumColor",
                    "x-options": [
                      {
                        "value": "yellow",
                        "label": "黃色"
                      },
                      {
                        "value": "white",
                        "label": "白色"
                      },
                      {
                        "value": "red",
                        "label": "紅色"
                      },
                      {
                        "value": "rust",
                        "label": "鐵銹色"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "sputumViscosity": {
                    "type": "string",
                    "enum": [
                      "thin",
                      "thick"
                    ],
                    "title": "痰液黏稠度",
                    "description": "痰液黏稠度",
                    "x-field-id": "respiratory.sputumViscosity",
                    "x-options": [
                      {
                        "value": "thin",
                        "label": "稀"
                      },
                      {
                        "value": "thick",
                        "label": "稠"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "sputumAmount": {
                    "type": "string",
                    "enum": [
                      "large",
                      "medium",
                      "small"
                    ],
                    "title": "痰液量",
                    "description": "痰液量",
                    "x-field-id": "respiratory.sputumAmount",
                    "x-options": [
                      {
                        "value": "large",
                        "label": "多"
                      },
                      {
                        "value": "medium",
                        "label": "中"
                      },
                      {
                        "value": "small",
                        "label": "少"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "breathSounds": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "diminished",
                        "rhonchi",
                        "wheezing",
                        "stridor"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "呼吸聲",
                    "description": "呼吸聲",
                    "x-field-id": "respiratory.breathSounds",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "diminished",
                        "label": "減弱"
                      },
                      {
                        "value": "rhonchi",
                        "label": "囉音 rhonch I"
                      },
                      {
                        "value": "wheezing",
                        "label": "喘鳴音 wheezing"
                      },
                      {
                        "value": "stridor",
                        "label": "摩擦音 stridor"
                      }
                    ]
                  },
                  "oxygenTherapies": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "nasal_cannula",
                        "mask",
                        "ventilator",
                        "peep",
                        "fio2",
                        "tracheostomy",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "用氧情況",
                    "description": "用氧情況",
                    "x-field-id": "respiratory.oxygenTherapies",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "nasal_cannula",
                        "label": "Nasal cannula"
                      },
                      {
                        "value": "mask",
                        "label": "Mask"
                      },
                      {
                        "value": "ventilator",
                        "label": "ventilator"
                      },
                      {
                        "value": "peep",
                        "label": "PEEP"
                      },
                      {
                        "value": "fio2",
                        "label": "FIO2"
                      },
                      {
                        "value": "tracheostomy",
                        "label": "氣切"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "circulation": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "implantStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "人工置入物",
                    "description": "人工置入物",
                    "x-field-id": "circulation.implantStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "implantTypes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "pacemaker",
                        "metal_valve"
                      ]
                    },
                    "minItems": 1,
                    "title": "人工置入物種類",
                    "description": "人工置入物種類",
                    "x-field-id": "circulation.implantTypes",
                    "x-options": [
                      {
                        "value": "pacemaker",
                        "label": "pacemaker"
                      },
                      {
                        "value": "metal_valve",
                        "label": "金屬瓣膜置換"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "circulation.implantStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "circulation.implantStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "peripheralCirculation": {
                    "type": "string",
                    "enum": [
                      "warm",
                      "cold",
                      "other"
                    ],
                    "title": "末梢循環",
                    "description": "末梢循環",
                    "x-field-id": "circulation.peripheralCirculation",
                    "x-options": [
                      {
                        "value": "warm",
                        "label": "溫暖"
                      },
                      {
                        "value": "cold",
                        "label": "冰冷"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "symptoms": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "palpitations",
                        "clubbing",
                        "jugular_venous_distention",
                        "epigastric_burning",
                        "chest_tightness",
                        "dizziness",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "病徵",
                    "description": "病徵",
                    "x-field-id": "circulation.symptoms",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "palpitations",
                        "label": "心悸"
                      },
                      {
                        "value": "clubbing",
                        "label": "杵狀指"
                      },
                      {
                        "value": "jugular_venous_distention",
                        "label": "頸靜脈怒張"
                      },
                      {
                        "value": "epigastric_burning",
                        "label": "上腹灼熱"
                      },
                      {
                        "value": "chest_tightness",
                        "label": "胸悶"
                      },
                      {
                        "value": "dizziness",
                        "label": "頭暈（含暈厥及眩暈）"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "cognition": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "leftVision": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "blind",
                        "presbyopia",
                        "myopia",
                        "diplopia",
                        "amblyopia",
                        "hemianopia",
                        "cataract",
                        "glaucoma",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "視力（左）",
                    "description": "視力（左）",
                    "x-field-id": "cognition.leftVision",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "blind",
                        "label": "失明"
                      },
                      {
                        "value": "presbyopia",
                        "label": "老花眼"
                      },
                      {
                        "value": "myopia",
                        "label": "近視"
                      },
                      {
                        "value": "diplopia",
                        "label": "複視"
                      },
                      {
                        "value": "amblyopia",
                        "label": "弱視"
                      },
                      {
                        "value": "hemianopia",
                        "label": "偏盲"
                      },
                      {
                        "value": "cataract",
                        "label": "白內障"
                      },
                      {
                        "value": "glaucoma",
                        "label": "青光眼"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "rightVision": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "blind",
                        "presbyopia",
                        "myopia",
                        "diplopia",
                        "amblyopia",
                        "hemianopia",
                        "cataract",
                        "glaucoma",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "視力（右）",
                    "description": "視力（右）",
                    "x-field-id": "cognition.rightVision",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "blind",
                        "label": "失明"
                      },
                      {
                        "value": "presbyopia",
                        "label": "老花眼"
                      },
                      {
                        "value": "myopia",
                        "label": "近視"
                      },
                      {
                        "value": "diplopia",
                        "label": "複視"
                      },
                      {
                        "value": "amblyopia",
                        "label": "弱視"
                      },
                      {
                        "value": "hemianopia",
                        "label": "偏盲"
                      },
                      {
                        "value": "cataract",
                        "label": "白內障"
                      },
                      {
                        "value": "glaucoma",
                        "label": "青光眼"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "leftHearing": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "hard_of_hearing",
                        "deaf",
                        "tinnitus",
                        "hearing_aid",
                        "cochlear_implant",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "聽力（左）",
                    "description": "聽力（左）",
                    "x-field-id": "cognition.leftHearing",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "hard_of_hearing",
                        "label": "重聽"
                      },
                      {
                        "value": "deaf",
                        "label": "失聰"
                      },
                      {
                        "value": "tinnitus",
                        "label": "耳鳴"
                      },
                      {
                        "value": "hearing_aid",
                        "label": "助聽器"
                      },
                      {
                        "value": "cochlear_implant",
                        "label": "電子耳"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "rightHearing": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "hard_of_hearing",
                        "deaf",
                        "tinnitus",
                        "hearing_aid",
                        "cochlear_implant",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "聽力（右）",
                    "description": "聽力（右）",
                    "x-field-id": "cognition.rightHearing",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "hard_of_hearing",
                        "label": "重聽"
                      },
                      {
                        "value": "deaf",
                        "label": "失聰"
                      },
                      {
                        "value": "tinnitus",
                        "label": "耳鳴"
                      },
                      {
                        "value": "hearing_aid",
                        "label": "助聽器"
                      },
                      {
                        "value": "cochlear_implant",
                        "label": "電子耳"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "orientation": {
                    "type": "string",
                    "enum": [
                      "fully_oriented",
                      "sometimes_partially_disoriented",
                      "always_partially_disoriented",
                      "sometimes_fully_disoriented",
                      "always_fully_disoriented",
                      "coma"
                    ],
                    "title": "意識－認知能力",
                    "description": "意識－認知能力",
                    "x-field-id": "cognition.orientation",
                    "x-options": [
                      {
                        "value": "fully_oriented",
                        "label": "清醒且對人時地物認知正確"
                      },
                      {
                        "value": "sometimes_partially_disoriented",
                        "label": "一天中某些時間失去部份定向感"
                      },
                      {
                        "value": "always_partially_disoriented",
                        "label": "一天中所有時間失去部份定向感"
                      },
                      {
                        "value": "sometimes_fully_disoriented",
                        "label": "一天中某些時間失去全部定向感"
                      },
                      {
                        "value": "always_fully_disoriented",
                        "label": "一天中所有時間失去全部定向感"
                      },
                      {
                        "value": "coma",
                        "label": "昏迷"
                      }
                    ]
                  },
                  "behaviors": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "appropriate",
                        "wandering",
                        "restless",
                        "confused",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "appropriate"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "意識－行為型態",
                    "description": "意識－行為型態",
                    "x-field-id": "cognition.behaviors",
                    "x-options": [
                      {
                        "value": "appropriate",
                        "label": "適當",
                        "exclusive": true
                      },
                      {
                        "value": "wandering",
                        "label": "四處游走"
                      },
                      {
                        "value": "restless",
                        "label": "燥動不安"
                      },
                      {
                        "value": "confused",
                        "label": "混亂"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "painStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "present",
                      "unable_to_assess"
                    ],
                    "title": "疼痛狀態",
                    "description": "疼痛狀態",
                    "x-field-id": "cognition.painStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "present",
                        "label": "有"
                      },
                      {
                        "value": "unable_to_assess",
                        "label": "無法評估"
                      }
                    ]
                  },
                  "painFindings": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "site": {
                          "type": "string",
                          "enum": [
                            "head",
                            "tooth",
                            "mouth",
                            "eye",
                            "ear",
                            "neck",
                            "back",
                            "chest",
                            "abdomen",
                            "waist",
                            "upper_limb",
                            "lower_limb",
                            "other"
                          ],
                          "title": "部位",
                          "description": "部位",
                          "x-field-id": "site",
                          "x-options": [
                            {
                              "value": "head",
                              "label": "頭部"
                            },
                            {
                              "value": "tooth",
                              "label": "牙"
                            },
                            {
                              "value": "mouth",
                              "label": "口腔"
                            },
                            {
                              "value": "eye",
                              "label": "眼睛"
                            },
                            {
                              "value": "ear",
                              "label": "耳朵"
                            },
                            {
                              "value": "neck",
                              "label": "頸部"
                            },
                            {
                              "value": "back",
                              "label": "背部"
                            },
                            {
                              "value": "chest",
                              "label": "胸部"
                            },
                            {
                              "value": "abdomen",
                              "label": "腹部"
                            },
                            {
                              "value": "waist",
                              "label": "腰部"
                            },
                            {
                              "value": "upper_limb",
                              "label": "上肢"
                            },
                            {
                              "value": "lower_limb",
                              "label": "下肢"
                            },
                            {
                              "value": "other",
                              "label": "其他"
                            }
                          ]
                        },
                        "score": {
                          "type": "string",
                          "enum": [
                            "0",
                            "1",
                            "2",
                            "3",
                            "4",
                            "5",
                            "6",
                            "7",
                            "8",
                            "9",
                            "10"
                          ],
                          "title": "疼痛分數",
                          "description": "疼痛分數",
                          "x-field-id": "score",
                          "x-options": [
                            {
                              "value": "0",
                              "label": "0 分"
                            },
                            {
                              "value": "1",
                              "label": "1 分"
                            },
                            {
                              "value": "2",
                              "label": "2 分"
                            },
                            {
                              "value": "3",
                              "label": "3 分"
                            },
                            {
                              "value": "4",
                              "label": "4 分"
                            },
                            {
                              "value": "5",
                              "label": "5 分"
                            },
                            {
                              "value": "6",
                              "label": "6 分"
                            },
                            {
                              "value": "7",
                              "label": "7 分"
                            },
                            {
                              "value": "8",
                              "label": "8 分"
                            },
                            {
                              "value": "9",
                              "label": "9 分"
                            },
                            {
                              "value": "10",
                              "label": "10 分"
                            }
                          ]
                        },
                        "otherSite": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "title": "其它疼痛部位",
                          "description": "其它疼痛部位",
                          "x-field-id": "otherSite",
                          "x-required-when": {
                            "fieldId": "site",
                            "operator": "equals",
                            "value": "other"
                          },
                          "x-visible-when": {
                            "fieldId": "site",
                            "operator": "equals",
                            "value": "other"
                          }
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "site"
                          ],
                          "properties": {
                            "site": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "score"
                          ],
                          "properties": {
                            "score": {}
                          }
                        },
                        {
                          "if": {
                            "type": "object",
                            "required": [
                              "site"
                            ],
                            "properties": {
                              "site": {
                                "const": "other"
                              }
                            }
                          },
                          "then": {
                            "type": "object",
                            "required": [
                              "otherSite"
                            ],
                            "properties": {
                              "otherSite": {}
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "site"
                              ],
                              "properties": {
                                "site": {
                                  "const": "other"
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "otherSite"
                              ],
                              "properties": {
                                "otherSite": {}
                              }
                            }
                          }
                        }
                      ]
                    },
                    "title": "疼痛部位與分數",
                    "description": "疼痛部位與分數",
                    "x-field-id": "cognition.painFindings",
                    "x-required-when": {
                      "fieldId": "cognition.painStatus",
                      "operator": "equals",
                      "value": "present"
                    },
                    "x-visible-when": {
                      "fieldId": "cognition.painStatus",
                      "operator": "equals",
                      "value": "present"
                    }
                  },
                  "speech": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "unclear_articulation",
                      "speech_disorder",
                      "aphasia",
                      "other"
                    ],
                    "title": "語言表達",
                    "description": "語言表達",
                    "x-field-id": "cognition.speech",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "unclear_articulation",
                        "label": "口齒欠清"
                      },
                      {
                        "value": "speech_disorder",
                        "label": "語言障礙"
                      },
                      {
                        "value": "aphasia",
                        "label": "失語症"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "skinAppearance": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "abnormal",
                      "other"
                    ],
                    "title": "皮膚外觀",
                    "description": "皮膚外觀",
                    "x-field-id": "cognition.skinAppearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "abnormal",
                        "label": "異常"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "skinFindings": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "pallor",
                            "rash",
                            "blister",
                            "swelling",
                            "ulcer",
                            "jaundice",
                            "wound",
                            "peeling",
                            "cracking"
                          ],
                          "title": "皮膚問題類型",
                          "description": "皮膚問題類型",
                          "x-field-id": "type",
                          "x-options": [
                            {
                              "value": "pallor",
                              "label": "蒼白"
                            },
                            {
                              "value": "rash",
                              "label": "紅疹"
                            },
                            {
                              "value": "blister",
                              "label": "水泡"
                            },
                            {
                              "value": "swelling",
                              "label": "紅腫"
                            },
                            {
                              "value": "ulcer",
                              "label": "潰瘍"
                            },
                            {
                              "value": "jaundice",
                              "label": "黃疸"
                            },
                            {
                              "value": "wound",
                              "label": "傷口"
                            },
                            {
                              "value": "peeling",
                              "label": "脫皮"
                            },
                            {
                              "value": "cracking",
                              "label": "乾裂"
                            }
                          ]
                        },
                        "sites": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "face",
                              "eyelid",
                              "mouth",
                              "neck",
                              "back",
                              "chest",
                              "abdomen",
                              "waist",
                              "upper_limb",
                              "lower_limb",
                              "other"
                            ]
                          },
                          "minItems": 1,
                          "title": "發生部位",
                          "description": "發生部位",
                          "x-field-id": "sites",
                          "x-options": [
                            {
                              "value": "face",
                              "label": "臉部"
                            },
                            {
                              "value": "eyelid",
                              "label": "眼瞼"
                            },
                            {
                              "value": "mouth",
                              "label": "口腔"
                            },
                            {
                              "value": "neck",
                              "label": "頸部"
                            },
                            {
                              "value": "back",
                              "label": "背部"
                            },
                            {
                              "value": "chest",
                              "label": "胸部"
                            },
                            {
                              "value": "abdomen",
                              "label": "腹部"
                            },
                            {
                              "value": "waist",
                              "label": "腰部"
                            },
                            {
                              "value": "upper_limb",
                              "label": "上肢"
                            },
                            {
                              "value": "lower_limb",
                              "label": "下肢"
                            },
                            {
                              "value": "other",
                              "label": "其它"
                            }
                          ]
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "sites"
                          ],
                          "properties": {
                            "sites": {}
                          }
                        }
                      ]
                    },
                    "title": "皮膚問題與部位",
                    "description": "皮膚問題與部位",
                    "x-field-id": "cognition.skinFindings",
                    "x-required-when": {
                      "fieldId": "cognition.skinAppearance",
                      "operator": "equals",
                      "value": "abnormal"
                    },
                    "x-visible-when": {
                      "fieldId": "cognition.skinAppearance",
                      "operator": "equals",
                      "value": "abnormal"
                    }
                  }
                }
              },
              "elimination": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "stoolConditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "incontinence",
                        "constipation",
                        "diarrhea",
                        "colostomy",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "大便狀況",
                    "description": "大便狀況",
                    "x-field-id": "elimination.stoolConditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "incontinence",
                        "label": "失禁"
                      },
                      {
                        "value": "constipation",
                        "label": "便秘"
                      },
                      {
                        "value": "diarrhea",
                        "label": "腹瀉"
                      },
                      {
                        "value": "colostomy",
                        "label": "人工肛門"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "stoolColor": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "bloody",
                      "black",
                      "clay",
                      "gray_white",
                      "other"
                    ],
                    "title": "大便顏色",
                    "description": "大便顏色",
                    "x-field-id": "elimination.stoolColor",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "bloody",
                        "label": "血便"
                      },
                      {
                        "value": "black",
                        "label": "黑便"
                      },
                      {
                        "value": "clay",
                        "label": "黏土色"
                      },
                      {
                        "value": "gray_white",
                        "label": "灰白便"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "urinationConditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "incontinence",
                        "nocturia",
                        "frequency",
                        "difficulty",
                        "dysuria",
                        "oliguria",
                        "renal_stoma",
                        "bladder_stoma",
                        "indwelling_catheter",
                        "intermittent_catheter",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "小便狀況",
                    "description": "小便狀況",
                    "x-field-id": "elimination.urinationConditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "incontinence",
                        "label": "失禁"
                      },
                      {
                        "value": "nocturia",
                        "label": "夜尿"
                      },
                      {
                        "value": "frequency",
                        "label": "頻尿"
                      },
                      {
                        "value": "difficulty",
                        "label": "排尿困難"
                      },
                      {
                        "value": "dysuria",
                        "label": "解尿疼痛"
                      },
                      {
                        "value": "oliguria",
                        "label": "尿少"
                      },
                      {
                        "value": "renal_stoma",
                        "label": "人工造瘻－腎"
                      },
                      {
                        "value": "bladder_stoma",
                        "label": "人工造瘻－膀胱"
                      },
                      {
                        "value": "indwelling_catheter",
                        "label": "導尿－存留導尿"
                      },
                      {
                        "value": "intermittent_catheter",
                        "label": "導尿－間歇導尿"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "urineColor": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "tea",
                      "cloudy",
                      "bloody",
                      "other"
                    ],
                    "title": "尿液顏色",
                    "description": "尿液顏色",
                    "x-field-id": "elimination.urineColor",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "tea",
                        "label": "茶色"
                      },
                      {
                        "value": "cloudy",
                        "label": "混濁"
                      },
                      {
                        "value": "bloody",
                        "label": "血尿"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "otherSymptoms": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "hematemesis",
                        "profuse_sweating",
                        "ascites"
                      ]
                    },
                    "minItems": 0,
                    "title": "其它症狀",
                    "description": "其它症狀",
                    "x-field-id": "elimination.otherSymptoms",
                    "x-options": [
                      {
                        "value": "hematemesis",
                        "label": "吐血"
                      },
                      {
                        "value": "profuse_sweating",
                        "label": "大量出汗"
                      },
                      {
                        "value": "ascites",
                        "label": "腹水"
                      }
                    ]
                  }
                }
              },
              "reproduction": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "maleGenitalAppearance": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "abnormal_discharge",
                        "enlarged_prostate",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "生殖器外觀（男）",
                    "description": "生殖器外觀（男）",
                    "x-field-id": "reproduction.maleGenitalAppearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "abnormal_discharge",
                        "label": "異常分泌物"
                      },
                      {
                        "value": "enlarged_prostate",
                        "label": "攝護腺腫大"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ],
                    "x-required-when": {
                      "source": "context",
                      "fieldId": "patientSex",
                      "operator": "equals",
                      "value": "male"
                    },
                    "x-visible-when": {
                      "source": "context",
                      "fieldId": "patientSex",
                      "operator": "equals",
                      "value": "male"
                    }
                  }
                }
              },
              "contacts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "decisionMakerName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "醫療措施決策者姓名",
                    "description": "醫療措施決策者姓名",
                    "x-field-id": "contacts.decisionMakerName"
                  },
                  "decisionMakerPhone": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "醫療措施決策者電話",
                    "description": "醫療措施決策者電話",
                    "x-field-id": "contacts.decisionMakerPhone"
                  },
                  "decisionMakerRelation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "醫療措施決策者稱謂／關係",
                    "description": "醫療措施決策者稱謂／關係",
                    "x-field-id": "contacts.decisionMakerRelation"
                  },
                  "informationProviderName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "資料提供者姓名",
                    "description": "資料提供者姓名",
                    "x-field-id": "contacts.informationProviderName"
                  },
                  "informationProviderPhone": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "資料提供者電話",
                    "description": "資料提供者電話",
                    "x-field-id": "contacts.informationProviderPhone"
                  },
                  "informationProviderRelation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "資料提供者與病人關係",
                    "description": "資料提供者與病人關係",
                    "x-field-id": "contacts.informationProviderRelation"
                  },
                  "contactName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "聯絡人姓名",
                    "description": "聯絡人姓名",
                    "x-field-id": "contacts.contactName"
                  },
                  "contactPhone": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "聯絡人電話",
                    "description": "聯絡人電話",
                    "x-field-id": "contacts.contactPhone"
                  },
                  "contactPhone2": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "聯絡人電話 2",
                    "description": "聯絡人電話 2",
                    "x-field-id": "contacts.contactPhone2"
                  },
                  "contactRelation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "聯絡人稱謂／關係",
                    "description": "聯絡人稱謂／關係",
                    "x-field-id": "contacts.contactRelation"
                  }
                }
              },
              "admission": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "wardDate": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "title": "入住病房日期",
                    "description": "入住病房日期",
                    "x-field-id": "admission.wardDate"
                  },
                  "wardTime": {
                    "type": "string",
                    "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
                    "title": "入住病房時間",
                    "description": "入住病房時間",
                    "x-field-id": "admission.wardTime"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "title": "住院原因",
                    "description": "住院原因",
                    "x-field-id": "admission.reason"
                  }
                }
              },
              "family": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "members": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "self",
                            "spouse",
                            "father",
                            "mother",
                            "paternal_grandfather",
                            "paternal_grandmother",
                            "maternal_grandfather",
                            "maternal_grandmother",
                            "older_brother",
                            "older_sister",
                            "younger_brother",
                            "younger_sister",
                            "son",
                            "daughter_in_law",
                            "daughter",
                            "son_in_law",
                            "fetus",
                            "grandson",
                            "grandson_spouse",
                            "granddaughter",
                            "granddaughter_spouse",
                            "maternal_grandson",
                            "maternal_grandson_spouse",
                            "maternal_granddaughter",
                            "maternal_granddaughter_spouse",
                            "stepfather",
                            "stepmother",
                            "adoptive_father",
                            "adoptive_mother",
                            "adopted_son",
                            "adopted_daughter",
                            "other"
                          ],
                          "title": "成員身份",
                          "description": "成員身份",
                          "x-field-id": "role",
                          "x-options": [
                            {
                              "value": "self",
                              "label": "本人"
                            },
                            {
                              "value": "spouse",
                              "label": "配偶"
                            },
                            {
                              "value": "father",
                              "label": "爸爸"
                            },
                            {
                              "value": "mother",
                              "label": "媽媽"
                            },
                            {
                              "value": "paternal_grandfather",
                              "label": "祖父"
                            },
                            {
                              "value": "paternal_grandmother",
                              "label": "祖母"
                            },
                            {
                              "value": "maternal_grandfather",
                              "label": "外祖父"
                            },
                            {
                              "value": "maternal_grandmother",
                              "label": "外祖母"
                            },
                            {
                              "value": "older_brother",
                              "label": "哥哥"
                            },
                            {
                              "value": "older_sister",
                              "label": "姐姐"
                            },
                            {
                              "value": "younger_brother",
                              "label": "弟弟"
                            },
                            {
                              "value": "younger_sister",
                              "label": "妹妹"
                            },
                            {
                              "value": "son",
                              "label": "兒子"
                            },
                            {
                              "value": "daughter_in_law",
                              "label": "媳婦"
                            },
                            {
                              "value": "daughter",
                              "label": "女兒"
                            },
                            {
                              "value": "son_in_law",
                              "label": "女婿"
                            },
                            {
                              "value": "fetus",
                              "label": "懷孕胞胎"
                            },
                            {
                              "value": "grandson",
                              "label": "孫子"
                            },
                            {
                              "value": "grandson_spouse",
                              "label": "孫媳婦"
                            },
                            {
                              "value": "granddaughter",
                              "label": "孫女"
                            },
                            {
                              "value": "granddaughter_spouse",
                              "label": "孫女婿"
                            },
                            {
                              "value": "maternal_grandson",
                              "label": "外孫"
                            },
                            {
                              "value": "maternal_grandson_spouse",
                              "label": "外孫媳婦"
                            },
                            {
                              "value": "maternal_granddaughter",
                              "label": "外孫女"
                            },
                            {
                              "value": "maternal_granddaughter_spouse",
                              "label": "外孫女婿"
                            },
                            {
                              "value": "stepfather",
                              "label": "繼父"
                            },
                            {
                              "value": "stepmother",
                              "label": "繼母"
                            },
                            {
                              "value": "adoptive_father",
                              "label": "養父"
                            },
                            {
                              "value": "adoptive_mother",
                              "label": "養母"
                            },
                            {
                              "value": "adopted_son",
                              "label": "養子"
                            },
                            {
                              "value": "adopted_daughter",
                              "label": "養女"
                            },
                            {
                              "value": "other",
                              "label": "其他"
                            }
                          ]
                        },
                        "otherRole": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "title": "其他成員身份",
                          "description": "其他成員身份",
                          "x-field-id": "otherRole",
                          "x-required-when": {
                            "fieldId": "role",
                            "operator": "equals",
                            "value": "other"
                          },
                          "x-visible-when": {
                            "fieldId": "role",
                            "operator": "equals",
                            "value": "other"
                          }
                        },
                        "aliveStatus": {
                          "type": "string",
                          "enum": [
                            "alive",
                            "deceased"
                          ],
                          "title": "存歿狀態",
                          "description": "存歿狀態",
                          "x-field-id": "aliveStatus",
                          "x-options": [
                            {
                              "value": "alive",
                              "label": "存活"
                            },
                            {
                              "value": "deceased",
                              "label": "死亡"
                            }
                          ],
                          "x-visible-when": {
                            "fieldId": "role",
                            "operator": "notEquals",
                            "value": "self"
                          }
                        },
                        "isDecisionMaker": {
                          "type": "string",
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "title": "家庭決策者",
                          "description": "家庭決策者",
                          "x-field-id": "isDecisionMaker",
                          "x-options": [
                            {
                              "value": "yes",
                              "label": "是"
                            },
                            {
                              "value": "no",
                              "label": "否"
                            }
                          ]
                        },
                        "livesTogether": {
                          "type": "string",
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "title": "同住",
                          "description": "同住",
                          "x-field-id": "livesTogether",
                          "x-options": [
                            {
                              "value": "yes",
                              "label": "是"
                            },
                            {
                              "value": "no",
                              "label": "否"
                            }
                          ]
                        },
                        "birthOrder": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 30,
                          "title": "排行",
                          "description": "排行",
                          "x-field-id": "birthOrder"
                        },
                        "age": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 130,
                          "title": "年齡",
                          "description": "年齡；單位：歲",
                          "x-field-id": "age"
                        },
                        "sex": {
                          "type": "string",
                          "enum": [
                            "male",
                            "female",
                            "unknown"
                          ],
                          "title": "性別",
                          "description": "性別",
                          "x-field-id": "sex",
                          "x-options": [
                            {
                              "value": "male",
                              "label": "男性"
                            },
                            {
                              "value": "female",
                              "label": "女性"
                            },
                            {
                              "value": "unknown",
                              "label": "性別不明"
                            }
                          ]
                        },
                        "multipleBirth": {
                          "type": "string",
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "title": "胞胎",
                          "description": "胞胎",
                          "x-field-id": "multipleBirth",
                          "x-options": [
                            {
                              "value": "yes",
                              "label": "是"
                            },
                            {
                              "value": "no",
                              "label": "否"
                            }
                          ]
                        },
                        "maritalStatus": {
                          "type": "string",
                          "enum": [
                            "single",
                            "married",
                            "divorced",
                            "separated",
                            "cohabiting",
                            "widowed"
                          ],
                          "title": "婚姻",
                          "description": "婚姻",
                          "x-field-id": "maritalStatus",
                          "x-options": [
                            {
                              "value": "single",
                              "label": "未婚"
                            },
                            {
                              "value": "married",
                              "label": "已婚"
                            },
                            {
                              "value": "divorced",
                              "label": "離婚"
                            },
                            {
                              "value": "separated",
                              "label": "分居"
                            },
                            {
                              "value": "cohabiting",
                              "label": "同居"
                            },
                            {
                              "value": "widowed",
                              "label": "喪偶"
                            }
                          ]
                        },
                        "familyHistory": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "none",
                              "hypertension",
                              "heart_disease",
                              "diabetes",
                              "liver_cancer",
                              "colorectal_cancer",
                              "asthma",
                              "blood_disease",
                              "cancer",
                              "cerebrovascular_disease",
                              "mental_illness",
                              "other"
                            ]
                          },
                          "minItems": 0,
                          "allOf": [
                            {
                              "if": {
                                "contains": {
                                  "const": "none"
                                }
                              },
                              "then": {
                                "maxItems": 1
                              }
                            }
                          ],
                          "title": "家族病史",
                          "description": "家族病史",
                          "x-field-id": "familyHistory",
                          "x-options": [
                            {
                              "value": "none",
                              "label": "無",
                              "exclusive": true
                            },
                            {
                              "value": "hypertension",
                              "label": "高血壓"
                            },
                            {
                              "value": "heart_disease",
                              "label": "心臟病"
                            },
                            {
                              "value": "diabetes",
                              "label": "糖尿病"
                            },
                            {
                              "value": "liver_cancer",
                              "label": "肝癌"
                            },
                            {
                              "value": "colorectal_cancer",
                              "label": "大腸直腸癌"
                            },
                            {
                              "value": "asthma",
                              "label": "氣喘"
                            },
                            {
                              "value": "blood_disease",
                              "label": "血液病"
                            },
                            {
                              "value": "cancer",
                              "label": "癌症"
                            },
                            {
                              "value": "cerebrovascular_disease",
                              "label": "腦血管疾病"
                            },
                            {
                              "value": "mental_illness",
                              "label": "精神疾病"
                            },
                            {
                              "value": "other",
                              "label": "其它"
                            }
                          ]
                        },
                        "otherMedicalHistory": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "title": "其他病史",
                          "description": "其他病史",
                          "x-field-id": "otherMedicalHistory",
                          "x-required-when": {
                            "fieldId": "familyHistory",
                            "operator": "includes",
                            "value": "other"
                          },
                          "x-visible-when": {
                            "fieldId": "familyHistory",
                            "operator": "includes",
                            "value": "other"
                          }
                        },
                        "note": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4000,
                          "title": "備註",
                          "description": "備註",
                          "x-field-id": "note"
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "role"
                          ],
                          "properties": {
                            "role": {}
                          }
                        },
                        {
                          "if": {
                            "type": "object",
                            "required": [
                              "role"
                            ],
                            "properties": {
                              "role": {
                                "const": "other"
                              }
                            }
                          },
                          "then": {
                            "type": "object",
                            "required": [
                              "otherRole"
                            ],
                            "properties": {
                              "otherRole": {}
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "role"
                              ],
                              "properties": {
                                "role": {
                                  "const": "other"
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "otherRole"
                              ],
                              "properties": {
                                "otherRole": {}
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "role"
                              ],
                              "properties": {
                                "role": {
                                  "not": {
                                    "const": "self"
                                  }
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "aliveStatus"
                              ],
                              "properties": {
                                "aliveStatus": {}
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "type": "object",
                            "required": [
                              "familyHistory"
                            ],
                            "properties": {
                              "familyHistory": {
                                "type": "array",
                                "contains": {
                                  "const": "other"
                                }
                              }
                            }
                          },
                          "then": {
                            "type": "object",
                            "required": [
                              "otherMedicalHistory"
                            ],
                            "properties": {
                              "otherMedicalHistory": {}
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "familyHistory"
                              ],
                              "properties": {
                                "familyHistory": {
                                  "type": "array",
                                  "contains": {
                                    "const": "other"
                                  }
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "otherMedicalHistory"
                              ],
                              "properties": {
                                "otherMedicalHistory": {}
                              }
                            }
                          }
                        }
                      ]
                    },
                    "allOf": [
                      {
                        "contains": {
                          "type": "object",
                          "required": [
                            "role"
                          ],
                          "properties": {
                            "role": {
                              "const": "self"
                            }
                          }
                        },
                        "minContains": 0,
                        "maxContains": 1
                      }
                    ],
                    "title": "家庭成員",
                    "description": "家庭成員",
                    "x-field-id": "family.members"
                  }
                }
              }
            },
            "allOf": [
              {
                "type": "object",
                "required": [
                  "basic"
                ],
                "properties": {
                  "basic": {
                    "type": "object",
                    "required": [
                      "education"
                    ],
                    "properties": {
                      "education": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "basic"
                ],
                "properties": {
                  "basic": {
                    "type": "object",
                    "required": [
                      "languages"
                    ],
                    "properties": {
                      "languages": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "basic"
                ],
                "properties": {
                  "basic": {
                    "type": "object",
                    "required": [
                      "religions"
                    ],
                    "properties": {
                      "religions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "antithromboticUse"
                    ],
                    "properties": {
                      "antithromboticUse": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "drugAllergy"
                    ],
                    "properties": {
                      "drugAllergy": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergy"
                      ],
                      "properties": {
                        "drugAllergy": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergyNote"
                      ],
                      "properties": {
                        "drugAllergyNote": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergy"
                        ],
                        "properties": {
                          "drugAllergy": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergyNote"
                        ],
                        "properties": {
                          "drugAllergyNote": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergy"
                      ],
                      "properties": {
                        "drugAllergy": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergens"
                      ],
                      "properties": {
                        "drugAllergens": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergy"
                        ],
                        "properties": {
                          "drugAllergy": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergens"
                        ],
                        "properties": {
                          "drugAllergens": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergens"
                      ],
                      "properties": {
                        "drugAllergens": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "otherDrugAllergen"
                      ],
                      "properties": {
                        "otherDrugAllergen": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergens"
                        ],
                        "properties": {
                          "drugAllergens": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "otherDrugAllergen"
                        ],
                        "properties": {
                          "otherDrugAllergen": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "foodAllergy"
                    ],
                    "properties": {
                      "foodAllergy": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "foodAllergy"
                      ],
                      "properties": {
                        "foodAllergy": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "foodAllergens"
                      ],
                      "properties": {
                        "foodAllergens": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "foodAllergy"
                        ],
                        "properties": {
                          "foodAllergy": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "foodAllergens"
                        ],
                        "properties": {
                          "foodAllergens": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "transfusionReaction"
                    ],
                    "properties": {
                      "transfusionReaction": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "bloodType"
                    ],
                    "properties": {
                      "bloodType": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "recentForeignTravel"
                    ],
                    "properties": {
                      "recentForeignTravel": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "recentForeignTravel"
                      ],
                      "properties": {
                        "recentForeignTravel": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "travelLocation"
                      ],
                      "properties": {
                        "travelLocation": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "recentForeignTravel"
                        ],
                        "properties": {
                          "recentForeignTravel": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "travelLocation"
                        ],
                        "properties": {
                          "travelLocation": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "treatmentRestrictions"
                    ],
                    "properties": {
                      "treatmentRestrictions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "tubes"
                    ],
                    "properties": {
                      "tubes": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "pcrResult"
                      ],
                      "properties": {
                        "pcrResult": {
                          "const": "positive"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "pcrCtValue"
                      ],
                      "properties": {
                        "pcrCtValue": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "pcrResult"
                        ],
                        "properties": {
                          "pcrResult": {
                            "const": "positive"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "pcrCtValue"
                        ],
                        "properties": {
                          "pcrCtValue": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "familyHistoryStatus"
                    ],
                    "properties": {
                      "familyHistoryStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "familyHistoryStatus"
                      ],
                      "properties": {
                        "familyHistoryStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "familyHistory"
                      ],
                      "properties": {
                        "familyHistory": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "familyHistoryStatus"
                        ],
                        "properties": {
                          "familyHistoryStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "familyHistory"
                        ],
                        "properties": {
                          "familyHistory": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "maritalStatus"
                    ],
                    "properties": {
                      "maritalStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "livingStatus"
                    ],
                    "properties": {
                      "livingStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "familyInteraction"
                    ],
                    "properties": {
                      "familyInteraction": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "familyInteraction"
                      ],
                      "properties": {
                        "familyInteraction": {
                          "const": "other"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "otherFamilyInteraction"
                      ],
                      "properties": {
                        "otherFamilyInteraction": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "familyInteraction"
                        ],
                        "properties": {
                          "familyInteraction": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "otherFamilyInteraction"
                        ],
                        "properties": {
                          "otherFamilyInteraction": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "primaryCaregivers"
                    ],
                    "properties": {
                      "primaryCaregivers": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "primaryCaregivers"
                      ],
                      "properties": {
                        "primaryCaregivers": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "otherPrimaryCaregiver"
                      ],
                      "properties": {
                        "otherPrimaryCaregiver": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "primaryCaregivers"
                        ],
                        "properties": {
                          "primaryCaregivers": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "otherPrimaryCaregiver"
                        ],
                        "properties": {
                          "otherPrimaryCaregiver": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "occupation"
                    ],
                    "properties": {
                      "occupation": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "occupation"
                      ],
                      "properties": {
                        "occupation": {
                          "const": "other"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "otherOccupation"
                      ],
                      "properties": {
                        "otherOccupation": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "occupation"
                        ],
                        "properties": {
                          "occupation": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "otherOccupation"
                        ],
                        "properties": {
                          "otherOccupation": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "financialStatus"
                    ],
                    "properties": {
                      "financialStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "smokingStatus"
                    ],
                    "properties": {
                      "smokingStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingAmount"
                      ],
                      "properties": {
                        "smokingAmount": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingAmount"
                        ],
                        "properties": {
                          "smokingAmount": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingAmountUnit"
                      ],
                      "properties": {
                        "smokingAmountUnit": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingAmountUnit"
                        ],
                        "properties": {
                          "smokingAmountUnit": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingYears"
                      ],
                      "properties": {
                        "smokingYears": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingYears"
                        ],
                        "properties": {
                          "smokingYears": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "quitSmokingExperience"
                      ],
                      "properties": {
                        "quitSmokingExperience": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "quitSmokingExperience"
                        ],
                        "properties": {
                          "quitSmokingExperience": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "quitSmokingWillingness"
                      ],
                      "properties": {
                        "quitSmokingWillingness": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "quitSmokingWillingness"
                        ],
                        "properties": {
                          "quitSmokingWillingness": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "alcoholUse"
                    ],
                    "properties": {
                      "alcoholUse": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "betelNutStatus"
                    ],
                    "properties": {
                      "betelNutStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutStatus"
                      ],
                      "properties": {
                        "betelNutStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutAmount"
                      ],
                      "properties": {
                        "betelNutAmount": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutStatus"
                        ],
                        "properties": {
                          "betelNutStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutAmount"
                        ],
                        "properties": {
                          "betelNutAmount": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutStatus"
                      ],
                      "properties": {
                        "betelNutStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutYears"
                      ],
                      "properties": {
                        "betelNutYears": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutStatus"
                        ],
                        "properties": {
                          "betelNutStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutYears"
                        ],
                        "properties": {
                          "betelNutYears": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "medicalHistory"
                    ],
                    "properties": {
                      "medicalHistory": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "surgeryExperience"
                    ],
                    "properties": {
                      "surgeryExperience": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "surgeryExperience"
                      ],
                      "properties": {
                        "surgeryExperience": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "surgeryNote"
                      ],
                      "properties": {
                        "surgeryNote": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "surgeryExperience"
                        ],
                        "properties": {
                          "surgeryExperience": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "surgeryNote"
                        ],
                        "properties": {
                          "surgeryNote": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "recentEmergencyOrAdmissionCount"
                    ],
                    "properties": {
                      "recentEmergencyOrAdmissionCount": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "currentMedications"
                    ],
                    "properties": {
                      "currentMedications": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "anyOf": [
                    {
                      "not": {
                        "type": "object",
                        "required": [
                          "nutrition"
                        ],
                        "properties": {
                          "nutrition": {
                            "type": "object",
                            "required": [
                              "heightCm"
                            ],
                            "properties": {
                              "heightCm": {
                                "not": {
                                  "enum": [
                                    null,
                                    "",
                                    []
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "not": {
                        "type": "object",
                        "required": [
                          "nutrition"
                        ],
                        "properties": {
                          "nutrition": {
                            "type": "object",
                            "required": [
                              "weightKg"
                            ],
                            "properties": {
                              "weightKg": {
                                "not": {
                                  "enum": [
                                    null,
                                    "",
                                    []
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "measurementUnavailableReason"
                      ],
                      "properties": {
                        "measurementUnavailableReason": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "anyOf": [
                      {
                        "not": {
                          "type": "object",
                          "required": [
                            "nutrition"
                          ],
                          "properties": {
                            "nutrition": {
                              "type": "object",
                              "required": [
                                "heightCm"
                              ],
                              "properties": {
                                "heightCm": {
                                  "not": {
                                    "enum": [
                                      null,
                                      "",
                                      []
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      {
                        "not": {
                          "type": "object",
                          "required": [
                            "nutrition"
                          ],
                          "properties": {
                            "nutrition": {
                              "type": "object",
                              "required": [
                                "weightKg"
                              ],
                              "properties": {
                                "weightKg": {
                                  "not": {
                                    "enum": [
                                      null,
                                      "",
                                      []
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "measurementUnavailableReason"
                        ],
                        "properties": {
                          "measurementUnavailableReason": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "edemaStatus"
                    ],
                    "properties": {
                      "edemaStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "edemaStatus"
                      ],
                      "properties": {
                        "edemaStatus": {
                          "const": "present"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "edemaFindings"
                      ],
                      "properties": {
                        "edemaFindings": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "edemaStatus"
                        ],
                        "properties": {
                          "edemaStatus": {
                            "const": "present"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "edemaFindings"
                        ],
                        "properties": {
                          "edemaFindings": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "feedingRoutes"
                    ],
                    "properties": {
                      "feedingRoutes": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "feedingStatus"
                    ],
                    "properties": {
                      "feedingStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "oralConditions"
                    ],
                    "properties": {
                      "oralConditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "dentures"
                    ],
                    "properties": {
                      "dentures": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dentures"
                      ],
                      "properties": {
                        "dentures": {
                          "type": "array",
                          "contains": {
                            "const": "upper"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "upperDentureType"
                      ],
                      "properties": {
                        "upperDentureType": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dentures"
                        ],
                        "properties": {
                          "dentures": {
                            "type": "array",
                            "contains": {
                              "const": "upper"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "upperDentureType"
                        ],
                        "properties": {
                          "upperDentureType": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dentures"
                      ],
                      "properties": {
                        "dentures": {
                          "type": "array",
                          "contains": {
                            "const": "lower"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "lowerDentureType"
                      ],
                      "properties": {
                        "lowerDentureType": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dentures"
                        ],
                        "properties": {
                          "dentures": {
                            "type": "array",
                            "contains": {
                              "const": "lower"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "lowerDentureType"
                        ],
                        "properties": {
                          "lowerDentureType": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "dietTypes"
                    ],
                    "properties": {
                      "dietTypes": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dietTypes"
                      ],
                      "properties": {
                        "dietTypes": {
                          "type": "array",
                          "contains": {
                            "const": "vegetarian"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "vegetarianDietDetails"
                      ],
                      "properties": {
                        "vegetarianDietDetails": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dietTypes"
                        ],
                        "properties": {
                          "dietTypes": {
                            "type": "array",
                            "contains": {
                              "const": "vegetarian"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "vegetarianDietDetails"
                        ],
                        "properties": {
                          "vegetarianDietDetails": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dietTypes"
                      ],
                      "properties": {
                        "dietTypes": {
                          "type": "array",
                          "contains": {
                            "const": "special"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "specialDietDetails"
                      ],
                      "properties": {
                        "specialDietDetails": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dietTypes"
                        ],
                        "properties": {
                          "dietTypes": {
                            "type": "array",
                            "contains": {
                              "const": "special"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "specialDietDetails"
                        ],
                        "properties": {
                          "specialDietDetails": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dietTypes"
                      ],
                      "properties": {
                        "dietTypes": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "otherDiet"
                      ],
                      "properties": {
                        "otherDiet": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dietTypes"
                        ],
                        "properties": {
                          "dietTypes": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "otherDiet"
                        ],
                        "properties": {
                          "otherDiet": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "foodRestriction"
                    ],
                    "properties": {
                      "foodRestriction": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "foodRestriction"
                      ],
                      "properties": {
                        "foodRestriction": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "foodRestrictionNote"
                      ],
                      "properties": {
                        "foodRestrictionNote": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "foodRestriction"
                        ],
                        "properties": {
                          "foodRestriction": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "foodRestrictionNote"
                        ],
                        "properties": {
                          "foodRestrictionNote": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "otherSymptoms"
                    ],
                    "properties": {
                      "otherSymptoms": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "sleep"
                ],
                "properties": {
                  "sleep": {
                    "type": "object",
                    "required": [
                      "conditions"
                    ],
                    "properties": {
                      "conditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "sleep"
                ],
                "properties": {
                  "sleep": {
                    "type": "object",
                    "required": [
                      "usualHours"
                    ],
                    "properties": {
                      "usualHours": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "mobility"
                    ],
                    "properties": {
                      "mobility": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "needsMobilityAid"
                    ],
                    "properties": {
                      "needsMobilityAid": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "needsMobilityAid"
                      ],
                      "properties": {
                        "needsMobilityAid": {
                          "const": true
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "mobilityAids"
                      ],
                      "properties": {
                        "mobilityAids": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "needsMobilityAid"
                        ],
                        "properties": {
                          "needsMobilityAid": {
                            "const": true
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "mobilityAids"
                        ],
                        "properties": {
                          "mobilityAids": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "mobilityAids"
                      ],
                      "properties": {
                        "mobilityAids": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "otherMobilityAid"
                      ],
                      "properties": {
                        "otherMobilityAid": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "mobilityAids"
                        ],
                        "properties": {
                          "mobilityAids": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "otherMobilityAid"
                        ],
                        "properties": {
                          "otherMobilityAid": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "leftUpperMuscleStrength"
                    ],
                    "properties": {
                      "leftUpperMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "rightUpperMuscleStrength"
                    ],
                    "properties": {
                      "rightUpperMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "leftLowerMuscleStrength"
                    ],
                    "properties": {
                      "leftLowerMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "rightLowerMuscleStrength"
                    ],
                    "properties": {
                      "rightLowerMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "limbAppearance"
                    ],
                    "properties": {
                      "limbAppearance": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "gait"
                    ],
                    "properties": {
                      "gait": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "gait"
                      ],
                      "properties": {
                        "gait": {
                          "const": "unstable"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "unstableGaitDetails"
                      ],
                      "properties": {
                        "unstableGaitDetails": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "gait"
                        ],
                        "properties": {
                          "gait": {
                            "const": "unstable"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "unstableGaitDetails"
                        ],
                        "properties": {
                          "unstableGaitDetails": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "unstableGaitDetails"
                      ],
                      "properties": {
                        "unstableGaitDetails": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "otherGait"
                      ],
                      "properties": {
                        "otherGait": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "unstableGaitDetails"
                        ],
                        "properties": {
                          "unstableGaitDetails": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "otherGait"
                        ],
                        "properties": {
                          "otherGait": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "selfCareAbility"
                    ],
                    "properties": {
                      "selfCareAbility": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "selfCareAbility"
                      ],
                      "properties": {
                        "selfCareAbility": {
                          "const": "needs_help"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "selfCareAssistance"
                      ],
                      "properties": {
                        "selfCareAssistance": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "selfCareAbility"
                        ],
                        "properties": {
                          "selfCareAbility": {
                            "const": "needs_help"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "selfCareAssistance"
                        ],
                        "properties": {
                          "selfCareAssistance": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "fallInPastYear"
                    ],
                    "properties": {
                      "fallInPastYear": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "chestSymmetry"
                    ],
                    "properties": {
                      "chestSymmetry": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "patterns"
                    ],
                    "properties": {
                      "patterns": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "coughFrequency"
                    ],
                    "properties": {
                      "coughFrequency": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "sputumClearance"
                    ],
                    "properties": {
                      "sputumClearance": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "sputumStatus"
                    ],
                    "properties": {
                      "sputumStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumStatus"
                      ],
                      "properties": {
                        "sputumStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumColor"
                      ],
                      "properties": {
                        "sputumColor": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumStatus"
                        ],
                        "properties": {
                          "sputumStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumColor"
                        ],
                        "properties": {
                          "sputumColor": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumStatus"
                      ],
                      "properties": {
                        "sputumStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumViscosity"
                      ],
                      "properties": {
                        "sputumViscosity": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumStatus"
                        ],
                        "properties": {
                          "sputumStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumViscosity"
                        ],
                        "properties": {
                          "sputumViscosity": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumStatus"
                      ],
                      "properties": {
                        "sputumStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumAmount"
                      ],
                      "properties": {
                        "sputumAmount": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumStatus"
                        ],
                        "properties": {
                          "sputumStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumAmount"
                        ],
                        "properties": {
                          "sputumAmount": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "breathSounds"
                    ],
                    "properties": {
                      "breathSounds": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "oxygenTherapies"
                    ],
                    "properties": {
                      "oxygenTherapies": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "circulation"
                ],
                "properties": {
                  "circulation": {
                    "type": "object",
                    "required": [
                      "implantStatus"
                    ],
                    "properties": {
                      "implantStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "circulation"
                  ],
                  "properties": {
                    "circulation": {
                      "type": "object",
                      "required": [
                        "implantStatus"
                      ],
                      "properties": {
                        "implantStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "circulation"
                  ],
                  "properties": {
                    "circulation": {
                      "type": "object",
                      "required": [
                        "implantTypes"
                      ],
                      "properties": {
                        "implantTypes": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "circulation"
                    ],
                    "properties": {
                      "circulation": {
                        "type": "object",
                        "required": [
                          "implantStatus"
                        ],
                        "properties": {
                          "implantStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "circulation"
                    ],
                    "properties": {
                      "circulation": {
                        "type": "object",
                        "required": [
                          "implantTypes"
                        ],
                        "properties": {
                          "implantTypes": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "circulation"
                ],
                "properties": {
                  "circulation": {
                    "type": "object",
                    "required": [
                      "peripheralCirculation"
                    ],
                    "properties": {
                      "peripheralCirculation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "circulation"
                ],
                "properties": {
                  "circulation": {
                    "type": "object",
                    "required": [
                      "symptoms"
                    ],
                    "properties": {
                      "symptoms": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "leftVision"
                    ],
                    "properties": {
                      "leftVision": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "rightVision"
                    ],
                    "properties": {
                      "rightVision": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "leftHearing"
                    ],
                    "properties": {
                      "leftHearing": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "rightHearing"
                    ],
                    "properties": {
                      "rightHearing": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "orientation"
                    ],
                    "properties": {
                      "orientation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "behaviors"
                    ],
                    "properties": {
                      "behaviors": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "painStatus"
                    ],
                    "properties": {
                      "painStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "painStatus"
                      ],
                      "properties": {
                        "painStatus": {
                          "const": "present"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "painFindings"
                      ],
                      "properties": {
                        "painFindings": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "painStatus"
                        ],
                        "properties": {
                          "painStatus": {
                            "const": "present"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "painFindings"
                        ],
                        "properties": {
                          "painFindings": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "speech"
                    ],
                    "properties": {
                      "speech": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "skinAppearance"
                    ],
                    "properties": {
                      "skinAppearance": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "skinAppearance"
                      ],
                      "properties": {
                        "skinAppearance": {
                          "const": "abnormal"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "skinFindings"
                      ],
                      "properties": {
                        "skinFindings": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "skinAppearance"
                        ],
                        "properties": {
                          "skinAppearance": {
                            "const": "abnormal"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "skinFindings"
                        ],
                        "properties": {
                          "skinFindings": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "stoolConditions"
                    ],
                    "properties": {
                      "stoolConditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "stoolColor"
                    ],
                    "properties": {
                      "stoolColor": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "urinationConditions"
                    ],
                    "properties": {
                      "urinationConditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "urineColor"
                    ],
                    "properties": {
                      "urineColor": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "family"
                  ],
                  "properties": {
                    "family": {
                      "type": "object",
                      "required": [
                        "members"
                      ],
                      "properties": {
                        "members": {
                          "type": "array",
                          "contains": {
                            "type": "object",
                            "required": [
                              "role",
                              "sex"
                            ],
                            "properties": {
                              "role": {
                                "const": "self"
                              },
                              "sex": {
                                "const": "male"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "reproduction"
                  ],
                  "properties": {
                    "reproduction": {
                      "type": "object",
                      "required": [
                        "maleGenitalAppearance"
                      ],
                      "properties": {
                        "maleGenitalAppearance": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "family"
                    ],
                    "properties": {
                      "family": {
                        "type": "object",
                        "required": [
                          "members"
                        ],
                        "properties": {
                          "members": {
                            "type": "array",
                            "contains": {
                              "type": "object",
                              "required": [
                                "role",
                                "sex"
                              ],
                              "properties": {
                                "role": {
                                  "const": "self"
                                },
                                "sex": {
                                  "const": "male"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "reproduction"
                    ],
                    "properties": {
                      "reproduction": {
                        "type": "object",
                        "required": [
                          "maleGenitalAppearance"
                        ],
                        "properties": {
                          "maleGenitalAppearance": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "decisionMakerName"
                    ],
                    "properties": {
                      "decisionMakerName": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "decisionMakerPhone"
                    ],
                    "properties": {
                      "decisionMakerPhone": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "decisionMakerRelation"
                    ],
                    "properties": {
                      "decisionMakerRelation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "informationProviderName"
                    ],
                    "properties": {
                      "informationProviderName": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "informationProviderPhone"
                    ],
                    "properties": {
                      "informationProviderPhone": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "informationProviderRelation"
                    ],
                    "properties": {
                      "informationProviderRelation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "contactName"
                    ],
                    "properties": {
                      "contactName": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "contactPhone"
                    ],
                    "properties": {
                      "contactPhone": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "contactRelation"
                    ],
                    "properties": {
                      "contactRelation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "admission"
                ],
                "properties": {
                  "admission": {
                    "type": "object",
                    "required": [
                      "wardDate"
                    ],
                    "properties": {
                      "wardDate": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "admission"
                ],
                "properties": {
                  "admission": {
                    "type": "object",
                    "required": [
                      "wardTime"
                    ],
                    "properties": {
                      "wardTime": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "admission"
                ],
                "properties": {
                  "admission": {
                    "type": "object",
                    "required": [
                      "reason"
                    ],
                    "properties": {
                      "reason": {}
                    }
                  }
                }
              }
            ],
            "title": "入院護理評估表",
            "description": "入院護理評估範例；驗證必填與條件欄位，唯讀值不接受寫入。"
          }
        }
      },
      "AdmissionAssessmentRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "clientRequestId",
          "patientId",
          "encounterId",
          "assessedAt",
          "assessment",
          "recordId",
          "version",
          "status",
          "recordState",
          "recordedAt"
        ],
        "properties": {
          "clientRequestId": {
            "type": "string",
            "minLength": 1,
            "description": "原提交 ID"
          },
          "patientId": {
            "type": "string",
            "minLength": 1,
            "description": "院方病人 ID"
          },
          "encounterId": {
            "type": "string",
            "minLength": 1,
            "description": "本例必填；必須是該病人的本次住院"
          },
          "assessedAt": {
            "type": "string",
            "format": "date-time",
            "description": "實際評估時間，含時區"
          },
          "assessment": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "basic": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "education": {
                    "type": "string",
                    "enum": [
                      "illiterate",
                      "elementary",
                      "junior_high",
                      "senior_high",
                      "college",
                      "university_or_above"
                    ],
                    "title": "教育程度",
                    "description": "教育程度",
                    "x-field-id": "basic.education",
                    "x-options": [
                      {
                        "value": "illiterate",
                        "label": "不識字"
                      },
                      {
                        "value": "elementary",
                        "label": "小學"
                      },
                      {
                        "value": "junior_high",
                        "label": "初中"
                      },
                      {
                        "value": "senior_high",
                        "label": "高中"
                      },
                      {
                        "value": "college",
                        "label": "專科"
                      },
                      {
                        "value": "university_or_above",
                        "label": "大學以上"
                      }
                    ]
                  },
                  "languages": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "mandarin",
                        "taiwanese_hokkien",
                        "hakka",
                        "amis",
                        "atayal",
                        "rukai",
                        "yami",
                        "english",
                        "indonesian",
                        "japanese",
                        "thai",
                        "filipino",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "溝通語言",
                    "description": "溝通語言",
                    "x-field-id": "basic.languages",
                    "x-options": [
                      {
                        "value": "mandarin",
                        "label": "國語"
                      },
                      {
                        "value": "taiwanese_hokkien",
                        "label": "閩南語"
                      },
                      {
                        "value": "hakka",
                        "label": "客家語"
                      },
                      {
                        "value": "amis",
                        "label": "原住民語－阿美"
                      },
                      {
                        "value": "atayal",
                        "label": "原住民語－泰雅"
                      },
                      {
                        "value": "rukai",
                        "label": "原住民語－魯凱"
                      },
                      {
                        "value": "yami",
                        "label": "原住民語－雅美"
                      },
                      {
                        "value": "english",
                        "label": "外國語－英語"
                      },
                      {
                        "value": "indonesian",
                        "label": "外國語－印尼語"
                      },
                      {
                        "value": "japanese",
                        "label": "外國語－日本"
                      },
                      {
                        "value": "thai",
                        "label": "外國語－泰國語"
                      },
                      {
                        "value": "filipino",
                        "label": "外國語－菲律賓語"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "religions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "buddhism",
                        "taoism",
                        "christianity",
                        "catholicism",
                        "islam",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "宗教信仰",
                    "description": "宗教信仰",
                    "x-field-id": "basic.religions",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "buddhism",
                        "label": "佛教"
                      },
                      {
                        "value": "taoism",
                        "label": "道教"
                      },
                      {
                        "value": "christianity",
                        "label": "基督教"
                      },
                      {
                        "value": "catholicism",
                        "label": "天主教"
                      },
                      {
                        "value": "islam",
                        "label": "回教"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "alerts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "antithromboticUse": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes",
                      "uncertain"
                    ],
                    "title": "抗血栓藥物使用",
                    "description": "抗血栓藥物使用",
                    "x-field-id": "alerts.antithromboticUse",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      },
                      {
                        "value": "uncertain",
                        "label": "不詳"
                      }
                    ]
                  },
                  "drugAllergy": {
                    "type": "string",
                    "enum": [
                      "none",
                      "unknown",
                      "yes"
                    ],
                    "title": "藥物過敏",
                    "description": "藥物過敏",
                    "x-field-id": "alerts.drugAllergy",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "drugAllergyNote": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "title": "藥物過敏說明",
                    "description": "藥物過敏說明",
                    "x-field-id": "alerts.drugAllergyNote",
                    "x-required-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "drugAllergens": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "contrast_media",
                        "blood_transfusion",
                        "nsaid",
                        "sulfonamides",
                        "penicillin",
                        "g6pd",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "藥物過敏種類",
                    "description": "藥物過敏種類",
                    "x-field-id": "alerts.drugAllergens",
                    "x-options": [
                      {
                        "value": "contrast_media",
                        "label": "顯影劑過敏"
                      },
                      {
                        "value": "blood_transfusion",
                        "label": "輸血過敏"
                      },
                      {
                        "value": "nsaid",
                        "label": "NSAID"
                      },
                      {
                        "value": "sulfonamides",
                        "label": "Sulfonamides"
                      },
                      {
                        "value": "penicillin",
                        "label": "Penicillin"
                      },
                      {
                        "value": "g6pd",
                        "label": "G6PD"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.drugAllergy",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "otherDrugAllergen": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其他藥物過敏",
                    "description": "其他藥物過敏",
                    "x-field-id": "alerts.otherDrugAllergen",
                    "x-required-when": {
                      "fieldId": "alerts.drugAllergens",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.drugAllergens",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "foodAllergy": {
                    "type": "string",
                    "enum": [
                      "none",
                      "unknown",
                      "yes"
                    ],
                    "title": "食物過敏",
                    "description": "食物過敏",
                    "x-field-id": "alerts.foodAllergy",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "foodAllergens": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "seafood",
                        "mushroom",
                        "beef",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "食物過敏種類",
                    "description": "食物過敏種類",
                    "x-field-id": "alerts.foodAllergens",
                    "x-options": [
                      {
                        "value": "seafood",
                        "label": "海鮮類"
                      },
                      {
                        "value": "mushroom",
                        "label": "菇類"
                      },
                      {
                        "value": "beef",
                        "label": "牛肉"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "alerts.foodAllergy",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.foodAllergy",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "transfusionReaction": {
                    "type": "string",
                    "enum": [
                      "none",
                      "unknown",
                      "yes"
                    ],
                    "title": "輸血反應",
                    "description": "輸血反應",
                    "x-field-id": "alerts.transfusionReaction",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "bloodType": {
                    "type": "string",
                    "enum": [
                      "o_positive",
                      "a_positive",
                      "b_positive",
                      "ab_positive",
                      "o_negative",
                      "a_negative",
                      "b_negative",
                      "ab_negative",
                      "unknown"
                    ],
                    "title": "血型",
                    "description": "血型",
                    "x-field-id": "alerts.bloodType",
                    "x-options": [
                      {
                        "value": "o_positive",
                        "label": "O+"
                      },
                      {
                        "value": "a_positive",
                        "label": "A+"
                      },
                      {
                        "value": "b_positive",
                        "label": "B+"
                      },
                      {
                        "value": "ab_positive",
                        "label": "AB+"
                      },
                      {
                        "value": "o_negative",
                        "label": "O-"
                      },
                      {
                        "value": "a_negative",
                        "label": "A-"
                      },
                      {
                        "value": "b_negative",
                        "label": "B-"
                      },
                      {
                        "value": "ab_negative",
                        "label": "AB-"
                      },
                      {
                        "value": "unknown",
                        "label": "不知道"
                      }
                    ]
                  },
                  "recentForeignTravel": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "近 3 個月外國旅遊史",
                    "description": "近 3 個月外國旅遊史",
                    "x-field-id": "alerts.recentForeignTravel",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "travelLocation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "旅遊地點",
                    "description": "旅遊地點",
                    "x-field-id": "alerts.travelLocation",
                    "x-required-when": {
                      "fieldId": "alerts.recentForeignTravel",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.recentForeignTravel",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "treatmentRestrictions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "left_hand",
                        "right_hand",
                        "left_foot",
                        "right_foot",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "禁做治療",
                    "description": "禁做治療",
                    "x-field-id": "alerts.treatmentRestrictions",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "left_hand",
                        "label": "左手"
                      },
                      {
                        "value": "right_hand",
                        "label": "右手"
                      },
                      {
                        "value": "left_foot",
                        "label": "左腳"
                      },
                      {
                        "value": "right_foot",
                        "label": "右腳"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "tubes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "ng",
                        "foley",
                        "tracheostomy",
                        "pigtail",
                        "port_a",
                        "av_shunt",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "管路",
                    "description": "管路",
                    "x-field-id": "alerts.tubes",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "ng",
                        "label": "NG"
                      },
                      {
                        "value": "foley",
                        "label": "Foley"
                      },
                      {
                        "value": "tracheostomy",
                        "label": "氣切"
                      },
                      {
                        "value": "pigtail",
                        "label": "pigtail"
                      },
                      {
                        "value": "port_a",
                        "label": "port-A"
                      },
                      {
                        "value": "av_shunt",
                        "label": "AV shunt"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "rapidTestDate": {
                    "type": "object",
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "year": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9999
                      },
                      "month": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "day": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 31
                      }
                    },
                    "allOf": [
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "enum": [
                                4,
                                6,
                                9,
                                11
                              ]
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 30
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 29
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "year",
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            },
                            "year": {
                              "not": {
                                "anyOf": [
                                  {
                                    "multipleOf": 400
                                  },
                                  {
                                    "allOf": [
                                      {
                                        "multipleOf": 4
                                      },
                                      {
                                        "not": {
                                          "multipleOf": 100
                                        }
                                      }
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 28
                            }
                          }
                        }
                      }
                    ],
                    "title": "快篩日期",
                    "description": "快篩日期",
                    "x-field-id": "alerts.rapidTestDate"
                  },
                  "rapidTestResult": {
                    "type": "string",
                    "enum": [
                      "positive",
                      "negative"
                    ],
                    "title": "快篩結果",
                    "description": "快篩結果",
                    "x-field-id": "alerts.rapidTestResult",
                    "x-options": [
                      {
                        "value": "positive",
                        "label": "Positive"
                      },
                      {
                        "value": "negative",
                        "label": "Negative"
                      }
                    ]
                  },
                  "pcrDate": {
                    "type": "object",
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "year": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9999
                      },
                      "month": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      },
                      "day": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 31
                      }
                    },
                    "allOf": [
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "enum": [
                                4,
                                6,
                                9,
                                11
                              ]
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 30
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 29
                            }
                          }
                        }
                      },
                      {
                        "if": {
                          "required": [
                            "year",
                            "month"
                          ],
                          "properties": {
                            "month": {
                              "const": 2
                            },
                            "year": {
                              "not": {
                                "anyOf": [
                                  {
                                    "multipleOf": 400
                                  },
                                  {
                                    "allOf": [
                                      {
                                        "multipleOf": 4
                                      },
                                      {
                                        "not": {
                                          "multipleOf": 100
                                        }
                                      }
                                    ]
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "then": {
                          "properties": {
                            "day": {
                              "maximum": 28
                            }
                          }
                        }
                      }
                    ],
                    "title": "PCR 日期",
                    "description": "PCR 日期",
                    "x-field-id": "alerts.pcrDate"
                  },
                  "pcrResult": {
                    "type": "string",
                    "enum": [
                      "positive",
                      "negative"
                    ],
                    "title": "PCR 結果",
                    "description": "PCR 結果",
                    "x-field-id": "alerts.pcrResult",
                    "x-options": [
                      {
                        "value": "positive",
                        "label": "Positive"
                      },
                      {
                        "value": "negative",
                        "label": "Negative"
                      }
                    ]
                  },
                  "pcrCtValue": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 50,
                    "title": "CT 值",
                    "description": "CT 值",
                    "x-field-id": "alerts.pcrCtValue",
                    "x-required-when": {
                      "fieldId": "alerts.pcrResult",
                      "operator": "equals",
                      "value": "positive"
                    },
                    "x-visible-when": {
                      "fieldId": "alerts.pcrResult",
                      "operator": "equals",
                      "value": "positive"
                    }
                  }
                }
              },
              "health": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "familyHistoryStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes",
                      "uncertain"
                    ],
                    "title": "家族病史",
                    "description": "家族病史",
                    "x-field-id": "health.familyHistoryStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      },
                      {
                        "value": "uncertain",
                        "label": "不詳"
                      }
                    ]
                  },
                  "familyHistory": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "relation": {
                          "type": "string",
                          "enum": [
                            "father",
                            "mother",
                            "son",
                            "daughter",
                            "paternal_grandfather",
                            "paternal_grandmother",
                            "other"
                          ],
                          "title": "發病親屬",
                          "description": "發病親屬",
                          "x-field-id": "relation",
                          "x-options": [
                            {
                              "value": "father",
                              "label": "父"
                            },
                            {
                              "value": "mother",
                              "label": "母"
                            },
                            {
                              "value": "son",
                              "label": "子"
                            },
                            {
                              "value": "daughter",
                              "label": "女"
                            },
                            {
                              "value": "paternal_grandfather",
                              "label": "祖父"
                            },
                            {
                              "value": "paternal_grandmother",
                              "label": "祖母"
                            },
                            {
                              "value": "other",
                              "label": "其他"
                            }
                          ]
                        },
                        "diseases": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "hypertension",
                              "heart_disease",
                              "diabetes",
                              "liver_cancer",
                              "colorectal_cancer",
                              "asthma",
                              "blood_disease",
                              "cancer",
                              "cerebrovascular_disease",
                              "mental_illness",
                              "other"
                            ]
                          },
                          "minItems": 1,
                          "title": "疾病",
                          "description": "疾病",
                          "x-field-id": "diseases",
                          "x-options": [
                            {
                              "value": "hypertension",
                              "label": "高血壓"
                            },
                            {
                              "value": "heart_disease",
                              "label": "心臟病"
                            },
                            {
                              "value": "diabetes",
                              "label": "糖尿病"
                            },
                            {
                              "value": "liver_cancer",
                              "label": "肝癌"
                            },
                            {
                              "value": "colorectal_cancer",
                              "label": "大腸直腸癌"
                            },
                            {
                              "value": "asthma",
                              "label": "氣喘"
                            },
                            {
                              "value": "blood_disease",
                              "label": "血液病"
                            },
                            {
                              "value": "cancer",
                              "label": "癌症"
                            },
                            {
                              "value": "cerebrovascular_disease",
                              "label": "腦血管疾病"
                            },
                            {
                              "value": "mental_illness",
                              "label": "精神疾病"
                            },
                            {
                              "value": "other",
                              "label": "其它"
                            }
                          ]
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "relation"
                          ],
                          "properties": {
                            "relation": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "diseases"
                          ],
                          "properties": {
                            "diseases": {}
                          }
                        }
                      ]
                    },
                    "title": "各親屬家族病史",
                    "description": "各親屬家族病史",
                    "x-field-id": "health.familyHistory",
                    "x-required-when": {
                      "fieldId": "health.familyHistoryStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "health.familyHistoryStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "maritalStatus": {
                    "type": "string",
                    "enum": [
                      "single",
                      "married",
                      "divorced",
                      "separated",
                      "cohabiting",
                      "widowed"
                    ],
                    "title": "婚姻狀況",
                    "description": "婚姻狀況",
                    "x-field-id": "health.maritalStatus",
                    "x-options": [
                      {
                        "value": "single",
                        "label": "未婚"
                      },
                      {
                        "value": "married",
                        "label": "已婚"
                      },
                      {
                        "value": "divorced",
                        "label": "離婚"
                      },
                      {
                        "value": "separated",
                        "label": "分居"
                      },
                      {
                        "value": "cohabiting",
                        "label": "同居"
                      },
                      {
                        "value": "widowed",
                        "label": "喪偶"
                      }
                    ]
                  },
                  "livingStatus": {
                    "type": "string",
                    "enum": [
                      "spouse_only",
                      "with_family",
                      "alone_family_support",
                      "alone_friend_support",
                      "alone_independent",
                      "alone_dependent",
                      "care_facility",
                      "other"
                    ],
                    "title": "居住狀況",
                    "description": "居住狀況",
                    "x-field-id": "health.livingStatus",
                    "x-options": [
                      {
                        "value": "spouse_only",
                        "label": "僅有配偶同住"
                      },
                      {
                        "value": "with_family",
                        "label": "與家人同住"
                      },
                      {
                        "value": "alone_family_support",
                        "label": "獨居且有家屬協助"
                      },
                      {
                        "value": "alone_friend_support",
                        "label": "獨居且有朋友協助"
                      },
                      {
                        "value": "alone_independent",
                        "label": "獨居且無人協助但能自理"
                      },
                      {
                        "value": "alone_dependent",
                        "label": "獨居且無人協助且無法自理"
                      },
                      {
                        "value": "care_facility",
                        "label": "住護理之家或療養機構"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "familyInteraction": {
                    "type": "string",
                    "enum": [
                      "caring",
                      "distant",
                      "no_contact",
                      "other"
                    ],
                    "title": "與家人互動關係",
                    "description": "與家人互動關係",
                    "x-field-id": "health.familyInteraction",
                    "x-options": [
                      {
                        "value": "caring",
                        "label": "互相關懷"
                      },
                      {
                        "value": "distant",
                        "label": "疏離"
                      },
                      {
                        "value": "no_contact",
                        "label": "不相往來"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ]
                  },
                  "otherFamilyInteraction": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它互動關係",
                    "description": "其它互動關係",
                    "x-field-id": "health.otherFamilyInteraction",
                    "x-required-when": {
                      "fieldId": "health.familyInteraction",
                      "operator": "equals",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "health.familyInteraction",
                      "operator": "equals",
                      "value": "other"
                    }
                  },
                  "primaryCaregivers": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "spouse",
                        "parents",
                        "children",
                        "friends",
                        "caregiver",
                        "foreign_caregiver",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "住院期間主要照顧者",
                    "description": "住院期間主要照顧者",
                    "x-field-id": "health.primaryCaregivers",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "spouse",
                        "label": "配偶"
                      },
                      {
                        "value": "parents",
                        "label": "父母"
                      },
                      {
                        "value": "children",
                        "label": "子女"
                      },
                      {
                        "value": "friends",
                        "label": "朋友"
                      },
                      {
                        "value": "caregiver",
                        "label": "看護"
                      },
                      {
                        "value": "foreign_caregiver",
                        "label": "外傭"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ]
                  },
                  "otherPrimaryCaregiver": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它主要照顧者",
                    "description": "其它主要照顧者",
                    "x-field-id": "health.otherPrimaryCaregiver",
                    "x-required-when": {
                      "fieldId": "health.primaryCaregivers",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "health.primaryCaregivers",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "occupation": {
                    "type": "string",
                    "enum": [
                      "none",
                      "military",
                      "civil_service",
                      "education",
                      "industrial",
                      "commerce",
                      "agriculture",
                      "student",
                      "healthcare",
                      "service",
                      "other"
                    ],
                    "title": "職業別",
                    "description": "職業別",
                    "x-field-id": "health.occupation",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "military",
                        "label": "軍人"
                      },
                      {
                        "value": "civil_service",
                        "label": "公"
                      },
                      {
                        "value": "education",
                        "label": "教"
                      },
                      {
                        "value": "industrial",
                        "label": "工"
                      },
                      {
                        "value": "commerce",
                        "label": "商"
                      },
                      {
                        "value": "agriculture",
                        "label": "農"
                      },
                      {
                        "value": "student",
                        "label": "學生"
                      },
                      {
                        "value": "healthcare",
                        "label": "醫護"
                      },
                      {
                        "value": "service",
                        "label": "服務業"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "otherOccupation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它職業",
                    "description": "其它職業",
                    "x-field-id": "health.otherOccupation",
                    "x-required-when": {
                      "fieldId": "health.occupation",
                      "operator": "equals",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "health.occupation",
                      "operator": "equals",
                      "value": "other"
                    }
                  },
                  "financialStatus": {
                    "type": "string",
                    "enum": [
                      "affluent",
                      "comfortable",
                      "barely_sustaining",
                      "low_income"
                    ],
                    "title": "經濟狀況",
                    "description": "經濟狀況",
                    "x-field-id": "health.financialStatus",
                    "x-options": [
                      {
                        "value": "affluent",
                        "label": "富裕"
                      },
                      {
                        "value": "comfortable",
                        "label": "小康"
                      },
                      {
                        "value": "barely_sustaining",
                        "label": "勉強維持生活"
                      },
                      {
                        "value": "low_income",
                        "label": "低收入戶"
                      }
                    ]
                  },
                  "smokingStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "current",
                      "quitting_under_six_months",
                      "quit_six_months_or_more"
                    ],
                    "title": "抽菸狀態",
                    "description": "抽菸狀態",
                    "x-field-id": "health.smokingStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "current",
                        "label": "有"
                      },
                      {
                        "value": "quitting_under_six_months",
                        "label": "持續戒菸中未達半年"
                      },
                      {
                        "value": "quit_six_months_or_more",
                        "label": "已戒達半年以上"
                      }
                    ]
                  },
                  "smokingAmount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000,
                    "title": "抽菸量",
                    "description": "抽菸量",
                    "x-field-id": "health.smokingAmount",
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "smokingAmountUnit": {
                    "type": "string",
                    "enum": [
                      "packs_per_day",
                      "cigarettes_per_day"
                    ],
                    "title": "抽菸量單位",
                    "description": "抽菸量單位",
                    "x-field-id": "health.smokingAmountUnit",
                    "x-options": [
                      {
                        "value": "packs_per_day",
                        "label": "包／天"
                      },
                      {
                        "value": "cigarettes_per_day",
                        "label": "支／天"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "smokingYears": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 120,
                    "title": "開始吸菸至今",
                    "description": "開始吸菸至今；單位：年",
                    "x-field-id": "health.smokingYears",
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "quitSmokingExperience": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "戒菸經驗",
                    "description": "戒菸經驗",
                    "x-field-id": "health.quitSmokingExperience",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "quitSmokingWillingness": {
                    "type": "string",
                    "enum": [
                      "yes",
                      "no"
                    ],
                    "title": "戒菸意願",
                    "description": "戒菸意願",
                    "x-field-id": "health.quitSmokingWillingness",
                    "x-options": [
                      {
                        "value": "yes",
                        "label": "是"
                      },
                      {
                        "value": "no",
                        "label": "否"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.smokingStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "alcoholUse": {
                    "type": "string",
                    "enum": [
                      "none",
                      "quit",
                      "occasional",
                      "frequent",
                      "daily"
                    ],
                    "title": "喝酒",
                    "description": "喝酒",
                    "x-field-id": "health.alcoholUse",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "quit",
                        "label": "已戒"
                      },
                      {
                        "value": "occasional",
                        "label": "偶爾（應酬）"
                      },
                      {
                        "value": "frequent",
                        "label": "經常"
                      },
                      {
                        "value": "daily",
                        "label": "每天"
                      }
                    ]
                  },
                  "betelNutStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "quit",
                      "current"
                    ],
                    "title": "檳榔狀態",
                    "description": "檳榔狀態",
                    "x-field-id": "health.betelNutStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "quit",
                        "label": "已戒"
                      },
                      {
                        "value": "current",
                        "label": "有"
                      }
                    ]
                  },
                  "betelNutAmount": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1000,
                    "title": "檳榔量",
                    "description": "檳榔量；單位：包／天",
                    "x-field-id": "health.betelNutAmount",
                    "x-required-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "betelNutYears": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 120,
                    "title": "開始嚼檳榔至今",
                    "description": "開始嚼檳榔至今；單位：年",
                    "x-field-id": "health.betelNutYears",
                    "x-required-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    },
                    "x-visible-when": {
                      "fieldId": "health.betelNutStatus",
                      "operator": "notEquals",
                      "value": "none"
                    }
                  },
                  "medicalHistory": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "breast_cancer",
                        "blood_disease",
                        "mental_illness",
                        "hypertension",
                        "liver_cancer",
                        "cancer",
                        "heart_disease",
                        "colorectal_cancer",
                        "suicide",
                        "diabetes",
                        "asthma",
                        "cerebrovascular_disease",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "過去病史",
                    "description": "過去病史",
                    "x-field-id": "health.medicalHistory",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "breast_cancer",
                        "label": "乳癌"
                      },
                      {
                        "value": "blood_disease",
                        "label": "血液病"
                      },
                      {
                        "value": "mental_illness",
                        "label": "精神疾病"
                      },
                      {
                        "value": "hypertension",
                        "label": "高血壓"
                      },
                      {
                        "value": "liver_cancer",
                        "label": "肝癌"
                      },
                      {
                        "value": "cancer",
                        "label": "癌症"
                      },
                      {
                        "value": "heart_disease",
                        "label": "心臟病"
                      },
                      {
                        "value": "colorectal_cancer",
                        "label": "大腸直腸癌"
                      },
                      {
                        "value": "suicide",
                        "label": "自殺"
                      },
                      {
                        "value": "diabetes",
                        "label": "糖尿病"
                      },
                      {
                        "value": "asthma",
                        "label": "氣喘"
                      },
                      {
                        "value": "cerebrovascular_disease",
                        "label": "腦血管病變"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "surgeryExperience": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "手術經驗",
                    "description": "手術經驗",
                    "x-field-id": "health.surgeryExperience",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "surgeryNote": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "手術說明",
                    "description": "手術說明",
                    "x-field-id": "health.surgeryNote",
                    "x-required-when": {
                      "fieldId": "health.surgeryExperience",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "health.surgeryExperience",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "recentEmergencyOrAdmissionCount": {
                    "type": "string",
                    "enum": [
                      "none",
                      "one",
                      "two",
                      "more_than_two"
                    ],
                    "title": "近 3 個月急診或住院次數",
                    "description": "近 3 個月急診或住院次數",
                    "x-field-id": "health.recentEmergencyOrAdmissionCount",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "沒有"
                      },
                      {
                        "value": "one",
                        "label": "1 次"
                      },
                      {
                        "value": "two",
                        "label": "2 次"
                      },
                      {
                        "value": "more_than_two",
                        "label": ">2 次"
                      }
                    ]
                  },
                  "currentMedications": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "antidepressant_or_antipsychotic",
                        "cardiac",
                        "laxative_or_stool_softener",
                        "antihypertensive",
                        "antiepileptic",
                        "anticoagulant",
                        "anesthetic_analgesic",
                        "glucose_lowering",
                        "anti_parkinson",
                        "erythropoietin",
                        "muscle_relaxant",
                        "diuretic",
                        "oral_anticancer",
                        "sedative_hypnotic",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "現在用藥",
                    "description": "現在用藥",
                    "x-field-id": "health.currentMedications",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "antidepressant_or_antipsychotic",
                        "label": "抗憂鬱／抗精神病藥"
                      },
                      {
                        "value": "cardiac",
                        "label": "心臟用藥"
                      },
                      {
                        "value": "laxative_or_stool_softener",
                        "label": "瀉藥／軟便劑"
                      },
                      {
                        "value": "antihypertensive",
                        "label": "降血壓"
                      },
                      {
                        "value": "antiepileptic",
                        "label": "抗癲癇藥"
                      },
                      {
                        "value": "anticoagulant",
                        "label": "抗凝血劑"
                      },
                      {
                        "value": "anesthetic_analgesic",
                        "label": "麻醉止痛藥"
                      },
                      {
                        "value": "glucose_lowering",
                        "label": "降血糖"
                      },
                      {
                        "value": "anti_parkinson",
                        "label": "抗帕金森氏症藥"
                      },
                      {
                        "value": "erythropoietin",
                        "label": "紅血球生成素"
                      },
                      {
                        "value": "muscle_relaxant",
                        "label": "肌肉鬆弛劑"
                      },
                      {
                        "value": "diuretic",
                        "label": "利尿劑"
                      },
                      {
                        "value": "oral_anticancer",
                        "label": "口服抗癌藥物"
                      },
                      {
                        "value": "sedative_hypnotic",
                        "label": "鎮靜安眠藥"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "nutrition": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "heightCm": {
                    "type": "number",
                    "minimum": 20,
                    "maximum": 250,
                    "title": "身高",
                    "description": "身高；單位：公分",
                    "x-field-id": "nutrition.heightCm"
                  },
                  "weightKg": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 500,
                    "title": "體重",
                    "description": "體重；單位：Kg",
                    "x-field-id": "nutrition.weightKg"
                  },
                  "idealWeightKg": {
                    "readOnly": true,
                    "x-computation": {
                      "kind": "formula",
                      "description": "由身高计算；公式由产品端配置。",
                      "dependsOn": [
                        "nutrition.heightCm"
                      ]
                    },
                    "description": "理想體重；只在查回結果出現。回傳型別依院方接口定義。",
                    "title": "理想體重",
                    "x-field-id": "nutrition.idealWeightKg"
                  },
                  "measurementUnavailableReason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "身高體重無法測量原因",
                    "description": "身高體重無法測量原因",
                    "x-field-id": "nutrition.measurementUnavailableReason",
                    "x-required-when": {
                      "any": [
                        {
                          "fieldId": "nutrition.heightCm",
                          "operator": "isPresent",
                          "value": false
                        },
                        {
                          "fieldId": "nutrition.weightKg",
                          "operator": "isPresent",
                          "value": false
                        }
                      ]
                    },
                    "x-visible-when": {
                      "any": [
                        {
                          "fieldId": "nutrition.heightCm",
                          "operator": "isPresent",
                          "value": false
                        },
                        {
                          "fieldId": "nutrition.weightKg",
                          "operator": "isPresent",
                          "value": false
                        }
                      ]
                    }
                  },
                  "relativeIdealWeight": {
                    "readOnly": true,
                    "x-computation": {
                      "kind": "derived",
                      "description": "依 BMI 自動分類：<18.5 過輕；18.5–<24 健康體重；24–<27 過重；>=27 肥胖。",
                      "dependsOn": [
                        "nutrition.heightCm",
                        "nutrition.weightKg"
                      ]
                    },
                    "description": "相較理想體重；只在查回結果出現。回傳型別依院方接口定義。",
                    "title": "相較理想體重",
                    "x-field-id": "nutrition.relativeIdealWeight",
                    "x-visible-when": {
                      "all": [
                        {
                          "fieldId": "nutrition.heightCm",
                          "operator": "isPresent",
                          "value": true
                        },
                        {
                          "fieldId": "nutrition.weightKg",
                          "operator": "isPresent",
                          "value": true
                        }
                      ]
                    }
                  },
                  "edemaStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "present"
                    ],
                    "title": "水腫情形",
                    "description": "水腫情形",
                    "x-field-id": "nutrition.edemaStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "present",
                        "label": "有"
                      }
                    ]
                  },
                  "edemaFindings": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "site": {
                          "type": "string",
                          "enum": [
                            "left_upper_limb",
                            "right_upper_limb",
                            "left_lower_limb",
                            "right_lower_limb",
                            "both_upper_limbs",
                            "both_lower_limbs",
                            "all_limbs"
                          ],
                          "title": "部位",
                          "description": "部位",
                          "x-field-id": "site",
                          "x-options": [
                            {
                              "value": "left_upper_limb",
                              "label": "左上肢"
                            },
                            {
                              "value": "right_upper_limb",
                              "label": "右上肢"
                            },
                            {
                              "value": "left_lower_limb",
                              "label": "左下肢"
                            },
                            {
                              "value": "right_lower_limb",
                              "label": "右下肢"
                            },
                            {
                              "value": "both_upper_limbs",
                              "label": "雙上肢"
                            },
                            {
                              "value": "both_lower_limbs",
                              "label": "雙下肢"
                            },
                            {
                              "value": "all_limbs",
                              "label": "四肢"
                            }
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "grade_1",
                            "grade_2",
                            "grade_3",
                            "grade_4"
                          ],
                          "title": "程度",
                          "description": "程度",
                          "x-field-id": "severity",
                          "x-options": [
                            {
                              "value": "grade_1",
                              "label": "1+"
                            },
                            {
                              "value": "grade_2",
                              "label": "2+"
                            },
                            {
                              "value": "grade_3",
                              "label": "3+"
                            },
                            {
                              "value": "grade_4",
                              "label": "4+"
                            }
                          ]
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "site"
                          ],
                          "properties": {
                            "site": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "severity"
                          ],
                          "properties": {
                            "severity": {}
                          }
                        }
                      ]
                    },
                    "title": "水腫部位與程度",
                    "description": "水腫部位與程度",
                    "x-field-id": "nutrition.edemaFindings",
                    "x-required-when": {
                      "fieldId": "nutrition.edemaStatus",
                      "operator": "equals",
                      "value": "present"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.edemaStatus",
                      "operator": "equals",
                      "value": "present"
                    }
                  },
                  "feedingRoutes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "oral",
                        "ng_feeding",
                        "gastrostomy",
                        "enterostomy",
                        "tpn_ppn",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "進食方式",
                    "description": "進食方式",
                    "x-field-id": "nutrition.feedingRoutes",
                    "x-options": [
                      {
                        "value": "oral",
                        "label": "由口進食"
                      },
                      {
                        "value": "ng_feeding",
                        "label": "N-G Feeding"
                      },
                      {
                        "value": "gastrostomy",
                        "label": "胃造"
                      },
                      {
                        "value": "enterostomy",
                        "label": "腸造"
                      },
                      {
                        "value": "tpn_ppn",
                        "label": "TPN/PPN"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "feedingStatus": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "decreased_appetite",
                        "dysphagia",
                        "chewing_difficulty",
                        "npo",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "進食情況",
                    "description": "進食情況",
                    "x-field-id": "nutrition.feedingStatus",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "decreased_appetite",
                        "label": "食慾減低"
                      },
                      {
                        "value": "dysphagia",
                        "label": "吞嚥困難"
                      },
                      {
                        "value": "chewing_difficulty",
                        "label": "咀嚼困難"
                      },
                      {
                        "value": "npo",
                        "label": "禁食"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "oralConditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "mucosal_damage",
                        "oral_odor",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "口腔狀況",
                    "description": "口腔狀況",
                    "x-field-id": "nutrition.oralConditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "mucosal_damage",
                        "label": "黏膜破損"
                      },
                      {
                        "value": "oral_odor",
                        "label": "口腔異味"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "dentures": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "upper",
                        "lower"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "假牙",
                    "description": "假牙",
                    "x-field-id": "nutrition.dentures",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "upper",
                        "label": "上"
                      },
                      {
                        "value": "lower",
                        "label": "下"
                      }
                    ]
                  },
                  "upperDentureType": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "removable"
                    ],
                    "title": "上假牙類型",
                    "description": "上假牙類型",
                    "x-field-id": "nutrition.upperDentureType",
                    "x-options": [
                      {
                        "value": "fixed",
                        "label": "固定"
                      },
                      {
                        "value": "removable",
                        "label": "活動"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "upper"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "upper"
                    }
                  },
                  "lowerDentureType": {
                    "type": "string",
                    "enum": [
                      "fixed",
                      "removable"
                    ],
                    "title": "下假牙類型",
                    "description": "下假牙類型",
                    "x-field-id": "nutrition.lowerDentureType",
                    "x-options": [
                      {
                        "value": "fixed",
                        "label": "固定"
                      },
                      {
                        "value": "removable",
                        "label": "活動"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "lower"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dentures",
                      "operator": "includes",
                      "value": "lower"
                    }
                  },
                  "dietTypes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "regular",
                        "tube_feeding",
                        "vegetarian",
                        "special",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "飲食種類",
                    "description": "飲食種類",
                    "x-field-id": "nutrition.dietTypes",
                    "x-options": [
                      {
                        "value": "regular",
                        "label": "普通飲食"
                      },
                      {
                        "value": "tube_feeding",
                        "label": "管灌"
                      },
                      {
                        "value": "vegetarian",
                        "label": "素食"
                      },
                      {
                        "value": "special",
                        "label": "特殊飲食"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ]
                  },
                  "vegetarianDietDetails": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "soft",
                        "liquid",
                        "diabetic",
                        "low_fat",
                        "low_salt"
                      ]
                    },
                    "minItems": 1,
                    "title": "素食細項",
                    "description": "素食細項",
                    "x-field-id": "nutrition.vegetarianDietDetails",
                    "x-options": [
                      {
                        "value": "soft",
                        "label": "軟質"
                      },
                      {
                        "value": "liquid",
                        "label": "流質"
                      },
                      {
                        "value": "diabetic",
                        "label": "糖尿病"
                      },
                      {
                        "value": "low_fat",
                        "label": "低油"
                      },
                      {
                        "value": "low_salt",
                        "label": "低鹽"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "vegetarian"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "vegetarian"
                    }
                  },
                  "specialDietDetails": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "soft",
                        "liquid",
                        "diabetic",
                        "low_fat",
                        "low_salt"
                      ]
                    },
                    "minItems": 1,
                    "title": "特殊飲食細項",
                    "description": "特殊飲食細項",
                    "x-field-id": "nutrition.specialDietDetails",
                    "x-options": [
                      {
                        "value": "soft",
                        "label": "軟質"
                      },
                      {
                        "value": "liquid",
                        "label": "流質"
                      },
                      {
                        "value": "diabetic",
                        "label": "糖尿病"
                      },
                      {
                        "value": "low_fat",
                        "label": "低油"
                      },
                      {
                        "value": "low_salt",
                        "label": "低鹽"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "special"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "special"
                    }
                  },
                  "otherDiet": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它飲食",
                    "description": "其它飲食",
                    "x-field-id": "nutrition.otherDiet",
                    "x-required-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.dietTypes",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "foodRestriction": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "食物禁忌",
                    "description": "食物禁忌",
                    "x-field-id": "nutrition.foodRestriction",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "foodRestrictionNote": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "食物禁忌說明",
                    "description": "食物禁忌說明",
                    "x-field-id": "nutrition.foodRestrictionNote",
                    "x-required-when": {
                      "fieldId": "nutrition.foodRestriction",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "nutrition.foodRestriction",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "otherSymptoms": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "nausea",
                        "vomiting",
                        "hiccups",
                        "bloating"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "其它症狀",
                    "description": "其它症狀",
                    "x-field-id": "nutrition.otherSymptoms",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "nausea",
                        "label": "噁心"
                      },
                      {
                        "value": "vomiting",
                        "label": "嘔吐"
                      },
                      {
                        "value": "hiccups",
                        "label": "打嗝"
                      },
                      {
                        "value": "bloating",
                        "label": "腹脹"
                      }
                    ]
                  }
                }
              },
              "sleep": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "conditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "day_night_reversal",
                        "insomnia",
                        "fatigue",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "休息睡眠狀況",
                    "description": "休息睡眠狀況",
                    "x-field-id": "sleep.conditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "day_night_reversal",
                        "label": "日夜顛倒"
                      },
                      {
                        "value": "insomnia",
                        "label": "失眠"
                      },
                      {
                        "value": "fatigue",
                        "label": "倦怠"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "usualHours": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 24,
                    "title": "平時約入睡幾小時",
                    "description": "平時約入睡幾小時；單位：小時",
                    "x-field-id": "sleep.usualHours"
                  }
                }
              },
              "activity": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "mobility": {
                    "type": "string",
                    "enum": [
                      "unable_to_walk",
                      "walks_with_person_assistance",
                      "independent"
                    ],
                    "title": "活動能力",
                    "description": "活動能力",
                    "x-field-id": "activity.mobility",
                    "x-options": [
                      {
                        "value": "unable_to_walk",
                        "label": "無法自行走動"
                      },
                      {
                        "value": "walks_with_person_assistance",
                        "label": "可走動需他人協助"
                      },
                      {
                        "value": "independent",
                        "label": "自己可走動"
                      }
                    ]
                  },
                  "needsMobilityAid": {
                    "type": "boolean",
                    "title": "可走動需輔助協助",
                    "description": "可走動需輔助協助",
                    "x-field-id": "activity.needsMobilityAid"
                  },
                  "mobilityAids": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "cane",
                        "walker",
                        "wheelchair",
                        "prosthesis",
                        "mobile_commode",
                        "mobile_iv_stand",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "行動輔具",
                    "description": "行動輔具",
                    "x-field-id": "activity.mobilityAids",
                    "x-options": [
                      {
                        "value": "cane",
                        "label": "拐杖"
                      },
                      {
                        "value": "walker",
                        "label": "助行器"
                      },
                      {
                        "value": "wheelchair",
                        "label": "輪椅"
                      },
                      {
                        "value": "prosthesis",
                        "label": "義肢"
                      },
                      {
                        "value": "mobile_commode",
                        "label": "活動便盆椅"
                      },
                      {
                        "value": "mobile_iv_stand",
                        "label": "活動點滴架"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "activity.needsMobilityAid",
                      "operator": "equals",
                      "value": true
                    },
                    "x-visible-when": {
                      "fieldId": "activity.needsMobilityAid",
                      "operator": "equals",
                      "value": true
                    }
                  },
                  "otherMobilityAid": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它行動輔具",
                    "description": "其它行動輔具",
                    "x-field-id": "activity.otherMobilityAid",
                    "x-required-when": {
                      "fieldId": "activity.mobilityAids",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.mobilityAids",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "leftUpperMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "左上肢肌肉張力",
                    "description": "左上肢肌肉張力",
                    "x-field-id": "activity.leftUpperMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "rightUpperMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "右上肢肌肉張力",
                    "description": "右上肢肌肉張力",
                    "x-field-id": "activity.rightUpperMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "leftLowerMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "左下肢肌肉張力",
                    "description": "左下肢肌肉張力",
                    "x-field-id": "activity.leftLowerMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "rightLowerMuscleStrength": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5"
                    ],
                    "title": "右下肢肌肉張力",
                    "description": "右下肢肌肉張力",
                    "x-field-id": "activity.rightLowerMuscleStrength",
                    "x-options": [
                      {
                        "value": "0",
                        "label": "0 分"
                      },
                      {
                        "value": "1",
                        "label": "1 分"
                      },
                      {
                        "value": "2",
                        "label": "2 分"
                      },
                      {
                        "value": "3",
                        "label": "3 分"
                      },
                      {
                        "value": "4",
                        "label": "4 分"
                      },
                      {
                        "value": "5",
                        "label": "5 分"
                      }
                    ]
                  },
                  "limbAppearance": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "abnormal"
                    ],
                    "title": "外觀－肢體",
                    "description": "外觀－肢體",
                    "x-field-id": "activity.limbAppearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "abnormal",
                        "label": "異常"
                      }
                    ]
                  },
                  "gait": {
                    "type": "string",
                    "enum": [
                      "stable",
                      "unstable"
                    ],
                    "title": "步態",
                    "description": "步態",
                    "x-field-id": "activity.gait",
                    "x-options": [
                      {
                        "value": "stable",
                        "label": "穩定"
                      },
                      {
                        "value": "unstable",
                        "label": "不穩定"
                      }
                    ]
                  },
                  "unstableGaitDetails": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "left_hemiplegia",
                        "right_hemiplegia",
                        "limp",
                        "unable_to_assess",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "title": "不穩定步態細項",
                    "description": "不穩定步態細項",
                    "x-field-id": "activity.unstableGaitDetails",
                    "x-options": [
                      {
                        "value": "left_hemiplegia",
                        "label": "偏癱（左側）"
                      },
                      {
                        "value": "right_hemiplegia",
                        "label": "偏癱（右側）"
                      },
                      {
                        "value": "limp",
                        "label": "跛行"
                      },
                      {
                        "value": "unable_to_assess",
                        "label": "暫無法評估"
                      },
                      {
                        "value": "other",
                        "label": "其他"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "activity.gait",
                      "operator": "equals",
                      "value": "unstable"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.gait",
                      "operator": "equals",
                      "value": "unstable"
                    }
                  },
                  "otherGait": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "其它步態",
                    "description": "其它步態",
                    "x-field-id": "activity.otherGait",
                    "x-required-when": {
                      "fieldId": "activity.unstableGaitDetails",
                      "operator": "includes",
                      "value": "other"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.unstableGaitDetails",
                      "operator": "includes",
                      "value": "other"
                    }
                  },
                  "selfCareAbility": {
                    "type": "string",
                    "enum": [
                      "independent",
                      "needs_help"
                    ],
                    "title": "自我照顧能力",
                    "description": "自我照顧能力",
                    "x-field-id": "activity.selfCareAbility",
                    "x-options": [
                      {
                        "value": "independent",
                        "label": "日常生活獨立"
                      },
                      {
                        "value": "needs_help",
                        "label": "需他人協助"
                      }
                    ]
                  },
                  "selfCareAssistance": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "eating",
                        "dressing",
                        "bathing",
                        "toileting",
                        "transfer",
                        "medication",
                        "cooking",
                        "finances",
                        "shopping",
                        "going_out"
                      ]
                    },
                    "minItems": 1,
                    "title": "需協助項目",
                    "description": "需協助項目",
                    "x-field-id": "activity.selfCareAssistance",
                    "x-options": [
                      {
                        "value": "eating",
                        "label": "進食"
                      },
                      {
                        "value": "dressing",
                        "label": "穿衣"
                      },
                      {
                        "value": "bathing",
                        "label": "沐浴"
                      },
                      {
                        "value": "toileting",
                        "label": "如廁"
                      },
                      {
                        "value": "transfer",
                        "label": "移位"
                      },
                      {
                        "value": "medication",
                        "label": "服藥"
                      },
                      {
                        "value": "cooking",
                        "label": "煮飯"
                      },
                      {
                        "value": "finances",
                        "label": "處理財物"
                      },
                      {
                        "value": "shopping",
                        "label": "購物"
                      },
                      {
                        "value": "going_out",
                        "label": "外出"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "activity.selfCareAbility",
                      "operator": "equals",
                      "value": "needs_help"
                    },
                    "x-visible-when": {
                      "fieldId": "activity.selfCareAbility",
                      "operator": "equals",
                      "value": "needs_help"
                    }
                  },
                  "fallInPastYear": {
                    "type": "string",
                    "enum": [
                      "yes",
                      "no",
                      "uncertain"
                    ],
                    "title": "最近一年內曾發生跌倒",
                    "description": "最近一年內曾發生跌倒",
                    "x-field-id": "activity.fallInPastYear",
                    "x-options": [
                      {
                        "value": "yes",
                        "label": "是"
                      },
                      {
                        "value": "no",
                        "label": "否"
                      },
                      {
                        "value": "uncertain",
                        "label": "不詳"
                      }
                    ]
                  }
                }
              },
              "respiratory": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "chestSymmetry": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "abnormally_symmetric"
                    ],
                    "title": "胸廓對稱性",
                    "description": "胸廓對稱性",
                    "x-field-id": "respiratory.chestSymmetry",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "abnormally_symmetric",
                        "label": "不正常對稱"
                      }
                    ]
                  },
                  "patterns": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "labored",
                        "orthopnea",
                        "accessory_muscle_use",
                        "ventilator_use"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "呼吸型態",
                    "description": "呼吸型態",
                    "x-field-id": "respiratory.patterns",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "labored",
                        "label": "費力"
                      },
                      {
                        "value": "orthopnea",
                        "label": "端坐喘息"
                      },
                      {
                        "value": "accessory_muscle_use",
                        "label": "使用呼吸輔助肌"
                      },
                      {
                        "value": "ventilator_use",
                        "label": "使用呼吸器"
                      }
                    ]
                  },
                  "coughFrequency": {
                    "type": "string",
                    "enum": [
                      "none",
                      "occasional",
                      "frequent"
                    ],
                    "title": "咳嗽",
                    "description": "咳嗽",
                    "x-field-id": "respiratory.coughFrequency",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "occasional",
                        "label": "偶爾"
                      },
                      {
                        "value": "frequent",
                        "label": "經常"
                      }
                    ]
                  },
                  "sputumClearance": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "needs_assistance",
                      "suction"
                    ],
                    "title": "咳痰能力",
                    "description": "咳痰能力",
                    "x-field-id": "respiratory.sputumClearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "needs_assistance",
                        "label": "需協助咳痰"
                      },
                      {
                        "value": "suction",
                        "label": "抽痰"
                      }
                    ]
                  },
                  "sputumStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "痰液",
                    "description": "痰液",
                    "x-field-id": "respiratory.sputumStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "sputumColor": {
                    "type": "string",
                    "enum": [
                      "yellow",
                      "white",
                      "red",
                      "rust"
                    ],
                    "title": "痰液顏色",
                    "description": "痰液顏色",
                    "x-field-id": "respiratory.sputumColor",
                    "x-options": [
                      {
                        "value": "yellow",
                        "label": "黃色"
                      },
                      {
                        "value": "white",
                        "label": "白色"
                      },
                      {
                        "value": "red",
                        "label": "紅色"
                      },
                      {
                        "value": "rust",
                        "label": "鐵銹色"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "sputumViscosity": {
                    "type": "string",
                    "enum": [
                      "thin",
                      "thick"
                    ],
                    "title": "痰液黏稠度",
                    "description": "痰液黏稠度",
                    "x-field-id": "respiratory.sputumViscosity",
                    "x-options": [
                      {
                        "value": "thin",
                        "label": "稀"
                      },
                      {
                        "value": "thick",
                        "label": "稠"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "sputumAmount": {
                    "type": "string",
                    "enum": [
                      "large",
                      "medium",
                      "small"
                    ],
                    "title": "痰液量",
                    "description": "痰液量",
                    "x-field-id": "respiratory.sputumAmount",
                    "x-options": [
                      {
                        "value": "large",
                        "label": "多"
                      },
                      {
                        "value": "medium",
                        "label": "中"
                      },
                      {
                        "value": "small",
                        "label": "少"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "respiratory.sputumStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "breathSounds": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "diminished",
                        "rhonchi",
                        "wheezing",
                        "stridor"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "呼吸聲",
                    "description": "呼吸聲",
                    "x-field-id": "respiratory.breathSounds",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "diminished",
                        "label": "減弱"
                      },
                      {
                        "value": "rhonchi",
                        "label": "囉音 rhonch I"
                      },
                      {
                        "value": "wheezing",
                        "label": "喘鳴音 wheezing"
                      },
                      {
                        "value": "stridor",
                        "label": "摩擦音 stridor"
                      }
                    ]
                  },
                  "oxygenTherapies": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "nasal_cannula",
                        "mask",
                        "ventilator",
                        "peep",
                        "fio2",
                        "tracheostomy",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "用氧情況",
                    "description": "用氧情況",
                    "x-field-id": "respiratory.oxygenTherapies",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "nasal_cannula",
                        "label": "Nasal cannula"
                      },
                      {
                        "value": "mask",
                        "label": "Mask"
                      },
                      {
                        "value": "ventilator",
                        "label": "ventilator"
                      },
                      {
                        "value": "peep",
                        "label": "PEEP"
                      },
                      {
                        "value": "fio2",
                        "label": "FIO2"
                      },
                      {
                        "value": "tracheostomy",
                        "label": "氣切"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "circulation": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "implantStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "yes"
                    ],
                    "title": "人工置入物",
                    "description": "人工置入物",
                    "x-field-id": "circulation.implantStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "yes",
                        "label": "有"
                      }
                    ]
                  },
                  "implantTypes": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "pacemaker",
                        "metal_valve"
                      ]
                    },
                    "minItems": 1,
                    "title": "人工置入物種類",
                    "description": "人工置入物種類",
                    "x-field-id": "circulation.implantTypes",
                    "x-options": [
                      {
                        "value": "pacemaker",
                        "label": "pacemaker"
                      },
                      {
                        "value": "metal_valve",
                        "label": "金屬瓣膜置換"
                      }
                    ],
                    "x-required-when": {
                      "fieldId": "circulation.implantStatus",
                      "operator": "equals",
                      "value": "yes"
                    },
                    "x-visible-when": {
                      "fieldId": "circulation.implantStatus",
                      "operator": "equals",
                      "value": "yes"
                    }
                  },
                  "peripheralCirculation": {
                    "type": "string",
                    "enum": [
                      "warm",
                      "cold",
                      "other"
                    ],
                    "title": "末梢循環",
                    "description": "末梢循環",
                    "x-field-id": "circulation.peripheralCirculation",
                    "x-options": [
                      {
                        "value": "warm",
                        "label": "溫暖"
                      },
                      {
                        "value": "cold",
                        "label": "冰冷"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "symptoms": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "none",
                        "palpitations",
                        "clubbing",
                        "jugular_venous_distention",
                        "epigastric_burning",
                        "chest_tightness",
                        "dizziness",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "none"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "病徵",
                    "description": "病徵",
                    "x-field-id": "circulation.symptoms",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無",
                        "exclusive": true
                      },
                      {
                        "value": "palpitations",
                        "label": "心悸"
                      },
                      {
                        "value": "clubbing",
                        "label": "杵狀指"
                      },
                      {
                        "value": "jugular_venous_distention",
                        "label": "頸靜脈怒張"
                      },
                      {
                        "value": "epigastric_burning",
                        "label": "上腹灼熱"
                      },
                      {
                        "value": "chest_tightness",
                        "label": "胸悶"
                      },
                      {
                        "value": "dizziness",
                        "label": "頭暈（含暈厥及眩暈）"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  }
                }
              },
              "cognition": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "leftVision": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "blind",
                        "presbyopia",
                        "myopia",
                        "diplopia",
                        "amblyopia",
                        "hemianopia",
                        "cataract",
                        "glaucoma",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "視力（左）",
                    "description": "視力（左）",
                    "x-field-id": "cognition.leftVision",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "blind",
                        "label": "失明"
                      },
                      {
                        "value": "presbyopia",
                        "label": "老花眼"
                      },
                      {
                        "value": "myopia",
                        "label": "近視"
                      },
                      {
                        "value": "diplopia",
                        "label": "複視"
                      },
                      {
                        "value": "amblyopia",
                        "label": "弱視"
                      },
                      {
                        "value": "hemianopia",
                        "label": "偏盲"
                      },
                      {
                        "value": "cataract",
                        "label": "白內障"
                      },
                      {
                        "value": "glaucoma",
                        "label": "青光眼"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "rightVision": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "blind",
                        "presbyopia",
                        "myopia",
                        "diplopia",
                        "amblyopia",
                        "hemianopia",
                        "cataract",
                        "glaucoma",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "視力（右）",
                    "description": "視力（右）",
                    "x-field-id": "cognition.rightVision",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "blind",
                        "label": "失明"
                      },
                      {
                        "value": "presbyopia",
                        "label": "老花眼"
                      },
                      {
                        "value": "myopia",
                        "label": "近視"
                      },
                      {
                        "value": "diplopia",
                        "label": "複視"
                      },
                      {
                        "value": "amblyopia",
                        "label": "弱視"
                      },
                      {
                        "value": "hemianopia",
                        "label": "偏盲"
                      },
                      {
                        "value": "cataract",
                        "label": "白內障"
                      },
                      {
                        "value": "glaucoma",
                        "label": "青光眼"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "leftHearing": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "hard_of_hearing",
                        "deaf",
                        "tinnitus",
                        "hearing_aid",
                        "cochlear_implant",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "聽力（左）",
                    "description": "聽力（左）",
                    "x-field-id": "cognition.leftHearing",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "hard_of_hearing",
                        "label": "重聽"
                      },
                      {
                        "value": "deaf",
                        "label": "失聰"
                      },
                      {
                        "value": "tinnitus",
                        "label": "耳鳴"
                      },
                      {
                        "value": "hearing_aid",
                        "label": "助聽器"
                      },
                      {
                        "value": "cochlear_implant",
                        "label": "電子耳"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "rightHearing": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "clear",
                        "hard_of_hearing",
                        "deaf",
                        "tinnitus",
                        "hearing_aid",
                        "cochlear_implant",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "clear"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "聽力（右）",
                    "description": "聽力（右）",
                    "x-field-id": "cognition.rightHearing",
                    "x-options": [
                      {
                        "value": "clear",
                        "label": "清晰",
                        "exclusive": true
                      },
                      {
                        "value": "hard_of_hearing",
                        "label": "重聽"
                      },
                      {
                        "value": "deaf",
                        "label": "失聰"
                      },
                      {
                        "value": "tinnitus",
                        "label": "耳鳴"
                      },
                      {
                        "value": "hearing_aid",
                        "label": "助聽器"
                      },
                      {
                        "value": "cochlear_implant",
                        "label": "電子耳"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "orientation": {
                    "type": "string",
                    "enum": [
                      "fully_oriented",
                      "sometimes_partially_disoriented",
                      "always_partially_disoriented",
                      "sometimes_fully_disoriented",
                      "always_fully_disoriented",
                      "coma"
                    ],
                    "title": "意識－認知能力",
                    "description": "意識－認知能力",
                    "x-field-id": "cognition.orientation",
                    "x-options": [
                      {
                        "value": "fully_oriented",
                        "label": "清醒且對人時地物認知正確"
                      },
                      {
                        "value": "sometimes_partially_disoriented",
                        "label": "一天中某些時間失去部份定向感"
                      },
                      {
                        "value": "always_partially_disoriented",
                        "label": "一天中所有時間失去部份定向感"
                      },
                      {
                        "value": "sometimes_fully_disoriented",
                        "label": "一天中某些時間失去全部定向感"
                      },
                      {
                        "value": "always_fully_disoriented",
                        "label": "一天中所有時間失去全部定向感"
                      },
                      {
                        "value": "coma",
                        "label": "昏迷"
                      }
                    ]
                  },
                  "behaviors": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "appropriate",
                        "wandering",
                        "restless",
                        "confused",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "appropriate"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "意識－行為型態",
                    "description": "意識－行為型態",
                    "x-field-id": "cognition.behaviors",
                    "x-options": [
                      {
                        "value": "appropriate",
                        "label": "適當",
                        "exclusive": true
                      },
                      {
                        "value": "wandering",
                        "label": "四處游走"
                      },
                      {
                        "value": "restless",
                        "label": "燥動不安"
                      },
                      {
                        "value": "confused",
                        "label": "混亂"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "painStatus": {
                    "type": "string",
                    "enum": [
                      "none",
                      "present",
                      "unable_to_assess"
                    ],
                    "title": "疼痛狀態",
                    "description": "疼痛狀態",
                    "x-field-id": "cognition.painStatus",
                    "x-options": [
                      {
                        "value": "none",
                        "label": "無"
                      },
                      {
                        "value": "present",
                        "label": "有"
                      },
                      {
                        "value": "unable_to_assess",
                        "label": "無法評估"
                      }
                    ]
                  },
                  "painFindings": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "site": {
                          "type": "string",
                          "enum": [
                            "head",
                            "tooth",
                            "mouth",
                            "eye",
                            "ear",
                            "neck",
                            "back",
                            "chest",
                            "abdomen",
                            "waist",
                            "upper_limb",
                            "lower_limb",
                            "other"
                          ],
                          "title": "部位",
                          "description": "部位",
                          "x-field-id": "site",
                          "x-options": [
                            {
                              "value": "head",
                              "label": "頭部"
                            },
                            {
                              "value": "tooth",
                              "label": "牙"
                            },
                            {
                              "value": "mouth",
                              "label": "口腔"
                            },
                            {
                              "value": "eye",
                              "label": "眼睛"
                            },
                            {
                              "value": "ear",
                              "label": "耳朵"
                            },
                            {
                              "value": "neck",
                              "label": "頸部"
                            },
                            {
                              "value": "back",
                              "label": "背部"
                            },
                            {
                              "value": "chest",
                              "label": "胸部"
                            },
                            {
                              "value": "abdomen",
                              "label": "腹部"
                            },
                            {
                              "value": "waist",
                              "label": "腰部"
                            },
                            {
                              "value": "upper_limb",
                              "label": "上肢"
                            },
                            {
                              "value": "lower_limb",
                              "label": "下肢"
                            },
                            {
                              "value": "other",
                              "label": "其他"
                            }
                          ]
                        },
                        "score": {
                          "type": "string",
                          "enum": [
                            "0",
                            "1",
                            "2",
                            "3",
                            "4",
                            "5",
                            "6",
                            "7",
                            "8",
                            "9",
                            "10"
                          ],
                          "title": "疼痛分數",
                          "description": "疼痛分數",
                          "x-field-id": "score",
                          "x-options": [
                            {
                              "value": "0",
                              "label": "0 分"
                            },
                            {
                              "value": "1",
                              "label": "1 分"
                            },
                            {
                              "value": "2",
                              "label": "2 分"
                            },
                            {
                              "value": "3",
                              "label": "3 分"
                            },
                            {
                              "value": "4",
                              "label": "4 分"
                            },
                            {
                              "value": "5",
                              "label": "5 分"
                            },
                            {
                              "value": "6",
                              "label": "6 分"
                            },
                            {
                              "value": "7",
                              "label": "7 分"
                            },
                            {
                              "value": "8",
                              "label": "8 分"
                            },
                            {
                              "value": "9",
                              "label": "9 分"
                            },
                            {
                              "value": "10",
                              "label": "10 分"
                            }
                          ]
                        },
                        "otherSite": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "title": "其它疼痛部位",
                          "description": "其它疼痛部位",
                          "x-field-id": "otherSite",
                          "x-required-when": {
                            "fieldId": "site",
                            "operator": "equals",
                            "value": "other"
                          },
                          "x-visible-when": {
                            "fieldId": "site",
                            "operator": "equals",
                            "value": "other"
                          }
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "site"
                          ],
                          "properties": {
                            "site": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "score"
                          ],
                          "properties": {
                            "score": {}
                          }
                        },
                        {
                          "if": {
                            "type": "object",
                            "required": [
                              "site"
                            ],
                            "properties": {
                              "site": {
                                "const": "other"
                              }
                            }
                          },
                          "then": {
                            "type": "object",
                            "required": [
                              "otherSite"
                            ],
                            "properties": {
                              "otherSite": {}
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "site"
                              ],
                              "properties": {
                                "site": {
                                  "const": "other"
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "otherSite"
                              ],
                              "properties": {
                                "otherSite": {}
                              }
                            }
                          }
                        }
                      ]
                    },
                    "title": "疼痛部位與分數",
                    "description": "疼痛部位與分數",
                    "x-field-id": "cognition.painFindings",
                    "x-required-when": {
                      "fieldId": "cognition.painStatus",
                      "operator": "equals",
                      "value": "present"
                    },
                    "x-visible-when": {
                      "fieldId": "cognition.painStatus",
                      "operator": "equals",
                      "value": "present"
                    }
                  },
                  "speech": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "unclear_articulation",
                      "speech_disorder",
                      "aphasia",
                      "other"
                    ],
                    "title": "語言表達",
                    "description": "語言表達",
                    "x-field-id": "cognition.speech",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "unclear_articulation",
                        "label": "口齒欠清"
                      },
                      {
                        "value": "speech_disorder",
                        "label": "語言障礙"
                      },
                      {
                        "value": "aphasia",
                        "label": "失語症"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "skinAppearance": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "abnormal",
                      "other"
                    ],
                    "title": "皮膚外觀",
                    "description": "皮膚外觀",
                    "x-field-id": "cognition.skinAppearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "abnormal",
                        "label": "異常"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "skinFindings": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "pallor",
                            "rash",
                            "blister",
                            "swelling",
                            "ulcer",
                            "jaundice",
                            "wound",
                            "peeling",
                            "cracking"
                          ],
                          "title": "皮膚問題類型",
                          "description": "皮膚問題類型",
                          "x-field-id": "type",
                          "x-options": [
                            {
                              "value": "pallor",
                              "label": "蒼白"
                            },
                            {
                              "value": "rash",
                              "label": "紅疹"
                            },
                            {
                              "value": "blister",
                              "label": "水泡"
                            },
                            {
                              "value": "swelling",
                              "label": "紅腫"
                            },
                            {
                              "value": "ulcer",
                              "label": "潰瘍"
                            },
                            {
                              "value": "jaundice",
                              "label": "黃疸"
                            },
                            {
                              "value": "wound",
                              "label": "傷口"
                            },
                            {
                              "value": "peeling",
                              "label": "脫皮"
                            },
                            {
                              "value": "cracking",
                              "label": "乾裂"
                            }
                          ]
                        },
                        "sites": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "face",
                              "eyelid",
                              "mouth",
                              "neck",
                              "back",
                              "chest",
                              "abdomen",
                              "waist",
                              "upper_limb",
                              "lower_limb",
                              "other"
                            ]
                          },
                          "minItems": 1,
                          "title": "發生部位",
                          "description": "發生部位",
                          "x-field-id": "sites",
                          "x-options": [
                            {
                              "value": "face",
                              "label": "臉部"
                            },
                            {
                              "value": "eyelid",
                              "label": "眼瞼"
                            },
                            {
                              "value": "mouth",
                              "label": "口腔"
                            },
                            {
                              "value": "neck",
                              "label": "頸部"
                            },
                            {
                              "value": "back",
                              "label": "背部"
                            },
                            {
                              "value": "chest",
                              "label": "胸部"
                            },
                            {
                              "value": "abdomen",
                              "label": "腹部"
                            },
                            {
                              "value": "waist",
                              "label": "腰部"
                            },
                            {
                              "value": "upper_limb",
                              "label": "上肢"
                            },
                            {
                              "value": "lower_limb",
                              "label": "下肢"
                            },
                            {
                              "value": "other",
                              "label": "其它"
                            }
                          ]
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {}
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "sites"
                          ],
                          "properties": {
                            "sites": {}
                          }
                        }
                      ]
                    },
                    "title": "皮膚問題與部位",
                    "description": "皮膚問題與部位",
                    "x-field-id": "cognition.skinFindings",
                    "x-required-when": {
                      "fieldId": "cognition.skinAppearance",
                      "operator": "equals",
                      "value": "abnormal"
                    },
                    "x-visible-when": {
                      "fieldId": "cognition.skinAppearance",
                      "operator": "equals",
                      "value": "abnormal"
                    }
                  }
                }
              },
              "elimination": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "stoolConditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "incontinence",
                        "constipation",
                        "diarrhea",
                        "colostomy",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "大便狀況",
                    "description": "大便狀況",
                    "x-field-id": "elimination.stoolConditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "incontinence",
                        "label": "失禁"
                      },
                      {
                        "value": "constipation",
                        "label": "便秘"
                      },
                      {
                        "value": "diarrhea",
                        "label": "腹瀉"
                      },
                      {
                        "value": "colostomy",
                        "label": "人工肛門"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "stoolColor": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "bloody",
                      "black",
                      "clay",
                      "gray_white",
                      "other"
                    ],
                    "title": "大便顏色",
                    "description": "大便顏色",
                    "x-field-id": "elimination.stoolColor",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "bloody",
                        "label": "血便"
                      },
                      {
                        "value": "black",
                        "label": "黑便"
                      },
                      {
                        "value": "clay",
                        "label": "黏土色"
                      },
                      {
                        "value": "gray_white",
                        "label": "灰白便"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "urinationConditions": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "incontinence",
                        "nocturia",
                        "frequency",
                        "difficulty",
                        "dysuria",
                        "oliguria",
                        "renal_stoma",
                        "bladder_stoma",
                        "indwelling_catheter",
                        "intermittent_catheter",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "小便狀況",
                    "description": "小便狀況",
                    "x-field-id": "elimination.urinationConditions",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "incontinence",
                        "label": "失禁"
                      },
                      {
                        "value": "nocturia",
                        "label": "夜尿"
                      },
                      {
                        "value": "frequency",
                        "label": "頻尿"
                      },
                      {
                        "value": "difficulty",
                        "label": "排尿困難"
                      },
                      {
                        "value": "dysuria",
                        "label": "解尿疼痛"
                      },
                      {
                        "value": "oliguria",
                        "label": "尿少"
                      },
                      {
                        "value": "renal_stoma",
                        "label": "人工造瘻－腎"
                      },
                      {
                        "value": "bladder_stoma",
                        "label": "人工造瘻－膀胱"
                      },
                      {
                        "value": "indwelling_catheter",
                        "label": "導尿－存留導尿"
                      },
                      {
                        "value": "intermittent_catheter",
                        "label": "導尿－間歇導尿"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "urineColor": {
                    "type": "string",
                    "enum": [
                      "normal",
                      "tea",
                      "cloudy",
                      "bloody",
                      "other"
                    ],
                    "title": "尿液顏色",
                    "description": "尿液顏色",
                    "x-field-id": "elimination.urineColor",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常"
                      },
                      {
                        "value": "tea",
                        "label": "茶色"
                      },
                      {
                        "value": "cloudy",
                        "label": "混濁"
                      },
                      {
                        "value": "bloody",
                        "label": "血尿"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ]
                  },
                  "otherSymptoms": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "hematemesis",
                        "profuse_sweating",
                        "ascites"
                      ]
                    },
                    "minItems": 0,
                    "title": "其它症狀",
                    "description": "其它症狀",
                    "x-field-id": "elimination.otherSymptoms",
                    "x-options": [
                      {
                        "value": "hematemesis",
                        "label": "吐血"
                      },
                      {
                        "value": "profuse_sweating",
                        "label": "大量出汗"
                      },
                      {
                        "value": "ascites",
                        "label": "腹水"
                      }
                    ]
                  }
                }
              },
              "reproduction": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "maleGenitalAppearance": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "normal",
                        "abnormal_discharge",
                        "enlarged_prostate",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "allOf": [
                      {
                        "if": {
                          "contains": {
                            "const": "normal"
                          }
                        },
                        "then": {
                          "maxItems": 1
                        }
                      }
                    ],
                    "title": "生殖器外觀（男）",
                    "description": "生殖器外觀（男）",
                    "x-field-id": "reproduction.maleGenitalAppearance",
                    "x-options": [
                      {
                        "value": "normal",
                        "label": "正常",
                        "exclusive": true
                      },
                      {
                        "value": "abnormal_discharge",
                        "label": "異常分泌物"
                      },
                      {
                        "value": "enlarged_prostate",
                        "label": "攝護腺腫大"
                      },
                      {
                        "value": "other",
                        "label": "其它"
                      }
                    ],
                    "x-required-when": {
                      "source": "context",
                      "fieldId": "patientSex",
                      "operator": "equals",
                      "value": "male"
                    },
                    "x-visible-when": {
                      "source": "context",
                      "fieldId": "patientSex",
                      "operator": "equals",
                      "value": "male"
                    }
                  }
                }
              },
              "contacts": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "decisionMakerName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "醫療措施決策者姓名",
                    "description": "醫療措施決策者姓名",
                    "x-field-id": "contacts.decisionMakerName"
                  },
                  "decisionMakerPhone": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "醫療措施決策者電話",
                    "description": "醫療措施決策者電話",
                    "x-field-id": "contacts.decisionMakerPhone"
                  },
                  "decisionMakerRelation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "醫療措施決策者稱謂／關係",
                    "description": "醫療措施決策者稱謂／關係",
                    "x-field-id": "contacts.decisionMakerRelation"
                  },
                  "informationProviderName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "資料提供者姓名",
                    "description": "資料提供者姓名",
                    "x-field-id": "contacts.informationProviderName"
                  },
                  "informationProviderPhone": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "資料提供者電話",
                    "description": "資料提供者電話",
                    "x-field-id": "contacts.informationProviderPhone"
                  },
                  "informationProviderRelation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "資料提供者與病人關係",
                    "description": "資料提供者與病人關係",
                    "x-field-id": "contacts.informationProviderRelation"
                  },
                  "contactName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "聯絡人姓名",
                    "description": "聯絡人姓名",
                    "x-field-id": "contacts.contactName"
                  },
                  "contactPhone": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "聯絡人電話",
                    "description": "聯絡人電話",
                    "x-field-id": "contacts.contactPhone"
                  },
                  "contactPhone2": {
                    "type": "string",
                    "minLength": 6,
                    "maxLength": 20,
                    "pattern": "^[0-9+()\\-\\s]{6,20}$",
                    "title": "聯絡人電話 2",
                    "description": "聯絡人電話 2",
                    "x-field-id": "contacts.contactPhone2"
                  },
                  "contactRelation": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "title": "聯絡人稱謂／關係",
                    "description": "聯絡人稱謂／關係",
                    "x-field-id": "contacts.contactRelation"
                  }
                }
              },
              "admission": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "wardDate": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "title": "入住病房日期",
                    "description": "入住病房日期",
                    "x-field-id": "admission.wardDate"
                  },
                  "wardTime": {
                    "type": "string",
                    "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
                    "title": "入住病房時間",
                    "description": "入住病房時間",
                    "x-field-id": "admission.wardTime"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "title": "住院原因",
                    "description": "住院原因",
                    "x-field-id": "admission.reason"
                  }
                }
              },
              "family": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "members": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "memberId": {
                          "readOnly": true,
                          "x-computation": {
                            "kind": "derived",
                            "description": "新增成員時由系統產生唯一 ID。"
                          },
                          "description": "成員 ID；只在查回結果出現。回傳型別依院方接口定義。",
                          "title": "成員 ID",
                          "x-field-id": "memberId"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "self",
                            "spouse",
                            "father",
                            "mother",
                            "paternal_grandfather",
                            "paternal_grandmother",
                            "maternal_grandfather",
                            "maternal_grandmother",
                            "older_brother",
                            "older_sister",
                            "younger_brother",
                            "younger_sister",
                            "son",
                            "daughter_in_law",
                            "daughter",
                            "son_in_law",
                            "fetus",
                            "grandson",
                            "grandson_spouse",
                            "granddaughter",
                            "granddaughter_spouse",
                            "maternal_grandson",
                            "maternal_grandson_spouse",
                            "maternal_granddaughter",
                            "maternal_granddaughter_spouse",
                            "stepfather",
                            "stepmother",
                            "adoptive_father",
                            "adoptive_mother",
                            "adopted_son",
                            "adopted_daughter",
                            "other"
                          ],
                          "title": "成員身份",
                          "description": "成員身份",
                          "x-field-id": "role",
                          "x-options": [
                            {
                              "value": "self",
                              "label": "本人"
                            },
                            {
                              "value": "spouse",
                              "label": "配偶"
                            },
                            {
                              "value": "father",
                              "label": "爸爸"
                            },
                            {
                              "value": "mother",
                              "label": "媽媽"
                            },
                            {
                              "value": "paternal_grandfather",
                              "label": "祖父"
                            },
                            {
                              "value": "paternal_grandmother",
                              "label": "祖母"
                            },
                            {
                              "value": "maternal_grandfather",
                              "label": "外祖父"
                            },
                            {
                              "value": "maternal_grandmother",
                              "label": "外祖母"
                            },
                            {
                              "value": "older_brother",
                              "label": "哥哥"
                            },
                            {
                              "value": "older_sister",
                              "label": "姐姐"
                            },
                            {
                              "value": "younger_brother",
                              "label": "弟弟"
                            },
                            {
                              "value": "younger_sister",
                              "label": "妹妹"
                            },
                            {
                              "value": "son",
                              "label": "兒子"
                            },
                            {
                              "value": "daughter_in_law",
                              "label": "媳婦"
                            },
                            {
                              "value": "daughter",
                              "label": "女兒"
                            },
                            {
                              "value": "son_in_law",
                              "label": "女婿"
                            },
                            {
                              "value": "fetus",
                              "label": "懷孕胞胎"
                            },
                            {
                              "value": "grandson",
                              "label": "孫子"
                            },
                            {
                              "value": "grandson_spouse",
                              "label": "孫媳婦"
                            },
                            {
                              "value": "granddaughter",
                              "label": "孫女"
                            },
                            {
                              "value": "granddaughter_spouse",
                              "label": "孫女婿"
                            },
                            {
                              "value": "maternal_grandson",
                              "label": "外孫"
                            },
                            {
                              "value": "maternal_grandson_spouse",
                              "label": "外孫媳婦"
                            },
                            {
                              "value": "maternal_granddaughter",
                              "label": "外孫女"
                            },
                            {
                              "value": "maternal_granddaughter_spouse",
                              "label": "外孫女婿"
                            },
                            {
                              "value": "stepfather",
                              "label": "繼父"
                            },
                            {
                              "value": "stepmother",
                              "label": "繼母"
                            },
                            {
                              "value": "adoptive_father",
                              "label": "養父"
                            },
                            {
                              "value": "adoptive_mother",
                              "label": "養母"
                            },
                            {
                              "value": "adopted_son",
                              "label": "養子"
                            },
                            {
                              "value": "adopted_daughter",
                              "label": "養女"
                            },
                            {
                              "value": "other",
                              "label": "其他"
                            }
                          ]
                        },
                        "otherRole": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "title": "其他成員身份",
                          "description": "其他成員身份",
                          "x-field-id": "otherRole",
                          "x-required-when": {
                            "fieldId": "role",
                            "operator": "equals",
                            "value": "other"
                          },
                          "x-visible-when": {
                            "fieldId": "role",
                            "operator": "equals",
                            "value": "other"
                          }
                        },
                        "aliveStatus": {
                          "type": "string",
                          "enum": [
                            "alive",
                            "deceased"
                          ],
                          "title": "存歿狀態",
                          "description": "存歿狀態",
                          "x-field-id": "aliveStatus",
                          "x-options": [
                            {
                              "value": "alive",
                              "label": "存活"
                            },
                            {
                              "value": "deceased",
                              "label": "死亡"
                            }
                          ],
                          "x-visible-when": {
                            "fieldId": "role",
                            "operator": "notEquals",
                            "value": "self"
                          }
                        },
                        "isDecisionMaker": {
                          "type": "string",
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "title": "家庭決策者",
                          "description": "家庭決策者",
                          "x-field-id": "isDecisionMaker",
                          "x-options": [
                            {
                              "value": "yes",
                              "label": "是"
                            },
                            {
                              "value": "no",
                              "label": "否"
                            }
                          ]
                        },
                        "livesTogether": {
                          "type": "string",
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "title": "同住",
                          "description": "同住",
                          "x-field-id": "livesTogether",
                          "x-options": [
                            {
                              "value": "yes",
                              "label": "是"
                            },
                            {
                              "value": "no",
                              "label": "否"
                            }
                          ]
                        },
                        "birthOrder": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 30,
                          "title": "排行",
                          "description": "排行",
                          "x-field-id": "birthOrder"
                        },
                        "age": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 130,
                          "title": "年齡",
                          "description": "年齡；單位：歲",
                          "x-field-id": "age"
                        },
                        "sex": {
                          "type": "string",
                          "enum": [
                            "male",
                            "female",
                            "unknown"
                          ],
                          "title": "性別",
                          "description": "性別",
                          "x-field-id": "sex",
                          "x-options": [
                            {
                              "value": "male",
                              "label": "男性"
                            },
                            {
                              "value": "female",
                              "label": "女性"
                            },
                            {
                              "value": "unknown",
                              "label": "性別不明"
                            }
                          ]
                        },
                        "multipleBirth": {
                          "type": "string",
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "title": "胞胎",
                          "description": "胞胎",
                          "x-field-id": "multipleBirth",
                          "x-options": [
                            {
                              "value": "yes",
                              "label": "是"
                            },
                            {
                              "value": "no",
                              "label": "否"
                            }
                          ]
                        },
                        "maritalStatus": {
                          "type": "string",
                          "enum": [
                            "single",
                            "married",
                            "divorced",
                            "separated",
                            "cohabiting",
                            "widowed"
                          ],
                          "title": "婚姻",
                          "description": "婚姻",
                          "x-field-id": "maritalStatus",
                          "x-options": [
                            {
                              "value": "single",
                              "label": "未婚"
                            },
                            {
                              "value": "married",
                              "label": "已婚"
                            },
                            {
                              "value": "divorced",
                              "label": "離婚"
                            },
                            {
                              "value": "separated",
                              "label": "分居"
                            },
                            {
                              "value": "cohabiting",
                              "label": "同居"
                            },
                            {
                              "value": "widowed",
                              "label": "喪偶"
                            }
                          ]
                        },
                        "familyHistory": {
                          "type": "array",
                          "uniqueItems": true,
                          "items": {
                            "type": "string",
                            "enum": [
                              "none",
                              "hypertension",
                              "heart_disease",
                              "diabetes",
                              "liver_cancer",
                              "colorectal_cancer",
                              "asthma",
                              "blood_disease",
                              "cancer",
                              "cerebrovascular_disease",
                              "mental_illness",
                              "other"
                            ]
                          },
                          "minItems": 0,
                          "allOf": [
                            {
                              "if": {
                                "contains": {
                                  "const": "none"
                                }
                              },
                              "then": {
                                "maxItems": 1
                              }
                            }
                          ],
                          "title": "家族病史",
                          "description": "家族病史",
                          "x-field-id": "familyHistory",
                          "x-options": [
                            {
                              "value": "none",
                              "label": "無",
                              "exclusive": true
                            },
                            {
                              "value": "hypertension",
                              "label": "高血壓"
                            },
                            {
                              "value": "heart_disease",
                              "label": "心臟病"
                            },
                            {
                              "value": "diabetes",
                              "label": "糖尿病"
                            },
                            {
                              "value": "liver_cancer",
                              "label": "肝癌"
                            },
                            {
                              "value": "colorectal_cancer",
                              "label": "大腸直腸癌"
                            },
                            {
                              "value": "asthma",
                              "label": "氣喘"
                            },
                            {
                              "value": "blood_disease",
                              "label": "血液病"
                            },
                            {
                              "value": "cancer",
                              "label": "癌症"
                            },
                            {
                              "value": "cerebrovascular_disease",
                              "label": "腦血管疾病"
                            },
                            {
                              "value": "mental_illness",
                              "label": "精神疾病"
                            },
                            {
                              "value": "other",
                              "label": "其它"
                            }
                          ]
                        },
                        "otherMedicalHistory": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "title": "其他病史",
                          "description": "其他病史",
                          "x-field-id": "otherMedicalHistory",
                          "x-required-when": {
                            "fieldId": "familyHistory",
                            "operator": "includes",
                            "value": "other"
                          },
                          "x-visible-when": {
                            "fieldId": "familyHistory",
                            "operator": "includes",
                            "value": "other"
                          }
                        },
                        "note": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4000,
                          "title": "備註",
                          "description": "備註",
                          "x-field-id": "note"
                        }
                      },
                      "allOf": [
                        {
                          "type": "object",
                          "required": [
                            "role"
                          ],
                          "properties": {
                            "role": {}
                          }
                        },
                        {
                          "if": {
                            "type": "object",
                            "required": [
                              "role"
                            ],
                            "properties": {
                              "role": {
                                "const": "other"
                              }
                            }
                          },
                          "then": {
                            "type": "object",
                            "required": [
                              "otherRole"
                            ],
                            "properties": {
                              "otherRole": {}
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "role"
                              ],
                              "properties": {
                                "role": {
                                  "const": "other"
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "otherRole"
                              ],
                              "properties": {
                                "otherRole": {}
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "role"
                              ],
                              "properties": {
                                "role": {
                                  "not": {
                                    "const": "self"
                                  }
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "aliveStatus"
                              ],
                              "properties": {
                                "aliveStatus": {}
                              }
                            }
                          }
                        },
                        {
                          "if": {
                            "type": "object",
                            "required": [
                              "familyHistory"
                            ],
                            "properties": {
                              "familyHistory": {
                                "type": "array",
                                "contains": {
                                  "const": "other"
                                }
                              }
                            }
                          },
                          "then": {
                            "type": "object",
                            "required": [
                              "otherMedicalHistory"
                            ],
                            "properties": {
                              "otherMedicalHistory": {}
                            }
                          }
                        },
                        {
                          "if": {
                            "not": {
                              "type": "object",
                              "required": [
                                "familyHistory"
                              ],
                              "properties": {
                                "familyHistory": {
                                  "type": "array",
                                  "contains": {
                                    "const": "other"
                                  }
                                }
                              }
                            }
                          },
                          "then": {
                            "not": {
                              "type": "object",
                              "required": [
                                "otherMedicalHistory"
                              ],
                              "properties": {
                                "otherMedicalHistory": {}
                              }
                            }
                          }
                        }
                      ]
                    },
                    "allOf": [
                      {
                        "contains": {
                          "type": "object",
                          "required": [
                            "role"
                          ],
                          "properties": {
                            "role": {
                              "const": "self"
                            }
                          }
                        },
                        "minContains": 0,
                        "maxContains": 1
                      }
                    ],
                    "title": "家庭成員",
                    "description": "家庭成員",
                    "x-field-id": "family.members"
                  }
                }
              }
            },
            "allOf": [
              {
                "type": "object",
                "required": [
                  "basic"
                ],
                "properties": {
                  "basic": {
                    "type": "object",
                    "required": [
                      "education"
                    ],
                    "properties": {
                      "education": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "basic"
                ],
                "properties": {
                  "basic": {
                    "type": "object",
                    "required": [
                      "languages"
                    ],
                    "properties": {
                      "languages": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "basic"
                ],
                "properties": {
                  "basic": {
                    "type": "object",
                    "required": [
                      "religions"
                    ],
                    "properties": {
                      "religions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "antithromboticUse"
                    ],
                    "properties": {
                      "antithromboticUse": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "drugAllergy"
                    ],
                    "properties": {
                      "drugAllergy": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergy"
                      ],
                      "properties": {
                        "drugAllergy": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergyNote"
                      ],
                      "properties": {
                        "drugAllergyNote": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergy"
                        ],
                        "properties": {
                          "drugAllergy": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergyNote"
                        ],
                        "properties": {
                          "drugAllergyNote": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergy"
                      ],
                      "properties": {
                        "drugAllergy": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergens"
                      ],
                      "properties": {
                        "drugAllergens": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergy"
                        ],
                        "properties": {
                          "drugAllergy": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergens"
                        ],
                        "properties": {
                          "drugAllergens": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "drugAllergens"
                      ],
                      "properties": {
                        "drugAllergens": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "otherDrugAllergen"
                      ],
                      "properties": {
                        "otherDrugAllergen": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "drugAllergens"
                        ],
                        "properties": {
                          "drugAllergens": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "otherDrugAllergen"
                        ],
                        "properties": {
                          "otherDrugAllergen": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "foodAllergy"
                    ],
                    "properties": {
                      "foodAllergy": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "foodAllergy"
                      ],
                      "properties": {
                        "foodAllergy": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "foodAllergens"
                      ],
                      "properties": {
                        "foodAllergens": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "foodAllergy"
                        ],
                        "properties": {
                          "foodAllergy": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "foodAllergens"
                        ],
                        "properties": {
                          "foodAllergens": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "transfusionReaction"
                    ],
                    "properties": {
                      "transfusionReaction": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "bloodType"
                    ],
                    "properties": {
                      "bloodType": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "recentForeignTravel"
                    ],
                    "properties": {
                      "recentForeignTravel": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "recentForeignTravel"
                      ],
                      "properties": {
                        "recentForeignTravel": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "travelLocation"
                      ],
                      "properties": {
                        "travelLocation": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "recentForeignTravel"
                        ],
                        "properties": {
                          "recentForeignTravel": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "travelLocation"
                        ],
                        "properties": {
                          "travelLocation": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "treatmentRestrictions"
                    ],
                    "properties": {
                      "treatmentRestrictions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "alerts"
                ],
                "properties": {
                  "alerts": {
                    "type": "object",
                    "required": [
                      "tubes"
                    ],
                    "properties": {
                      "tubes": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "pcrResult"
                      ],
                      "properties": {
                        "pcrResult": {
                          "const": "positive"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "object",
                      "required": [
                        "pcrCtValue"
                      ],
                      "properties": {
                        "pcrCtValue": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "pcrResult"
                        ],
                        "properties": {
                          "pcrResult": {
                            "const": "positive"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "alerts"
                    ],
                    "properties": {
                      "alerts": {
                        "type": "object",
                        "required": [
                          "pcrCtValue"
                        ],
                        "properties": {
                          "pcrCtValue": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "familyHistoryStatus"
                    ],
                    "properties": {
                      "familyHistoryStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "familyHistoryStatus"
                      ],
                      "properties": {
                        "familyHistoryStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "familyHistory"
                      ],
                      "properties": {
                        "familyHistory": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "familyHistoryStatus"
                        ],
                        "properties": {
                          "familyHistoryStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "familyHistory"
                        ],
                        "properties": {
                          "familyHistory": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "maritalStatus"
                    ],
                    "properties": {
                      "maritalStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "livingStatus"
                    ],
                    "properties": {
                      "livingStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "familyInteraction"
                    ],
                    "properties": {
                      "familyInteraction": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "familyInteraction"
                      ],
                      "properties": {
                        "familyInteraction": {
                          "const": "other"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "otherFamilyInteraction"
                      ],
                      "properties": {
                        "otherFamilyInteraction": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "familyInteraction"
                        ],
                        "properties": {
                          "familyInteraction": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "otherFamilyInteraction"
                        ],
                        "properties": {
                          "otherFamilyInteraction": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "primaryCaregivers"
                    ],
                    "properties": {
                      "primaryCaregivers": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "primaryCaregivers"
                      ],
                      "properties": {
                        "primaryCaregivers": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "otherPrimaryCaregiver"
                      ],
                      "properties": {
                        "otherPrimaryCaregiver": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "primaryCaregivers"
                        ],
                        "properties": {
                          "primaryCaregivers": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "otherPrimaryCaregiver"
                        ],
                        "properties": {
                          "otherPrimaryCaregiver": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "occupation"
                    ],
                    "properties": {
                      "occupation": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "occupation"
                      ],
                      "properties": {
                        "occupation": {
                          "const": "other"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "otherOccupation"
                      ],
                      "properties": {
                        "otherOccupation": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "occupation"
                        ],
                        "properties": {
                          "occupation": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "otherOccupation"
                        ],
                        "properties": {
                          "otherOccupation": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "financialStatus"
                    ],
                    "properties": {
                      "financialStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "smokingStatus"
                    ],
                    "properties": {
                      "smokingStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingAmount"
                      ],
                      "properties": {
                        "smokingAmount": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingAmount"
                        ],
                        "properties": {
                          "smokingAmount": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingAmountUnit"
                      ],
                      "properties": {
                        "smokingAmountUnit": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingAmountUnit"
                        ],
                        "properties": {
                          "smokingAmountUnit": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingYears"
                      ],
                      "properties": {
                        "smokingYears": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingYears"
                        ],
                        "properties": {
                          "smokingYears": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "quitSmokingExperience"
                      ],
                      "properties": {
                        "quitSmokingExperience": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "quitSmokingExperience"
                        ],
                        "properties": {
                          "quitSmokingExperience": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "smokingStatus"
                      ],
                      "properties": {
                        "smokingStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "quitSmokingWillingness"
                      ],
                      "properties": {
                        "quitSmokingWillingness": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "smokingStatus"
                        ],
                        "properties": {
                          "smokingStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "quitSmokingWillingness"
                        ],
                        "properties": {
                          "quitSmokingWillingness": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "alcoholUse"
                    ],
                    "properties": {
                      "alcoholUse": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "betelNutStatus"
                    ],
                    "properties": {
                      "betelNutStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutStatus"
                      ],
                      "properties": {
                        "betelNutStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutAmount"
                      ],
                      "properties": {
                        "betelNutAmount": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutStatus"
                        ],
                        "properties": {
                          "betelNutStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutAmount"
                        ],
                        "properties": {
                          "betelNutAmount": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutStatus"
                      ],
                      "properties": {
                        "betelNutStatus": {
                          "not": {
                            "const": "none"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "betelNutYears"
                      ],
                      "properties": {
                        "betelNutYears": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutStatus"
                        ],
                        "properties": {
                          "betelNutStatus": {
                            "not": {
                              "const": "none"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "betelNutYears"
                        ],
                        "properties": {
                          "betelNutYears": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "medicalHistory"
                    ],
                    "properties": {
                      "medicalHistory": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "surgeryExperience"
                    ],
                    "properties": {
                      "surgeryExperience": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "surgeryExperience"
                      ],
                      "properties": {
                        "surgeryExperience": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "health"
                  ],
                  "properties": {
                    "health": {
                      "type": "object",
                      "required": [
                        "surgeryNote"
                      ],
                      "properties": {
                        "surgeryNote": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "surgeryExperience"
                        ],
                        "properties": {
                          "surgeryExperience": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "health"
                    ],
                    "properties": {
                      "health": {
                        "type": "object",
                        "required": [
                          "surgeryNote"
                        ],
                        "properties": {
                          "surgeryNote": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "recentEmergencyOrAdmissionCount"
                    ],
                    "properties": {
                      "recentEmergencyOrAdmissionCount": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "health"
                ],
                "properties": {
                  "health": {
                    "type": "object",
                    "required": [
                      "currentMedications"
                    ],
                    "properties": {
                      "currentMedications": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "anyOf": [
                    {
                      "not": {
                        "type": "object",
                        "required": [
                          "nutrition"
                        ],
                        "properties": {
                          "nutrition": {
                            "type": "object",
                            "required": [
                              "heightCm"
                            ],
                            "properties": {
                              "heightCm": {
                                "not": {
                                  "enum": [
                                    null,
                                    "",
                                    []
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "not": {
                        "type": "object",
                        "required": [
                          "nutrition"
                        ],
                        "properties": {
                          "nutrition": {
                            "type": "object",
                            "required": [
                              "weightKg"
                            ],
                            "properties": {
                              "weightKg": {
                                "not": {
                                  "enum": [
                                    null,
                                    "",
                                    []
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "measurementUnavailableReason"
                      ],
                      "properties": {
                        "measurementUnavailableReason": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "anyOf": [
                      {
                        "not": {
                          "type": "object",
                          "required": [
                            "nutrition"
                          ],
                          "properties": {
                            "nutrition": {
                              "type": "object",
                              "required": [
                                "heightCm"
                              ],
                              "properties": {
                                "heightCm": {
                                  "not": {
                                    "enum": [
                                      null,
                                      "",
                                      []
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      {
                        "not": {
                          "type": "object",
                          "required": [
                            "nutrition"
                          ],
                          "properties": {
                            "nutrition": {
                              "type": "object",
                              "required": [
                                "weightKg"
                              ],
                              "properties": {
                                "weightKg": {
                                  "not": {
                                    "enum": [
                                      null,
                                      "",
                                      []
                                    ]
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "measurementUnavailableReason"
                        ],
                        "properties": {
                          "measurementUnavailableReason": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "edemaStatus"
                    ],
                    "properties": {
                      "edemaStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "edemaStatus"
                      ],
                      "properties": {
                        "edemaStatus": {
                          "const": "present"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "edemaFindings"
                      ],
                      "properties": {
                        "edemaFindings": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "edemaStatus"
                        ],
                        "properties": {
                          "edemaStatus": {
                            "const": "present"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "edemaFindings"
                        ],
                        "properties": {
                          "edemaFindings": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "feedingRoutes"
                    ],
                    "properties": {
                      "feedingRoutes": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "feedingStatus"
                    ],
                    "properties": {
                      "feedingStatus": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "oralConditions"
                    ],
                    "properties": {
                      "oralConditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "dentures"
                    ],
                    "properties": {
                      "dentures": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dentures"
                      ],
                      "properties": {
                        "dentures": {
                          "type": "array",
                          "contains": {
                            "const": "upper"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "upperDentureType"
                      ],
                      "properties": {
                        "upperDentureType": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dentures"
                        ],
                        "properties": {
                          "dentures": {
                            "type": "array",
                            "contains": {
                              "const": "upper"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "upperDentureType"
                        ],
                        "properties": {
                          "upperDentureType": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dentures"
                      ],
                      "properties": {
                        "dentures": {
                          "type": "array",
                          "contains": {
                            "const": "lower"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "lowerDentureType"
                      ],
                      "properties": {
                        "lowerDentureType": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dentures"
                        ],
                        "properties": {
                          "dentures": {
                            "type": "array",
                            "contains": {
                              "const": "lower"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "lowerDentureType"
                        ],
                        "properties": {
                          "lowerDentureType": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "dietTypes"
                    ],
                    "properties": {
                      "dietTypes": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dietTypes"
                      ],
                      "properties": {
                        "dietTypes": {
                          "type": "array",
                          "contains": {
                            "const": "vegetarian"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "vegetarianDietDetails"
                      ],
                      "properties": {
                        "vegetarianDietDetails": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dietTypes"
                        ],
                        "properties": {
                          "dietTypes": {
                            "type": "array",
                            "contains": {
                              "const": "vegetarian"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "vegetarianDietDetails"
                        ],
                        "properties": {
                          "vegetarianDietDetails": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dietTypes"
                      ],
                      "properties": {
                        "dietTypes": {
                          "type": "array",
                          "contains": {
                            "const": "special"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "specialDietDetails"
                      ],
                      "properties": {
                        "specialDietDetails": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dietTypes"
                        ],
                        "properties": {
                          "dietTypes": {
                            "type": "array",
                            "contains": {
                              "const": "special"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "specialDietDetails"
                        ],
                        "properties": {
                          "specialDietDetails": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "dietTypes"
                      ],
                      "properties": {
                        "dietTypes": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "otherDiet"
                      ],
                      "properties": {
                        "otherDiet": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "dietTypes"
                        ],
                        "properties": {
                          "dietTypes": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "otherDiet"
                        ],
                        "properties": {
                          "otherDiet": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "foodRestriction"
                    ],
                    "properties": {
                      "foodRestriction": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "foodRestriction"
                      ],
                      "properties": {
                        "foodRestriction": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "nutrition"
                  ],
                  "properties": {
                    "nutrition": {
                      "type": "object",
                      "required": [
                        "foodRestrictionNote"
                      ],
                      "properties": {
                        "foodRestrictionNote": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "foodRestriction"
                        ],
                        "properties": {
                          "foodRestriction": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "nutrition"
                    ],
                    "properties": {
                      "nutrition": {
                        "type": "object",
                        "required": [
                          "foodRestrictionNote"
                        ],
                        "properties": {
                          "foodRestrictionNote": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "nutrition"
                ],
                "properties": {
                  "nutrition": {
                    "type": "object",
                    "required": [
                      "otherSymptoms"
                    ],
                    "properties": {
                      "otherSymptoms": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "sleep"
                ],
                "properties": {
                  "sleep": {
                    "type": "object",
                    "required": [
                      "conditions"
                    ],
                    "properties": {
                      "conditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "sleep"
                ],
                "properties": {
                  "sleep": {
                    "type": "object",
                    "required": [
                      "usualHours"
                    ],
                    "properties": {
                      "usualHours": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "mobility"
                    ],
                    "properties": {
                      "mobility": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "needsMobilityAid"
                    ],
                    "properties": {
                      "needsMobilityAid": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "needsMobilityAid"
                      ],
                      "properties": {
                        "needsMobilityAid": {
                          "const": true
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "mobilityAids"
                      ],
                      "properties": {
                        "mobilityAids": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "needsMobilityAid"
                        ],
                        "properties": {
                          "needsMobilityAid": {
                            "const": true
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "mobilityAids"
                        ],
                        "properties": {
                          "mobilityAids": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "mobilityAids"
                      ],
                      "properties": {
                        "mobilityAids": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "otherMobilityAid"
                      ],
                      "properties": {
                        "otherMobilityAid": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "mobilityAids"
                        ],
                        "properties": {
                          "mobilityAids": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "otherMobilityAid"
                        ],
                        "properties": {
                          "otherMobilityAid": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "leftUpperMuscleStrength"
                    ],
                    "properties": {
                      "leftUpperMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "rightUpperMuscleStrength"
                    ],
                    "properties": {
                      "rightUpperMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "leftLowerMuscleStrength"
                    ],
                    "properties": {
                      "leftLowerMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "rightLowerMuscleStrength"
                    ],
                    "properties": {
                      "rightLowerMuscleStrength": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "limbAppearance"
                    ],
                    "properties": {
                      "limbAppearance": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "gait"
                    ],
                    "properties": {
                      "gait": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "gait"
                      ],
                      "properties": {
                        "gait": {
                          "const": "unstable"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "unstableGaitDetails"
                      ],
                      "properties": {
                        "unstableGaitDetails": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "gait"
                        ],
                        "properties": {
                          "gait": {
                            "const": "unstable"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "unstableGaitDetails"
                        ],
                        "properties": {
                          "unstableGaitDetails": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "unstableGaitDetails"
                      ],
                      "properties": {
                        "unstableGaitDetails": {
                          "type": "array",
                          "contains": {
                            "const": "other"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "otherGait"
                      ],
                      "properties": {
                        "otherGait": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "unstableGaitDetails"
                        ],
                        "properties": {
                          "unstableGaitDetails": {
                            "type": "array",
                            "contains": {
                              "const": "other"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "otherGait"
                        ],
                        "properties": {
                          "otherGait": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "selfCareAbility"
                    ],
                    "properties": {
                      "selfCareAbility": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "selfCareAbility"
                      ],
                      "properties": {
                        "selfCareAbility": {
                          "const": "needs_help"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "activity"
                  ],
                  "properties": {
                    "activity": {
                      "type": "object",
                      "required": [
                        "selfCareAssistance"
                      ],
                      "properties": {
                        "selfCareAssistance": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "selfCareAbility"
                        ],
                        "properties": {
                          "selfCareAbility": {
                            "const": "needs_help"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "activity"
                    ],
                    "properties": {
                      "activity": {
                        "type": "object",
                        "required": [
                          "selfCareAssistance"
                        ],
                        "properties": {
                          "selfCareAssistance": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "activity"
                ],
                "properties": {
                  "activity": {
                    "type": "object",
                    "required": [
                      "fallInPastYear"
                    ],
                    "properties": {
                      "fallInPastYear": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "chestSymmetry"
                    ],
                    "properties": {
                      "chestSymmetry": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "patterns"
                    ],
                    "properties": {
                      "patterns": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "coughFrequency"
                    ],
                    "properties": {
                      "coughFrequency": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "sputumClearance"
                    ],
                    "properties": {
                      "sputumClearance": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "sputumStatus"
                    ],
                    "properties": {
                      "sputumStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumStatus"
                      ],
                      "properties": {
                        "sputumStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumColor"
                      ],
                      "properties": {
                        "sputumColor": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumStatus"
                        ],
                        "properties": {
                          "sputumStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumColor"
                        ],
                        "properties": {
                          "sputumColor": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumStatus"
                      ],
                      "properties": {
                        "sputumStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumViscosity"
                      ],
                      "properties": {
                        "sputumViscosity": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumStatus"
                        ],
                        "properties": {
                          "sputumStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumViscosity"
                        ],
                        "properties": {
                          "sputumViscosity": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumStatus"
                      ],
                      "properties": {
                        "sputumStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "respiratory"
                  ],
                  "properties": {
                    "respiratory": {
                      "type": "object",
                      "required": [
                        "sputumAmount"
                      ],
                      "properties": {
                        "sputumAmount": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumStatus"
                        ],
                        "properties": {
                          "sputumStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "respiratory"
                    ],
                    "properties": {
                      "respiratory": {
                        "type": "object",
                        "required": [
                          "sputumAmount"
                        ],
                        "properties": {
                          "sputumAmount": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "breathSounds"
                    ],
                    "properties": {
                      "breathSounds": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "respiratory"
                ],
                "properties": {
                  "respiratory": {
                    "type": "object",
                    "required": [
                      "oxygenTherapies"
                    ],
                    "properties": {
                      "oxygenTherapies": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "circulation"
                ],
                "properties": {
                  "circulation": {
                    "type": "object",
                    "required": [
                      "implantStatus"
                    ],
                    "properties": {
                      "implantStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "circulation"
                  ],
                  "properties": {
                    "circulation": {
                      "type": "object",
                      "required": [
                        "implantStatus"
                      ],
                      "properties": {
                        "implantStatus": {
                          "const": "yes"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "circulation"
                  ],
                  "properties": {
                    "circulation": {
                      "type": "object",
                      "required": [
                        "implantTypes"
                      ],
                      "properties": {
                        "implantTypes": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "circulation"
                    ],
                    "properties": {
                      "circulation": {
                        "type": "object",
                        "required": [
                          "implantStatus"
                        ],
                        "properties": {
                          "implantStatus": {
                            "const": "yes"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "circulation"
                    ],
                    "properties": {
                      "circulation": {
                        "type": "object",
                        "required": [
                          "implantTypes"
                        ],
                        "properties": {
                          "implantTypes": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "circulation"
                ],
                "properties": {
                  "circulation": {
                    "type": "object",
                    "required": [
                      "peripheralCirculation"
                    ],
                    "properties": {
                      "peripheralCirculation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "circulation"
                ],
                "properties": {
                  "circulation": {
                    "type": "object",
                    "required": [
                      "symptoms"
                    ],
                    "properties": {
                      "symptoms": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "leftVision"
                    ],
                    "properties": {
                      "leftVision": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "rightVision"
                    ],
                    "properties": {
                      "rightVision": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "leftHearing"
                    ],
                    "properties": {
                      "leftHearing": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "rightHearing"
                    ],
                    "properties": {
                      "rightHearing": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "orientation"
                    ],
                    "properties": {
                      "orientation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "behaviors"
                    ],
                    "properties": {
                      "behaviors": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "painStatus"
                    ],
                    "properties": {
                      "painStatus": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "painStatus"
                      ],
                      "properties": {
                        "painStatus": {
                          "const": "present"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "painFindings"
                      ],
                      "properties": {
                        "painFindings": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "painStatus"
                        ],
                        "properties": {
                          "painStatus": {
                            "const": "present"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "painFindings"
                        ],
                        "properties": {
                          "painFindings": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "speech"
                    ],
                    "properties": {
                      "speech": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cognition"
                ],
                "properties": {
                  "cognition": {
                    "type": "object",
                    "required": [
                      "skinAppearance"
                    ],
                    "properties": {
                      "skinAppearance": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "skinAppearance"
                      ],
                      "properties": {
                        "skinAppearance": {
                          "const": "abnormal"
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "cognition"
                  ],
                  "properties": {
                    "cognition": {
                      "type": "object",
                      "required": [
                        "skinFindings"
                      ],
                      "properties": {
                        "skinFindings": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "skinAppearance"
                        ],
                        "properties": {
                          "skinAppearance": {
                            "const": "abnormal"
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "cognition"
                    ],
                    "properties": {
                      "cognition": {
                        "type": "object",
                        "required": [
                          "skinFindings"
                        ],
                        "properties": {
                          "skinFindings": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "stoolConditions"
                    ],
                    "properties": {
                      "stoolConditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "stoolColor"
                    ],
                    "properties": {
                      "stoolColor": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "urinationConditions"
                    ],
                    "properties": {
                      "urinationConditions": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "elimination"
                ],
                "properties": {
                  "elimination": {
                    "type": "object",
                    "required": [
                      "urineColor"
                    ],
                    "properties": {
                      "urineColor": {}
                    }
                  }
                }
              },
              {
                "if": {
                  "type": "object",
                  "required": [
                    "family"
                  ],
                  "properties": {
                    "family": {
                      "type": "object",
                      "required": [
                        "members"
                      ],
                      "properties": {
                        "members": {
                          "type": "array",
                          "contains": {
                            "type": "object",
                            "required": [
                              "role",
                              "sex"
                            ],
                            "properties": {
                              "role": {
                                "const": "self"
                              },
                              "sex": {
                                "const": "male"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "type": "object",
                  "required": [
                    "reproduction"
                  ],
                  "properties": {
                    "reproduction": {
                      "type": "object",
                      "required": [
                        "maleGenitalAppearance"
                      ],
                      "properties": {
                        "maleGenitalAppearance": {}
                      }
                    }
                  }
                }
              },
              {
                "if": {
                  "not": {
                    "type": "object",
                    "required": [
                      "family"
                    ],
                    "properties": {
                      "family": {
                        "type": "object",
                        "required": [
                          "members"
                        ],
                        "properties": {
                          "members": {
                            "type": "array",
                            "contains": {
                              "type": "object",
                              "required": [
                                "role",
                                "sex"
                              ],
                              "properties": {
                                "role": {
                                  "const": "self"
                                },
                                "sex": {
                                  "const": "male"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "then": {
                  "not": {
                    "type": "object",
                    "required": [
                      "reproduction"
                    ],
                    "properties": {
                      "reproduction": {
                        "type": "object",
                        "required": [
                          "maleGenitalAppearance"
                        ],
                        "properties": {
                          "maleGenitalAppearance": {}
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "decisionMakerName"
                    ],
                    "properties": {
                      "decisionMakerName": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "decisionMakerPhone"
                    ],
                    "properties": {
                      "decisionMakerPhone": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "decisionMakerRelation"
                    ],
                    "properties": {
                      "decisionMakerRelation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "informationProviderName"
                    ],
                    "properties": {
                      "informationProviderName": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "informationProviderPhone"
                    ],
                    "properties": {
                      "informationProviderPhone": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "informationProviderRelation"
                    ],
                    "properties": {
                      "informationProviderRelation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "contactName"
                    ],
                    "properties": {
                      "contactName": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "contactPhone"
                    ],
                    "properties": {
                      "contactPhone": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "contacts"
                ],
                "properties": {
                  "contacts": {
                    "type": "object",
                    "required": [
                      "contactRelation"
                    ],
                    "properties": {
                      "contactRelation": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "admission"
                ],
                "properties": {
                  "admission": {
                    "type": "object",
                    "required": [
                      "wardDate"
                    ],
                    "properties": {
                      "wardDate": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "admission"
                ],
                "properties": {
                  "admission": {
                    "type": "object",
                    "required": [
                      "wardTime"
                    ],
                    "properties": {
                      "wardTime": {}
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "admission"
                ],
                "properties": {
                  "admission": {
                    "type": "object",
                    "required": [
                      "reason"
                    ],
                    "properties": {
                      "reason": {}
                    }
                  }
                }
              }
            ]
          },
          "recordId": {
            "type": "string",
            "minLength": 1,
            "description": "院方正式紀錄 ID"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "const": "committed",
            "description": "本次操作已寫入；不是紀錄有效狀態"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "valid",
              "voided"
            ],
            "description": "valid = 有效紀錄；voided = 作廢"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time",
            "description": "此操作的寫入時間"
          }
        }
      },
      "Patient": {
        "type": "object",
        "required": [
          "patientId",
          "medicalRecordNumber",
          "displayName"
        ],
        "properties": {
          "patientId": {
            "type": "string",
            "minLength": 1,
            "description": "穩定病人 ID"
          },
          "medicalRecordNumber": {
            "type": "string",
            "minLength": 1,
            "description": "此機構的病歷號"
          },
          "displayName": {
            "type": "string",
            "minLength": 1,
            "description": "核對用顯示名稱，不作識別鍵"
          }
        }
      },
      "Measurement": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value",
          "unit"
        ],
        "properties": {
          "value": {
            "type": "number",
            "minimum": 0,
            "description": "合成範例；實際臨床範圍由院方定義"
          },
          "unit": {
            "type": "string",
            "const": "cm"
          }
        }
      },
      "AssessmentInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "clientRequestId",
          "patientId",
          "woundId",
          "observedAt",
          "assessment",
          "attachmentIds"
        ],
        "properties": {
          "clientRequestId": {
            "type": "string",
            "minLength": 1,
            "description": "同一次提交重試時保持不變"
          },
          "patientId": {
            "type": "string",
            "minLength": 1,
            "description": "由查詢取得"
          },
          "encounterId": {
            "type": "string",
            "minLength": 1,
            "description": "依院方流程決定是否必填；不適用時省略"
          },
          "woundId": {
            "type": "string",
            "minLength": 1,
            "description": "由既有傷口查詢取得"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "description": "評估時間，需帶時區"
          },
          "assessment": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "careNote"
            ],
            "properties": {
              "length": {
                "$ref": "#/components/schemas/Measurement"
              },
              "width": {
                "$ref": "#/components/schemas/Measurement"
              },
              "careNote": {
                "type": "string",
                "minLength": 1,
                "description": "處置描述"
              }
            }
          },
          "attachmentIds": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "已上傳且有權使用的院方檔案 ID"
            },
            "description": "無照片時傳空陣列"
          }
        }
      },
      "AssessmentUpdate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "clientRequestId",
          "version",
          "changes"
        ],
        "properties": {
          "clientRequestId": {
            "type": "string",
            "minLength": 1,
            "description": "每次新操作產生新 ID；重試保持不變"
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "目前紀錄版本"
          },
          "changes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "careNote"
            ],
            "properties": {
              "careNote": {
                "type": "string",
                "minLength": 1,
                "description": "新的處置描述；本例不接受 null"
              }
            }
          }
        }
      },
      "AssessmentVoid": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "clientRequestId",
          "version",
          "reason"
        ],
        "properties": {
          "clientRequestId": {
            "type": "string",
            "minLength": 1,
            "description": "每次新操作產生新 ID；重試保持不變"
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "目前紀錄版本"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "description": "作廢原因；保留於院方稽核紀錄"
          }
        }
      },
      "Receipt": {
        "type": "object",
        "required": [
          "clientRequestId",
          "recordId",
          "version",
          "status",
          "recordState",
          "recordedAt"
        ],
        "properties": {
          "clientRequestId": {
            "type": "string",
            "minLength": 1,
            "description": "原提交 ID"
          },
          "recordId": {
            "type": "string",
            "minLength": 1,
            "description": "院方正式紀錄 ID"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "const": "committed",
            "description": "本次操作已寫入；不是紀錄有效狀態"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "valid",
              "voided"
            ],
            "description": "valid = 有效紀錄；voided = 作廢"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time",
            "description": "此操作的寫入時間"
          }
        }
      },
      "AssessmentRecord": {
        "type": "object",
        "required": [
          "recordId",
          "version",
          "status",
          "recordState",
          "patientId",
          "woundId",
          "observedAt",
          "assessment",
          "attachmentIds",
          "clientRequestId",
          "recordedAt"
        ],
        "properties": {
          "clientRequestId": {
            "type": "string",
            "minLength": 1,
            "description": "原提交 ID"
          },
          "patientId": {
            "type": "string",
            "minLength": 1,
            "description": "由查詢取得"
          },
          "encounterId": {
            "type": "string",
            "minLength": 1,
            "description": "依院方流程決定是否必填；不適用時省略"
          },
          "woundId": {
            "type": "string",
            "minLength": 1,
            "description": "由既有傷口查詢取得"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "description": "評估時間，需帶時區"
          },
          "assessment": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "careNote"
            ],
            "properties": {
              "length": {
                "$ref": "#/components/schemas/Measurement"
              },
              "width": {
                "$ref": "#/components/schemas/Measurement"
              },
              "careNote": {
                "type": "string",
                "minLength": 1,
                "description": "處置描述"
              }
            }
          },
          "attachmentIds": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "已上傳且有權使用的院方檔案 ID"
            },
            "description": "無照片時傳空陣列"
          },
          "recordId": {
            "type": "string",
            "minLength": 1,
            "description": "院方正式紀錄 ID"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "const": "committed",
            "description": "本次操作已寫入；不是紀錄有效狀態"
          },
          "recordState": {
            "type": "string",
            "enum": [
              "valid",
              "voided"
            ],
            "description": "valid = 有效紀錄；voided = 作廢"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time",
            "description": "此操作的寫入時間"
          }
        }
      },
      "Attachment": {
        "type": "object",
        "required": [
          "attachmentId",
          "patientId",
          "contentType"
        ],
        "properties": {
          "attachmentId": {
            "type": "string",
            "minLength": 1,
            "description": "院方檔案 ID"
          },
          "patientId": {
            "type": "string",
            "minLength": 1,
            "description": "所屬病人"
          },
          "contentType": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png"
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "requestId"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "minLength": 1,
                "description": "機器可辨識的錯誤碼"
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "description": "可讀說明"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "path",
                    "message"
                  ],
                  "properties": {
                    "path": {
                      "type": "string",
                      "minLength": 1,
                      "description": "錯誤欄位路徑"
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1,
                      "description": "如何修正"
                    }
                  }
                }
              }
            }
          },
          "requestId": {
            "type": "string",
            "minLength": 1,
            "description": "伺服器追蹤 ID，與去重用 clientRequestId 不同"
          }
        }
      }
    }
  }
}
