Questions tagged [hapi]

HAPI (HL7 application programming interface; pronounced "happy") is an open-source, object-oriented HL7 2.x parser for Java.

HAPI (HL7 application programming interface; pronounced "happy") is an open-source, object-oriented HL7 2.x parser for Java.

HL7 is a widely-used standard for electronic data exchange in the clinical and healthcare domain.

Useful links

406 questions
0
votes
1 answer

Hapi unknown authentication strategy jwt

I'm getting the error Hapi unknown authentication strategy jwt but I'm not sure why. I'm certain I've probably set something up wrong but here's my server index.js: Should i be using a different auth strategy? Also stackoverflow won't let me submit…
0
votes
0 answers

How to write hapi code for a specific local URL

I am presently using HAPI FHIR server for implementation. Presently I have HAPI code for below AND Query which is working fine. http://127.0.0.1:8080/hapi-fhir-jpaserver/fhir/Organization?name=SIMPLY&address=SIMPLY Bundle bundle =…
Shriya
  • 21
  • 2
0
votes
1 answer

Sanitization with JOI 10.2 (extend()?)

JOI 10 is used to validate calls against an API. I now want to sanitize many (but not all) of the strings that are contained in the JSONs before validating them, namely filter out certain characters. I know that this would be an easy task with a…
gizarmaluke
  • 55
  • 1
  • 6
0
votes
0 answers

Get an error: missing authentication using hapi-auth-jwt2

this my routes code const Joi = require('joi') const handler = require('../handler/get-request') const route = { method: 'POST', path: '/IB', options: { tags: ['api', 'IB', 'request'], description: 'Request New User IB', notes:…
0
votes
1 answer

Why does Hapi not listen on a port?

I have a new DigitalOcean Droplet, and have followed this tutorial to install Node: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04 I create a test application in index.js as per…
matt9292
  • 401
  • 2
  • 7
  • 19
0
votes
1 answer

How do I unit test logic in a Hapi 'onPreResponse' callback function using Jest?

How do I unit test logic in a Hapi 'onPreResponse' callback function using Jest? I am seeking 100% code coverage, but this "if" path below isn't hit. Code to test: module.exports = { async initialize() { const server = await…
CodeDreamer68
  • 420
  • 5
  • 10
0
votes
1 answer

How to return results from MySQL in HAPI

I'm new to Node and HAPI and am working through tutorials on a basic CRUD API. I am trying to do a simple SQL query to retrieve a few rows out of the database and return the data in the request. // routes.js 'use strict'; const Path =…
Patrick
  • 3,142
  • 4
  • 31
  • 46
0
votes
0 answers

Setting and Getting of Values using Scala Reflection

I have a patient resource of below type: val p:Patient = new Patient which comes under below package: import org.hl7.fhir.r4.model.Patient Now, I want to set some value for it like one ID attribute with value like example and when I try…
whatsinthename
  • 1,828
  • 20
  • 59
0
votes
1 answer

How can a determine if a plugin has been registered or not, given a HapiJS server object?

I have code that loads a plugin dynamically based on environment. Because I am using jest --coverage, and 100% coverage is required, I need to test if the plugin was loaded or not given the environment conditions set in the NODE_ENV. All I am…
CodeDreamer68
  • 420
  • 5
  • 10
0
votes
1 answer

Can I use an enum for a JOi schema property name

Is it possible to use an enum for the property names of a Joi schema? For example, given the following string-constants.enum.js file: export default { INPUT_BUSINESS_NAME: 'business-name', INPUT_ADDRESS_LINE_1: 'address-line-1' //…
Nick Roper
  • 127
  • 1
  • 3
  • 13
0
votes
2 answers

Can we update any fhir resource on the basis of patient id?

I am trying to update Encounter resource on the basis of patient id but it is only creating one new record of Encounter rather than updating the existing one. But if i try to update Encounter on the basis of identifier i.e. unique value representing…
0
votes
1 answer

How to post a form data with array to an API with Joi array validation

I created a Hapi API which only allows multipart/form-data because I need to pass an image stream and one of the payloads is required as an array, so I use Joi.array to validate it. payload: { parse: true, maxBytes: 20971520, output:…
0
votes
1 answer

Hapi response doesn't show tree-like (nested) json

Ok, so I have an object that has the following structure: interface FolderWithContent { uuid: string name: string; folders: Array; files: Array; } Where Files is an extension of Sequelize.Model. And I'm…
Icaro Mota
  • 912
  • 1
  • 12
  • 20
0
votes
1 answer

HAPI - How to stop SimpleServer correctly and prevent further connections

I am building an application with several server and client HL7 connections managed by a CommunicationProcess class. Part of the application's functionality is to restart that process when new connections are added. Client connections do not pose…
Martin
  • 1,977
  • 5
  • 30
  • 67
0
votes
1 answer

Can we update a bundle in FHIR?

I am trying to update one resource but the request body is bundle. I have tried to update by sending following combinations of URL: resource_type/resource_identifier and bundle/bundle_identifier and bundle/resource_type/resource_identifier. but none…