You should have access to Power Apps, a FHIR server, and an understanding of how FHIR data is formatted before you begin this tutorial. Several other pre-requisites for our FHIR data connection can also be found here.
FHIR objects or rather JSON formatted data is one of the preeminent methods in passing data between cloud applications and especially so for health care. Setting up a Power App that seamlessly integrates with FHIR objects greatly increases the business value of tools like FHIR.
1. Create a Power App Solution.
In this example we have created several buttons, labels, and text inputs. They will eventually be the parameters that we pass to our FHIRPower client.
2. Connect FHIRPower to your Solution.
For more information on how to set up this custom connector from scratch please see the HLS Emerging Opportunities Github repository and Power Apps custom connectors. For those of you who would like to use the pre-built solution I have attached it to the blog post. This is a custom built connector that has been exported as a solution to work in your native environment.
Save your solution. Download the attached file and navigate to the Solutions section on the right-hand-side menu. You will want to import the file that was attached here.
Now go back to your original solution and click Edit. At the top you will see a button to Add Existing. Under Automation click Custom Connector and search for FHIRPower. If the search feature is slow or returns nothing you will have to manually search but don’t worry it is alphabetically sorted.
3. Go back to the solution page and in data connections add the custom connector that was added in Step 2.
After authentication your data connection panel should look like the following:
4. Now we will want to give functionality to our submit button from Step 1.
I have changed the names of the label, buttons, and input fields to make the button’s OnSelect property maintainable.
If you are unable to see new records in your FHIR server check the formatting of the above property or make sure that your FHIR server is either in the same environment or another environment that you also have access to use.
In our example we are creating a patient, but any of the available functions for FHIRPower would be just as suitable to use in this scenario as well. For specifics on how to pass them data or view their output refer back to the repository written by Microsoft’s Emerging Opportunities team. This was a good example of the custom data connection FHIRPower and the creation of new patient records in FHIR.