## Hl7Segment.getField() method  
Returns an HL7 field by index.  
Note that the index is 1-based, not 0-based.  
For example, to get the first field, use `getField(1)`.  
This aligns with HL7 field names such as PID.1, PID.2, etc.  
Field zero is the segment name.  
Fields are lazily parsed; the requested field is parsed and cached on demand.

**Signature:**  
```typescript
getField(index: number): Hl7Field;
```

## Parameters  
| Parameter | Type | Description |
| --- | --- | --- |
| index | number | The HL7 field index. |

**Returns:**  
[Hl7Field](/content/docs/sdk/core.hl7field)  
The HL7 field.

- [Hl7Segment.getField() method](/content/docs/sdk/core.hl7segment.getfield#hl7segmentgetfield-method/index.html)  
- [Parameters](/content/docs/sdk/core.hl7segment.getfield#parameters/index.html)
