Class Substance

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IResource, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseResource

    public class Substance
    extends BaseResource
    implements ca.uhn.fhir.model.api.IResource
    HAPI/FHIR Substance Resource (administrative.entity)

    Definition: A homogeneous material with a definite composition.

    Requirements:

    Profile Definition: http://hl7.org/fhir/profiles/Substance

    See Also:
    Serialized Form
    • Field Detail

      • SP_CODE

        public static final String SP_CODE
        Search parameter constant for code

        Description: The code of the substance
        Type: token
        Path: Substance.code

        See Also:
        Constant Field Values
      • CODE

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE
        Fluent Client search parameter constant for code

        Description: The code of the substance
        Type: token
        Path: Substance.code

      • SP_CATEGORY

        public static final String SP_CATEGORY
        Search parameter constant for category

        Description: The category of the substance
        Type: token
        Path: Substance.category

        See Also:
        Constant Field Values
      • CATEGORY

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY
        Fluent Client search parameter constant for category

        Description: The category of the substance
        Type: token
        Path: Substance.category

      • SP_CONTAINER_IDENTIFIER

        public static final String SP_CONTAINER_IDENTIFIER
        Search parameter constant for container-identifier

        Description: Identifier of the package/container
        Type: token
        Path: Substance.instance.identifier

        See Also:
        Constant Field Values
      • CONTAINER_IDENTIFIER

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTAINER_IDENTIFIER
        Fluent Client search parameter constant for container-identifier

        Description: Identifier of the package/container
        Type: token
        Path: Substance.instance.identifier

      • SP_EXPIRY

        public static final String SP_EXPIRY
        Search parameter constant for expiry

        Description: Expiry date of package or container of substance
        Type: date
        Path: Substance.instance.expiry

        See Also:
        Constant Field Values
      • EXPIRY

        public static final ca.uhn.fhir.rest.gclient.DateClientParam EXPIRY
        Fluent Client search parameter constant for expiry

        Description: Expiry date of package or container of substance
        Type: date
        Path: Substance.instance.expiry

      • SP_QUANTITY

        public static final String SP_QUANTITY
        Search parameter constant for quantity

        Description: Amount of substance in the package
        Type: quantity
        Path: Substance.instance.quantity

        See Also:
        Constant Field Values
      • QUANTITY

        public static final ca.uhn.fhir.rest.gclient.QuantityClientParam QUANTITY
        Fluent Client search parameter constant for quantity

        Description: Amount of substance in the package
        Type: quantity
        Path: Substance.instance.quantity

      • SP_SUBSTANCE

        public static final String SP_SUBSTANCE
        Search parameter constant for substance

        Description: A component of the substance
        Type: reference
        Path: Substance.ingredient.substance

        See Also:
        Constant Field Values
      • SUBSTANCE

        public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBSTANCE
        Fluent Client search parameter constant for substance

        Description: A component of the substance
        Type: reference
        Path: Substance.ingredient.substance

      • SP_IDENTIFIER

        public static final String SP_IDENTIFIER
        Search parameter constant for identifier

        Description: Unique identifier for the substance
        Type: token
        Path: Substance.identifier

        See Also:
        Constant Field Values
      • IDENTIFIER

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER
        Fluent Client search parameter constant for identifier

        Description: Unique identifier for the substance
        Type: token
        Path: Substance.identifier

      • INCLUDE_SUBSTANCE

        public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBSTANCE
        Constant for fluent queries to be used to add include statements. Specifies the path value of "Substance:substance".
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      • getAllPopulatedChildElementsOfType

        public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType​(Class<T> theType)
        Specified by:
        getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
      • getIdentifier

        public List<IdentifierDtgetIdentifier()
        Gets the value(s) for identifier (). creating it if it does not exist. Will not return null.

        Definition: Unique identifier for the substance

      • addIdentifier

        public IdentifierDt addIdentifier()
        Adds and returns a new value for identifier ()

        Definition: Unique identifier for the substance

      • addIdentifier

        public Substance addIdentifier​(IdentifierDt theValue)
        Adds a given new value for identifier ()

        Definition: Unique identifier for the substance

        Parameters:
        theValue - The identifier to add (must not be null)
      • getIdentifierFirstRep

        public IdentifierDt getIdentifierFirstRep()
        Gets the first repetition for identifier (), creating it if it does not already exist.

        Definition: Unique identifier for the substance

      • addCategory

        public BoundCodeableConceptDt<SubstanceCategoryCodesEnumaddCategory​(SubstanceCategoryCodesEnum theValue)
        Add a value for category (class) using an enumerated type. This is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory or contain the desirable codes. If you wish to use codes other than those which are built-in, you may also use the addCategory() method.

        Definition: A code that classifies the general type of substance. This is used for searching, sorting and display purposes.

      • setCategory

        public Substance setCategory​(SubstanceCategoryCodesEnum theValue)
        Sets the value(s), and clears any existing value(s) for category (class)

        Definition: A code that classifies the general type of substance. This is used for searching, sorting and display purposes.

      • getCode

        public CodeableConceptDt getCode()
        Gets the value(s) for code (what). creating it if it does not exist. Will not return null.

        Definition: A code (or set of codes) that identify this substance

      • setCode

        public Substance setCode​(CodeableConceptDt theValue)
        Sets the value(s) for code (what)

        Definition: A code (or set of codes) that identify this substance

      • getDescriptionElement

        public ca.uhn.fhir.model.primitive.StringDt getDescriptionElement()
        Gets the value(s) for description (). creating it if it does not exist. Will not return null.

        Definition: A description of the substance - its appearance, handling requirements, and other usage notes

      • getDescription

        public String getDescription()
        Gets the value(s) for description (). creating it if it does not exist. This method may return null.

        Definition: A description of the substance - its appearance, handling requirements, and other usage notes

      • setDescription

        public Substance setDescription​(ca.uhn.fhir.model.primitive.StringDt theValue)
        Sets the value(s) for description ()

        Definition: A description of the substance - its appearance, handling requirements, and other usage notes

      • setDescription

        public Substance setDescription​(String theString)
        Sets the value for description ()

        Definition: A description of the substance - its appearance, handling requirements, and other usage notes

      • getInstance

        public List<Substance.InstancegetInstance()
        Gets the value(s) for instance (class). creating it if it does not exist. Will not return null.

        Definition: Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance

      • setInstance

        public Substance setInstance​(List<Substance.Instance> theValue)
        Sets the value(s) for instance (class)

        Definition: Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance

      • addInstance

        public Substance.Instance addInstance()
        Adds and returns a new value for instance (class)

        Definition: Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance

      • addInstance

        public Substance addInstance​(Substance.Instance theValue)
        Adds a given new value for instance (class)

        Definition: Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance

        Parameters:
        theValue - The instance to add (must not be null)
      • getInstanceFirstRep

        public Substance.Instance getInstanceFirstRep()
        Gets the first repetition for instance (class), creating it if it does not already exist.

        Definition: Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance

      • getIngredient

        public List<Substance.IngredientgetIngredient()
        Gets the value(s) for ingredient (). creating it if it does not exist. Will not return null.

        Definition: A substance can be composed of other substances

      • addIngredient

        public Substance.Ingredient addIngredient()
        Adds and returns a new value for ingredient ()

        Definition: A substance can be composed of other substances

      • addIngredient

        public Substance addIngredient​(Substance.Ingredient theValue)
        Adds a given new value for ingredient ()

        Definition: A substance can be composed of other substances

        Parameters:
        theValue - The ingredient to add (must not be null)
      • getIngredientFirstRep

        public Substance.Ingredient getIngredientFirstRep()
        Gets the first repetition for ingredient (), creating it if it does not already exist.

        Definition: A substance can be composed of other substances

      • getResourceName

        public String getResourceName()
        Specified by:
        getResourceName in interface ca.uhn.fhir.model.api.IResource
      • getStructureFhirVersionEnum

        public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
        Specified by:
        getStructureFhirVersionEnum in interface org.hl7.fhir.instance.model.api.IBaseResource
        Specified by:
        getStructureFhirVersionEnum in interface ca.uhn.fhir.model.api.IResource