core.hl7field.setcomponent | Medplum
Hl7Field.setComponent() method
Sets a component value at the specified indices. Note that the indices are 1-based, not 0-based.
Signature:
setComponent(component: number, value: string, subcomponent?: number, repetition?: number): boolean;
Parameters
| Parameter | Type | Description |
|---|---|---|
| component | number | The component index |
| value | string | The new component value |
| subcomponent | number | (Optional) Optional subcomponent index |
| repetition | number | (Optional) Optional repetition index |
Returns:
boolean
true if the component was set, false otherwise