Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DomainResourceBuilder

Class representing a FHIR DomainResource builder

Hierarchy

Index

Constructors

constructor

Methods

addContained

  • addContained(contained: Resource): this
  • Adds the resource provided as an argument to the resource's contained array, if a resource with that id does not already exist in the array.

    throws

    { AlreadyExistsError } If the resource already exists

    Parameters

    • contained: Resource

      The resource to be added to the contained array

    Returns this

    the Builder

addExtension

  • Adds the extension provided as an argument to the resource's extension array

    Parameters

    • extension: Extension

      The extension to be added to the extension-array

    Returns this

    the Builder

addModifierExtension

  • addModifierExtension(modifierExtension: Extension): this
  • Adds the extension provided as an argument to the resource's modifierExtension array

    Parameters

    • modifierExtension: Extension

      The modifierExtension to be added to the modifierExtension-array

    Returns this

    the Builder

build

conflictsWith

  • conflictsWith(resource: Resource): boolean
  • Returns whether or not the resource provided as an argument is in conflict with the resource used in the builder

    Parameters

    • resource: Resource

      The resource to test for conflict

    Returns boolean

    Whether it is in conflict

getContained

  • Returns either the resource identified by the provided id from the contained array or the entire contained array, if no id is provided

    Returns Resource[]

    The resource if it exists or the contained-array

  • Parameters

    Returns Resource | undefined

getExtension

  • Returns either the extensions identified by the provided url from the extension array or the entire extension array, if no url is provided

    Parameters

    • Optional url: uri

    Returns Extension[]

    The extensions if they exists or the extension-array

getId

  • getId(): id | undefined
  • Returns the resource's id

    Returns id | undefined

    The resource's id

getImplicitRules

  • getImplicitRules(): uri | undefined
  • Returns the implicitRules-field of the Resource

    Returns uri | undefined

    The implicitRules-field

getLanguage

  • getLanguage(): code | undefined
  • Returns the language-field of the Resource

    Returns code | undefined

    The language-field

getMeta

  • getMeta(): Meta | undefined
  • Returns the meta-field of the Resource

    Returns Meta | undefined

    The meta-field

getModifierExtension

  • Returns either the modifierExtensions identified by the provided url from the modifierExtension array or the entire modifierExtension array, if no url is provided

    Parameters

    • Optional url: uri

    Returns Extension[]

    The modifierExtensions if they exists or the modifierExtension-array

getResourceType

  • getResourceType(): code | undefined
  • Returns the resourceType-field of the Resource

    Returns code | undefined

    The resourceType-field

getText

  • Returns the text-field of the DomainResource

    Returns Narrative | undefined

    The text-field

Protected make

  • Make a new object that implements a FHIR DomainResource

    override

    Returns DomainResource

    • an object that implements FHIR DomainResource

setContained

  • setContained(contained?: Resource[]): this
  • Sets the resource's contained-array to the provided array If no argument is provided, the field will be removed

    Parameters

    • Optional contained: Resource[]

      The array to be set as the resource's contained array

    Returns this

    the Builder

setExtension

  • setExtension(extension?: Extension[]): this
  • Sets the resource's extension-array to the provided array If no argument is provided, the field will be removed

    Parameters

    • Optional extension: Extension[]

      The array to be set as the resource's extension array

    Returns this

    the Builder

setId

  • setId(id?: id): this
  • Sets the resource's id to the id provided as an argument If no argument is provided, the field will be removed

    Parameters

    • Optional id: id

      the id to be set

    Returns this

    the Builder

setImplicitRules

  • setImplicitRules(implicitRules?: uri): this
  • Sets the implicitRules-field of the Resource If no argument is provided, the field will be removed

    Parameters

    • Optional implicitRules: uri

      The value to be set in the implicitRules-field

    Returns this

    • The builder

setLanguage

  • setLanguage(language?: code): this
  • Sets the language-field of the Resource If no argument is provided, the field will be removed

    Parameters

    • Optional language: code

    Returns this

    • The builder

setMeta

  • setMeta(meta?: Meta): this
  • Sets the meta-field of the Resource If no argument is provided, the field will be removed

    Parameters

    • Optional meta: Meta

      The value to be set in the meta-field

    Returns this

    • The builder

setModifierExtension

  • setModifierExtension(modifierExtension?: Extension[]): this
  • Sets the resource's modifierExtension-array to the provided array If no argument is provided, the field will be removed

    Parameters

    • Optional modifierExtension: Extension[]

      The array to be set as the resource's modifierExtension array

    Returns this

    the Builder

setResourceType

  • setResourceType(resourceType?: code): this
  • Sets the resourceType-field of the Resource If no argument is provided, the field will be removed

    Parameters

    • Optional resourceType: code

      The value to be set in the resourceType-field

    Returns this

    • The builder

setText

  • Sets the text-field of the DomainResource If no argument is provided, the field will be removed

    Parameters

    • Optional text: Narrative

      The value to be set in the text-field

    Returns this

    • The builder

use

  • Sets a copy of an existing domainResource for this builder to allow for manipulation, If no argument is provided, a new DomainResource will be generated

    override

    Parameters

    • Optional domainResource: DomainResource

      the domainResource to be set

    Returns this

    The builder

Generated using TypeDoc