core.hl7message.getallsegments | Medplum
Hl7Message.getAllSegments() method
Returns all HL7 segments of a given name.
Only the segments that match the requested name are parsed, which avoids parsing unrelated segments when scanning a message.
Signature:
getAllSegments(name: string): Hl7Segment[];
Parameters [](/content/docs/sdk/core.hl7message.getallsegments#parameters "Direct link to Parameters"/index.html)
| Parameter | Type | Description |
|---|---|---|
| name | string | The HL7 segment name. |
Returns:
An array of HL7 segments with the specified name.