Interface IResource

    • Method Detail

      • getContained

        BaseContainedDt getContained()
        Returns the contained resource list for this resource.

        Usage note: HAPI will generally populate and use the resources from this list automatically (placing inline resources in the contained list when encoding, and copying contained resources from this list to their appropriate references when parsing) so it is generally not neccesary to interact with this list directly. Instead, in a server you can place resource instances in reference fields (such as Patient#setManagingOrganization(ResourceReferenceDt) ) and the resource will be automatically contained. In a client, contained resources will be automatically populated into their appropriate fields by the HAPI parser.

        TODO: document contained resources and link there
      • getId

        IdDt getId()
        Returns the ID of this resource. Note that this identifier is the URL (or a portion of the URL) used to access this resource, and is not the same thing as any business identifiers stored within the resource. For example, a Patient resource might have any number of medical record numbers but these are not stored here.

        This ID is specified as the "Logical ID" and "Version ID" in the FHIR specification, see here

      • getLanguage

        CodeDt getLanguage()
        Gets the language of the resource itself - NOTE that this language attribute applies to the resource itself, it is not (for example) the language spoken by a practitioner or patient
      • getResourceName

        String getResourceName()
        Returns a String representing the name of this Resource. This return value is not used for anything by HAPI itself, but is provided as a convenience to developers using the API.
        Returns:
        the name of this resource, e.g. "Patient", or "Observation"
      • setId

        void setId​(IdDt theId)
        Sets the ID of this resource. Note that this identifier is the URL (or a portion of the URL) used to access this resource, and is not the same thing as any business identifiers stored within the resource. For example, a Patient resource might have any number of medical record numbers but these are not stored here.

        This ID is specified as the "Logical ID" and "Version ID" in the FHIR specification, see here

      • setLanguage

        void setLanguage​(CodeDt theLanguage)
        Sets the language of the resource itself - NOTE that this language attribute applies to the resource itself, it is not (for example) the language spoken by a practitioner or patient
      • setResourceMetadata

        void setResourceMetadata​(ResourceMetadataMap theMap)
        Sets the metadata map for this object. Metadata entries are used to get/set feed bundle entries, such as the resource version, or the last updated timestamp.
        Throws:
        NullPointerException - The map must not be null