Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TaskBuilder

Class reporesenting a FHIR Task builder FIXME: Incomplete

Hierarchy

Index

Constructors

constructor

Methods

addBasedOn

  • Adds the reference provided as an argument to the resource's reference array, if a reference referring to the same resource does not already exist in the array

    Parameters

    • reference: Reference

      The reference to be added to the basedOn-array

    Returns this

    the Builder

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

addIdentifier

  • Appends an identifier to the task, if an identifier within the system does not already exist

    throws

    { MissingPropertyError } When the identifier is missing necessary properties

    throws

    { AlreadyExistsError } When an identifier in that system already exists on the task

    Parameters

    • identifier: Identifier

      the identifier to be appended

    Returns this

    • this TaskBuilder

addInput

  • Adds the reference provided as an argument to the resource's reference array, if a reference referring to the same resource does not already exist in the array

    Parameters

    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(task: Task): boolean
  • Returns whether or not the task provided as an argument is in conflict with the task used in the builder

    Parameters

    • task: Task

      The task to test for conflict

    Returns boolean

    Whether it is in conflict

getAuthoredOn

  • Returns the authoredOn field of the task if it is set

    Returns dateTime | undefined

    the authoredOn of the task

getBasedOn

  • Returns the basedOn-array

    Returns Reference[]

    The basedOn-array

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

getIdentifier

  • Returns identifier from specific system if one exists or the identifier-array if no system was provided

    Returns Identifier[]

    the identifier if it exists

  • Parameters

    Returns Identifier | undefined

getImplicitRules

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

    Returns uri | undefined

    The implicitRules-field

getInput

  • Returns the input-array

    Returns TaskInput[]

    The input-array

getIntent

  • Returns the intent field of the task

    Returns TaskIntent

    the intent of the task

getLanguage

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

    Returns code | undefined

    The language-field

getLastModified

  • getLastModified(): dateTime | undefined
  • Returns the lastModified field of the task if it is set

    Returns dateTime | undefined

    the lastModified of the task

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

getStatus

  • Returns the status field of the task

    Returns TaskStatus

    the code of the task

getText

Protected make

  • Make a new object that implements a FHIR Task

    override

    Returns Task

    • an object that implements FHIR Task

setAuthoredOn

  • setAuthoredOn(authoredOn?: dateTime): this
  • Set the authoredOn field of the task If no argument is provided, the field will be removed

    Parameters

    • Optional authoredOn: dateTime

      the date to be set as authoredOn

    Returns this

    this TaskBuilder

setBasedOn

  • Sets the basedOn-array to the provided array If no argument is provided, the field will be removed

    Parameters

    • Optional basedOn: Reference[]

      The array to be set as the basedOn-array

    Returns this

    the Builder

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

setIdentifier

  • Replaces the identifier array with the provided array If no argument is provided, the field will be removed

    Parameters

    Returns this

    • this TaskBuilder

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

setInput

  • Sets the input-array to the provided array If no argument is provided, the field will be removed

    Parameters

    • Optional input: TaskInput[]

      The array to be set as the input-array

    Returns this

    the Builder

setIntent

  • Set the intent field of the task If no argument is provided, the field will be removed

    Parameters

    • intent: TaskIntent

      the intent to be set. Must be one of: unknown | proposal | plan | order | original-order | reflex-order | filler-order

    Returns this

    this TaskBuilder

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

setLastModified

  • setLastModified(lastModified?: dateTime): this
  • Set the lastModified field of the task If no argument is provided, the field will be removed

    Parameters

    • Optional lastModified: dateTime

      the date to be set as lastModified

    Returns this

    this TaskBuilder

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

setStatus

  • Set the status field of the task If no argument is provided, the field will be removed

    Parameters

    Returns this

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

  • use(task?: Task): this
  • Sets a copy of an existing task for this TaskBuilder to allow for manipulation, or interacting with, the task through this TaskBuilder. If no argument is provided, a new Task will be generated

    override

    Parameters

    • Optional task: Task

      the task to be set

    Returns this

    this TaskBuilder

Generated using TypeDoc