Package ca.cdr.api.pub.hl7v2.model
Class Hl7v2ToFhirConversionResultJson
java.lang.Object
ca.cdr.api.pub.hl7v2.model.Hl7v2ToFhirConversionResultJson
- All Implemented Interfaces:
IModelJson
,IModelJson
Contains all relevant data involved in the conversion of an HL7 v2.x message to a list of IBaseBundle resources.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface ca.uhn.fhir.model.api.IModelJson
SENSITIVE_DATA_FILTER_NAME
-
Constructor Summary
ConstructorDescriptionHl7v2ToFhirConversionResultJson
(ca.uhn.hl7v2.model.Message theOriginalMessage) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBundle
(IBaseBundle theBundle) Adds a bundlevoid
addIssue
(MappingMessage theIssue) Adds an issuevoid
addIssue
(String thePath, MappingMessage.MessageLevel theMessageLevel, String theIssue) Adds a message to the conversion result.void
addIssues
(List<MappingMessage> theIssues) Adds the items in list of issues that have occurred throughout the conversion process.static ca.uhn.hl7v2.model.Message
cloneMessage
(ca.uhn.hl7v2.model.Message theMessage) Deprecated.ca.uhn.hl7v2.model.Message
ca.uhn.hl7v2.model.Message
boolean
Indicates whether there were anyMappingMessage.MessageLevel.ERROR
issues during the message conversionboolean
Indicates whether there were anyMappingMessage.MessageLevel.INFO
issues during the message conversionboolean
Indicates whether there were any issues (MappingMessage.MessageLevel.INFO
,MappingMessage.MessageLevel.WARNING
, orMappingMessage.MessageLevel.ERROR
) during the message conversionboolean
Indicates whether there were anyMappingMessage.MessageLevel.WARNING
issues during the message conversionboolean
boolean
void
setBundles
(List<IBaseBundle> theBundles) Sets the list of Bundle resources that have been created from the modifiable Message.void
setDoAutoConvert
(boolean theDoAutoConvert) Sets a flag to indicate whether the modifiable Message should be passed through the Smile generic mapper.void
setDoProcess
(boolean theDoProcess) Sets a flag to indicate whether the modifiable Message should be processed.void
setIssues
(List<MappingMessage> theIssues) Sets the list of issues that have occurred throughout the conversion process.void
setModifiableMessage
(ca.uhn.hl7v2.model.Message theModifiableMessage) Sets the HL7 v2.x message which customizations can be applied to.
-
Field Details
-
ORIGINAL_MESSAGE
- See Also:
-
MODIFIABLE_MESSAGE
- See Also:
-
BUNDLES
- See Also:
-
ISSUES
- See Also:
-
DO_PROCESS
- See Also:
-
DO_AUTO_CONVERT
- See Also:
-
-
Constructor Details
-
Hl7v2ToFhirConversionResultJson
public Hl7v2ToFhirConversionResultJson(ca.uhn.hl7v2.model.Message theOriginalMessage) throws ca.uhn.hl7v2.HL7Exception Constructor- Parameters:
theOriginalMessage
- The original message to be preserved during the HL7V2 to FHIR conversion- Throws:
ca.uhn.hl7v2.HL7Exception
-
-
Method Details
-
cloneMessage
@Deprecated(since="2023.11.R01") public static ca.uhn.hl7v2.model.Message cloneMessage(ca.uhn.hl7v2.model.Message theMessage) throws ca.uhn.hl7v2.HL7Exception Deprecated.UseAbstractMessage.copy()
instead.
Clones the specifiedMessage
into a newMessage
with the same contents- Parameters:
theMessage
- The message to clone- Throws:
ca.uhn.hl7v2.HL7Exception
-
addBundle
Adds a bundle- Parameters:
theBundle
- The bundle to add
-
addIssue
Adds a message to the conversion result. Acceptable message levels are `INFO`, `WARNING`, and `ERROR`- Parameters:
thePath
- The path within the message where the issue was detectedtheMessageLevel
- The issue error level, e.g. 'INFO', 'WARNING', or 'ERROR'.theIssue
- The description of the issue
-
addIssue
Adds an issue- Parameters:
theIssue
- The issue to add
-
hasIssues
Indicates whether there were any issues (MappingMessage.MessageLevel.INFO
,MappingMessage.MessageLevel.WARNING
, orMappingMessage.MessageLevel.ERROR
) during the message conversion- Returns:
- true if there are any issues
-
hasInfoIssues
Indicates whether there were anyMappingMessage.MessageLevel.INFO
issues during the message conversion- Returns:
- true if there are any
MappingMessage.MessageLevel.INFO
issues
-
hasWarningIssues
Indicates whether there were anyMappingMessage.MessageLevel.WARNING
issues during the message conversion- Returns:
- true if there are any
MappingMessage.MessageLevel.WARNING
issues
-
hasErrorIssues
Indicates whether there were anyMappingMessage.MessageLevel.ERROR
issues during the message conversion- Returns:
- true if there are any
MappingMessage.MessageLevel.ERROR
issues
-
getOriginalMessage
- Returns:
- A copy of the original HL7 v2.x message before any customizations have been applied.
- Throws:
ca.uhn.hl7v2.HL7Exception
-
getModifiableMessage
- Returns:
- The HL7 v2.x message which customizations can be applied to.
-
setModifiableMessage
Sets the HL7 v2.x message which customizations can be applied to.- Parameters:
theModifiableMessage
- The modifiable Message
-
getBundles
- Returns:
- A list of Bundle resources that have been created from the modifiable Message.
-
setBundles
Sets the list of Bundle resources that have been created from the modifiable Message.- Parameters:
theBundles
- The Bundles
-
getIssues
- Returns:
- A list of issues that have occurred throughout the conversion process.
-
setIssues
Sets the list of issues that have occurred throughout the conversion process.- Parameters:
theIssues
- The issues
-
addIssues
Adds the items in list of issues that have occurred throughout the conversion process.- Parameters:
theIssues
- The issues
-
isDoProcess
- Returns:
- Whether the modifiable Message should be processed.
-
setDoProcess
Sets a flag to indicate whether the modifiable Message should be processed.- Parameters:
theDoProcess
- The value of the flag
-
isDoAutoConvert
- Returns:
- Whether the modifiable Message should be passed through the Smile generic mapper.
-
setDoAutoConvert
Sets a flag to indicate whether the modifiable Message should be passed through the Smile generic mapper.
The Smile generic mapper will be skipped entirely if this flag is set to false.- Parameters:
theDoAutoConvert
- The value of the flag
-
AbstractMessage.copy()
instead.