-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This integrates with https://github.com/brianpos/smart-on-fhir. It is a Windows app acting as a EHR to launch SMART Apps. The only thing I had to do to get it to run on my Windows 11 box was to add the following binding redirect: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.8.0.0" newVersion="4.8.0.0" /> </dependentAssembly> </assemblyBinding> </assemblyBinding> Then in UdapEd I created a launchBP.razor page as the main launch. In the "SmartSession from.well - known / smart - configuration" section click the CONTINUE TO AUTHORIZE button to get an access code. Then click the REQUEST TOKEN button to get an access token. The token is placed in your user session so you can use it in the Patient Search Page. But because the PatientSearch searches from the backend rather than WASM you can't use the https://fhir.test.localhost URL. But you can use the one auto generated at startup based on port. You will it in the bottom status area when the EHRApp starts up.
- Loading branch information
1 parent
59b5fb3
commit 9a1726a
Showing
19 changed files
with
681 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@page "/smart/launch" | ||
@using Microsoft.IdentityModel.Tokens | ||
@using UdapEd.Shared.Extensions | ||
@using UdapEd.Shared.Model.Smart | ||
@using UdapEd.Shared.Services | ||
@using UdapEd.Shared.Services.Http | ||
@using Microsoft.AspNetCore.WebUtilities | ||
|
||
|
||
|
||
|
||
<MudExpansionPanels MultiExpansion="true"> | ||
<MudExpansionPanel Text="Metadata"> | ||
<pre>@Metadata</pre> | ||
</MudExpansionPanel> | ||
<MudExpansionPanel Text=".well-known/smart-configuration"> | ||
<pre>@SmartMetadata</pre> | ||
</MudExpansionPanel> | ||
</MudExpansionPanels> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@page "/smart/launchBP" | ||
@using UdapEd.Shared.Model.Smart | ||
@using Microsoft.IdentityModel.Tokens | ||
|
||
|
||
@if (string.IsNullOrEmpty(@AuthCode)) | ||
{ | ||
<MudExpansionPanels MultiExpansion="true"> | ||
<MudExpansionPanel Text="SmartSession from CapabiliSmartSessionMetadataent"> | ||
<pre>@SmartSessionCapabilityStatement</pre> | ||
<MudExpansionPanels MultiExpansion="true"> | ||
<MudExpansionPanel Text="CapabilityStatement" class="mud-info"> | ||
<pre>@CapabilityStatement</pre> | ||
</MudExpansionPanel> | ||
</MudExpansionPanels> | ||
</MudExpansionPanel> | ||
<MudExpansionPanel Text="SmartSession from.well - known / smart - configuration"> | ||
<pre>@SmartSessionWellknownMetadata</pre> | ||
<MudButton OnClick="SmartAuth">Continue to Authorize</MudButton> | ||
<MudExpansionPanels MultiExpansion="true"> | ||
<MudExpansionPanel Text=".well - known / smart - configuration" class="mud-info"> | ||
<pre>@SmartMetadata</pre> | ||
</MudExpansionPanel> | ||
</MudExpansionPanels> | ||
</MudExpansionPanel> | ||
</MudExpansionPanels> | ||
} | ||
else | ||
{ | ||
<MudCard Class="mud-typography-h5"> | ||
<MudCardHeader Class="bold">Smart Auth Code</MudCardHeader> | ||
<MudCardContent> | ||
<MudIcon Icon="@Icons.Material.Filled.Code" Class=""><MudSpacer /></MudIcon><MudText Class="d-inline">Code: @AuthCode</MudText> | ||
<MudSpacer /> | ||
<MudIcon Icon="@Icons.Material.Filled.Key" Class=""><MudSpacer /></MudIcon><MudText Class="d-inline">State: @StateCode</MudText> | ||
</MudCardContent> | ||
<MudCardActions><MudButton OnClick="RequestToken">Request Token</MudButton> </MudCardActions> | ||
|
||
@if (!Token.IsNullOrEmpty()) | ||
{ | ||
<MudCardHeader Class="bold">Access Token</MudCardHeader> | ||
<MudCardContent> | ||
<MudIcon Icon="@Icons.Material.Filled.Token"><MudSpacer/></MudIcon><MudText Class="d-inline">Token:</MudText> | ||
<MudSpacer/> | ||
<pre>@Token</pre> | ||
</MudCardContent> | ||
} | ||
</MudCard> | ||
} |
Oops, something went wrong.