Class ReferenceFinder


  • public class ReferenceFinder
    extends java.lang.Object
    This class contains utility functions for finding "reference" fields within a FHIR resource.
    • Constructor Summary

      Constructors 
      Constructor Description
      ReferenceFinder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<Reference> getReferences​(Resource resource)
      Returns a list of Reference fields that are found in the specified resource instance.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReferenceFinder

        public ReferenceFinder()
    • Method Detail

      • getReferences

        public static java.util.List<Reference> getReferences​(Resource resource)
                                                       throws java.lang.Exception
        Returns a list of Reference fields that are found in the specified resource instance. For example, an Observation has a "subject" field of type Reference, so if this method is called on an Observation instance that has the "subject" field set, then we'll return the Reference instance that represents this "subject" field
        Parameters:
        resource - the FHIR resource for which we want to find all Reference fields
        Returns:
        list of Reference instances found in the specified FHIR resource
        Throws:
        java.lang.Exception