{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/predoc/json-schema/predoc-anonymous-record-upload-status-resp-dto-schema.json",
  "title": "AnonymousRecordUploadStatusRespDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/predoc-record-upload-api-openapi.yml#/components/schemas/AnonymousRecordUploadStatusRespDto",
  "type": "object",
  "properties": {
    "recordUploadId": {
      "type": "string",
      "description": "The ID of the record upload request."
    },
    "status": {
      "type": "string",
      "description": "Current anonymous record upload processing status.",
      "enum": [
        "IDENTIFYING",
        "PROCESSING",
        "READY_TO_VALIDATE",
        "VALIDATING",
        "VALIDATED",
        "ERROR"
      ]
    },
    "recipientProviders": {
      "description": "Recipient provider information.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecordProviderInfoDto"
      }
    },
    "sendingProviders": {
      "description": "Sending provider information.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecordProviderInfoDto"
      }
    },
    "originalDocumentDownloadUrl": {
      "type": "string",
      "description": "Secure URL to download the originally uploaded document. The URL expires after approximately 15 minutes; fetch the status again to receive a fresh URL.",
      "format": "uri"
    },
    "documents": {
      "description": "Generated anonymous record upload output documents with generated patient document IDs, document types, and secure download URLs.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecordUploadPatientDocumentDto"
      }
    }
  },
  "required": [
    "recordUploadId",
    "status",
    "originalDocumentDownloadUrl"
  ],
  "$defs": {
    "RecordProviderInfoDto": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "Provider first name."
        },
        "lastName": {
          "type": "string",
          "description": "Provider last name."
        },
        "designations": {
          "description": "Provider designations.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "providerFacilityType": {
          "type": "string",
          "description": "Provider facility type."
        },
        "facilityName": {
          "type": "string",
          "description": "Facility name."
        },
        "email": {
          "type": "string",
          "description": "Provider email."
        },
        "inferredNpi": {
          "type": [
            "string",
            "null"
          ],
          "description": "Inferred provider NPI, or null when no inferred NPI exists."
        }
      },
      "required": [
        "designations"
      ]
    },
    "RecordUploadPatientDocumentDto": {
      "type": "object",
      "properties": {
        "documentId": {
          "type": "string",
          "description": "Generated patient document ID."
        },
        "documentType": {
          "type": "string",
          "description": "Core patient document type."
        },
        "downloadUrl": {
          "type": "string",
          "description": "Secure, time-limited URL to download the generated document.",
          "format": "uri"
        },
        "indexedRecordSpliceType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Spliced indexed record classification for the generated document.",
          "enum": [
            "CANVAS_SET",
            "SEGMENT_SET",
            "PRESPLICED"
          ]
        }
      },
      "required": [
        "documentId",
        "documentType",
        "downloadUrl"
      ]
    }
  }
}