{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-practice-location-update-request-schema.json",
  "title": "Practice Location",
  "description": "Practice location data for PUT operations that replace the entire practice locations array",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-credentialingworkflow-api-openapi.yml#/components/schemas/PracticeLocationUpdateRequest",
  "type": "object",
  "required": [
    "address1",
    "city",
    "state",
    "zipcode",
    "healthcareServiceName",
    "country",
    "source"
  ],
  "properties": {
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CredentialingWorkflowAttachment"
      },
      "description": "Array of attachment metadata for this record"
    },
    "verifiedBy": {
      "type": "string",
      "description": "Person who verified this record"
    },
    "verifiedDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "Date when this record was verified"
    },
    "address1": {
      "type": "string",
      "pattern": "\\S",
      "description": "Address line 1"
    },
    "address2": {
      "type": "string",
      "description": "Address line 2"
    },
    "city": {
      "type": "string",
      "pattern": "\\S",
      "description": "City"
    },
    "county": {
      "type": "string",
      "description": "County"
    },
    "state": {
      "type": "string",
      "pattern": "\\S",
      "description": "State"
    },
    "zipcode": {
      "type": "string",
      "pattern": "\\S",
      "description": "Zip code"
    },
    "healthcareServiceName": {
      "type": "string",
      "pattern": "\\S",
      "description": "Name of the healthcare service"
    },
    "tin": {
      "type": "string",
      "description": "Tax Identification Number"
    },
    "npi": {
      "type": "string",
      "description": "National Provider Identifier"
    },
    "country": {
      "type": "string",
      "pattern": "\\S",
      "description": "Country"
    },
    "startDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "Start date at this practice location"
    },
    "phoneCoverage24x7": {
      "type": "boolean",
      "description": "Whether phone coverage is available 24x7"
    },
    "locationHours": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LocationHours"
      },
      "description": "Hours of operation for each day of the week"
    },
    "totalLocationHours": {
      "type": "number",
      "format": "double",
      "description": "Total hours per week"
    },
    "drawingBlood": {
      "type": "boolean",
      "description": "Whether blood drawing services are available"
    },
    "laboratoryServices": {
      "type": "boolean",
      "description": "Whether laboratory services are available"
    },
    "cliaNumber": {
      "type": "string",
      "description": "Clinical Laboratory Improvement Amendments number"
    },
    "cliaExpirationDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "CLIA certificate expiration date"
    },
    "source": {
      "type": "string",
      "pattern": "\\S",
      "description": "Source of the practice location information"
    }
  },
  "$defs": {
    "CredentialingWorkflowAttachment": {
      "type": "object",
      "required": [
        "fileType",
        "fileUrl",
        "originalFileName"
      ],
      "description": "Attachment metadata for credentialing workflow row",
      "properties": {
        "createdAt": {
          "type": "string",
          "description": "Creation timestamp"
        },
        "fileType": {
          "type": "string",
          "description": "Document file type"
        },
        "fileUrl": {
          "type": "string",
          "description": "GCS file URL for file retrieval"
        },
        "originalFileName": {
          "type": "string",
          "description": "Original file name"
        },
        "expirationDate": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
          "description": "Expiration date",
          "default": "9999-12-31"
        },
        "createdBy": {
          "type": "string",
          "description": "User who created the record"
        },
        "artifactLinkId": {
          "type": "string",
          "description": "Shared identifier linking this attachment to its corresponding supportingDocuments entry"
        }
      }
    },
    "Date": {
      "type": "string",
      "format": "date"
    },
    "LocationHours": {
      "type": "object",
      "description": "Hours of operation for a specific day of the week",
      "properties": {
        "dayOfWeek": {
          "type": "string",
          "enum": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday",
            "Saturday",
            "Sunday"
          ],
          "description": "Day of the week"
        },
        "startHours": {
          "type": "string",
          "description": "Start time in 12-hour format with AM/PM (e.g., \"8:00 AM\") or \"None\" if closed"
        },
        "endHours": {
          "type": "string",
          "description": "End time in 12-hour format with AM/PM (e.g., \"5:00 PM\") or \"None\" if closed"
        }
      }
    }
  }
}