Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FhirPath

Hierarchy

  • FhirPath

Index

Constructors

constructor

  • new FhirPath(resources: any, parser: any): FhirPath
  • Constructs a new instance of the FhirPath class with one or mores resources

    classdesc

    Handles evaluation of FhirPath against one or more resources. See http://build.fhir.org/fhirpath.html for more information.

    Parameters

    • resources: any

      One or more resources that the class should evaluate FhirPath against

    • parser: any

      The conformance parser to use when needing to reference definitions of resources

    Returns FhirPath

Events

resolve

  • resolve(reference: any): void
  • A callback which is executed when a reference needs to be resolved to a resource. This should be overridden by the caller of the FhirPath class.

    Parameters

    • reference: any

      The reference that needs to be resolved

    Returns void

    Should return a Resource instance

Properties

Readonly operators

operators: string[] = ...

Private parser

parser: any

Readonly resources

resources: any

Methods

evaluate

  • evaluate(fhirPath: any): any
  • Evaluates the given fhirPath string against the resources passed in the constructor of the class In the event of an operator comparison, returns a boolean In the event of a path evaluation, returns the value of the given path (for each of the resources)

    Parameters

    • fhirPath: any

      The FhirPath string to evaluate against the resources provided to the FhirPath class

    Returns any

    The result of the evaluation. Can be either an object, boolean or array of results

Private findClosingParenIndex

  • findClosingParenIndex(string: any, startIndex: any): any
  • Parameters

    • string: any
    • startIndex: any

    Returns any

Private findClosingQuoteIndex

  • findClosingQuoteIndex(string: any, startIndex: any): any
  • Parameters

    • string: any
    • startIndex: any

    Returns any

Private getResourceTypes

  • getResourceTypes(): string[]
  • Gets a list of all resource type names from the ParseConformance class loaded with the FhirPath class.

    Returns string[]

Private getValue

  • getValue(current: any, paths: any): any
  • Parameters

    • current: any
    • paths: any

    Returns any

Private internalEvaluate

  • internalEvaluate(resource: any, statements: any): boolean | any[]
  • Evaluates the given statements against the specified single resource.

    Parameters

    • resource: any
    • statements: any

    Returns boolean | any[]

Private internalResolve

  • internalResolve(reference: any): any
  • Attempts to resolve the resource reference using this resources. If no resource is found in the resources provided to the FhirPath class, calls the resolve event.

    fires

    FhirPath#resolve

    Parameters

    • reference: any

      The resource reference string to resolve

    Returns any

Private parse

  • parse(fhirPath: any): StatementStructure[]
  • Parses the specified path into a structure

    Parameters

    • fhirPath: any

    Returns StatementStructure[]

Private shouldReturnArray

  • shouldReturnArray(statements: any): boolean
  • Determines if the statements specified should result in an array being returned

    Parameters

    • statements: any

    Returns boolean

Generated using TypeDoc