Interface IResource
- All Superinterfaces:
IBase
,IBaseResource
,ICompositeElement
,IElement
,Serializable
- All Known Subinterfaces:
BaseConformance
,BaseOperationOutcome
,BaseSecurityEvent
@ResourceDef
annotation.
Note that this class is a part of HAPI's model API, used to define structure classes. Users will often interact with this interface, but should not need to implement it directly.
-
Field Summary
Fields inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
INCLUDE_ALL, WILDCARD_ALL_SET
-
Method Summary
Modifier and TypeMethodDescriptionReturns the contained resource list for this resource.getId()
Returns the ID of this resource.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 patientgetMeta()
Returns a view of theresource metadata
map.Returns the metadata map for this object, creating it if neccesary.Returns a String representing the name of this Resource.Returns the FHIR version represented by this structuregetText()
Returns the narrative block for this resourcevoid
Sets the ID of this resource.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 patientvoid
Sets the metadata map for this object.Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, isEmpty, setUserData
Methods inherited from interface org.hl7.fhir.instance.model.api.IBaseResource
getIdElement, isDeleted, setId, setId
Methods inherited from interface ca.uhn.fhir.model.api.ICompositeElement
getAllPopulatedChildElementsOfType
-
Method Details
-
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
TODO: document contained resources and link therePatient#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. -
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
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 -
getMeta
Returns a view of theresource metadata
map. Note that getters from this map return immutable objects, but theaddFoo()
andsetFoo()
methods may be used to modify metadata.- Specified by:
getMeta
in interfaceIBaseResource
- Since:
- 1.5
-
getResourceMetadata
Returns the metadata map for this object, creating it if neccesary. Metadata entries are used to get/set feed bundle entries, such as the resource version, or the last updated timestamp.Keys in this map are enumerated in the
ResourceMetadataKeyEnum
, and each key has a specific value type that it must use.- See Also:
-
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"
-
getStructureFhirVersionEnum
Returns the FHIR version represented by this structure- Specified by:
getStructureFhirVersionEnum
in interfaceIBaseResource
-
getText
BaseNarrativeDt<?> getText()Returns the narrative block for this resource -
setId
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
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
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
-