# Observation

Source: https://www.flexpa.com/docs/fhir/observation
Description: Observation is a clinical FHIR Resource that represents any measurements and simple assertions made about a patient, device or other subject.

GET `https://api.flexpa.com/fhir/Observation`

* [Observation](https://www.hl7.org/fhir/observation.html) is a base FHIR Resource ( [JSON example](https://www.hl7.org/fhir/observation-example.json))
* Commonly available via [US Core Vital Signs Profile](https://www.hl7.org/fhir/us/core/StructureDefinition-us-core-vital-signs.html)

**Observation** is a clinical FHIR Resource that represents any measurements and simple assertions made about a patient, device or other subject.

Observation may be used in a standalone context (for use cases such as a vitals reading) or it may be referenced from [DiagnosticReport](https://www.flexpa.com/docs/fhir/diagnostic-report) to represent the results of a diagnostic test.

Observation is an extremely broad resource that can be used to represent a wide variety of clinical data, so using search parameters such as `category` can be valuable to find specific information you may be looking for.

While some payers may make this information available, many do not have this data unless it is submitted to the payer by providers for quality measures or other provider/payer data exchange programs, as it is not included with or derived from core claims generation.

## Search parameters
The full list of search parameters can be found [here](http://hl7.org/FHIR/observation.html#search). Some of the most important are:

**Parameters**

- `patient` (string):
The ID of the patient for whom the observation was documented. We recommend using this search parameter along with the `$PATIENT_ID` [wildcard](https://www.flexpa.com/docs/records#wildcard-parameters)

- `category` (string):
The category of the observation. Given that observations are extremely broad, this can be valuable for filtering and this is a required search parameter for some servers. The most common values are `vital-signs` and `laboratory`.

- `date` (string):
The date range into which the observation falls.

## Sample request

**Note:**
While some servers may support a resource-level search without any parameters, not all do. We recommend using the format below with the patient ID via the `$PATIENT_ID` [wildcard](https://www.flexpa.com/docs/records#wildcard-parameters) as a search parameter.

This is a sample request using `curl`

```shell
ACCESS_TOKEN=patient-access-token

curl "https://api.flexpa.com/fhir/Observation?patient=$PATIENT_ID" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

## Sample response

This is a sample response from UnitedHealthcare using Flexpa API in [test mode](https://www.flexpa.com/docs/test-mode#health-insurers)

## Sample request - Profile

We can also request Observations (and any other resources) that conform to a specific profile

Sample `curl`

```shell
ACCESS_TOKEN=patient-access-token
PROFILE=http://hl7.org/fhir/us/core/StructureDefinition/us-core-vital-signs

curl "https://api.flexpa.com/fhir/Observation?patient=$PATIENT_ID&_profile=$PROFILE" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

## Sample response - Profile

This is a sample response from UnitedHealthcare using Flexpa API in [test mode](https://www.flexpa.com/docs/test-mode#health-insurers)
