Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CarePlanBuilder

Class representing a FHIR CarePlan builder

Hierarchy

Index

Constructors

constructor

Methods

_generateIsoDate

  • _generateIsoDate(): string
  • Public make-method for mocking

    Returns string

addActivity

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

    Parameters

    Returns this

    the Builder

addAddresses

  • Appends an address to the careplan, if an addres within the system does not already exist

    throws

    { MissingPropertyError } When the Reference is missing necessary properties

    throws

    { AlreadyExistsError } When the Reference is missing necessary properties

    Parameters

    Returns this

    • this CarePlanBuilder

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 element 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, if an extension with that url does not already exist in the array.

    Parameters

    • extension: Extension

      The extension to be added to the extension-array

    Returns this

    the Builder

addIdentifier

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

    throws

    { MissingPropertyError } When identifier is missing necessary properties

    throws

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

    Parameters

    • identifier: Identifier

      the identifier to be appended

    Returns this

    • this CarePlanBuilder

addInstantiatesCanonical

  • addInstantiatesCanonical(canonical: canonical): this
  • Appends a plan definition canonical reference to the careplan, if it does not already exist

    throws

    { AlreadyExistsError } When the canonical already exists on the CarePlan

    Parameters

    • canonical: canonical

      the canonical reference to be appended

    Returns this

    • this CarePlanBuilder

addModifierExtension

  • addModifierExtension(modifierExtension: Extension): this
  • Adds the modifierExtension provided as an argument to the resource's modifierExtension array, if an modifierExtension with that url does not already exist in the 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

getActivity

  • Returns either the carePlanActivity identified by the provided id from the activity-array or the entire activity-array, if no id is provided

    Returns CarePlanActivity[]

    The carePlanActivity identified by the provided id or the activity-array

  • Parameters

    Returns CarePlanActivity | undefined

getAddresses

  • Returns the addresses-field for careplan

    Returns Reference[]

    • the addresses-field

getAuthor

  • Returns the careplan's author

    Returns Reference

    author - the author of the careplan

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

getCreated

  • Returns the careplan's created field

    Returns dateTime

    created - the date the careplan's was created

getEncounter

  • Returns the careplan's encounter

    Returns Reference

    encounter - the encounter to which the careplan is related.

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 either the identifier identified by the provided system from the identifier-array or the entire identifier array, if no system is provided

    Returns Identifier[]

    The identifier if it exists or the identifier-array

  • Parameters

    Returns Identifier | undefined

getImplicitRules

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

    Returns uri | undefined

    The implicitRules-field

getInstantiatesCanonical

  • Returns all plan definition canonical references for careplan

    Returns canonical[]

    • the canonicals

getIntent

  • Returns the careplan's intent field. This field is contrained to 'order'

    Returns CarePlanIntent

    • the intent of the careplan

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

getPeriod

  • getPeriod(): Period | undefined
  • Returns the careplan's period

    Returns Period | undefined

    period - the period within which the careplan is active

getResourceType

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

    Returns code | undefined

    The resourceType-field

getStatus

  • Returns the careplan's status field

    Returns CarePlanStatus

    • the status of the careplan

getSubject

  • Returns the careplan's subject

    Returns Reference

    subject - the subject of the careplan

getText

getTitle

  • getTitle(): string | undefined
  • Returns the carplan's title field

    Returns string | undefined

    the title of the careplan

Protected make

  • Make a new object that implements a FHIR CarePlan

    Returns CarePlan

    • an object that implements FHIR CarePlan

setActivity

  • Sets the activity-array to the provided array

    Parameters

    Returns this

    the Builder

setAddresses

  • setAddresses(addresses?: Reference[]): this
  • Replace the addresses array with the provided array

    Parameters

    Returns this

    • this CarePlanBuilder

setAuthor

  • Sets the careplan's author field

    Parameters

    • Optional author: Reference

      the author which the careplan refereces

    Returns this

    this CarePlanBuilder

setContained

  • setContained(contained?: Resource[]): this
  • Sets the resource's contained-array to the provided array

    Parameters

    • Optional contained: Resource[]

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

    Returns this

    the Builder

setCreated

  • Sets the careplan's created field

    Parameters

    • Optional created: dateTime

      the date the careplan's was created

    Returns this

    this CarePlanBuilder

setEncounter

  • Sets the careplan's encounter field

    Parameters

    • Optional encounter: Reference

      the encounter to which the careplan is related

    Returns this

    this CarePlanBuilder

setExtension

  • setExtension(extension?: Extension[]): this
  • Sets the resource's extension-array to the provided array

    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

    Parameters

    • Optional id: id

      the id to be set

    Returns this

    the Builder

setIdentifier

  • Replaces the identifier array with the provided array

    Parameters

    Returns this

    • this CarePlanBuilder

setImplicitRules

  • setImplicitRules(implicitRules?: uri): this
  • Sets the implicitRules-field of the Resource

    Parameters

    • Optional implicitRules: uri

      The value to be set in the implicitRules-field

    Returns this

    • The builder

setInstantiatesCanonical

  • setInstantiatesCanonical(canonical?: canonical[]): this
  • Replaces the instantiatesCanonical array with the provided array

    Parameters

    • Optional canonical: canonical[]

      the array to be set

    Returns this

    • this CarePlanBuilder

setIntent

  • Sets the careplan's intent-field

    Parameters

    • intent: CarePlanIntent

      the intent to be set. Must be one of: draft | active | suspended | completed | entered-in-error | cancelled | unknown

    Returns this

    • The builder

setLanguage

  • setLanguage(language?: code): this
  • Sets the language-field of the Resource

    Parameters

    • Optional language: code

    Returns this

    • The builder

setMeta

  • setMeta(meta?: Meta): this
  • Sets the meta-field of the Resource

    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

    Parameters

    • Optional modifierExtension: Extension[]

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

    Returns this

    the Builder

setPeriod

  • setPeriod(period?: Period): this
  • Sets the careplan's period field

    Parameters

    • Optional period: Period

      the period within which the careplan is active

    Returns this

    this CarePlanBuilder

setResourceType

  • setResourceType(resourceType?: code): this
  • Sets the resourceType-field of the Resource

    Parameters

    • Optional resourceType: code

      The value to be set in the resourceType-field

    Returns this

    • The builder

setStatus

  • Sets the careplan's status field

    Parameters

    • status: CarePlanStatus

      the status to be set. Must be one of: draft | active | suspended | completed | entered-in-error | cancelled | unknown

    Returns this

    • The builder

setSubject

  • Sets the careplan's subject field

    Parameters

    • Optional subject: Reference

      the subject which the careplan refereces

    Returns this

    this CarePlanBuilder

setText

  • Sets the text-field of the DomainResource

    Parameters

    • Optional text: Narrative

      The value to be set in the text-field

    Returns this

    • The builder

setTitle

  • setTitle(title?: undefined | string): this
  • Sets the careplan's title field.

    Parameters

    • Optional title: undefined | string

      the title of the careplan

    Returns this

    this CarePlanBuilder

use

  • Sets an existing careplan for this CarePlanBuilder to allow for manipulating, or interacting with, the careplan through this CarePlanBuilder

    Parameters

    • Optional careplan: CarePlan

      The careplan to set

    Returns this

    This CarePlanBuilder

Generated using TypeDoc