# Returns PatientProcedure which has been created

Creates a resource from the request body. Validation errors return **400**; a successful create returns **201** with the created resource in `data`.

Endpoint: POST /v1/patientprocedures
Version: 193.0.0
Security: bearerAuth, oAuthSandbox

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

  - `oAuthSandbox` (unknown)
    oauth2

## Query parameters:

  - `coveredBy` (string)
    Covered practice procedures by location | carrier (insurance) ?coveredBy=location

## Header parameters:

  - `Organization-ID` (string, required)
    Organization context for the request. Must match the organization authorized by the access token.

## Request body:

  - `application/json` (unknown)
    **Purpose:** Add a clinical procedure to a patient's chart.
**Required fields:** See `PatientProcedureCreateV1` schema (`patient`, `location`, `practiceProcedure`, `status`, etc.).
**Query `coveredBy`:** Optional `location` or `carrier` — controls fee/estimate coverage validation.
**Status-specific rules:** `COMPLETED` requires `autoCalculateEstimateEnabled`. Treatment-info practice procedures also require `monthsRemaining` and `appliancePlacementDate`.
**Idempotency:** Not supported.

## Request fields (application/json):

  - `amount` (number, required)
    Example: 123.56

  - `entryDate` (string)
    Example: 2021-09-29T00:00:00.000Z

  - `serviceDate` (string)
    Example: 2021-09-29T00:00:00.000Z

  - `startDate` (string)
    Example: 2018-07-09T00:00:00.000Z

  - `endDate` (string)
    Example: 2018-07-09T00:00:00.000Z

  - `treatmentPlannedDate` (string)
    Example: 2018-07-09T00:00:00.000Z

  - `expirationDate` (string)
    Example: 2018-07-09T19:00:00.000Z

  - `status` (string, required)
    Enum: "COMPLETED", "EXISTING", "TREATMENT_PLAN", "IN_PROCESS", "REFERRED"

  - `oralCavity` (string)
    Enum: "UPPER_LEFT", "UPPER_RIGHT", "LOWER_LEFT", "LOWER_RIGHT", "ARCH_MAXILLARY", "ARCH_MANDI_BULAR", "UPPER_LEFT_SEXTANT", "UPPER_ANTERIOR_SEXTANT", "UPPER_RIGHT_SEXTANT", "LOWER_LEFT_SEXTANT", "LOWER_ANTERIOR_SEXTANT", "LOWER_RIGHT_SEXTANT"

  - `notes` (string)
    Example: string

  - `state` (string, required)
    Enum: "ACTIVE", "CANCELLED", "INVALIDATED"

  - `primaryInsuranceEstimateOverride` (number)
    Example: 1.23456

  - `secondaryInsuranceEstimateOverride` (number)
    Example: 1.23456

  - `billToInsurance` (boolean, required)
    Example: true

  - `autoCalculateEstimateEnabled` (boolean)
    Required if status field is COMPLETED
    Example: true

  - `monthsRemaining` (number)
    Example: 0

  - `referredOut` (boolean)
    Example: true

  - `procedureTeeth` (array)
    Required if treatmentArea of practiceProcedure is in [TOOTH, SURFACE, ROOT]

  - `procedureTeeth.id` (string)
    Example: abc123

  - `procedureTeeth.procedureId` (integer)
    Example: 987654321

  - `procedureTeeth.mesial` (boolean)
    Example: true

  - `procedureTeeth.incisal` (boolean)
    Example: false

  - `procedureTeeth.occlusal` (boolean)
    Example: true

  - `procedureTeeth.distal` (boolean)
    Example: false

  - `procedureTeeth.lingual` (boolean)
    Example: true

  - `procedureTeeth.facial` (boolean)
    Example: true

  - `procedureTeeth.buccal` (boolean)
    Example: false

  - `procedureTeeth.classFive` (boolean)
    Example: true

  - `procedureTeeth.toothId` (string)
    Example: T123

  - `procedureTeeth.incisalOcclusal` (boolean)
    Example: false

  - `procedureTeeth.facialBuccal` (boolean)
    Example: true

  - `practiceProcedure` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `practiceProcedure.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `renderingProvider` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `renderingProvider.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `treatmentPlannedProvider` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `treatmentPlannedProvider.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `insuranceClaims` (array)

  - `insuranceClaims.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `patientConditions` (array)

  - `patientConditions.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `perioExams` (array)

  - `perioExams.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `primaryInsurance` (number)
    Example: 1.23

  - `secondaryInsurance` (number)
    Example: 1.23

  - `writeOff` (number)
    Example: 1.23

  - `guarantorPortion` (number)
    Example: 1.23

  - `replacedBy` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `replacedBy.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `patient` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `patient.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `location` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `location.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

## Request examples:

  - `default` (unknown)

## Response 201:

  - `201` (unknown)
    PatientProcedure was created

## Response 201 fields (application/json):

  - `data` (array)

  - `data.id` (integer)

  - `data.unlock` (boolean)
    Example: true

  - `data.lastModified` (string)
    Example: 2018-07-09T19:00:00.000Z

  - `data.amount` (number, required)
    Example: 123.56

  - `data.entryDate` (string)
    Example: 2021-09-29T00:00:00.000Z

  - `data.serviceDate` (string)
    Example: 2021-09-29T00:00:00.000Z

  - `data.startDate` (string)
    Example: 2018-07-09T00:00:00.000Z

  - `data.endDate` (string)
    Example: 2018-07-09T00:00:00.000Z

  - `data.treatmentPlannedDate` (string)
    Example: 2018-07-09T00:00:00.000Z

  - `data.expirationDate` (string)
    Example: 2018-07-09T19:00:00.000Z

  - `data.status` (string, required)
    Enum: "COMPLETED", "EXISTING", "TREATMENT_PLAN", "IN_PROCESS", "REFERRED"

  - `data.oralCavity` (string)
    Enum: "UPPER_LEFT", "UPPER_RIGHT", "LOWER_LEFT", "LOWER_RIGHT", "ARCH_MAXILLARY", "ARCH_MANDI_BULAR", "UPPER_LEFT_SEXTANT", "UPPER_ANTERIOR_SEXTANT", "UPPER_RIGHT_SEXTANT", "LOWER_LEFT_SEXTANT", "LOWER_ANTERIOR_SEXTANT", "LOWER_RIGHT_SEXTANT"

  - `data.notes` (string)
    Example: string

  - `data.state` (string, required)
    Enum: "ACTIVE", "CANCELLED", "INVALIDATED"

  - `data.primaryInsuranceEstimateOverride` (number)
    Example: 1.23456

  - `data.secondaryInsuranceEstimateOverride` (number)
    Example: 1.23456

  - `data.billToInsurance` (boolean, required)
    Example: true

  - `data.autoCalculateEstimateEnabled` (boolean)
    Required if status field is COMPLETED
    Example: true

  - `data.monthsRemaining` (number)
    Example: 0

  - `data.procedureTeeth` (array)
    Required if treatmentArea of practiceProcedure is in [TOOTH, SURFACE, ROOT]

  - `data.procedureTeeth.id` (string)
    Example: abc123

  - `data.procedureTeeth.procedureId` (integer)
    Example: 987654321

  - `data.procedureTeeth.mesial` (boolean)
    Example: true

  - `data.procedureTeeth.incisal` (boolean)
    Example: false

  - `data.procedureTeeth.occlusal` (boolean)
    Example: true

  - `data.procedureTeeth.distal` (boolean)
    Example: false

  - `data.procedureTeeth.lingual` (boolean)
    Example: true

  - `data.procedureTeeth.facial` (boolean)
    Example: true

  - `data.procedureTeeth.buccal` (boolean)
    Example: false

  - `data.procedureTeeth.classFive` (boolean)
    Example: true

  - `data.procedureTeeth.toothId` (string)
    Example: T123

  - `data.procedureTeeth.incisalOcclusal` (boolean)
    Example: false

  - `data.procedureTeeth.facialBuccal` (boolean)
    Example: true

  - `data.practiceProcedure` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.practiceProcedure.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.practiceProcedure.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.practiceProcedure.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.renderingProvider` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.renderingProvider.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.renderingProvider.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.renderingProvider.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.treatmentPlannedProvider` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.treatmentPlannedProvider.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.treatmentPlannedProvider.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.treatmentPlannedProvider.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.insuranceClaims` (array)

  - `data.insuranceClaims.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.insuranceClaims.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.insuranceClaims.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.patientConditions` (array)

  - `data.patientConditions.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.patientConditions.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.patientConditions.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.perioExams` (array)

  - `data.perioExams.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.perioExams.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.perioExams.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.patient` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.patient.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.patient.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.patient.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.location` (object, required)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.location.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.location.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.location.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `data.txCase` (object)
    A reference to a linked model. Includes the id, the type, and URL at which the model can be accessed.

  - `data.txCase.id` (integer, required)
    The unique identifier for the linked model.
    Example: 12345

  - `data.txCase.type` (string)
    The type of the linked model. This field is read-only.
    Example: ExampleModelType

  - `data.txCase.url` (string, required)
    The URL at which the linked model can be accessed. This field is read-only.
    Example: https://api.example.com/models/12345

  - `warnings` (array)

  - `warnings.code` (string)

  - `warnings.title` (string)

  - `warnings.description` (string)

  - `warnings.source` (string)

  - `errors` (array)

  - `meta` (object)

  - `meta.pagination` (object)
    Pagination info
    Example: {"limit":10,"offset":0}

  - `meta.pagination.limit` (integer)
    Example: 10

  - `meta.pagination.offset` (integer)
    Example: 0

  - `meta.pagination.total` (integer)
    Example: 100

## Response 400:

  - `400` (unknown)
    The request was invalid or cannot be processed

## Response 401:

  - `401` (unknown)
    Authentication is required and has failed or has not been provided

## Response 403:

  - `403` (unknown)
    The request is understood, but it has been refused or access is not allowed

## Response 404:

  - `404` (unknown)
    The requested resource is either missing or does not exist

## Response 408:

  - `408` (unknown)
    The server timed out while processing the request

## Response 429:

  - `429` (unknown)
    Rate limit exceeded

## Response 500:

  - `500` (unknown)
    An unexpected error occurred

## Response 201 examples:

  - `default` (unknown)

