Annotation Type History


RESTful method annotation to be used for the FHIR history method.

History returns a feed containing all versions (or a selected range of versions) of a resource or a specific set of resources.

The history command supports three usage patterns, as described in the FHIR history documentation:

  • A search for the history of all resources on a server. In this case, type() should be set to IResource (as is the default) and the method should not have an ID parameter.
    • To invoke this pattern: GET [base]/_history{?[parameters]&_format=[mime-type]}
  • A search for the history of all instances of a specific resource type on a server. In this case, type() should be set to the specific resource type (e.g. Patient.class) and the method should not have an ID parameter.
    • To invoke this pattern: GET [base]/[type]/_history{?[parameters]&_format=[mime-type]}
  • A search for the history of a specific instances of a specific resource type on a server. In this case, type() should be set to the specific resource type (e.g. Patient.class and the method should have one parameter of type IdDt annotated with the IdParam annotation.
    • To invoke this pattern: GET [base]/[type]/[id]/_history{?[parameters]&_format=[mime-type]}
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends IBaseResource>
    The resource type that this method applies to.
    This method allows the return type for this method to be specified in a non-type-specific way, using the text name of the resource, e.g.
  • Element Details

    • type

      The resource type that this method applies to. See the History annotation type documentation for information on usage patterns.
      Default:
      org.hl7.fhir.instance.model.api.IBaseResource.class
    • typeName

      This method allows the return type for this method to be specified in a non-type-specific way, using the text name of the resource, e.g. "Patient". This attribute should be populate, or type() should be, but not both.
      Since:
      5.4.0
      Default:
      ""