You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/healthcare-apis/fhir/smart-on-fhir.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,51 +12,51 @@ ms.date: 11/10/2022
12
12
13
13
# SMART on FHIR
14
14
15
-
Substitutable Medical Applications and Reusable Technologies ([SMART on FHIR](https://docs.smarthealthit.org/)) is a healthcare standard through which applications can access clinical information through a data store. It adds a security layer based on open standards including OAuth2 and OpenID Connect, to FHIR interfaces to enable integration with EHR systems. Using SMART on FHIR provides at least three important benefits:
15
+
Substitutable Medical Applications and Reusable Technologies ([SMART on FHIR](https://docs.smarthealthit.org/)) is a healthcare standard through which applications can access clinical information through a data store. It adds a security layer based on open standards including OAuth2 and OpenID Connect, to FHIR® interfaces to enable integration with EHR systems. Using SMART on FHIR provides at least three important benefits:
16
16
- Applications have a known method for obtaining authentication/authorization to a FHIR repository.
17
17
- Users accessing a FHIR repository with SMART on FHIR are restricted to resources associated with the user, rather than having access to all data in the repository.
18
18
- Users have the ability to grant applications access to a limited set of their data by using SMART clinical scopes.
19
19
20
-
Below tutorials provide steps to enable SMART on FHIR applications with FHIR Service.
20
+
The following tutorials provide steps to enable SMART on FHIR applications with FHIR Service.
-[Register public client application in Microsoft Entra ID](/azure/healthcare-apis/azure-api-for-fhir/register-public-azure-ad-client-app)
28
-
- After registering the application, make note of the applicationId for client application.
29
-
- Ensure you have access to Azure Subscription of FHIR service, to create resources and add role assignments.
28
+
- After registering the application, make note of the `applicationId` for client application.
29
+
- Ensure you have access to an Azure Subscription of FHIR service, to create resources and add role assignments.
30
30
31
31
## SMART on FHIR using Azure Health Data Services Samples (SMART on FHIR (Enhanced))
32
32
33
33
### Step 1: Set up FHIR SMART user role
34
-
Follow the steps listed under section [Manage Users: Assign Users to Role](../../role-based-access-control/role-assignments-portal.yml). Any user added to this role would be able to access the FHIR Service, provided their requests comply with the SMART on FHIR implementation Guide. The access granted to the users in this role will then be limited by the resources associated to their fhirUser compartment and the restrictions in the clinical scopes.
34
+
Follow the steps listed in section [Manage Users: Assign Users to Role](../../role-based-access-control/role-assignments-portal.yml). Any user added to this role will be able to access the FHIR Service, provided their requests comply with the SMART on FHIR implementation Guide. The access granted to the users in this role will then be limited by the resources associated to their fhirUser compartment and the restrictions in the clinical scopes.
35
35
36
36
> [!NOTE]
37
-
> SMART on FHIR Implementation Guide defines access to FHIR resource types with scopes. These scopes impact the access an application may have to FHIR resources. User with SMART user role has access to perform read API interactions on FHIR service. SMART user role does not grant write access to FHIR service.
37
+
> SMART on FHIR Implementation Guide defines access to FHIR resource types with scopes. These scopes impact the access an application may have to FHIR resources. A user with the SMART user role has access to perform read API interactions on FHIR service. SMART user role does not grant write access to FHIR service.
38
38
39
39
### Step 2: FHIR server integration with samples
40
-
**[Click on the link](https://github.com/Azure-Samples/azure-health-data-and-ai-samples/tree/main/samples/smartonfhir)** to navigate to Azure Health Data and AI Samples Open source solution. This step listed in the document enables integration of FHIR server with other Azure Services (such as APIM, Azure functions and more).
40
+
**[Click on this link](https://github.com/Azure-Samples/azure-health-data-and-ai-samples/tree/main/samples/smartonfhir)** to navigate to Azure Health Data and AI Samples open source solution. The steps listed in the document enable integration of FHIR server with other Azure Services (such as APIM, Azure functions and more).
41
41
42
42
> [!NOTE]
43
-
> Samples are open-source code, and you should review the information and licensing terms on GitHub before using it. They are not part of the Azure Health Data Service and are not supported by Microsoft Support. These samples can be used to demonstrate how Azure Health Data Services and other open-source tools can be used together to demonstrate [§170.315(g)(10) Standardized API for patient and population services criterion](https://www.healthit.gov/test-method/standardized-api-patient-and-population-services#ccg) compliance, using Microsoft Entra ID as the identity provider workflow.
43
+
> Samples are open-source code, and you should review the information and licensing terms on GitHub before using it. They are not part of the Azure Health Data Service and are not supported by Microsoft Support. These samples are used to demonstrate how Azure Health Data Services (AHDS) and other open-source tools can be used together to demonstrate [§170.315(g)(10) Standardized API for patient and population services criterion](https://www.healthit.gov/test-method/standardized-api-patient-and-population-services#ccg) compliance, using Microsoft Entra ID as the identity provider workflow.
44
44
45
45
## SMART on FHIR Proxy
46
46
<details>
47
47
<summary> Click to expand! </summary>
48
48
49
49
> [!NOTE]
50
-
> This is another option to SMART on FHIR(Enhanced) using AHDS Samples mentioned above. We suggest you to adopt SMART on FHIR(Enhanced). SMART on FHIR Proxy option is legacy option.
51
-
> SMART on FHIR(Enhanced) provides added capabilities than SMART on FHIR proxy. SMART on FHIR(Enhanced) can be considered to meet requirements with[SMART on FHIR Implementation Guide (v 1.0.0)](https://hl7.org/fhir/smart-app-launch/1.0.0/) and [§170.315(g)(10) Standardized API for patient and population services criterion](https://www.healthit.gov/test-method/standardized-api-patient-and-population-services#ccg).
50
+
> This is another option to SMART on FHIR(Enhanced) using the AHDS Samples previously mentioned. We suggest you to adopt SMART on FHIR(Enhanced). SMART on FHIR Proxy option is a legacy option.
51
+
> SMART on FHIR(Enhanced) provides added capabilities to SMART on FHIR proxy. SMART on FHIR(Enhanced) meets requirements in[SMART on FHIR Implementation Guide (v 1.0.0)](https://hl7.org/fhir/smart-app-launch/1.0.0/) and [§170.315(g)(10) Standardized API for patient and population services criterion](https://www.healthit.gov/test-method/standardized-api-patient-and-population-services#ccg).
52
52
53
53
### Step 1: Set admin consent for your client application
54
54
55
-
To use SMART on FHIR, you must first authenticate and authorize the app. The first time you use SMART on FHIR, you also must get administrative consent to let the app access your FHIR resources.
55
+
To use SMART on FHIR, you must first authenticate and authorize the app. The first time you use SMART on FHIR, you must also get administrative consent to let the app access your FHIR resources.
56
56
57
57
If you don't have an ownership role in the app, contact the app owner and ask them to grant admin consent for you in the app.
58
58
59
-
If you do have administrative privileges, complete the following steps to grant admin consent to yourself directly. (You also can grant admin consent to yourself later when you're prompted in the app.) You can complete the same steps to add other users as owners, so they can view and edit this app registration.
59
+
If you do have administrative privileges, complete the following steps to grant admin consent to yourself directly. (You can also grant admin consent to yourself later when prompted in the app.) You can use these same steps to add other users as owners, so they can view and edit the app registration.
60
60
61
61
To add yourself or another user as owner of an app:
62
62
@@ -76,15 +76,15 @@ To enable the SMART on FHIR proxy in the **Authentication** settings for your FH
76
76
77
77
The SMART on FHIR proxy acts as an intermediary between the SMART on FHIR app and Microsoft Entra ID. The authentication reply (the authentication code) must go to the SMART on FHIR proxy instead of the app itself. The proxy then forwards the reply to the app.
78
78
79
-
Because of this two-step relay of the authentication code, you need to set the reply URL (callback) for your Microsoft Entra client application to a URL that is a combination of the reply URL for the SMART on FHIR proxy and the reply URL for the SMART on FHIR app. The combined reply URL takes this form:
79
+
Because of this two-step relay of the authentication code, you need to set the reply URL (callback) for your Microsoft Entra client application to a URL that is a combination of the reply URL for the SMART on FHIR proxy, and the reply URL for the SMART on FHIR app. The combined reply URL takes the following form.
In that reply, `aHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMS9zYW1wbGVhcHAvaW5kZXguaHRtbA` is a URL-safe, base64-encoded version of the reply URL for the SMART on FHIR app. For the SMART on FHIR app launcher, when the app is running locally, the reply URL is `https://localhost:5001/sampleapp/index.html`.
85
+
In the reply, `aHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMS9zYW1wbGVhcHAvaW5kZXguaHRtbA` is a URL-safe, base64-encoded version of the reply URL for the SMART on FHIR app. For the SMART on FHIR app launcher, when the app is running locally, the reply URL is `https://localhost:5001/sampleapp/index.html`.
86
86
87
-
You can generate the combined reply URL by using a script like this:
87
+
You can generate the combined reply URL by using a script like the following.
Add the reply URL to the public client application that you created earlier for Microsoft Entra ID
101
+
Add the reply URL to the public client application that you created previously for Microsoft Entra ID.
102
102
103
103
<!------>
104
104
105
105
106
106
### Step 3: Get a test patient
107
107
108
-
To test the FHIR service and the SMART on FHIR proxy, you need to have at least one patient in the database. If you've not interacted with the API yet, and you don't have data in the database, see [Access the FHIR service using Postman](./../fhir/use-postman.md) to load a patient. Make a note of the ID of a specific patient.
108
+
To test the FHIR service and the SMART on FHIR proxy, you need to have at least one patient in the database. If you've not used the API yet, and you don't have data in the database, see [Access the FHIR service using Postman](./../fhir/use-postman.md) to load a patient. Make a note of the ID of a specific patient.
109
109
110
110
### Step 4: Download the SMART on FHIR app launcher
111
111
112
-
The open-source [FHIR Server for Azure repository](https://github.com/Microsoft/fhir-server) includes a simple SMART on FHIR app launcher and a sample SMART on FHIR app. In this tutorial, use this SMART on FHIR launcher locally to test the setup.
112
+
The open-source [FHIR Server for Azure repository](https://github.com/Microsoft/fhir-server) includes a simple SMART on FHIR app launcher and a sample SMART on FHIR app. In this tutorial, use this SMART on FHIR app launcher locally to test the setup.
113
113
114
-
You can clone the GitHub repository and go to the application by using these commands:
114
+
You can clone the GitHub repository and go to the application by using the following commands.
@@ -128,28 +128,28 @@ The application needs a few configuration settings, which you can set in `appset
128
128
}
129
129
```
130
130
131
-
We recommend that you use the `dotnet user-secrets` feature:
131
+
We recommend you use the `dotnet user-secrets` feature:
132
132
133
133
```PowerShell
134
134
dotnet user-secrets set FhirServerUrl https://MYFHIRAPI.fhir.azurehealthcareapis.com
135
135
dotnet user-secrets set ClientId <APP-ID>
136
136
```
137
137
138
-
Use this command to run the application:
138
+
Use the following command to run the application:
139
139
140
140
```PowerShell
141
141
dotnet run
142
142
```
143
143
144
144
### Step 5: Test the SMART on FHIR proxy
145
145
146
-
After you start the SMART on FHIR app launcher, you can point your browser to `https://localhost:5001`, where you should see the following screen:
146
+
After you start the SMART on FHIR app launcher, you can point your browser to `https://localhost:5001`, where you should see the following:
147
147
148
148

149
149
150
150
When you enter **Patient**, **Encounter**, or **Practitioner** information, you notice that the **Launch context** is updated. When you're using the FHIR service, the launch context is simply a JSON document that contains information about patient, practitioner, and more. This launch context is base64 encoded and passed to the SMART on FHIR app as the `launch` query parameter. According to the SMART on FHIR specification, this variable is opaque to the SMART on FHIR app and passed on to the identity provider.
151
151
152
-
The SMART on FHIR proxy uses this information to populate fields in the token response. The SMART on FHIR app *can* use these fields to control which patient it requests data for and how it renders the application on the screen. The SMART on FHIR proxy supports the following fields:
152
+
The SMART on FHIR proxy uses this information to populate fields in the token response. The SMART on FHIR app *can* use these fields to control which patient it requests data for, and how it renders the application on the screen. The SMART on FHIR proxy supports the following fields.
153
153
154
154
*`patient`
155
155
*`encounter`
@@ -159,7 +159,7 @@ The SMART on FHIR proxy uses this information to populate fields in the token re
159
159
160
160
These fields are meant to provide guidance to the app, but they don't convey any security information. A SMART on FHIR application can ignore them.
161
161
162
-
Notice that the SMART on FHIR app launcher updates the **Launch URL** information at the bottom of the page. Select **Launch** to start the sample app, and you should see something like this sample:
162
+
Notice that the SMART on FHIR app launcher updates the **Launch URL** information at the bottom of the page. Select **Launch** to start the sample app, and you should see something like the following.
163
163
164
164

165
165
@@ -175,5 +175,6 @@ Now that you've learned about enabling SMART on FHIR functionality, see the sear
175
175
176
176
>[!div class="nextstepaction"]
177
177
>[FHIR search examples](search-samples.md)
178
-
179
-
FHIR® is a registered trademark of [HL7](https://hl7.org/fhir/) and is used with the permission of HL7.
0 commit comments