Knowledge Base
Testing phiQuery Implementation Using HealthToGo Sandbox
To verify that an implementer’s phiQuery instance can respond to 3rd party client requests, EMR Direct developers may use the HealthToGo Sandbox test harness. HealthToGo uses the open API documentation to connect to a data source’s database to extract data. Third party client app developers will also use that same documentation to implement their own apps like HealthToGo. There are "show raw data" links within HealthToGo that assist the developer in demonstrating to the proctor that phiQuery is serving up FHIR resources according to the documentation at the link above. It is up to the developer to create a test user(s) within their system for use in testing. The developer can authenticate the test user(s) in HealthToGo Sandbox at the link provided during phiQuery Developer registration:
https://www.emrdirect.com/healthtogo/healthtogo?datasource=[datasource-name]
and request data from the API using that client. The developer can also use this URL so that they can demonstrate the functionality the public API to the proctor during certification testing. To launch the client app, the URL MUST end in “?datasource=[datasource-name]," or it will not connect to the developer’s system.
Launching the client app with the above URL ending in "?datasource=[datasource-name]", will connect the client application to that data source’s database through the Interoperability Engine software using the FHIR Open API at the following URL that is specific to the developer’s system:
https://sandbox.interopengine.com:8181/fhir/stu3/[datasource-name]/
The URL immediately above is a FHIR endpoint URL that is connected to the developer’s test system’s database. It is not a website that serves HTML for a regular browser like Chrome; instead, it is intended to be accessed by a FHIR client that is following the Open API documentation for 3rd party client application developers, just like the HealthToGo test client app does.
The developer can see the FHIR requests sent to the API server by the test client app and the responses returned by the API server by clicking the "Show Raw Data" button that appears after the human readable table of results is displayed. For example, if one requested Medications for patient #1001 with the test client, one would see something like:
FHIR request sent to server:
Security: TLS; Method: GET
https://sandbox.interopengine.com:8181/fhir/stu3/[datasource-name]/MedicationStatement?patient=1001
This is the RESTful call to the FHIR URL constructed by the test client app using the base URL that is unique for the test system and the FHIR specific query information as per the Open API documentation, so that the proctor can see that the public API server responds as expected to a properly constructed query URL.
After clicking "Show Raw Data", once can view the raw FHIR JSON result that was returned by the API to the test client app just below the human readable table. The test client formats this JSON data into a more friendly human readable form so the developer can envision how a production app might render the data, but the "raw data" is what the proctor wants to see in order to document that the public API is returning FHIR resources as per the Open API documentation.
Did this article answer your question? If not, please contact us.