Class Reference

java.lang.Object
org.projecthusky.common.model.Reference

public class Reference extends Object
The class Reference contains all necessary fields for an HL7 CDA R2 reference. This class also provides mapping methods to other data types.
  • Constructor Details

    • Reference

      public Reference()
      Instantiates a new identificator. Default constructor.
    • Reference

      public Reference(String value, List<String> narrativeText)
      Instantiates a new instance from the given base type.
      Parameters:
      value -
      narrativeText -
    • Reference

      public Reference(ED hl7CdaR2Value)
      Instantiates a new instance from the given HL7 CDA R2 data type.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 data type
  • Method Details

    • createReferenceType

      public static Reference createReferenceType(ED hl7CdaR2Value)
      Creates from the given HL7 CDA R2 value.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 value
      Returns:
      the reference type
    • createHl7CdaR2Ed

      public static ED createHl7CdaR2Ed(Reference baseType)
      Creates the HL7 CDA R2 data type from the given base type.
      Parameters:
      baseType - the base type
      Returns:
      the HL7 CDA R2 data typed value
    • createReference

      public static ED createReference(ED existingText, String reference)
      Creates an MDHT ED reference from a given String. Adds the hashtag '#' automatically, if not present as first character.
      Parameters:
      existingText - the existing text
      reference - the reference
      Returns:
      the MDHT ED
    • createReference

      public static ED createReference(int contentId, String prefix)
      Creates the reference.
      Parameters:
      contentId -
      content id
      prefix -
      prefix
      Returns:
      the ed
    • createReference

      public static ED createReference(String reference)
      Creates an ED reference from a given String. Adds the hashtag '#' automatically, if not present as first character.
      Parameters:
      reference - the reference value
      Returns:
      the ED
    • createReference

      public static ED createReference(String url, String narrativeText)
      Creates an ED reference from a given String.
      Parameters:
      url - the reference url
      narrativeText - the reference narrative text
      Returns:
      the ED
    • createReferenceTel

      public static TEL createReferenceTel(String value)
      Creates the reference tel.
      Parameters:
      value - the value
      Returns:
      the tel
    • getHl7CdaR2Ed

      public ED getHl7CdaR2Ed()
      Gets the HL7 CDA R2 data type from the current instance.
      Returns:
      the HL7 CDA R2 data type
    • set

      public void set(Reference baseType)
      Sets the fields of the current instance by the given base type.
      Parameters:
      baseType - the base type
    • set

      public void set(ED hl7CdaR2Value)
      Sets the fields of the current instance by the given HL7 CDA R2 data type.
      Parameters:
      hl7CdaR2Value - the HL7 CDA R2 data typed value
    • getNullFlavor

      public NullFlavor getNullFlavor()
    • setNullFlavor

      public void setNullFlavor(NullFlavor nullFlavor)
    • getValue

      public String getValue()
    • setValue

      public void setValue(String value)
    • getNarrativeText

      public List<String> getNarrativeText()
    • setNarrativeText

      public void setNarrativeText(List<String> narrativeText)