Unable to get data from bulk API call - hl7-fhir

I am trying to load data in FHIRBASE through a bulk API call.I have used the below command for the same:
fhirbase --host localhost -p 5432 -d fhirbase -U postgres -W postgres --fhir=3.3.0 load -m insert http://localhost:6544/patients
This endpoint 'http://localhost:6544/patients' has json data.
Getting a response:-No Content-Location header was returned by Bulk Data API server.

Thanks for your interest in Fhirbase!
Bulk Data API is not a part of FHIR specification yet. However, there is a draft specification in the working group's GitHub repo: https://github.com/smart-on-fhir/fhir-bulk-data-docs/blob/master/export.md. This page fully describes Bulk Data API requests and responses.
Bulk Data API works asynchronously, which means that a client does not receive the response immediately, as with regular REST endpoints. Instead of that, client initiates (kick-offs) a Bulk Data API request describing data he's interested in. Server responds with 202 Accepted and returns temporary URL in Content-Location header. Client will poll this URL to know if bulk data files are ready or not.
In your case, Fhirbase complains that your Bulk Data endpoint does not return that temporary URL to get current request's status. Without that URL Fhirbase cannot proceed to actual NDJSON files download.

Related

Exist DB XQuery: How to make an HTTP POST Request

Question: How do you make an HTTP POST request to an external service within Exist DB, ideally using just XQuery?
Motivation: I want to take a set of XML documents in Exist DB, and send each to an external server for processing, then I want to receive the result, and store them back in Exist DB.
I can accomplish this with an external script that interacts with the Exist DB REST interface, but I would like to it all within Exist DB and XQuery. Marklogic has a http request function that does POST requests under the xdmp namespace, which seems to accomplish this. Does something similar exist for Exist-DB?
Bonus points if the request body can be sent in JSON format.
eXist-db implements the EXPath HTTP Client specification, which defines a function, http:send-request, that can perform HTTP POST requests.
For sample code, including sending a request body containing JSON, see eXist-db send JSON via POST request using eXPath Http_module.

Trouble using Websockets with Julia

I am trying to connect to an API that uses websockets. I need to do the following:
Connect to the websocket using a given URI
Send a login request
Send a request for the required data stream(s)
Store the returned streamed data in an array for immediate processing (the array will be continually updated while data is streamed)
When finished collecting data, send a logout request
I have a general understanding of websockets, but have never tried to connect to a websocket. I have read through the “documentation” for packages HTTP (which I have used before), WebSockets, and DandelionWebSockets. Each has left me scratching my head trying to understand how to implement the above tasks.
Would someone please help by showing me, line-by-line, how to set up the above tasks and also explain why each line or function is used? (Assume I have the correct URI, login, data, and logout request formats.)

Parse URL returns incorrect response

I have an installation of the Parse Server powered by Bitnami. I have modified the server.js code, and inserted appropriate keys.
My codebase lies on another instance of AWS, and can be accessed by the following URL: http://34.194.238.134:9000/coaches (hitting the URL http://34.194.238.134 takes the website to the https version, so I am using port 9000 so avoid the https conflict)
However, my data does not load. When I inspect the request (which should bring data from the InstructorClass), it hits the correct URL, but the response gives me something from the Parse Dashboard instead of a JSON response.
The Application keys are embedded into the Request Payload, and are set correctly. Not sure what to do...
The issue is likely happening because the requests to Parse in your page are being directed to port 1337 instead of 80. If you retry the POST request you show in the screenshots but targeting port 80, you should get this JSON response:
{"code":102,"error":"Invalid parameter for query: _ApplicationId"}
If you change the request type to GET and include the X-Parse-Application-Id header with the right value, you should get the JSON data of the object as a response. You may test it with the curl command:
curl -H "X-Parse-Application-Id: APP_ID" http://ec2-54-165-212-93.compute-1.amazonaws.com/parse/classes/InstructorClass
Please, don't forget to replace the APP_ID placeholder with the correct value in the previous command.

Query REST API with image data using CURL

I have a RESTful API (built on flask) which has to return JSON after receiving an Image file. So this has to be done through GET request with image data. SO, how do i use CURL to query the REST API on image data through GET request? Which format will it be sent to the server for me to retrieve it?

CodeIgniter send multiple responses to client

Is there any way when the client sends a request to the CodeIgniter server that it can respond with multiple responses?
For example, this can be a file upload to show how the file is processed in the backend.
Can this be done with an ajax request or do I need sockets for this?
EDIT:
Example situation here
I send a data object to the CI backend to be saved. Let's say on the
backend the following functions has to run on this received data
Inspect data to be secure
search for any similar data
Save data
Create a page based on the data
add some default images to this new page
As you see, these functions may take more then 5 seconds to execute.
Do I need a response from the server every time a task from the list above is completed? Does that make sense?
Another example would be when task 1 is complete the server will send a response saying that task 1 has completed. So the user knows that something is going on.

Resources