{
   "$schema": "https://json-schema.org/draft/2020-12/schema",
   "title": "Tyrer-Cuzick Risk Score Inputs",
   "type": "object",
   "unevaluatedProperties": false,
   "properties": {
      "age_at_menarche": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/age_at_menarche"
      },
      "number_of_live_births": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/number_of_live_births"
      },
      "menopausal_status": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/menopausal_status"
      },
      "history_of_hyperplasia": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/history_of_hyperplasia"
      },
      "history_of_atypical_hyperplasia": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/history_of_atypical_hyperplasia"
      },
      "history_of_lcis": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/history_of_lcis"
      },
      "history_of_ovarian_cancer": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/history_of_ovarian_cancer"
      },
      "hormone_replacement_therapy_use": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/hormone_replacement_therapy_use"
      },
      "genetic_testing": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/genetic_testing"
      },
      "genetic_testing_of_father": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/genetic_testing_of_father",
         "title": "Father's Breast Cancer Genetic Testing"
      },
      "father_had_breast_cancer": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/father_had_breast_cancer"
      },
      "brother_had_breast_cancer": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/brother_had_breast_cancer"
      },
      "breast_density_measure": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/breast_density_measure"
      },
      "polygenic_snp_score": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/polygenic_snp_score"
      },
      "mother": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies",
         "title": "Mother"
      },
      "paternal_grandmother": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies",
         "title": "Paternal Grandmother"
      },
      "maternal_grandmother": {
         "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies",
         "title": "Maternal Grandmother"
      },
      "sisters": {
         "title": "Sisters",
         "type": "array",
         "items": {
            "type": "object",
            "properties": {
               "personal_history": {
                  "title": "Personal History",
                  "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
               },
               "daughters": {
                  "title": "Daughters (Nieces)",
                  "type": "array",
                  "items": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
                  }
               }
            }
         }
      },
      "paternal_aunts": {
         "title": "Paternal Aunts",
         "type": "array",
         "items": {
            "type": "object",
            "properties": {
               "personal_history": {
                  "title": "Personal History",
                  "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
               },
               "daughters": {
                  "title": "Daughters (Cousins)",
                  "type": "array",
                  "items": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
                  }
               }
            }
         }
      },
      "maternal_aunts": {
         "title": "Maternal Aunts",
         "type": "array",
         "items": {
            "type": "object",
            "properties": {
               "personal_history": {
                  "title": "Personal History",
                  "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
               },
               "daughters": {
                  "title": "Daughters (Cousins)",
                  "type": "array",
                  "items": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
                  }
               }
            }
         }
      },
      "daughters": {
         "title": "Daughters",
         "type": "array",
         "items": {
            "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
         }
      },
      "brothers_daughters": {
         "title": "Brothers' Daughters With Breast Cancer",
         "type": "array",
         "items": {
            "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
         }
      },
      "paternal_half_sisters": {
         "title": "Paternal Half Sisters",
         "type": "array",
         "items": {
            "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
         }
      },
      "maternal_half_sisters": {
         "title": "Maternal Half Sisters",
         "type": "array",
         "items": {
            "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
         }
      },
      "paternal_uncles_daughters": {
         "title": "Paternal Uncles' Daughters (Cousins)",
         "type": "array",
         "items": {
            "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
         }
      },
      "maternal_uncles_daughters": {
         "title": "Maternal Uncles' Daughters (Cousins)",
         "type": "array",
         "items": {
            "$ref": "tyrer_cuzick_inputs_common.json#/definitions/TyrerCuzickFamilyHistoryWithDependencies"
         }
      }
   },
   "dependencies": {
      "number_of_live_births": {
         "oneOf": [
            {
               "properties": {
                  "number_of_live_births": {
                     "minimum": 0,
                     "maximum": 0
                  }
               }
            },
            {
               "properties": {
                  "number_of_live_births": {
                     "minimum": 1
                  },
                  "age_at_first_birth": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/age_at_first_birth"
                  }
               }
            }
         ]
      },
      "menopausal_status": {
         "oneOf": [
            {
               "properties": {
                  "menopausal_status": {
                     "enum": [
                        "PREMENOPAUSAL",
                        "PERIMENOPAUSAL",
                        "UNKNOWN"
                     ]
                  }
               }
            },
            {
               "properties": {
                  "menopausal_status": {
                     "enum": [
                        "POSTMENOPAUSAL"
                     ]
                  },
                  "age_at_menopause": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/age_at_menopause"
                  }
               }
            }
         ]
      },
      "history_of_ovarian_cancer": {
         "oneOf": [
            {
               "properties": {
                  "history_of_ovarian_cancer": {
                     "enum": [
                        "NO",
                        "UNKNOWN"
                     ]
                  }
               }
            },
            {
               "properties": {
                  "history_of_ovarian_cancer": {
                     "enum": [
                        "YES"
                     ]
                  },
                  "age_at_diagnosis_of_ovarian_cancer": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/age_at_diagnosis_of_ovarian_cancer"
                  }
               }
            }
         ]
      },
      "hormone_replacement_therapy_use": {
         "oneOf": [
            {
               "properties": {
                  "hormone_replacement_therapy_use": {
                     "enum": [
                        "NEVER",
                        "GT_5_YEARS_AGO"
                     ]
                  }
               }
            },
            {
               "properties": {
                  "hormone_replacement_therapy_use": {
                     "enum": [
                        "CURRENT"
                     ]
                  },
                  "type_of_hormone_replacement_therapy_taken": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/type_of_hormone_replacement_therapy_taken"
                  },
                  "length_of_time_taking_hormone_replacement_therapy": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/length_of_time_taking_hormone_replacement_therapy"
                  },
                  "length_of_future_time_intended_to_take_hormone_replacement_therapy": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/length_of_future_time_intended_to_take_hormone_replacement_therapy"
                  }
               }
            },
            {
               "properties": {
                  "hormone_replacement_therapy_use": {
                     "enum": [
                        "LT_5_YEARS_AGO"
                     ]
                  },
                  "type_of_hormone_replacement_therapy_taken": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/type_of_hormone_replacement_therapy_taken"
                  },
                  "length_of_time_taking_hormone_replacement_therapy": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/length_of_time_taking_hormone_replacement_therapy"
                  },
                  "length_of_time_since_last_taking_hormone_replacement_therapy": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/length_of_time_since_last_taking_hormone_replacement_therapy"
                  }
               }
            }
         ]
      },
      "breast_density_measure": {
         "oneOf": [
            {
               "properties": {
                  "breast_density_measure": {
                     "enum": [
                        "NOT_AVAILABLE"
                     ]
                  }
               }
            },
            {
               "properties": {
                  "breast_density_measure": {
                     "enum": [
                        "VOLPARA",
                        "VAS"
                     ]
                  },
                  "breast_density_value_decimal": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/breast_density_value_decimal"
                  }
               }
            },
            {
               "properties": {
                  "breast_density_measure": {
                     "enum": [
                        "BIRADS"
                     ]
                  },
                  "breast_density_value_birads": {
                     "$ref": "tyrer_cuzick_inputs_common.json#/definitions/breast_density_value_birads"
                  }
               }
            }
         ]
      }
   }
}