TranslateHL7 CallBack
Overview
By using the TranslateHL7 CallBack, you can select a translation map based on the contents of the input data by modifying the Java code.
Enable Callback
To enable TranslateHL7 CallBack:
- Select the TIBCO ActiveMatrix BusinessWorks Application Module when creating a new project.
- Enter a project name, select the
Use Java Configuration checkbox, and click
Next.
-
Select the CallBack checkbox on the General tab of the TranslateHL7 activity and click Create a new class
.
-
Enter a class name and click Finish.
A Java class is created with default functions and variables.
Result
The following (HL7 input) MSH information is set to
HashMap<String, String> infoMap
key = Info.ReceivingApplicationUniversalID key = Info.SendingFacilityNamespaceID key = Info.MessageTypeMessageStructure key = Info.MessageHeader, value = MSH key = Info.SendingFacilityUniversalID key = Info.ReceivingFacilityUniversalID key = Info.id, value = HL7 key = Info.SendingFacilityUniversalIDType key = Info.ReceivingFacilityUniversalIDType key = Info.SendingApplicationNamespaceID key = Info.DateTimeofMessage key = Info.ReceivingApplicationNamespaceID key = Info.ReceivingApplicationUniversalIDType key = Info.SendingApplicationUniversalID key = Info.Version key = Info.ReceivingFacilityNamespaceID key = Info.MessageTypeTriggerEvent key = Info.SendingApplicationUniversalIDType key = Info.MessageTypeMessageCode
Use the “get” function to access the values in the map.
infoMap.get("Info.MessageTypeMessageCode")
Setting the Map, Source Guideline, and Target Guideline
Refer to the associated examples:
If Map Resides on Disk (Translator Database Directory)
Set up the Map file name.
- Directly assign the map name to variable
mapFileName.
mapFileName = “VXR_V03_VXR_V03_EX.map”;
- Update the
configName variable with the format
configName=mapname||
.configName=“VXR_V03_VXR_V03_EX.map||”
If Map Resides in Memory (Database)
- Update the
configName variable with the format
configName = MapName|SourceGuidelineName|TargetGuidelineName;
- Assign the map image to variable
mapFileBuffer =(map image in byte[])
. - Specify the source guideline variable with the format
sourceGuidelineBuffer = (source guideline image in byte[]);
- Specify the target guideline variable with the format
targetGuidelineBuffer = (target guideline image in byte[]);