---
title: "init(fromVersionString:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkfhirversion/init(fromversionstring:)"
---

# init(fromVersionString:)

Creates an FHIR version object from a string representation of the version.

## Declaration

```swift
convenience init(fromVersionString versionString: String) throws
```

## Parameters

- `versionString`: A string representing the version.

## Discussion

Discussion The string must be in the following format: <major>.<minor>.<patch>.

## See Also

### Creating Version Objects

- [primaryDSTU2()](healthkit/hkfhirversion/primarydstu2().md)
- [primaryR4()](healthkit/hkfhirversion/primaryr4().md)
