generated from PrivateAIM/python-template
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: fhir to csv improvements #17
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
289f5c5
feat: rename result files
Nightknight3000 32e6eca
feat: add progress tracking
Nightknight3000 1b62e69
fix: append UUID to result file names for uniqueness
antidodo 5ee1639
fix: append UUID to result file names for uniqueness
antidodo b6a2f38
fix: correct string formatting in result file naming
antidodo 6c8b37e
fix: call get_progress method to retrieve current progress status
antidodo 0d35aff
feat: set runstatus to finished and push final log
Nightknight3000 9c32142
fix: tiny logic change for progress
Nightknight3000 725ab40
feat: move progress to log streaming and remove from status health
Nightknight3000 71ada9d
fix: temporarely comment out progress stream
Nightknight3000 8d8936b
Merge branch 'main' into canary
Nightknight3000 2a9b73f
fix: missing progress on log stream
Nightknight3000 e493788
fix: add control print to error in log stream
Nightknight3000 ff820c8
fix: add control print to error in log stream
Nightknight3000 cdd9bc8
refactor: remove log tails
Nightknight3000 f0d1b3c
refactor: remove control prints
Nightknight3000 9e2a264
refactor: enhance send/receive msg logs
Nightknight3000 9b2baf3
fix: delete message_by_id
Nightknight3000 6bb7cd2
fix: log error in msgbroker
Nightknight3000 0477e5c
refactor: remove control print
Nightknight3000 399215c
refactor: linebreaks for readability
Nightknight3000 4c47d62
feat: small revision of data retrieval logic
Nightknight3000 4b6f2cd
fix: add debug prints for finished check status and main thread activity
antidodo e2f5fa8
Merge remote-tracking branch 'origin/canary' into canary
antidodo c245392
refactor: remove todos
Nightknight3000 4f7e170
Merge branch 'main' into canary
Nightknight3000 08d990d
fix: improve logging and refactor key sequence handling in FHIR to CS…
antidodo 8de9e1b
feat: move keys split out of the loop
antidodo 51bb89e
refactor: remove debug print statements from finished check method
antidodo ad156fa
Merge branch 'canary' into fhir_to_csv
antidodo db553c7
refactor: remove warning msg in fhir-to-csv
Nightknight3000 ec82896
Merge remote-tracking branch 'origin/fhir_to_csv' into fhir_to_csv
Nightknight3000 aae3672
refactor: remove warning msg in fhir-to-csv
Nightknight3000 d8b574a
feat: enhance logging behaviour in fhir-to-ccsv
Nightknight3000 6cd922d
feat: reduce dict_to_csv complexity
Nightknight3000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Row IDs for QuestionnaireResponse can collide across pages.
Using the per-page
iindex resets on each paged batch, so later pages can overwrite earlier rows for the same column. Use a stable row key (e.g.,current_countor resource id).🛠️ Proposed fix
for i, entry in enumerate(fhir_data['entry']): current_count += 1 @@ - elif input_resource == 'QuestionnaireResponse': - for item in entry['resource']['item']: + elif input_resource == 'QuestionnaireResponse': + row_key = str(entry.get("resource", {}).get("id", current_count)) + for item in entry['resource']['item']: @@ - df_dict[col_id][str(i)] = value + df_dict[col_id][row_key] = value📝 Committable suggestion
🤖 Prompt for AI Agents