> For the complete documentation index, see [llms.txt](https://docs.journl.dk/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.journl.dk/v1/api/fhir-api/accessing-fhir-data.md).

# Accessing FHIR Data

Journl Streamed exposes FHIR data through its standard API endpoints.

A resource is a structured object that includes a type, associated data, relationships to other resources, and a set of methods for interaction. Typically, a resource is represented in formats such as JSON, XML, or YAML.\
\
More information about FHIR specifications can be found [here](https://www.hl7.org/fhir/resourcelist.html).\
\
Below are some examples of how to interact with the FHIR APIs:

**Retrieve a Patient Resource:**\
This endpoint retrieves the details of a patient resource identified by {id}.

```http
GET {base}/fhir/Patient/{id}
```

**Search for Observations:**\
This endpoint searches for all observations related to a specific patient identified by {patient\_id}.

```http
GET {base}/Observation?patient={patient_id}
```

**Create a New Condition:**\
This endpoint creates a new condition resource for a patient.

```http
POST /Condition
Content-Type: application/fhir+json
{
  "resourceType": "Condition",
  "patient": {
    "reference": "Patient/{id}"
  },
  "code": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "44054006",
        "display": "Diabetes mellitus type 2"
      }
    ]
  },
  "clinicalStatus": "active",
  "verificationStatus": "confirmed"
}
```
