# Get a diagnostic test

Operation ID: `graph.getDiagnosticTest`

Get one diagnostic test record plus its dimension nodes (analyte, test system, specialty, complexity). Neo4j only.

## Public method

`getDiagnosticTest`

Signature: `graph.getDiagnosticTest(testId)`

Return type: `Promise<DiagnosticTest>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /diagnostic-tests/{test_id}`

## Path parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `test_id` | `string` | Yes |  |  |  | No |  |

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`GetDiagnosticTestResponse`](../models/GetDiagnosticTestResponse.md) | application/json | One diagnostic test + its dimension nodes |

## Success response examples

### 200

```json
{
  "dimensions": {},
  "test": {
    "analyte_id": "810",
    "analyte_name": "1,25-Dihydroxyvitamin D (1,25-(OH)2D)",
    "complexity": "HIGH",
    "date_effective": "2002/03/22 00:00:00.000",
    "document_number": "K014030",
    "id": "f40168669505218707fefe48b5b56ba838917bb3cae99d75181f8f979a7a22db",
    "manufacturer": "DIASORIN 1",
    "qualifier1": "Serum",
    "qualifier2": "Quantitative",
    "specialty_id": "2",
    "specialty_name": "General Chemistry",
    "test_system_id": "2094",
    "test_system_name": "DIASORIN 1,25-DIHYDROXYVITAMIN D 125 I RIA KIT"
  }
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `404` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | No test exists for test_id |
| `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |

## Error examples

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 404 — No diagnostic test matches test_id

```json
{
  "error": "Diagnostic test not found"
}
```

### 500 — Unexpected service failure (sanitized example)

```json
{
  "error": "Internal server error"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const testId = "<TEST_ID>";

const result = await graph.getDiagnosticTest(testId);
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-graph.health.cloud/diagnostic-tests/%3CTEST_ID%3E'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
