{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ellkay/json-schema/ellkay-lkcloud-connect-contracts-documents-get-document-result-schema.json",
  "title": "LKCloudConnect.Contracts.Documents.GetDocumentResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ellkay-lkdocuments-api-openapi.yml#/components/schemas/LKCloudConnect.Contracts.Documents.GetDocumentResult",
  "type": "object",
  "properties": {
    "document": {
      "type": "string",
      "description": "Document binary content - base64 encoded string",
      "format": "byte"
    },
    "patientId": {
      "type": "string",
      "description": "Document patient id"
    },
    "fileFormat": {
      "type": "string",
      "description": "Document file format e.g. Png, Pdf, Json\n`Unknown` `Pdf` `Docx` `Doc` `Jpg` `Tif` `Png` `Html` `Xml` `Json` `Text` `Rtf`"
    },
    "pages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LKCloudConnect.Contracts.Documents.DocumentPage"
      },
      "description": "Document pages, null if document is not divided into pages in the target system"
    },
    "facilityId": {
      "type": "string",
      "description": "Id of Facility where document was created."
    },
    "needsReview": {
      "type": "boolean",
      "description": "The review status of the document - true if needs review, false otherwise"
    },
    "encounterId": {
      "type": "string",
      "description": "Document linked to a patient's clinical visit or encounter"
    },
    "custom": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "System-specific data for special cases"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "LKCloudConnect.Contracts.Documents.DocumentPage": {
      "type": "object",
      "properties": {
        "pageId": {
          "type": "string",
          "description": "Document page id"
        }
      },
      "additionalProperties": false
    }
  }
}