Class ReferenceFinder


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

      • ReferenceFinder

        public ReferenceFinder()
    • Method Detail

      • getReferences

        public static List<Reference> getReferences​(Resource resource)
                                             throws 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:
        Exception