{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/finchnode-com/json-schema/finchnode-com-tefca-export-schema.json",
  "title": "TefcaExport",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/finchnode-com-api-openapi.yml#/components/schemas/TefcaExport",
  "type": "object",
  "required": [
    "object",
    "mode",
    "synthetic",
    "environment",
    "categories",
    "sessionId",
    "bundle",
    "failures",
    "consent"
  ],
  "properties": {
    "mode": {
      "type": "string",
      "const": "simulation"
    },
    "synthetic": {
      "type": "boolean",
      "const": true
    },
    "environment": {
      "type": "string",
      "const": "sandbox"
    },
    "categories": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "demographics",
          "medications",
          "conditions",
          "labs",
          "vitals",
          "allergies",
          "immunizations",
          "encounters"
        ]
      }
    },
    "object": {
      "type": "string",
      "const": "tefca_export"
    },
    "sessionId": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "complete",
        "partial"
      ]
    },
    "consent": {
      "type": "object"
    },
    "failures": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "bundle": {
      "type": "object",
      "required": [
        "resourceType",
        "type",
        "entry"
      ],
      "properties": {
        "resourceType": {
          "type": "string",
          "const": "Bundle"
        },
        "type": {
          "type": "string",
          "const": "collection"
        },
        "entry": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "resource": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  }
}