{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/healthtensor/json-schema/healthtensor-note-findings-response-schema.json",
  "title": "NoteFindingsResponse",
  "description": "Response body for the GET /outpatient/note-findings endpoint.",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/healthtensor-openapi.json#/components/schemas/NoteFindingsResponse",
  "properties": {
    "noteId": {
      "type": "string",
      "title": "Noteid",
      "description": "The FHIR note ID"
    },
    "regardPatientId": {
      "type": "string",
      "title": "Regardpatientid",
      "description": "The Regard patient ID"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/Icd10Result"
      },
      "type": "array",
      "title": "Results",
      "description": "ICD-10 findings persisted for this note"
    }
  },
  "type": "object",
  "required": [
    "noteId",
    "regardPatientId",
    "results"
  ],
  "$defs": {
    "Icd10Result": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "A valid ICD-10 code (e.g., 'E11.9')"
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "English description of the condition"
        },
        "quotes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Quotes",
          "description": "Exact quote(s) from the source text that justify the ICD-10 code"
        },
        "hccs": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Hccs",
          "description": "HCC codes mapped from the ICD-10 code, empty if none"
        },
        "sentiment": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "affirmed",
                "inconclusive",
                "negated",
                "irrelevant"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Sentiment",
          "description": "Truth value of the condition mention. Null for findings analyzed before this field was introduced."
        },
        "temporality": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "current",
                "historical"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Temporality",
          "description": "Time status of the condition. Null for findings analyzed before this field was introduced."
        },
        "meat_score": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Meat Score",
          "description": "MEAT criteria count (0-4): how many of Monitor, Evaluate, Assess, Treat are documented. Null for findings analyzed before this field was introduced."
        },
        "meat_quotes": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Meat Quotes",
          "description": "Exact substring(s) from the note that specifically justify the MEAT score. Null for findings analyzed before this field was introduced."
        }
      },
      "type": "object",
      "required": [
        "code",
        "description",
        "quotes"
      ],
      "title": "Icd10Result",
      "description": "A single ICD-10 code identified from a clinical note."
    }
  }
}