aktin / aktin/dwh-import

`generic-file-importer`: Server should define sourcesystem value

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
XSLT
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Issue relates to the data import module using Python scripts. Currently, both server and Python script must independently construct the `sourcesystem_cd` using the same algorithm, which can lead to inconsistencies.

Currently, `sourcesystem_cd` is built from various components:
- Script ID
- Script version
- File UUID
- etc.

The server uses this identifier to delete imported data from database. Rows are identified by combination of `encounter_id` and `sourcesystem_cd`

**Problem**:
* Both Python script and server must use identical algorithm to build `sourcesystem_cd`
* If they don't match, data deletion becomes impossible (except directly via database)

**Proposed solution**:
* Server generates `sourcesystem_cd` for each imported file
* Store in existing `properties`
* Pass `sourcesystem_cd` to script as environment variable (similar to other server information)
* Remove algorithm responsibility from Python script
* Eliminate potential discrepancies in identifier generation

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.