We are trying to include OpenHIM in an environment where they preferably use Docker. After talking with a few folks from Jembi we were able to locate a docker compose file for the basic OpenHIM install with
openhim-core and openhim-console.
But we need to include a couple mediators as well in the install. I am pretty new to docker and have only conceptual knowledge. After discussing with people working with Docker and giving a brief idea of how
a mediator and openhim core work their suggestion was to use Volumes in docker compose to copy mediator files (usually stored in /usr/share/ and available in github) and a separate volume for implementation specific scripts or resources like shell scripts
(one of the mediator we are using is the Shell script mediator).
I am reaching out to see if anyone in the community have experience with dockerizing mediators or have an idea/best practice examples for this architecture(OpenHIM/Mediators) or how a similar example in docker
would be.
— Thanks and Regards,
**Sri Maurya Kummamuru |Systems Engineer
Tel 317-640-2458 | Skype srimaurya23
1101 West Tenth Street
Indianapolis, IN 46202
Web and email addresses, and phone numbers will remain the same.
Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely
for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making
further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not sufficient
for this purpose.
If you have received this message in error, please notify the sender by return e-mail and delete the original message. Any retention, disclosure, copying, distribution
or use of this information by anyone other than the intended recipient is strictly prohibited.
Hello @maurya , At openmrs with PLIR andHAPI fHIR we are trying to implement such kind of work, Am also facing this scenario setting up docker environments for openhim mediators,Did you finally succeed with this, is there any documentation that you can share please thanks
Hi, We ended up going another route of implementing openhim and its mediators using Ansible roles. There isn’t any documentation and the code is in private repos but this is an example ansible role of how you can deploy the mediators. You need to tweak them to work for your environment or use case. Also, this can be used as a reference of what you need to do to implement in docker -
Thanks @mattdickie for sharing that @sharfspace We’ve started Dockerizing new mediators that we develop, with the Mapping Mediator an example of the approach taken. The Mapping Mediator has been developed as a generic mediator that supports data validation, mapping, and orchestration, and is intended to be adapted based on specific use cases. More details are available here:
Thanks so much @mattdickie , for your response , will surely follow the vedio however it seems its specifically using node js for creating mediator mappings we are looking at a use case of creating a java mediator use scenarios thanks will keep you up to date of findings
I’m new to OpenHIM/OpenHIE and currently working on a project involving OpenMRS. We’re trying to develop a FHIR profile for a patient’s clinical note. During the installation of a scaffold mediator, I encountered an error. I would greatly appreciate any assistance or suggestions on how to resolve this. Thank you!
=> ERROR [4/4] RUN npm install 257.3s
------
> [4/4] RUN npm install:
1.356 npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
132.4 npm WARN newproject@1.0.0 No description
132.4 npm WARN newproject@1.0.0 No repository field.
132.4
132.4 npm ERR! code EAI_AGAIN
132.4 npm ERR! errno EAI_AGAIN
132.4 npm ERR! request to https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
257.3
257.3 npm ERR! A complete log of this run can be found in:
257.3 npm ERR! /root/.npm/_logs/2024-03-05T10_19_16_053Z-debug.log
------
Dockerfile:6
--------------------
4 | COPY . /app
5 |
6 | >>> RUN npm install
7 |
8 | CMD npm start
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1
santosh@santosh-ThinkPad-T14-Gen-1:~/newproject$
However, during the installation of scaffold mediator, I got another error:
> openhim-bootstrap-mediator@1.0.0 start /app
> babel-node index.js
/app/node_modules/axios/index.js:1
import axios from './lib/axios.js';
^^^^^
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Module._compile (/app/node_modules/pirates/lib/index.js:117:24)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.newLoader [as .js] (/app/node_modules/pirates/lib/index.js:121:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/app/node_modules/openhim-mediator-utils/auth.js:3:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openhim-bootstrap-mediator@1.0.0 start: `babel-node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openhim-bootstrap-mediator@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-03-07T18_49_22_109Z-debug.log
Does anyone have a solution to this? Any suggestion will be helpful, Thank you
cc @tmkmart@daniel.futerman