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
In this article, learn how to configure settings for `$convert-data` using the Azure portal to convert health data into [FHIR® R4](https://www.hl7.org/fhir/R4/index.html).
16
+
This article illustrates how to configure settings for `$convert-data` using the Azure portal to convert health data into [FHIR® R4](https://www.hl7.org/fhir/R4/index.html).
17
17
18
18
## Default templates
19
19
@@ -30,7 +30,7 @@ To access and use the default templates for your conversion requests, ensure tha
30
30
> [!WARNING]
31
31
> Default templates are released under the MIT License and are *not* supported by Microsoft Support.
32
32
>
33
-
> The default templates are provided only to help you get started with your data conversion workflow. These default templates are not intended for production and might change when Microsoft releases updates for the FHIR service. To have consistent data conversion behavior across different versions of the FHIR service, you must do the following:
33
+
> The default templates are provided to help you get started with your data conversion workflow. These default templates are _not_ intended for production and might change when Microsoft releases updates for the FHIR service. To have consistent data conversion behavior across different versions of the FHIR service, you must do the following.
34
34
>
35
35
> 1. Host your own copy of the templates in an [Azure Container Registry (ACR)](../../container-registry/container-registry-intro.md) instance.
36
36
> 2. Register the templates to the FHIR service.
@@ -46,7 +46,9 @@ You can use the [FHIR Converter Visual Studio Code extension](https://marketplac
46
46
> [!NOTE]
47
47
> The FHIR Converter extension for Visual Studio Code is available for HL7v2, C-CDA, and JSON Liquid templates. FHIR STU3 to FHIR R4 Liquid templates are currently not supported.
48
48
49
-
The provided default templates can be used as a base starting point if needed, on top of which your customizations can be added. When making updates to the templates, consider following these guidelines to avoid unintended conversion results. The template should be authored in a way such that it yields a valid structure for a FHIR bundle resource.
49
+
The provided default templates can be used as a starting point if needed, on top of which your customizations can be added. When making updates to the templates, consider following these guidelines to avoid unintended conversion results.
50
+
51
+
The template should be authored in a way such that it yields a valid structure for a FHIR bundle resource.
50
52
51
53
For instance, the Liquid templates should have a format such as the following code:
52
54
@@ -71,7 +73,7 @@ For instance, the Liquid templates should have a format such as the following co
71
73
}
72
74
```
73
75
74
-
The overall template follows the structure and expectations for a FHIR bundle resource, with the FHIR bundle JSON being at the root of the file. If you choose to add custom fields to the template that aren’t part of the FHIR specification for a bundle resource, the conversion request could still succeed. However, the converted result could potentially have unexpected output and wouldn't yield a valid FHIR bundle resource that can be persisted in the FHIR service as is.
76
+
The overall template follows the structure and expectations for a FHIR bundle resource, with the FHIR bundle JSON being at the root of the file. If you choose to add custom fields to the template that aren’t part of the FHIR specification for a bundle resource, the conversion request could. However, the converted result could potentially have unexpected output, and wouldn't yield a valid FHIR bundle resource that can be persisted in the FHIR service as is.
75
77
76
78
For example, consider the following code:
77
79
@@ -99,13 +101,13 @@ For example, consider the following code:
99
101
}
100
102
```
101
103
102
-
In the example code, two example custom fields `customfield_message` and `customfield_data`that aren't FHIR properties per the specification and the FHIR bundle resource seem to be nested under `customfield_data` (that is, the FHIR bundle JSON isn't at the root of the file). This template doesn’t align with the expected structure around a FHIR bundle resource. As a result, the conversion request might succeed using the provided template. However, the returned converted result could potentially have unexpected output (due to certain post conversion processing steps being skipped). It wouldn't be considered a valid FHIR bundle (since it's nested and has non FHIR specification properties) and attempting to persist the result in your FHIR service fails.
104
+
In the example code, two example custom fields `customfield_message` and `customfield_data` aren't FHIR properties per the specification, and the FHIR bundle resource seem to be nested under `customfield_data` (that is, the FHIR bundle JSON isn't at the root of the file). This template doesn’t align with the expected structure around a FHIR bundle resource. The conversion request might succeed using the provided template. However, the returned converted result could potentially have unexpected output (due to certain post conversion processing steps being skipped). It wouldn't be considered a valid FHIR bundle (since it's nested and has non FHIR specification properties) and attempting to persist the result in your FHIR service fails.
103
105
104
106
## Host your own templates
105
107
106
108
We recommend that you host your own copy of templates in an [Azure Container Registry (ACR)](../../container-registry/container-registry-intro.md) instance. ACR can be used to host your custom templates and support with versioning.
107
109
108
-
Hosting your own templates and using them for `$convert-data` operations involves the following seven steps:
110
+
Hosting your own templates and using them for `$convert-data` operations involves the following seven steps.
109
111
110
112
1.[Create an Azure Container Registry instance](#step-1-create-an-azure-container-registry-instance)
111
113
2.[Push the templates to your Azure Container Registry instance](#step-2-push-the-templates-to-your-azure-container-registry-instance)
@@ -147,7 +149,7 @@ To reference specific template versions in the API, be sure to use the exact ima
147
149
148
150
:::image type="content" source="~/reusable-content/ce-skilling/azure/media/role-based-access-control/add-role-assignment-page.png" alt-text="Screenshot showing the add role assignment pane." lightbox="~/reusable-content/ce-skilling/azure/media/role-based-access-control/add-role-assignment-page.png":::
149
151
150
-
4. On the **Members** tab, select **Managed identity**, and then select **Select members**.
152
+
4. On the **Members** tab, select **Managed identity**, and then **Select members**.
151
153
152
154
5. Select your Azure subscription.
153
155
@@ -191,7 +193,7 @@ There are many methods for securing ACR using the built-in firewall depending on
191
193
192
194
Make a call to the `$convert-data` operation by specifying your template reference in the `templateCollectionReference` parameter:
193
195
194
-
`<RegistryServer>/<imageName>@<imageDigest>`
196
+
`<RegistryServer>/<imageName>@<imageDigest>`.
195
197
196
198
You should receive a `bundle` response that contains the health data converted into the FHIR format.
Copy file name to clipboardExpand all lines: articles/healthcare-apis/fhir/convert-data-faq.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ For more information, see [Access the FHIR service in Azure Health Data Services
44
44
45
45
## What's the difference between the $convert-data endpoint in Azure API for FHIR versus the FHIR service in Azure Health Data Services?
46
46
47
-
The experience and core `$convert-data` operation functionality is similar for both Azure API for FHIR and the FHIR service in Azure Health Data Services(../../healthcare-apis/fhir/overview.md). The only difference exists in the setup for the Azure API for FHIR version of the `$convert-data` operation, which requires assigning permissions to the right resources.
47
+
The experience and core `$convert-data` operation functionality is similar for both Azure API for FHIR and the FHIR service in [Azure Health Data Services](../../healthcare-apis/fhir/overview.md). The only difference exists in the setup for the Azure API for FHIR version of the `$convert-data` operation, which requires assigning permissions to the right resources.
48
48
49
49
Learn more:
50
50
@@ -72,7 +72,7 @@ Yes. It’s possible to store and reference custom templates. For more informati
72
72
73
73
## Why are my dates being converted when transforming JSON data?
74
74
75
-
It's possible for dates supplied within JSON data to be returned in a different format than what was supplied. During deserialization of the JSON payload strings that are identified as dates get converted into .NET DateTime objects. These objects then get converted back to strings before going through the Liquid template engine. This conversion can cause the date value to be reformatted and represented in the local timezone of the FHIR service.
75
+
It's possible for dates supplied within JSON data to be returned in a different format than what was supplied. During deserialization of the JSON payload, strings that are identified as dates get converted into .NET DateTime objects. These objects then get converted back to strings before going through the Liquid template engine. This conversion can cause the date value to be reformatted and represented in the local timezone of the FHIR service.
76
76
77
77
The coercion of strings to .NET DateTime objects can be disabled using the boolean parameter `jsonDeserializationTreatDatesAsStrings`. When set to `true`, the supplied data is treated as a string and won't be modified before being supplied to the Liquid engine.
Copy file name to clipboardExpand all lines: articles/healthcare-apis/fhir/convert-data-overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The health data for conversion is delivered to the FHIR service in the body of t
35
35
36
36
## Parameters
37
37
38
-
A `$convert-data` operation call packages the health data for conversion inside a JSON-formatted [parameters](http://hl7.org/fhir/parameters.html) in the body of the request. The parameters are described in the following table:
38
+
A `$convert-data` operation call packages the health data for conversion inside JSON-formatted [parameters](http://hl7.org/fhir/parameters.html) in the body of the request. The parameters are described in the following table.
39
39
40
40
| Parameter name | Description | Accepted values |
@@ -48,7 +48,7 @@ A `$convert-data` operation call packages the health data for conversion inside
48
48
49
49
-**FHIR STU3 to FHIR R4 templates are Liquid templates** that provide mappings of field differences only between a FHIR STU3 resource and its equivalent resource in the FHIR R4 specification. Some of the FHIR STU3 resources are renamed or removed from FHIR R4. For more information about the resource differences and constraints for FHIR STU3 to FHIR R4 conversion, see [Resource differences and constraints for FHIR STU3 to FHIR R4 conversion](https://github.com/microsoft/FHIR-Converter/blob/main/docs/Stu3R4-resources-differences.md).
50
50
51
-
-**JSON templates are sample templates for use in building your own conversion mappings.** They aren't default templates that adhere to any predefined health data message types. JSON itself isn't specified as a health data format, unlike HL7v2 or C-CDA. Therefore, instead of providing default JSON templates, we provide some sample JSON templates as a starting point for your own customized mappings.
51
+
-**JSON templates are sample templates for use in building your own conversion mappings.** They aren't default templates that adhere to any predefined health data message types. JSON itself isn't specified as a health data format, unlike HL7v2 or C-CDA. As a result, instead of providing default JSON templates, we provide some sample JSON templates as a starting point for your own customized mappings.
52
52
53
53
> [!WARNING]
54
54
> Default templates are released under the MIT License and aren't supported by Microsoft.
Copy file name to clipboardExpand all lines: articles/healthcare-apis/fhir/convert-data-troubleshoot.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,14 +24,14 @@ Two main factors come into play that determine how long a `$convert-data` operat
24
24
Any loops or iterations in the templates can have large impacts on performance. The `$convert-data` operation has a post processing step that is run after the template is applied. In particular, the deduping step can mask template issues that cause performance problems. Updating the template so duplicates aren’t generated can greatly increase performance. For more information and details about the post processing step, see [Post processing](#post-processing).
25
25
26
26
## Post processing
27
-
The `$convert-data` operation applies post processing logic after the template is applied to the input. This post processing logic can result in the output looking different or unexpected errors compared to if you ran the default Liquid template directly. Post processing ensures the output is valid JSON and removes any duplicates based on the ID properties generated for resources in the template. To see the post processing logic in more detail, see the [FHIR-Converter GitHub repository](https://github.com/microsoft/FHIR-Converter/blob/main/src/Microsoft.Health.Fhir.Liquid.Converter/OutputProcessors/PostProcessor.cs).
27
+
The `$convert-data` operation applies post processing logic after the template is applied to the input. This post processing logic can result in the output looking different, or unexpected errors compared to running the default Liquid template directly. Post processing ensures the output is valid JSON and removes any duplicates based on the ID properties generated for resources in the template. To see the post processing logic in more detail, see the [FHIR-Converter GitHub repository](https://github.com/microsoft/FHIR-Converter/blob/main/src/Microsoft.Health.Fhir.Liquid.Converter/OutputProcessors/PostProcessor.cs).
28
28
29
29
## Message size
30
-
There isn’t a hard limit on the size of the messages allowed for the `$convert-data` operation, however, for content with a request size greater than 10 MB, server 500 errors are possible. If you're receiving 500 server errors, ensure your requests are under 10 MB.
30
+
There isn’t a hard limit on the size of the messages allowed for the `$convert-data` operation. However, for content with a request size greater than 10 MB, server errors `500`are possible. If you're receiving `500` server errors, ensure your requests are under 10 MB.
31
31
32
32
## Why are my dates being converted when transforming JSON data?
33
33
34
-
It's possible for dates supplied within JSON data to be returned in a different format than what was supplied. During deserialization of the JSON payload strings that are identified as dates get converted into .NET DateTime objects. These objects then get converted back to strings before going through the Liquid template engine. This conversion can cause the date value to be reformatted and represented in the local timezone of the FHIR service.
34
+
It's possible for dates supplied within JSON data to be returned in a different format than what was supplied. During deserialization of the JSON payload, strings that are identified as dates get converted into .NET DateTime objects. These objects then get converted back to strings before going through the Liquid template engine. This conversion can cause the date value to be reformatted, and represented in the local timezone of the FHIR service.
35
35
36
36
The coercion of strings to .NET DateTime objects can be disabled using the boolean parameter `jsonDeserializationTreatDatesAsStrings`. When set to `true`, the supplied data is treated as a string and won't be modified before being supplied to the Liquid engine.
0 commit comments