core.hl7segment.setfield
Home > @medplum/core > Hl7Segment > setField
Hl7Segment.setField() method
Sets a field at the specified index. If that index does not exist, it will be added. Note that the index is 1-based, not 0-based.
Signature:
setField(index: number, field: Hl7Field | string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The field index |
field | Hl7Field | string | The new field value |
Returns:
boolean
true if the field was set, false otherwise