## Delete a clinical reference

`ClinicalReference autoScribe().clinicalReferences().delete(ClinicalReferenceDeleteParamsparams = ClinicalReferenceDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

**post** `/v1/autoScribe/clinicalReferences/{clinicalReferenceId}/delete`

Soft-deletes a clinical reference by setting isActive to false and suffixing the name to free the unique constraint.

### Parameters

- `ClinicalReferenceDeleteParams params`

  - `Optional<String> clinicalReferenceId`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

### Returns

- `class ClinicalReference:`

  A canonical clinical reference value for study workflow pickers and normalization

  - `String clinicalReferenceId`

    Unique clinical reference identifier. Format: ref_{32-hex-chars}

  - `Optional<LocalDateTime> createdAt`

    Timestamp when the clinical reference was created

  - `boolean isActive`

    Whether this reference is active and available for pickers

  - `String name`

    Canonical display name for this reference value

  - `ClinicalReferenceType type`

    Category of canonical clinical reference value used for study workflow pickers and normalization.

    - `FACILITY("facility")`

    - `REFERRING_PROVIDER("referring_provider")`

    - `STUDY_DESCRIPTION("study_description")`

    - `PROCEDURE("procedure")`

  - `Optional<LocalDateTime> updatedAt`

    Timestamp when the clinical reference was last updated

  - `Optional<ExpressCustomerReference> expressCustomer`

    A reference to an Express customer with basic identifying information

    - `String expressCustomerId`

      Unique Express customer identifier. Format: cus_{32-hex-chars}

    - `String expressCustomerName`

      Name of the Express customer

  - `Optional<String> externalReferenceId`

    Integrator-provided stable identifier for mapping inbound data

  - `Optional<Metadata> metadata`

    Optional key-value metadata. Maximum 50 pairs

### Example

```java
package com.avarasoftware.example;

import com.avarasoftware.client.AvaraClient;
import com.avarasoftware.client.okhttp.AvaraOkHttpClient;
import com.avarasoftware.models.autoscribe.clinicalreferences.ClinicalReference;
import com.avarasoftware.models.autoscribe.clinicalreferences.ClinicalReferenceDeleteParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AvaraClient client = AvaraOkHttpClient.fromEnv();

        ClinicalReference clinicalReference = client.autoScribe().clinicalReferences().delete("ref_1234567890abcdef1234567890abcdef");
    }
}
```

#### Response

```json
{
  "clinicalReferenceId": "ref_1234567890abcdef1234567890abcdef",
  "createdAt": "2024-01-15T09:00:00Z",
  "isActive": true,
  "name": "City Medical Center",
  "type": "facility",
  "updatedAt": "2024-03-15T14:20:00Z",
  "expressCustomer": {
    "expressCustomerId": "cus_1234567890abcdef1234567890abcdef",
    "expressCustomerName": "City Medical Center"
  },
  "externalReferenceId": "FAC-001",
  "metadata": {
    "region": "northeast"
  }
}
```
