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

Draft attempt at ingestion using mapping file #24

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

pipliggins
Copy link
Collaborator

@pipliggins pipliggins commented May 8, 2024

Reads data into class then back out again

@codecov-commenter

This comment was marked as outdated.

- Reads data into class then back out again, probably not very efficient.
- Not tested with multiple rows of input data
- Can't cope with multiple columns trying to set the same variable (need logic in mapping file for this)
Copy link
Contributor

@abhidg abhidg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Few minor typos

fhirflat/__init__.py Outdated Show resolved Hide resolved
fhirflat/flat2fhir.py Outdated Show resolved Hide resolved
fhirflat/ingest.py Show resolved Hide resolved
fhirflat/ingest.py Outdated Show resolved Hide resolved
fhirflat/ingest.py Outdated Show resolved Hide resolved
fhirflat/ingest.py Outdated Show resolved Hide resolved
fhirflat/resources/base.py Outdated Show resolved Hide resolved
fhirflat/resources/base.py Outdated Show resolved Hide resolved
fhirflat/resources/base.py Show resolved Hide resolved
fhirflat/ingest.py Outdated Show resolved Hide resolved
@abhidg abhidg linked an issue May 20, 2024 that may be closed by this pull request
@pipliggins pipliggins marked this pull request as ready for review May 22, 2024 15:18
@pipliggins pipliggins requested a review from abhidg May 22, 2024 15:18
codes = [old_dict[name + ".system"] + "|" + formatted_code]
else:
formatted_code = [
c if isinstance(c, str) else str(int(c)) for c in raw_codes
Copy link
Contributor

@abhidg abhidg May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that leading 0s in codes are not significant - is that true? (probably, but good to make sure, and document elsewhere)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, not sure about this - I don't think I've seen codes with leading 0's but that doesn't mean they don't exist

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sadiekelly have you seen any codes starting with leading 0s?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I haven't, none of the codes I've used so far begin with a zero. I've not been able to find anything that definitively says codes do not start with a zero, but it seems like a fair assumption to make from what we currently are using. I'll keep an eye out for any codes that do have leading zeros.

fhirflat/flat2fhir.py Show resolved Hide resolved
fhirflat/resources/extensions.py Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

Turn into Python package
4 participants