# HL7v2 Test Cases Instructions

{% file src="/files/SBfIAxaOw2chl1caA8Zc" %}

## Pull santempi:

Pull santempi repository from github : <https://github.com/santedb/santempi.git>

## Install docker containers:

Having docker installed, run the following command inside santempi/instant directory where the docker-compose.yml file exists to spin up docker containers.

```
 docker compose -f docker-compose.yml up
```

{% hint style="info" %}
It also can be done by running the "docker-compose.ui.yml" file but the ui component is not necessary here
{% endhint %}

## Get sdbac(santedb admin console) from latest release

Get the latest sdbac release from github: <https://github.com/santedb/santedb-server/releases>

Download the sdbac.zip and extract the files.&#x20;

## Configure santempi instances for pre-conditions setup

1-Run the following commands inside sdbac directory where the sdbac.exe is located or run the sdbac.exe directly.

{% hint style="info" %}
The command prompt should be run in administrative mode
{% endhint %}

```
sdbac
```

2-Insert the credentials for Username and Password.

3-Wait for the system to get ready

![](/files/Ox5tKIGSo8WMLvpsu5pE)

4-Run the following commands:

**To create TEST\_HARNESS application run:**

```
application.add TEST_HARNESS -s TEST_HARNESS
```

**To create TEST\_HARNESS|TEST device run:**

```
device.add TEST_HARNESS|TEST -s TEST_HARNESS
```

**To create TEST identity domain and set the assigned authority to TEST\_HARNESS run:**

```
aa.add -n TEST -o 2.16.840.1.113883.3.72.5.9.1 -u http://ohie.org/test/test -d 'OpenHIE Test Domain' -a TEST_HARNESS
```

![](/files/RvHsOnPZGoj8gtw0KU0q)

## Pull hl7-testing-tool:

Pull hl7-testing-tool from github: <https://github.com/santedb/hl7-testing-tool.git>

## Run hl7-testing-tool:

Run hl7-testing-tool solution with visual studio.

They can be run as an entire test suite or an individual test case or test step.

For a test step to pass all  mandatory assertions and at least one of alternate assertions for the same terserstring must pass.

{% hint style="info" %}
For more information about how the tool works please visit The README section in hl7-testing-tool repository at github: <https://github.com/santedb/hl7-testing-tool/blob/main/README.md>
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.santesuite.org/installation/installation-1/deployment/installing-software/santedb-server/installation-qualification/fhir-interface-validation/mpi-cr-test-cases-for-hl7v2/hl7v2-test-cases-instructions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
