# Inferno Test-Suite US Core 3.1.1

{% hint style="warning" %}
This page is related to Aidbox project configuration.

Since the 2405 release, using Aidbox in FHIR schema validation engine is recommended, which is incompatible with zen or Entity/Attribute options.

[Setup Aidbox with FHIR Schema validation engine](broken-reference/)
{% endhint %}

In this tutorial we will guide you how to setup Aidbox US Core FHIR Implementation Guide and pass Inferno US Core 3.1.1 confromance tests.

## Setup Aidbox with US Core IG version 3.1.1 with prebuilt Aidbox config

To correctly set up Aidbox, we'll utilize the Aidbox configuration projects.

There's an [existing guide](broken-reference/) for this process. Adhere to this guide, but note a variation when you reach the `Configure the Aidbox` step: instead of using the recommended configuration projects (R4,R4B,R5,etc.) — clone this specific project:

```bash
git clone \
  --branch=us-core-3.1.1 \
  --depth=1 \
  https://github.com/Aidbox/aidbox-project-template.git \
  aidbox-project && \
  cd aidbox-project && \
  rm -rf .git
```

The git template project contains US Core version 3.1.1 FHIR IG preconfigured via .env file.

{% hint style="info" %}
If you already have a running Aidbox instance, please refer to the following guide:
{% endhint %}

{% content-ref url="../../../../tutorials/artifact-registry-tutorials/upload-fhir-implementation-guide/" %}
[upload-fhir-implementation-guide](../../../../tutorials/artifact-registry-tutorials/upload-fhir-implementation-guide/)
{% endcontent-ref %}

## Uploading test data samples

{% code lineNumbers="true" %}
```yaml
POST /rpc
content-type: text/yaml
accept: text/yaml

method: aidbox.bulk/import-start
params:
  on-conflict: update
  id_prefix: app1
  format: fhir
  meta: {source: app1}
  input:
  - {url: 'https://storage.googleapis.com/samurai-public/inf-ts.ndjson.gz'}
```
{% endcode %}

The link in `input.url` points to an archive containing data samples generated by Synthea. Inside, you'll find two Patient resources and numerous other resources, such as Observations and Encounters, related to these two patients.

## Obtaining OAuth credentials

To obtain OAuth credentials, please refer to this [video guide](../../../../tutorials/security-access-control-tutorials/client-credentials-grant.md#auth-sandbox). Keep obtained access token for the following steps.

## (Optional) Forwarding your local Aidbox deployment to the public web

This step is optional and only necessary if you want to test a local Aidbox deployment running on your machine. For this purpose, you can use the public, free SSH tunnel forwarder localhost.run.

Run the following command:

`ssh -R 80:localhost:<aidbox-port> nokey@localhost.run`

In the returned output, look for the link:

```
... tunneled with tls termination, <link to your Aidbox exposed to the public web>
```

## Setting up Inferno US Core 3.1.1 Test Suit

In the test tree, click on the `"US Core FHIR API"` test. Then, click on the `"Run All Tests"` button and provide the following information:

1. **FHIR Endpoint (required)**: Enter the Aidbox link with the added suffix `/fhir` (e.g., `https://my.aidbox/fhir`, where the base link is `https://my.aidbox` and the suffix is `/fhir`).
2. **OAuth Credentials, Access Token**: Insert the Access Token obtained earlier.
3. **Patient IDs**: The patients in the test suite bundle have the following IDs: `d831ec91-c7a3-4a61-9312-7ff0c4a32134,e91975f5-9445-c11f-cabf-c3c6dae161f2` just copy and insert this substring.

After entering this information, simply run the tests by pressing the "submit" button.
