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

Export extensions to their own fields on analytics print? #35

Open
AlexFragotsis opened this issue Apr 19, 2021 · 2 comments
Open

Export extensions to their own fields on analytics print? #35

AlexFragotsis opened this issue Apr 19, 2021 · 2 comments

Comments

@AlexFragotsis
Copy link

Hello, I'm working with python and I've been trying to figure out if there's a way to make print_fhir_to_json_string_for_analytics export nested extension fields to their own fields. (Currently just creates a list and adds just the extension URLs inside)
I thought that If I created a custom profile and defined my extensions there it would work but it still doesn't.

@nickgeorge
Copy link
Collaborator

Hi Alex - Your understanding is totally correct about the relationship between extensions in analytics and profiles, and I'm glad to hear that you were able to create a custom profile.

There is one final piece to the puzzle, and that is to take data in Unprofiled FHIR and convert it into your new profile prior to printing. Unfortunately, the profile conversion API only exists in C++ right now. Really sorry about that - it's high on our priority list to implement it in python but I'm not confident enough to give an estimate of when right now. Is doing this in C++ an option for you? if so, take a look at the ConvertToProfileR4 api, with an Example usage that converts to the UsCore profile.

Once you have the data in a profiled proto, you can print for analytics, and any profiled extensions will show up as you expect them to.

@AlexFragotsis
Copy link
Author

Oh ok, thank you @nickgeorge it's great to hear that it's on your plan to implement that. Unfortunately, I don't have the option to use c++ right now.
I've implemented my own custom function to transform FHIR objects to analytics before I found out about the custom profiles and how they work so I think I'm going to stick with that for now.
Thanks a lot for the quick response, looking forward for the implementation! 🙏🙏🙏

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

No branches or pull requests

2 participants