To add the HAPI library to QIE:
1. System Administration
2. System Configuration
3. Manage External Libraries

----------------------------------------------------------------------------
----------------------------------------------------------------------------
From here, you can download the HAPI library version from a list of available versions.

----------------------------------------------------------------------------
----------------------------------------------------------------------------
Below is an example of creating a FHIR Account using the HAPI functions:
var account = new hapi.r4.Account();
account.setId("exampleAccount");
account.addIdentifier().setValue("654321").setSystem("urn:oid:0.1.2.3.4.5.6.7");
account.setStatus(hapi.r4.Account.AccountStatus.ACTIVE);
var ctx = hapi.context.getR4FhirContext();
// Instantiate a new JSON parser
var parser= ctx.newJsonParser();
parser.setPrettyPrint(true);
// Serialize it
var accountString = parser.encodeResourceToString(account);
message = qie.createJSONMessage(accountString, 'UTF-8');
----------------------------------------------------------------------------
----------------------------------------------------------------------------
You can find more information about the HAPI resources on the HAPI website:
https://hapifhir.io/hapi-fhir/docs/