## Hl7Field.get() method

> Warning: This API is now obsolete.
>
> Use getComponent() instead. This method will be removed in a future release.

Returns an HL7 component by index.

**Signature:**

```typescript
get(component: number, subcomponent?: number, repetition?: number): string;
```

## Parameters

| Parameter   | Type     | Description                                   |
| ----------- | -------- | --------------------------------------------- |
| component   | number   | The component index.                          |
| subcomponent| number   | _(Optional)_ Optional subcomponent index.    |
| repetition  | number   | _(Optional)_ Optional repetition index.       |

**Returns:**

string

The string value of the specified component.
