Primitive Type
FHIR primitive types are a single value. In Gleam, primitive types are record fields with a single value, rather than with child fields. For example, the Patient resource has a Patient.active boolean element, which in Gleam is a Bool in r4.Patient.
pub type Patient {
Patient(
...
active: Option(Bool),
...
)
}
| Primitive Type | In Gleam |
|---|---|
| base64Binary | String |
| boolean | Bool |
| canonical | String |
| code | enum if required binding, otherwise String |
| date | String |
| dateTime | String |
| decimal | Float |
| id | String |
| instant | String |
| integer | Int |
| integer64 | String |
| markdown | String |
| oid | String |
| string | String |
| positiveInt | Int |
| time | String |
| unsignedInt | Int |
| uri | String |
| url | String |
| uuid | String |