Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CarePlanBuilder

Class representing a FHIR CarePlan builder

Hierarchy

Index

Constructors

constructor

Methods

add

  • Adds a questionnaire to the careplan, by adding a task referencing the canonical url of the questionnaire to the careplan's contained array, and adding an activity referencing the task to the careplan's activity array

    Parameters

    Returns this

    The builder

addActivity

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

    throws

    { AlreadyExistsError } If the activity is in conflict with an acitivty already existing in the activity array

    Parameters

    Returns this

    the Builder

addAddresses

  • Appends a reference to a condition, that this carePlan addresses

    throws

    { MissingPropertyError } When the Reference is missing necessary properties

    Parameters

    Returns this

    • this CarePlanBuilder

addContained

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

    throws

    { AlreadyExistsError } If the resource already exists

    override

    Parameters

    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 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 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

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 an array of references to conditions, that this carePlan addresses

    Returns Reference[]

    • the array of references

getAuthor

  • Returns the carePlan's author

    Returns Reference

    author - the author of the carePlan

getConflictingActivity

  • Returns the activity from the activity-array that is in conflict with the provided activity, if one exists

    Parameters

    Returns CarePlanActivity | undefined

    The activity that is in conflict with the provided activity

getConflictingContained

  • Returns the resource from the contained-array, that is in conflict with the provided resource, if one exists

    Parameters

    Returns Resource | undefined

    The resource that is in conflict with the provided activity

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 If no argument is provided, the field will be removed

    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

has

  • Checks if a Questionnaire with a specific canonical is already in the CarePlan.

    Parameters

    • canonical: canonical

      The canonical of the Questionnaire to check for

    Returns boolean

    A boolean value indicating whether the Questionnaire is already there or not.

remove

  • Removes a Questionnaire from the CarePlan based on the provided canonical reference

    Parameters

    Returns this

setActivity

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

    Parameters

    Returns this

    the Builder

setAddresses

  • setAddresses(addresses?: Reference[]): this
  • Replace the array of references to conditions, that this carePlan addresses with the provided array If no argument is provided, the field will be removed

    Parameters

    • Optional addresses: Reference[]

      The array of references

    Returns this

    • The builder

setAuthor

  • Sets the carePlan's author field If no argument is provided, the field will be removed

    Parameters

    • Optional author: Reference

      the author which the carePlan refereces

    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

setCreated

  • Sets the carePlan's created field If no argument is provided, the field will be removed

    Parameters

    • Optional created: dateTime

      the date the carePlan's was created

    Returns this

    this CarePlanBuilder

setEncounter

  • Sets the carePlan's encounter field If no argument is provided, the field will be removed

    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 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 CarePlanBuilder

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

setInstantiatesCanonical

  • setInstantiatesCanonical(canonical?: canonical[]): this
  • Replaces the instantiatesCanonical array with the provided array If no argument is provided, the field will be removed

    Parameters

    • Optional canonical: canonical[]

      the array to be set

    Returns this

    • this CarePlanBuilder

setIntent

  • Sets the carePlan's intent-field If no argument is provided, the field will be removed

    Parameters

    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

setPeriod

  • setPeriod(period?: Period): this
  • Sets the carePlan's period field If no argument is provided, the field will be removed

    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 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

  • Sets the carePlan's status field If no argument is provided, the field will be removed

    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 If no argument is provided, the field will be removed

    Parameters

    • Optional subject: Reference

      the subject which the carePlan refereces

    Returns this

    this CarePlanBuilder

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

setTitle

  • setTitle(title?: undefined | string): this
  • Sets the carePlan's title field. If no argument is provided, the field will be removed

    Parameters

    • Optional title: undefined | string

      the title of the carePlan

    Returns this

    this CarePlanBuilder

use

  • Sets a copy of an existing carePlan for this CarePlanBuilder to allow for manipulating, or interacting with, the carePlan through this CarePlanBuilder If no argument is provided, a new CarePlan will be generated

    override

    Parameters

    • Optional carePlan: CarePlan

      The carePlan to set

    Returns this

    The builder

Generated using TypeDoc