{
   "$schema": "https://json-schema.org/draft/2020-12/schema",
   "type": "object",
   "title": "MyOme json report for Clinical Risk Only scores",
   "description": "MyOme report object for Clinical Risk Only scores",
   "allOf": [
      {
         "$ref": "base.json"
      },
      {
         "properties": {
            "report_type": {
               "type": "string",
               "const": "CLINICAL_RISK_ONLY"
            },
            "results": {
               "$ref": "#/definitions/ClinicalRiskReportResults"
            }
         }
      }
   ],
   "definitions": {
      "ClinicalRiskReportResults": {
         "description": "Extends the properties in Interps by adding toplines, general findings, clinical inputs, and next steps.",
         "type": "object",
         "allOf": [
            {
               "$ref": "../interps/CLINICAL_RISK_ONLY.json#/definitions/ClinicalInterpretation"
            },
            {
               "properties": {
                  "score_type": {
                     "enum": [
                        "POOLED_COHORT_EQUATION"
                     ],
                     "type": "string"
                  },
                  "toplines": {
                     "$ref": "#/definitions/Topline"
                  },
                  "general": {
                     "type": "array",
                     "items": {
                        "$ref": "../interps/CLINICAL_RISK_ONLY.json#/definitions/ClinicalRiskResult"
                     }
                  },
                  "sample_limitations": {
                     "type": "array",
                     "items": {
                        "type": "string"
                     }
                  },
                  "clinical_risk_inputs": {
                     "$ref": "../interps/CLINICAL_RISK_ONLY.json#/definitions/ClinicalRiskInputs"
                  }
               },
               "required": [
                  "score_type",
                  "toplines"
               ]
            },
            {
               "required": [
                  "general"
               ]
            }
         ]
      },
      "Topline": {
         "description": "Uses Clinical Topline finding definition from structs.json",
         "type": "array",
         "minItems": 1,
         "maxItems": 1,
         "items": {
            "allOf": [
               {
                  "$ref": "../../structs.json#/definitions/ToplineFinding"
               },
               {
                  "properties": {
                     "finding": {
                        "$ref": "../../core.json#/definitions/ClinicalToplineFinding"
                     }
                  }
               }
            ]
         },
         "example": [
            {
               "finding": "HIGH_RISK",
               "text": "Based on clinical factors, this patient has a 20.2% chance of experiencing a coronary artery disease (CAD) event in the next 10 years.\\n"
            }
         ]
      }
   }
}