-
Notifications
You must be signed in to change notification settings - Fork 7
Add dataframe columns / Filter Fhir elements by FhirPath #105
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
base: develop
Are you sure you want to change the base?
Conversation
…of certain codesystems)
Mappings format is yet from the ETL point of view f.mappings_fhirpath_to_column = {
"code.coding.where(system = 'http://snomed.info/sct').code": 'code_snomed',
"code.coding.where(system = 'urn:mysystem').code": 'code_mysystem',
} Since fhir paths longer/more difficult to read than the dataframe column names choosen by users maybe it would be easier for users to overview/manage the mappings in the other direction (more from the dataframe/analysis point of view) like f.mappings_column_from_fhirpath = {
'code_snomed': "code.coding.where(system = 'http://snomed.info/sct').code" ,
'code_mysystem': "code.coding.where(system = 'urn:mysystem').code",
} Opinions / proposals for better property name? |
If no other wishes/proposals would change name and direction to f.columns_by_fhirpaths = {
"mycolumnname": "myfhirpath",
...
} |
…_fhirpaths and the mapping direction
…s function in read_bundle_from_file so same code for FHIR Path extraction used by FHIR search and by JSON file import
Further plan:
|
Please mark this as done once completed, so that I can merge this. Thanks! |
It is done for FHIR bundle files and FHIR search, but (like documented in readme) not yet for ndjson (no time next weeks and not sure if first to add quick and dirty (by copying the code parts from fhiry.py) or better but more long term more DRY (but more effort/have to compare the differences between fhiry.py and fhirndjson.py / maybe some architecture discussion for somehow unifying or inheriting or sharing codeparts between fhiry.py and fhirndjson.py maybe by defining a property with maybe (optional) prefix "resource." for json bundles which not used or empty for import of ndjson (i yet didnt use in FHIR context/yet no experience/deeper look on fhirndjson.py) |
I have released a new version with the previous PR. Thanks for the effort! |
Add Pandas dataframe columns / Filter Fhir elements by FhirPath / the Python implementation fhirpath-py (f.e. for easier filtering/analysis of codes of certain/different codesystems)