Internet-Delivered Psychological Treatments
  • Introduction
  • Getting started
    • Tech stack
    • Want to contribute
    • Development process
    • What can you learn from this project?
  • Architecture
    • IDPT architecture
    • Database
  • Interoperability layer
    • Communication
    • Authorization server
  • Team
Powered by GitBook
On this page
  • Prerequisite
  • Getting started
  • Testing Resource server

Was this helpful?

Interoperability layer

How to get started with interoperability?

PreviousDatabaseNextCommunication

Last updated 3 years ago

Was this helpful?

This section contains developers guide for getting started with interoperability layer using HL7 FHIR. Let us dive in without further background. In this section, we discuss how to get started with resource server.

To read more about interoperability layer, please read following articles:

Prerequisite

  • NODEJS: Install latest version of Verify you have node JS installed by running node --version in your terminal (Mac) or Command Line (Windows). We have tested resource server using NODE version 10.24.0.

  • MONGODB: Install mongoDB on your system. . Instructions .

  • NPM or YARN: You can choose either NPM or YARN. During development, we chose yarn.

    • NPM: . For window followt.

    • YARN:

Getting started

Follow the steps below:

  1. Download zip of the latest release of the INTROMAT FHIR project here:. If you are familiar with GitHub, you can clone the repo in your preferred location.

  2. From your favourite command line, navigate to the root folder. If you downloaded the folder inside "download" then navigate to root folder as, cd /downloads/intromat-fhir.

  3. Open entire project in your favourite editor such as ATOM, Sublime, VSCODE. Trust me, there is no preferences.

  4. Now, the first thing is to create .env file. Create a file named .env and provide following variables. You need to get yourMONGODB_URL. NODE_ENV=development MONGODB_URI=YOUR_MONGODB_URL.Assuming you have MONGODB installed on your computer, you will get YOUR_MONGODB_URL once you run the mongo database. For details about URI .

  5. Once you get step 4 correctly. From the root directly install the dependencies. You can do this by npm install or yarnon which you installed.

  6. In order to test resource server alone, you need to disconnect it from authentication server. To do so, simply navigate to src/config.js and comment Auth configuration. The block should look like: // Auth configurations auth: { // name: 'bearer', <-- COMMNTED LINE strategy: smartBearerStrategy({ clientId: process.env.CLIENT_ID, clientSecret: process.env.CLIENT_SECRET, introspectionUrl: process.env.INTROSPECTION_URL, }), passportOptions: { session: false, }, },

  7. Similarly, navigate to src/environment.js and change process.env.SOF_AUTHENTICATION=false. The line should say as follows: if (process.env.NODE_ENV === 'production') { process.env.SOF_AUTHENTICATION = false; process.env.HAS_GRAPHIQL = false; }

  8. Finally, from your command line run yarn start. It should start your resource server. Look for following message as shown in the screenshot below:

Testing Resource server

To test resource server without authentication server, follow these steps:

  1. Make a new request in postman

  2. Make it a GET or POST depending on what operation you are doing (create update and delete being posts and get(single) and get(list) being.)

  3. Go to Body and select GraphQL

  4. Paste one of the example queries into the TEXT box and hit Send

Use HTTP client like Postman . Download and install.

Example CRUDs can be found on the GitHub wiki:

There is only one endpoint when working with GraphQL, in the request URL put:

8. If you are using GET request, you should see the output on POST man. If you are using POST you should see appropriate output saying INSERT/Update is successful. Check if CUD (Create/Update/Delete) was successful or not by installing database client such as MongoDB Compass:

A GraphQL approach to Healthcare Information Exchange with HL7 FHIR
nodeJS.
Instructions for mac is available here
for windows is available here
Follow these instructions for Mac
these instruction se
For mac installation, follow these instructions.
https://github.com/sureshHARDIYA/intromat-fhir
check here
https://www.getpostman.com/
https://github.com/sureshHARDIYA/intromat-fhir/wiki
127.0.0.1:3000/4_0_0/$graphql
https://www.mongodb.com/products/compass.