{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-facility-npdb-report-update-request-schema.json",
  "title": "FacilityNpdbReportUpdateRequest",
  "description": "Facility NPDB report data for PUT operations that replace the entire NPDB reports 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/FacilityNpdbReportUpdateRequest",
  "type": "object",
  "required": [
    "reportDate",
    "processDate",
    "typeOfAction",
    "source",
    "reportType"
  ],
  "properties": {
    "reportDate": {
      "type": "string",
      "description": "Report date"
    },
    "processDate": {
      "type": "string",
      "description": "Process date"
    },
    "verifiedBy": {
      "type": "string",
      "description": "User who verified the report"
    },
    "data": {
      "description": "Additional data about the report"
    },
    "verifiedDate": {
      "type": "string",
      "description": "Date when report was verified"
    },
    "typeOfAction": {
      "type": "string",
      "pattern": "\\S",
      "description": "Type of action"
    },
    "createdDate": {
      "type": "string",
      "description": "Created date"
    },
    "deceased": {
      "type": "string",
      "description": "Deceased status"
    },
    "paymentAmount": {
      "type": "string",
      "description": "Payment amount"
    },
    "paymentDate": {
      "type": "string",
      "description": "Payment date"
    },
    "patientAge": {
      "type": "string",
      "description": "Patient age"
    },
    "patientGender": {
      "type": "string",
      "description": "Patient gender"
    },
    "patientType": {
      "type": "string",
      "description": "Patient type"
    },
    "medicalConditionDescription": {
      "type": "string",
      "description": "Medical condition description"
    },
    "procedureDescription": {
      "type": "string",
      "description": "Procedure description"
    },
    "allegationsDescription": {
      "type": "string",
      "description": "Allegations description"
    },
    "allegationNature": {
      "type": "string",
      "description": "Nature of allegation"
    },
    "specificAllegation": {
      "type": "string",
      "description": "Specific allegation"
    },
    "specificAllegationDate": {
      "type": "string",
      "description": "Specific allegation date"
    },
    "outcome": {
      "type": "string",
      "description": "Outcome"
    },
    "source": {
      "type": "string",
      "pattern": "\\S",
      "description": "Source of the report"
    },
    "reportType": {
      "type": "string",
      "pattern": "\\S",
      "description": "Report type"
    },
    "firstName": {
      "type": "string",
      "description": "First name"
    },
    "lastName": {
      "type": "string",
      "description": "Last name"
    },
    "middleName": {
      "type": "string",
      "description": "Middle name"
    },
    "gender": {
      "type": "string",
      "description": "Gender"
    },
    "npi": {
      "type": "string",
      "description": "NPI"
    },
    "homeAddress": {
      "type": "string",
      "description": "Home address"
    },
    "homeCity": {
      "type": "string",
      "description": "Home city"
    },
    "homeState": {
      "type": "string",
      "description": "Home state"
    },
    "homeZip": {
      "type": "string",
      "description": "Home zip code"
    },
    "dcn": {
      "type": "string",
      "description": "DCN"
    },
    "databankSubjectId": {
      "type": "string",
      "description": "Databank subject ID"
    },
    "enrollmentStatus": {
      "type": "string",
      "description": "Enrollment status"
    },
    "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 report"
    }
  },
  "$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"
        }
      }
    }
  }
}