import { uri, Task, Identifier, Reference, TaskStatus, TaskIntent, dateTime, TaskInput } from 'fhir'; import { DomainResourceBuilder } from './domain-resource-builder'; /** * Class reporesenting a FHIR Task builder * FIXME: Incomplete */ export declare class TaskBuilder extends DomainResourceBuilder { /** * The Task that is being built * @protected * @type { Task } * @ignore */ protected resource: Task; /** * Create a new FHIR TaskBuilder */ constructor(); /** * Sets a copy of an existing task for this TaskBuilder to allow for manipulation, * or interting with, the task through this TaskBuilder. * If no argument is provided, a new Task will be generated * @param { Task } task - the task to be set * @returns { TaskBuilder } this TaskBuilder * @override */ use(task?: Task): this; /** * Returns identifier from specific system if one exists or the identifier-array if no system was provided * @param { uri } system - the system from which to return the identifier * @returns { Identifier } the identifier if it exists */ getIdentifier(): Identifier[]; getIdentifier(system: uri): Identifier | undefined; /** * Replaces the identifier array with the provided array * If no argument is provided, the field will be removed * @param { Identifier[] } identifiers - the identifier to be set * @returns { TaskBuilder } - this TaskBuilder */ setIdentifier(identifier?: Identifier[]): this; /** * Appends an identifier to the task, if an identifier within the system does not already exist * @param { Identifier } identifier - the identifier to be appended * @returns { TaskBuilder } - this TaskBuilder * @throws { MissingPropertyError } When the identifier is missing necessary properties * @throws { AlreadyExistsError } When an identifier in that system already exists on the task */ addIdentifier(identifier: Identifier): this; /** * Returns the basedOn-array * @returns { Reference[] } The basedOn-array */ getBasedOn(): Reference[]; /** * Sets the basedOn-array to the provided array * If no argument is provided, the field will be removed * @param { Reference[] } basedOn The array to be set as the basedOn-array * @returns the Builder */ setBasedOn(basedOn?: Reference[]): this; /** * 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 * @param { Reference } reference The reference to be added to the basedOn-array * @returns the Builder */ addBasedOn(reference: Reference): this; /** * Returns the status field of the task * @returns { code } the code of the task */ getStatus(): TaskStatus; /** * Set the status field of the task * If no argument is provided, the field will be removed * @param { code } status - the status to be set */ setStatus(status: TaskStatus): this; /** * Returns the intent field of the task * @returns { TaskIntent } the intent of the task */ getIntent(): TaskIntent; /** * Set the intent field of the task * If no argument is provided, the field will be removed * @param { TaskIntent } intent - the intent to be set. * Must be one of: unknown | proposal | plan | order | original-order | reflex-order | filler-order * @returns { TaskBuilder } this TaskBuilder */ setIntent(intent: TaskIntent): this; /** * Returns the authoredOn field of the task if it is set * @returns { dateTime } the authoredOn of the task */ getAuthoredOn(): dateTime | undefined; /** * Set the authoredOn field of the task * If no argument is provided, the field will be removed * @param { dateTime } authoredOn - the date to be set as authoredOn * @returns { TaskBuilder } this TaskBuilder */ setAuthoredOn(authoredOn?: dateTime): this; /** * Returns the lastModified field of the task if it is set * @returns { dateTime } the lastModified of the task */ getLastModified(): dateTime | undefined; /** * Set the lastModified field of the task * If no argument is provided, the field will be removed * @param { dateTime } lastModified - the date to be set as lastModified * @returns { TaskBuilder } this TaskBuilder */ setLastModified(lastModified?: dateTime): this; /** * Returns the input-array * @returns { TaskInput[] } The input-array */ getInput(): TaskInput[]; /** * Sets the input-array to the provided array * If no argument is provided, the field will be removed * @param { TaskInput[] } input The array to be set as the input-array * @returns the Builder */ setInput(input?: TaskInput[]): this; /** * 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 * @param { TaskInput } reference The reference to be added to the input-array * @returns the Builder */ addInput(input: TaskInput): this; /** * Returns whether or not the task provided as an argument is in conflict with the task used in the builder * @param { Task } task The task to test for conflict * @returns { boolean } Whether it is in conflict */ conflictsWith(task: Task): boolean; /** * Make a new object that implements a FHIR Task * @returns { Task } - an object that implements FHIR Task * @override */ protected make(): Task; /** * Builds and returns the task * @returns { Task } - the task * @override */ build(): Task; }