{
  "tool": "mph-health-economics--policy.discounted_qalys",
  "name": "Discounted QALYs (CDU-HEA-MPH-900)",
  "answers": "How many QALYs does this stream of health-state utilities yield, undiscounted and discounted at the reference-case rate?",
  "degree": {
    "id": "competency:mph-health-economics--policy",
    "code": "CDU-HEA-MPH-900",
    "name": "MPH Health Economics & Policy",
    "version": "1.0.0"
  },
  "reference": "NICE PMG36 reference case: health effects discounted at 3.5% a year; QALY = Σ utility × time",
  "endpoint": "/faculty/mph-health-economics--policy/discounted_qalys",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "utilities"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "utilities": {
        "type": "array",
        "description": "Mean utility in each successive year (0–1; below 0 for states worse than dead)",
        "items": {
          "type": "number"
        }
      },
      "discountRate": {
        "type": "number",
        "description": "Annual discount rate, 0–0.1",
        "minimum": 0,
        "maximum": 0.1,
        "default": 0.035
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "lifeYears",
      "undiscountedQalys",
      "discountedQalys"
    ],
    "properties": {
      "lifeYears": {
        "type": "number",
        "description": "Years counted"
      },
      "undiscountedQalys": {
        "type": "number",
        "description": "Σ utilities"
      },
      "discountedQalys": {
        "type": "number",
        "description": "Σ u_t ÷ (1 + r)^t, t = 0 for year 1"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "utilities": [
      0.85,
      0.82,
      0.8,
      0.78,
      0.75
    ],
    "discountRate": 0.035
  }
}