{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-facility-performance-indicator-update-request-schema.json",
  "title": "FacilityPerformanceIndicatorUpdateRequest",
  "description": "Facility performance indicator data for PUT operations that replace the entire performance indicators array",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-facilitycredentialingworkflow-api-openapi.yml#/components/schemas/FacilityPerformanceIndicatorUpdateRequest",
  "type": "object",
  "required": [
    "totalComplaints"
  ],
  "properties": {
    "totalComplaints": {
      "type": "integer",
      "format": "int32",
      "description": "Total number of complaints"
    },
    "clinicalComplaints": {
      "type": "integer",
      "format": "int32",
      "description": "Number of clinical complaints"
    },
    "serviceComplaints": {
      "type": "integer",
      "format": "int32",
      "description": "Number of service complaints"
    },
    "benefitsComplaints": {
      "type": "integer",
      "format": "int32",
      "description": "Number of benefits complaints"
    },
    "claimComplaints": {
      "type": "integer",
      "format": "int32",
      "description": "Number of claim complaints"
    },
    "accessIssueComplaints": {
      "type": "integer",
      "format": "int32",
      "description": "Number of access issue complaints"
    },
    "reportDate": {
      "type": "string",
      "description": "The date of the report"
    },
    "createdAt": {
      "type": "string",
      "description": "The date the record was created"
    },
    "createdBy": {
      "type": "string",
      "description": "The user who created the record"
    },
    "updatedAt": {
      "type": "string",
      "description": "The date the record was last updated"
    },
    "updatedBy": {
      "type": "string",
      "description": "The user who last updated the record"
    },
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FacilityCredentialingWorkflowAttachment"
      },
      "description": "Supporting documents for the indicator"
    },
    "verifiedDate": {
      "type": "string",
      "description": "The date the indicator was verified"
    },
    "verifiedBy": {
      "type": "string",
      "description": "The user who verified the indicator"
    }
  },
  "$defs": {
    "FacilityCredentialingWorkflowAttachment": {
      "type": "object",
      "required": [
        "fileType",
        "fileUrl",
        "originalFileName"
      ],
      "description": "Attachment metadata for facility credentialing workflow sections",
      "properties": {
        "createdAt": {
          "type": "string",
          "description": "The date the attachment was created"
        },
        "fileType": {
          "type": "string",
          "description": "Supporting Document File Type (i.e. Malpractice Insurance Policy, License, etc.)"
        },
        "fileUrl": {
          "type": "string",
          "description": "Supporting Document File URI in GCS"
        },
        "originalFileName": {
          "type": "string",
          "description": "Supporting Document Original File Name"
        },
        "state": {
          "type": "string",
          "description": "The state associated with the supporting document"
        },
        "expirationDate": {
          "type": "string",
          "description": "The expiration date of the supporting document"
        },
        "source": {
          "type": "string",
          "description": "The source of the supporting document"
        },
        "createdBy": {
          "type": "string",
          "description": "The user who created the record"
        },
        "updatedAt": {
          "type": "string",
          "description": "The date the attachment was last updated"
        },
        "updatedBy": {
          "type": "string",
          "description": "The user who last updated the record"
        }
      }
    }
  }
}