import { IDomainResource, IExtension, IResource } from './library-interfaces'; import { Resource } from './Resource'; import { Narrative } from '../data-types/complex/Narrative'; import { fhirUri } from '../data-types/primitive/primitive-types'; import * as JSON from '../utility/json-helpers'; /** * Abstract DomainResource Class * * @remarks * A resource that includes narrative, extensions, and contained resources. * * **FHIR Specification** * - **Short:** A resource with narrative, extensions, and contained resources. * - **Definition:** A resource that includes narrative, extensions, and contained resources. * - **FHIR Version:** 4.0.1; Normative since 4.0.0 * * @privateRemarks * Loosely based on HAPI FHIR org.hl7.fhir-core.r4.model.DomainResource * * @category Base Models * @see [FHIR DomainResource](http://hl7.org/fhir/StructureDefinition/DomainResource) */ export declare abstract class DomainResource extends Resource implements IDomainResource { protected constructor(); /** * DomainResource.text Element * * @remarks * **FHIR Specification** * - **Short:** Text summary of the resource, for human interpretation * - **Definition:** A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. * - **Comment:** Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded information is added later. * - **FHIR Type:** `Narrative` * - **Cardinality:** 0..1 * - **isModifier:** false * - **isSummary:** false */ private text?; /** * DomainResource.contained Element * * @remarks * **FHIR Specification** * - **Short:** Contained, inline Resources * - **Definition:** These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope. * - **Comment:** This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels. * - **FHIR Type:** `Resource` * - **Cardinality:** 0..* * - **isModifier:** false * - **isSummary:** false */ private contained?; /** * DomainResource.extension Element * * @remarks * **FHIR Specification** * - **Short:** Additional content defined by implementations * - **Definition:** May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. * - **Comment:** There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. * - **FHIR Type:** `Extension` * - **Cardinality:** 0..* * - **isModifier:** false * - **isSummary:** false */ private extension?; /** * DomainResource.modifierExtension Element * * @remarks * **FHIR Specification** * - **Short:** Extensions that cannot be ignored * - **Definition:** May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). * - **Comment:** There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone. * - **Requirements:** Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](https://hl7.org/fhir/R4/extensibility.html#modifierExtension). * - **FHIR Type:** `Extension` * - **Cardinality:** 0..* * - **isModifier:** true * - **isModifierReason:** Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](https://hl7.org/fhir/R4/extensibility.html#modifierExtension). * - **isSummary:** false */ private modifierExtension?; /** * @returns the `text` property value as a Narrative */ getText(): Narrative; /** * Assigns the provided value to the `text` property. * * @param value - the `text` value * @returns this */ setText(value: Narrative | undefined): this; /** * @returns `true` if the `text` property exists and has a value; `false` otherwise */ hasText(): boolean; /** * @returns the `contained` property value as a Resource array */ getContained(): IResource[]; /** * Assigns the provided Resource array value to the `contained` property. * * @param value - the `contained` array value * @returns this */ setContained(value: IResource[] | undefined): this; /** * Add the provided Resource value to the `contained` array property. * * @param value - the `contained` value * @returns this */ addContained(value: IResource | undefined): this; /** * @returns `true` if the `contained` property exists and has a value; `false` otherwise */ hasContained(): boolean; /** * Initialize the `contained` property */ private initContained; /** * @returns the array of `extension` values */ getExtension(): IExtension[]; /** * Assigns the provided array of Extension values to the `extension` property. * * @param extension - array of Extensions * @returns this */ setExtension(extension: IExtension[] | undefined): this; /** * Determines if the `extension` property exists. * * @remarks If the url is provided, determines if an Extension having * the provided url exists. If the url is not provided, determines * if the `extension` property exists and has any values. * * @param url - the url that identifies a specific Extension * @returns `true` if an Extension has the provided url; false otherwise * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid url */ hasExtension(url?: fhirUri): boolean; /** * Returns the Extension having the provided url. * * @param url - the url that identifies a specific Extension * @returns the Extension having the provided url * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid url */ getExtensionByUrl(url: fhirUri): IExtension | undefined; /** * Adds the provided Extension to the `extension` property array. * * @param extension - the Extension value to add to the `extension` property array * @returns this */ addExtension(extension: IExtension | undefined): this; /** * Removes the Extension having the provided url from the `extension` property array. * * @param url - the url that identifies a specific Extension to remove * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid url */ removeExtension(url: fhirUri): void; /** * Ensures the `extension` property exists and if not initializes it to an empty array. */ private initExtension; /** * Determines if `extension` property exists, and if so, determines if the `extension` array is empty. * * @returns `true` if the `extension` property array exists and has at least one element; false otherwise */ private existsExtension; /** * @returns the array of `modifierExtension` values */ getModifierExtension(): IExtension[]; /** * Assigns the provided array of Extension values to the `modifierExtension` property. * * @param extension - array of Extensions * @returns this */ setModifierExtension(extension: IExtension[] | undefined): this; /** * Determines if the `modifierExtension` property exists. * * @remarks If the url is provided, determines if an Extension having * the provided url exists. If the url is not provided, determines * if the `modifierExtension` property exists and has any values. * * @param url - the url that identifies a specific Extension * @returns `true` if an Extension has the provided url * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid url */ hasModifierExtension(url?: fhirUri): boolean; /** * Returns the Extension having the provided url. * * @param url - the url that identifies a specific Extension * @returns the Extension having the provided url * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid url */ getModifierExtensionByUrl(url: fhirUri): IExtension | undefined; /** * Adds the provided Extension to the `modifierExtension` property array. * * @param extension - the Extension value to add to the `modifierExtension` property array * @returns this */ addModifierExtension(extension: IExtension | undefined): this; /** * Removes the Extension having the provided url from the `modifierExtension` property array. * * @param url - the url that identifies a specific Extension to remove * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid url */ removeModifierExtension(url: fhirUri): void; /** * Ensures the `modifierExtension` property exists and if not initializes it to an empty array. * */ private initModifierExtension; /** * Determines if `modifierExtension` property exists, and if so, determines if the `modifierExtension` * array is empty. * * @returns `true` if the `modifierExtension` property array exists and has at least one element; * false otherwise */ private existsModifierExtension; /** * @returns the FHIR type defined in the FHIR standard */ abstract fhirType(): string; /** * @returns `true` if the instance is empty; `false` otherwise */ isEmpty(): boolean; /** * Creates a copy of the current instance. * * @returns the a new instance copied from the current instance */ abstract copy(): DomainResource; /** * Copies the current instance's elements into the provided object. * * @param dest - the copied instance * @protected */ protected copyValues(dest: DomainResource): void; /** * @returns the JSON value */ toJSON(): JSON.Value | undefined; } //# sourceMappingURL=DomainResource.d.ts.map