Data Transformations in InterSystems Healthcare Products
InterSystems healthcare products have the built-in ability to transform healthcare data from one format to another. These InterSystems healthcare products use three different mechanisms to transform data:
All three mechanisms for transforming data (DTLs, XSLTs, and API methods) can be extended and customized as needed.
SDA: The Intermediary Format
InterSystems healthcare products use their own data format, SDA, as an intermediary format for transforming data from one standard format to another. For example, to convert patient data from C-CDA v2.1 to HL7® FHIR®, the InterSystems healthcare products use pre-built XSLTs to convert the data from CDA to SDA, then use pre-built DTLs to convert the data from SDA to FHIR. The intermediary format saves you the expense of creating custom data transformations between two formats. The SDA format can be extended and customized as needed, and the mechanism for converting to or from SDA can be customized to work with these modifications. For more information about SDA, see SDA: InterSystems Clinical Data Format.
Using SDA as the intermediary format lets you take advantage of ready-made XSLTs, DTLs, and API methods provided with InterSystems healthcare products. In certain use cases, especially when you only need to convert small pieces of a data representation, directly mapping from one format to another might make more sense. In these cases, you can build your own DTLs to directly map data from one format to another without using SDA as the intermediary format. For example, mapping data from an HL7 schema version to a different HL7 schema version can be done directly with a custom DTL. Custom DTLs can be used to transform any format to another, but the complexity of the transformation might make using the pre-packaged XSLTs, DTLs, or API methods a better choice.
Transforming To and From SDA
InterSystems products provide built-in mechanisms for transforming the following data formats into SDA and from SDA into the format:
Uses DTLs to transform FHIR to and from SDA. These DTLs can be invoked by API methods or a built-in business process. For more information about the SDA-FHIR transformations, see SDA-FHIR Transformations.
For conversions from HL7 v2 to SDA, you can use the class method HS.Gateway.HL7.HL7ToSDA3.GetSDA()Opens in a new tab to programmatically convert the HL7 message to SDA. There is no method for programmatically converting from SDA to HL7 v2. Transformations from HL7 to SDA assume HL7 2.5.1. If your HL7 messages are a different version, first transform them to 2.5.1, and then use the transformations to SDA.
Combining SDA Transformations
By combining the transformations to and from SDA, you can transform one data format to another with minimal custom code. For example, suppose you need to transform HL7 v2 messages into FHIR. In this case, you could create an interoperability production that included a business process that called the API method to convert HL7 v2 into SDA along with the built-in business process that transforms SDA into FHIR (by calling the appropriate DTL). This production would include a business service that consumed HL7 messages, such as EnsLib.HL7.Service.FileService and the built-in SDA-FHIR business process HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process. Once these business hosts were added to the production, you could use a custom business process or BPL to invoke the HL7–SDA method and send the resulting SDA to the SDA-FHIR business process. If you were using a custom business process, the code might look like:
For an example of using a BPL rather than a custom business process to accomplish this transformation, see FHIR R4 Integration QuickStartOpens in a new tab.
About DTL Data Transformations
DTLs are InterSystems data transformations that convert healthcare data from one format to another. These DTLs are created and customized in a visual DTL Editor, which allows non-technical users to take advantage of these powerful data transformations without writing custom code. You can use the DTL Editor to customize pre-built DTLs that are provided by InterSystems to transform data to and from SDA. In cases where using SDA as an intermediary format does not fit your use case, you can create custom DTLs that directly transform healthcare data from one standard format to another. For example, you can create a DTL that converts C-CDA v2 to HL7 directly without using pre-packaged XSLTs and DTLs.
The visual representations of DTLs are saved internally in the InterSystems Data Transformation Language, an XML-based language. Advanced users can directly edit DTL code rather than using the DTL Editor.
For a simple, hands-on tutorial of the DTL Editor in non-healthcare settings, try Creating a Data TransformationOpens in a new tab. For complete details about creating DTL transformations, see Developing DTL Transformations.