## Hl7Field class
The Hl7Field class represents one HL7 field. A field is a collection of components.

**Signature:**

```typescript
export declare class Hl7Field
```

## Constructors

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(components, context)](/content/docs/sdk/core.hl7field._constructor_/index.html) |  | Creates a new HL7 field. |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [components](/content/docs/sdk/core.hl7field.components) | `readonly` | string[][] |  |
| [context](/content/docs/sdk/core.hl7field.context) | `readonly` | [Hl7Context](/content/docs/sdk/core.hl7context) |  |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [get(component, subcomponent, repetition)](/content/docs/sdk/core.hl7field.get) |  | Returns an HL7 component by index. |
| [getComponent(component, subcomponent, repetition)](/content/docs/sdk/core.hl7field.getcomponent) |  | Returns an HL7 component by index. Note that the index is 1-based, not 0-based. For example, to get the first component, use `getComponent(1)`. This aligns with HL7 component names such as MSH.9.2. |
| [parse(text, context)](/content/docs/sdk/core.hl7field.parse) | `static` | Parses an HL7 field string into an Hl7Field object. |
| [setComponent(component, value, subcomponent, repetition)](/content/docs/sdk/core.hl7field.setcomponent) |  | Sets a component value at the specified indices. Note that the indices are 1-based, not 0-based. |
| [toString()](/content/docs/sdk/core.hl7field.tostring) |  | Returns the HL7 field as a string. |

- [Hl7Field class](/content/docs/sdk/core.hl7field#hl7field-class/index.html)
- [Constructors](/content/docs/sdk/core.hl7field#constructors/index.html)
- [Properties](/content/docs/sdk/core.hl7field#properties/index.html)
- [Methods](/content/docs/sdk/core.hl7field#methods/index.html)
