{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ellkay/json-schema/ellkay-lkcloud-connect-swagger-swagger-requests-lkcharges-send-charge-swagger-request-schema.json",
  "title": "LKCloudConnect.Swagger.SwaggerRequests.LKCharges.SendChargeSwaggerRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ellkay-lkcharges-api-openapi.yml#/components/schemas/LKCloudConnect.Swagger.SwaggerRequests.LKCharges.SendChargeSwaggerRequest",
  "required": [
    "charges"
  ],
  "type": "object",
  "properties": {
    "charges": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.ChargeDetail"
      },
      "description": "array of ChargeDetail objects - Required"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "LKCloudConnect.Contracts.Charges.BillDetail": {
      "type": "object",
      "properties": {
        "encounter": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.EncounterDetail"
            }
          ],
          "description": "Charge encounter data"
        },
        "supervisingProvider": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.ProviderDetail"
            }
          ],
          "description": "Charge top-level supersiving provider"
        },
        "referringProvider": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.ProviderDetail"
            }
          ],
          "description": "Charge top-level referring provider"
        },
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.TransactionDetail"
          },
          "description": "Charge transactions"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.ChargeDetail": {
      "type": "object",
      "properties": {
        "transactionId": {
          "type": "string",
          "description": "Top-level charge transaction id"
        },
        "sendingFacility": {
          "type": "string",
          "description": "Sending facility"
        },
        "receivingFacility": {
          "type": "string",
          "description": "Receiving facility"
        },
        "patient": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.PatientDetail"
            }
          ],
          "description": "Patient"
        },
        "bill": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.BillDetail"
            }
          ],
          "description": "Charge transaction data"
        },
        "custom": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": "System-specific data for special cases"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.Diagnosis": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Diagnosis code"
        },
        "problemId": {
          "type": "string",
          "description": "Diagnosis problem id"
        },
        "icdVersion": {
          "enum": [
            "Unknown",
            "I9",
            "I10",
            "I11"
          ],
          "type": "string",
          "description": "Diagnosis ICD version\n            I11 and Unknown coding systems are not currently supported"
        },
        "alternateCode": {
          "type": "string",
          "description": "Diagnosis alternate code"
        },
        "alternateICDVersion": {
          "enum": [
            "Unknown",
            "I9",
            "I10",
            "I11"
          ],
          "type": "string",
          "description": "Diagnosis alternate ICD version\n            I11 and Unknown coding systems are not currently supported"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.EncounterDetail": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Encounter id"
        },
        "locationName": {
          "type": "string",
          "description": "Encounter location name"
        },
        "locationId": {
          "type": "string",
          "description": "Encounter location id"
        },
        "date": {
          "type": "string",
          "description": "Encounter date e.g. 2019-01-01T00:00:00.112",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.ModifierCode": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Procedure (CPT) modifier code"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.PatientDetail": {
      "type": "object",
      "properties": {
        "internalId": {
          "type": "string",
          "description": "Patient id in the target system"
        },
        "externalId": {
          "type": "string",
          "description": "Patient id from an external system"
        },
        "lastName": {
          "type": "string",
          "description": "Patient last name"
        },
        "firstName": {
          "type": "string",
          "description": "Patient first name"
        },
        "sex": {
          "enum": [
            "Unknown",
            "Male",
            "Female"
          ],
          "type": "string",
          "description": "Patient sex"
        },
        "dob": {
          "type": "string",
          "description": "Patient date of birth e.g. 2019-01-01T00:00:00",
          "format": "date-time"
        },
        "ssn": {
          "type": "integer",
          "description": "Patient social security number",
          "format": "int64"
        },
        "alternatePatientId": {
          "type": "string",
          "description": "Patient alternate id"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.Procedure": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Procedure code"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.ProviderDetail": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Provider id"
        },
        "firstName": {
          "type": "string",
          "description": "Provider first name"
        },
        "lastName": {
          "type": "string",
          "description": "Provider last name"
        },
        "middleName": {
          "type": "string",
          "description": "Provider middle name"
        },
        "prefix": {
          "type": "string",
          "description": "Provider name prefix"
        },
        "suffix": {
          "type": "string",
          "description": "Provider name suffix"
        },
        "npi": {
          "type": "string",
          "description": "Provider NPI"
        },
        "upin": {
          "type": "string",
          "description": "Provider UPIN"
        }
      },
      "additionalProperties": false
    },
    "LKCloudConnect.Contracts.Charges.TransactionDetail": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Transaction id"
        },
        "renderingProvider": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.ProviderDetail"
            }
          ],
          "description": "Transaction rendering provider"
        },
        "dateOfService": {
          "type": "string",
          "description": "Transaction date of service e.g. 2019-01-01T00:00:00.112",
          "format": "date-time"
        },
        "postingDate": {
          "type": "string",
          "description": "Transaction posting date e.g. 2019-01-01T00:00:00.112",
          "format": "date-time"
        },
        "procedure": {
          "allOf": [
            {
              "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.Procedure"
            }
          ],
          "description": "Transaction procedure code"
        },
        "diagnoses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.Diagnosis"
          },
          "description": "Transaction diagnosis codes"
        },
        "modifiers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LKCloudConnect.Contracts.Charges.ModifierCode"
          },
          "description": "Transaction procedure (CPT) code modifiers"
        },
        "units": {
          "type": "integer",
          "description": "Transaction numeric units eg 1",
          "format": "int32"
        },
        "insuranceId": {
          "type": "string",
          "description": "Transaction insurance id"
        },
        "placeOfServiceCode": {
          "type": "string",
          "description": "Transaction Place of Service code"
        },
        "typeOfServiceCode": {
          "type": "string",
          "description": "Represents the Type of Service provided during the transaction"
        }
      },
      "additionalProperties": false
    }
  }
}