Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 16](https://developer.android.com/sdkExtensions) Summary: [Inherited Constants](https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#inhconstants) \| [Fields](https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#lfields) \| [Methods](https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#inhmethods)

# FhirVersion

*** ** * ** ***

` public final class FhirVersion `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/android/os/Parcelable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.health.connect.datatypes.FhirVersion |

<br />

*** ** * ** ***

Represents the FHIR version. This is designed according to [the official FHIR versions](https://build.fhir.org/versions.html#versions) of the Fast Healthcare Interoperability Resources (FHIR) standard. "label", which represents a 'working' version, is not supported for now.

The versions R4 (4.0.1) and R4B (4.3.0) are supported in Health Connect.

## Summary

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion>` | `https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#CREATOR` <br /> |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` boolean` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` int` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#getMajor()() ` Returns the major version. |
| ` int` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#getMinor()() ` Returns the minor version. |
| ` int` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#getPatch()() ` Returns the patch version. |
| ` int` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#isSupportedFhirVersion()() ` Returns `true` if the `https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion` is supported by Health Connect. |
| ` static https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#parseFhirVersion(java.lang.String)(https://developer.android.com/reference/java/lang/String fhirVersionString) ` Creates a `https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion` object with the version of string format. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#toString()() ` Returns the string representation of the FHIR version. |
| ` void` | ` https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Populates a `https://developer.android.com/reference/android/os/Parcel` with the self information. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Fields

### CREATOR

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 16](https://developer.android.com/sdkExtensions)

```
public static final Creator<FhirVersion> CREATOR
```

<br />

<br />

## Public methods

### describeContents

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`, the return value of this method must include the `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### equals

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object o)
```

Indicates whether some other object is "equal to" this one.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getMajor

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 16](https://developer.android.com/sdkExtensions)

```
public int getMajor ()
```

Returns the major version.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getMinor

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 16](https://developer.android.com/sdkExtensions)

```
public int getMinor ()
```

Returns the minor version.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getPatch

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 16](https://developer.android.com/sdkExtensions)

```
public int getPatch ()
```

Returns the patch version.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### hashCode

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object.

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isSupportedFhirVersion

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 16](https://developer.android.com/sdkExtensions)

```
public boolean isSupportedFhirVersion ()
```

Returns `true` if the `https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion` is supported by Health Connect.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### parseFhirVersion

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 16](https://developer.android.com/sdkExtensions)

```
public static FhirVersion parseFhirVersion (String fhirVersionString)
```

Creates a `https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion` object with the version of string format.

The format should look like "4.0.1" which contains 3 numbers - major, minor and patch, separated by ".". This aligns with [the official FHIR versions](https://build.fhir.org/versions.html#versions). Note that the "label" is not supported for now, which represents a 'working' version.

<br />

| Parameters ||
|---|---|
| `fhirVersionString` | `String`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/health/connect/datatypes/FhirVersion` | This value cannot be `null`. <br /> |

### toString

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns the string representation of the FHIR version.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Populates a `https://developer.android.com/reference/android/os/Parcel` with the self information.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |