# code

Canonical page: https://docs.ovok.com/fhir-elements/primitive/code

Base StructureDefinition for code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents

Primitive data type in FHIR R4. Maturity: Not stated.

## Elements [#elements]

| **Element** | **Type** | **Cardinality** | **Description** |
| --- | --- | --- | --- |
| <span id="element-id"></span>`id` | [string](/fhir-elements/primitive/string) | `0..1` | xml:id (or equivalent in JSON) |
| <span id="element-extension"></span>`extension` | [Extension](/fhir-elements/complex/extension) | `0..*` | Additional content defined by implementations |
| <span id="element-value"></span>`value` | [string](/fhir-elements/primitive/string) | `0..1` | Primitive value for code |

## Reference [#reference]

Official FHIR R4 specification: [code](https://hl7.org/fhir/R4/datatypes.html#code).
