GitHub Integration
Authentication
The import and export screens both contain options for GitHub. As soon as the GitHub option is selected in either screen, you are prompted to login with your GitHub credentials. Once logged in, your GitHub authentication token is stored in cookies so that you do not have to login every time you select "GitHub" under the import/export screens.
After you have logged into GitHub, a GitHub icon appears in the top-right corner of the all screens. When clicked, this icon logs you out of GitHub within ToF.
ToF uses a pop-up window to authenticate with GitHub. If your browser blocks the pop-up window, ToF will not be able to authenticate with GitHub and you will receive an error.
NOTE: If you select "Remember Me" when logging into GitHub, and want to change to a different GitHub user, you will need to open github.com in a separate window and logout of your GitHub account, then have ToF forget the GitHub login using the GitHub icon mentioned above. Once this is done, when you attempt to login to GitHub via ToF, it will ask you which account you would like to use with GitHub.
Work Flow
The work flow within ToF for GitHub is to
- Import resources from a GitHub repository into the selected FHIR server
- Edit the resources using ToF
- Export the resources back to the GitHub repository after they have the desired changes
Extensions
When importing resources, two extensions are added to each resource representing the location within GitHub for where the resource came from. This enables ToF to know where in GItHub to export the resources back to.
If you are exporting new resources to GitHub, these extensions will not yet exist and you will need to specify where the resources should be stored during the export (which will create the two extensions on the resource).
Limitations
- Trifolia only exports the individual resources associated with the implementation guide, and does not include the entire IG Publication package. For example, the "framework" (html templates) folder is not included in the export.
- Trifolia only allows importing FHIR resources. Trifolia-on-FHIR allows the user to select any JSON or XML file from GitHub. If the user selects an XML or JSON file that is not a FHIR resource, the import will fail.
- GitHub does not allow retrieving/updating very large files. For example, if attempting to import/export a large ValueSet resource, GitHub may fail with a "Payload too large" error.
Signing Out
When you sign out of GitHub within Trifolia, this clears your GitHub session only within Trifolia. GitHub maintains its own session within your browser. To sign out of GitHub entirely, you will need to go to github.com and click "Sign out".