addOrReplace
addOrReplace(id, value)
Adds a new DataElement with the specified identifier and value, or replaces the existing element if an entry with the same ElementID is already present.
| Parameter | Description |
|---|---|
| id | A 3-letter identifier that uniquely specifies the jurisdiction-related data element. |
| value | The text value assigned to the data element; this value will overwrite the existing one if the element already exists. |
Returns: The DataElement instance that was added to the collection or updated in place.