Class Hl7v2ToFhirConversionResultJson

java.lang.Object
ca.cdr.api.pub.hl7v2.model.Hl7v2ToFhirConversionResultJson
All Implemented Interfaces:
IModelJson, IModelJson

public class Hl7v2ToFhirConversionResultJson extends Object implements IModelJson
Contains all relevant data involved in the conversion of an HL7 v2.x message to a list of IBaseBundle resources.
  • Field Details

  • 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.
      Use AbstractMessage.copy() instead.

      Clones the specified Message into a new Message with the same contents
      Parameters:
      theMessage - The message to clone
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • addBundle

      public void addBundle(IBaseBundle theBundle)
      Adds a bundle
      Parameters:
      theBundle - The bundle to add
    • addIssue

      public void addIssue(String thePath, MappingMessage.MessageLevel theMessageLevel, String theIssue)
      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 detected
      theMessageLevel - The issue error level, e.g. 'INFO', 'WARNING', or 'ERROR'.
      theIssue - The description of the issue
    • addIssue

      public void addIssue(MappingMessage theIssue)
      Adds an issue
      Parameters:
      theIssue - The issue to add
    • hasIssues

      public boolean hasIssues()
      Indicates whether there were any issues (MappingMessage.MessageLevel.INFO, MappingMessage.MessageLevel.WARNING, or MappingMessage.MessageLevel.ERROR) during the message conversion
      Returns:
      true if there are any issues
    • hasInfoIssues

      public boolean hasInfoIssues()
      Indicates whether there were any MappingMessage.MessageLevel.INFO issues during the message conversion
      Returns:
      true if there are any MappingMessage.MessageLevel.INFO issues
    • hasWarningIssues

      public boolean hasWarningIssues()
      Indicates whether there were any MappingMessage.MessageLevel.WARNING issues during the message conversion
      Returns:
      true if there are any MappingMessage.MessageLevel.WARNING issues
    • hasErrorIssues

      public boolean hasErrorIssues()
      Indicates whether there were any MappingMessage.MessageLevel.ERROR issues during the message conversion
      Returns:
      true if there are any MappingMessage.MessageLevel.ERROR issues
    • getOriginalMessage

      public ca.uhn.hl7v2.model.Message getOriginalMessage() throws ca.uhn.hl7v2.HL7Exception
      Returns:
      A copy of the original HL7 v2.x message before any customizations have been applied.
      Throws:
      ca.uhn.hl7v2.HL7Exception
    • getModifiableMessage

      public ca.uhn.hl7v2.model.Message getModifiableMessage()
      Returns:
      The HL7 v2.x message which customizations can be applied to.
    • setModifiableMessage

      public void setModifiableMessage(ca.uhn.hl7v2.model.Message theModifiableMessage)
      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

      public void setBundles(List<IBaseBundle> theBundles)
      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

      public void setIssues(List<MappingMessage> theIssues)
      Sets the list of issues that have occurred throughout the conversion process.
      Parameters:
      theIssues - The issues
    • addIssues

      public void addIssues(List<MappingMessage> theIssues)
      Adds the items in list of issues that have occurred throughout the conversion process.
      Parameters:
      theIssues - The issues
    • isDoProcess

      public boolean isDoProcess()
      Returns:
      Whether the modifiable Message should be processed.
    • setDoProcess

      public void setDoProcess(boolean theDoProcess)
      Sets a flag to indicate whether the modifiable Message should be processed.
      Parameters:
      theDoProcess - The value of the flag
    • isDoAutoConvert

      public boolean isDoAutoConvert()
      Returns:
      Whether the modifiable Message should be passed through the Smile generic mapper.
    • setDoAutoConvert

      public void setDoAutoConvert(boolean theDoAutoConvert)
      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