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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface ca.uhn.fhir.model.api.IModelJson
SENSITIVE_DATA_FILTER_NAME -
Constructor Summary
ConstructorsConstructorDescriptionHl7v2ToFhirConversionResultJson(ca.uhn.hl7v2.model.Message theOriginalMessage) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBundle(IBaseBundle theBundle) Adds a bundlevoidaddIssue(MappingMessage theIssue) Adds an issuevoidaddIssue(String thePath, MappingMessage.MessageLevel theMessageLevel, String theIssue) Adds a message to the conversion result.voidaddIssues(List<MappingMessage> theIssues) Adds the items in list of issues that have occurred throughout the conversion process.static ca.uhn.hl7v2.model.MessagecloneMessage(ca.uhn.hl7v2.model.Message theMessage) Deprecated.ca.uhn.hl7v2.model.Messageca.uhn.hl7v2.model.MessagebooleanIndicates whether there were anyMappingMessage.MessageLevel.ERRORissues during the message conversionbooleanIndicates whether there were anyMappingMessage.MessageLevel.INFOissues during the message conversionbooleanIndicates whether there were any issues (MappingMessage.MessageLevel.INFO,MappingMessage.MessageLevel.WARNING, orMappingMessage.MessageLevel.ERROR) during the message conversionbooleanIndicates whether there were anyMappingMessage.MessageLevel.WARNINGissues during the message conversionbooleanbooleanvoidsetBundles(List<IBaseBundle> theBundles) Sets the list of Bundle resources that have been created from the modifiable Message.voidsetDoAutoConvert(boolean theDoAutoConvert) Sets a flag to indicate whether the modifiable Message should be passed through the Smile generic mapper.voidsetDoProcess(boolean theDoProcess) Sets a flag to indicate whether the modifiable Message should be processed.voidsetIssues(List<MappingMessage> theIssues) Sets the list of issues that have occurred throughout the conversion process.voidsetModifiableMessage(ca.uhn.hl7v2.model.Message theModifiableMessage) Sets the HL7 v2.x message which customizations can be applied to.voidsetRequestHeaders(Map<String, String> theRequestHeaders) Stores the request headers associated with the request (if any)
-
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:
-
REQUEST_HEADERS
- 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 specifiedMessageinto a newMessagewith 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.INFOissues during the message conversion- Returns:
- true if there are any
MappingMessage.MessageLevel.INFOissues
-
hasWarningIssues
Indicates whether there were anyMappingMessage.MessageLevel.WARNINGissues during the message conversion- Returns:
- true if there are any
MappingMessage.MessageLevel.WARNINGissues
-
hasErrorIssues
Indicates whether there were anyMappingMessage.MessageLevel.ERRORissues during the message conversion- Returns:
- true if there are any
MappingMessage.MessageLevel.ERRORissues
-
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
-
getRequestHeaders
- Returns:
- the http request headers associated with the request (if any).
-
setRequestHeaders
Stores the request headers associated with the request (if any)- Parameters:
theRequestHeaders-
-
AbstractMessage.copy()instead.