Bulk upload implementation guideline #1399
Replies: 2 comments
-
TODO:
|
Beta Was this translation helpful? Give feedback.
-
Update to the Non-goals for this initial scope
Update:Lessons learnt from an attempt at using the proposed solution
One of the goals of this feature was to eventually have this shipped as a single service, possibly use a single image to house it alongside existing web features.
I know think the scope of the feature is not huge enough to warrant using temporal despite its very impressive out of the box capabilities. |
Beta Was this translation helpful? Give feedback.
-
Introduction
We have previously had a discussion on how to do bulk uploads on the web. This was done and finalized on this thread. The decision made was that we would integrate the importer script into fhir-web’s backend. This document attempts to further that discussion into how we can technically achieve this. We will explore the 2 top alternatives and make a recommendation. The options we currently have are:
Definition
Keywords
Feature overview
FHIR Web Frontend
FHIR Web Backend
git remote add -f fhir-tooling https://github.com/onaio/fhir-tooling git merge -s ours --no-commit --allow-unrelated-histories fhir-tooling/main git read-tree --prefix=submodules/fhir-tooling/ -u fhir-tooling/main:importer git commit -m "Merge importer subfolder into fhir-tooling" git push origin main
Importer Script
Hapi FHIR server
Architecture and Design
Frontend mockups
Backend implementation Arch.
1. Temporal approach
Prepping environment
Development
tempral server start-dev
Production
Persistence
The persistence layer for this approach can be done either by use of a postgres database or the lightweight but ephemeral alternative Sqlite.
My recommendation is to go with the Sqlite option for now and provision the db later once scalability, and reliability of the workflows becomes a concern.
For both storage approaches; The application will save the workflow information to the FHIR server as tasks.
Security
The import feature will require an active logged in user session. The Logged-in user should also have the required roles that allow for updating the respective resources i.e. For a user to upload resources they should have the
POST_LOCATION
role. Furthermore the express API will serve as the only proxy to the embedded temporal service.We could consider the option of adding a proxy to the temporal UI for more detailed view of the running workflows but I can consider this out of scope for now.
In addition to the roles that correspond to the upload resource types, there are 2 additional roles that a user should have so that requests to save the workflows as tasks to the fhir server are successful i.e.
PUT_TASK
,POST_TASK
,POST_DOCUMENTREFERENCE
,PUT_DOCUMENTREFERENCE
.Areas of new development
Tentative Timelines
Web ui development: - 1 week
Web express backend update - 3 days
Importer script update - TBD
Configuration and Customization
TroubleShooting
Perfomance
Monitoring and logging
Documentation updates.
2. Bull MQ & Redis
Prepping environment
Development
Production
Persistence
This approach makes use of redis to store workflow data as well as metadata regarding the job queue. Redis is required in this option whether working in dev or production.
In this approach as well; The application will save the workflows to the FHIR server as tasks.
Security
The import feature will require an active logged in user session. The Logged-in user should also have the required roles that allow for updating the respective resources i.e. For a user to upload resources they should have the
POST_LOCATION
role. Furthermore the express API will serve as the only proxy to the embedded temporal service.In addition to the roles that correspond to the upload resource types, there are 2 additional roles that a user should have so that requests to save the workflows as tasks to the fhir server are successful i.e.
PUT_TASK
,POST_TASK
,POST_DOCUMENTREFERENCE
,PUT_DOCUMENTREFERENCE
.Areas of new development
Tentative Timelines
Web ui development: - 1 week
Web express backend update - 2 week
Importer script update - TBD but less than in the temporal option
Configuration and Customization
TroubleShooting
Perfomance
Monitoring and logging
Documentation updates.
Summary
I think so far temporal is the winner, since it provides a feature rich set of functionalities that we would have to think about and possibly implement by ourselves in the approach 2. Temporal's rich feature set however can be a disadvantage since we will include functionality that we do not need and thus bloat our environments with a possibly over-engineered solution. In addition, the importer script core team feels strongly that temporal would fit into the importer offering quite nicely especially in the scenario where someone might want to use the tool directly without having to setup a fhir-web instance.
#TODO:
Add data flow diagrams that flesh out api interactions for both approaches. we can do a sequence diagram or several flow diagrams. one for each scenario.
Beta Was this translation helpful? Give feedback.
All reactions