Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace/suppress packages on matchbox-server #320

Open
mahieuecd opened this issue Dec 12, 2024 · 1 comment
Open

Replace/suppress packages on matchbox-server #320

mahieuecd opened this issue Dec 12, 2024 · 1 comment

Comments

@mahieuecd
Copy link

Hello,

The APHP (Assistance Publique Hôpitaux de Paris) data teams are using matchbox project through its engine part to develop a tool that can perform a validation and transformation step on top of the FHIR Mapping Langage file as a Visual Studio Code extension.

One of the remaining challenges for us is to completely manage the packages installed on the matchbox-server using API requests.

Our problem is to replace or suppress a package loaded on the matchbox-server using the API request without the need of changing the package version or completely kill and recreate the server as the server seems to keep a package and its version in memory.

Is it something you already know, working on or maybe developed a solution for?

Thank you

@qligier
Copy link
Member

qligier commented Dec 13, 2024

Hi!

So you are trying to update a package installed on Matchbox with a new NPM content, but the same version (e.g. for a dev/ci-build version)?

To accomplish that, you could:

  1. Uninstall the ImplementationGuide from the database by using the REST API: DELETE /fhir/ImplementationGuide/id
  2. Reinstall it in the database by providing the content of the NPM package to the $install-npm-package operation: POST /fhir/$install-npm-package (see https://ahdis.github.io/matchbox/matchbox-server/#install-npm-package)

We could probably improve Matchbox to support updating the package if it already exists in the $install-npm-package operation.

Then, you need to reload the IG in the engine. The way to do it depends on your Matchbox version, and your configuration (especially the httpReadOnly and onlyOneEngine flags).

I recently wrote a bit of documentation about the handling of packages in Matchbox (e.g. the difference between installing a package in the server, vs loading a package in the engine): https://ahdis.github.io/matchbox/packages/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants