{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ellkay/json-schema/ellkay-lkcloud-connect-contracts-documents-get-patient-document-result-schema.json",
  "title": "LKCloudConnect.Contracts.Documents.GetPatientDocumentResult",
  "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.GetPatientDocumentResult",
  "type": "object",
  "properties": {
    "patientDocuments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LKCloudConnect.Contracts.Documents.PatientDocument"
      },
      "description": "Patient documents"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "LKCloudConnect.Contracts.Documents.DocumentAssigned": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of the user to assign the document to. Use SearchPracticioner"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Documents.DocumentStatus": {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "Unknown",
            "Registered",
            "Partial",
            "Preliminary",
            "Final",
            "Amended",
            "Corrected",
            "Appended",
            "Cancelled",
            "EnteredInError",
            "Deprecated"
          ],
          "type": "string",
          "description": "ELLKAY defined standardized code representing the availability and validity status of the patient document."
        },
        "source": {
          "type": "string",
          "description": "Original document status value as received from the source system."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Documents.DocumentType": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Document type id"
        },
        "name": {
          "type": "string",
          "description": "Document type name"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Documents.PatientDocument": {
      "type": "object",
      "properties": {
        "patientId": {
          "type": "string",
          "description": "Document patient id"
        },
        "id": {
          "type": "string",
          "description": "Document id"
        },
        "name": {
          "type": "string",
          "description": "Document name"
        },
        "date": {
          "type": "string",
          "description": "Document date (DateTimeOffset) e.g. 2019-01-01T00:00:00+00:00",
          "format": "date-time"
        },
        "documentType": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Documents.DocumentType"
            }
          ],
          "description": "Document type"
        },
        "fileFormat": {
          "type": "string",
          "description": "Document file format e.g. Png, Pdf, Json"
        },
        "provider": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Documents.Provider"
            }
          ],
          "description": "Document physician"
        },
        "assignedTo": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Documents.DocumentAssigned"
            }
          ],
          "description": "The practicioner the document should be assigned to for review"
        },
        "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"
        },
        "status": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Documents.DocumentStatus"
            }
          ],
          "description": "Patient document status object representing the standardized document state along with the original status value received from the source."
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Documents.Provider": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Physician id"
        },
        "name": {
          "type": "string",
          "description": "Physician name"
        }
      },
      "additionalProperties": false
    }
  }
}