import { Base } from './Base'; import { fhirString, fhirUri } from '../data-types/primitive/primitive-types'; import * as JSON from '../utility/json-helpers'; import { IBackboneElement, IBackboneType, IDataType, IElement, IExtension, IPrimitiveType } from './library-interfaces'; /** * Abstract Element Class * * @remarks * Base StructureDefinition for Element Type: Base definition for all elements in a resource. * * There are 3 kinds of descendant types that specialize Element: * - Primitive datatypes, that add a primitive value property of the specified type * - Complex datatypes, that add their own children (all of which are also elements) * - BackboneElement, a specialization that adds modifierExtension, which is the super-type of all the element types defined in resource definitions (e.g. Patient.contact) * * **FHIR Specification** * - **Short:** Base for all elements * - **Definition:** Base definition for all elements in a resource. * - **FHIR Version:** 4.0.1; Normative since 4.0.0 * * @privateRemarks * Loosely based on HAPI FHIR org.hl7.fhir-core.r4.model.Element * * @category Base Models * @see [FHIR Element](http://hl7.org/fhir/StructureDefinition/Element) */ export declare abstract class Element extends Base implements IElement { protected constructor(); /** * Element.id Element * * @remarks * **FHIR Specification** * - **Short:** Unique id for inter-element referencing * - **Definition:** Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. * - **FHIR Type:** `string` * - **Cardinality:** 0..1 * - **isModifier:** false * - **isSummary:** false */ private id?; /** * Element.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 element. 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?; /** * @returns the `id` property value */ getId(): fhirString | undefined; /** * Assigns the provided value to the `id` property. * * @param value - the `id` value * @returns this * @throws {@link PrimitiveTypeError} for invalid value */ setId(value: fhirString | undefined): this; /** * @returns `true` if `id` exists and has a value; `false` otherwise */ hasId(): boolean; /** * @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; /** * 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 an 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 FHIR type defined in the FHIR standard */ 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(): Element; /** * Copies the current instance's elements into the provided object. * * @param dest - the copied instance * @protected */ protected copyValues(dest: Element): void; /** * @returns the JSON value */ toJSON(): JSON.Value | undefined; } /** * Abstract BackboneElement Class * * @remarks * Base StructureDefinition for BackboneElement Type: Base definition for all elements that are defined inside a resource - but not those in a data type. * * **FHIR Specification** * - **Short:** Base for elements defined inside a resource * - **Definition:** Base definition for all elements that are defined inside a resource - but not those in a data type. * - **FHIR Version:** 4.0.1; Normative since 4.0.0 * * @privateRemarks * Loosely based on HAPI FHIR org.hl7.fhir-core.r4.model.BackboneElement * * @category Base Models * @see [FHIR BackboneElement](http://hl7.org/fhir/StructureDefinition/BackboneElement) */ export declare abstract class BackboneElement extends Element implements IBackboneElement { protected constructor(); /** * BackboneElement.modifierExtension Element * * @remarks * **FHIR Specification** * - **Short:** Extensions that cannot be ignored even if unrecognized * - **Definition:** May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained 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 can 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 are expected to modify the meaning or interpretation of the element that contains them * - **isSummary:** true */ private modifierExtension?; /** * @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; false otherwise * @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 not, determines if the `modifierExtension` * array is empty. * * @returns `true` if the `modifierExtension` property exists and has at least one element; false otherwise */ private existsModifierExtension; /** * @returns the FHIR type defined in the FHIR standard */ 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(): BackboneElement; /** * Copies the current instance's elements into the provided object. * * @param dest - the copied instance * @protected */ protected copyValues(dest: BackboneElement): void; /** * @returns the JSON value */ toJSON(): JSON.Value | undefined; } /** * Abstract DataType Class * * @remarks * DataType Type: The base class for all re-useable types defined as part of the FHIR Specification. * * **FHIR Specification** * - **Short:** Reuseable Types * - **Definition:** The base class for all re-useable types defined as part of the FHIR Specification. * - **FHIR Version:** 5.0.0; Normative since 4.0.0 * * @privateRemarks * Loosely based on HAPI FHIR org.hl7.fhir-core.r4.model.DataType * * @category Base Models * @see [FHIR DataType](http://hl7.org/fhir/StructureDefinition/DataType) */ export declare abstract class DataType extends Element implements IDataType { protected constructor(); /** * Creates a copy of the current instance. * * @returns the a new instance copied from the current instance */ abstract copy(): DataType; /** * @returns `true` if the instance is a FHIR complex or primitive datatype; `false` otherwise */ isDataType(): boolean; /** * @returns the complex or primitive data model type name (e.g., 'Period", 'StringType', `UriType', etc.) */ abstract dataTypeName(): string; } /** * Abstract BackboneType Class * * @remarks * BackboneType Type: Base definition for the few data types that are allowed to carry modifier extensions. * * **FHIR Specification** * - **Short:** Base for datatypes that can carry modifier extensions * - **Definition:** Base definition for the few data types that are allowed to carry modifier extensions. * - **FHIR Version:** 5.0.0; Normative since 4.0.0 * * @privateRemarks * Loosely based on HAPI FHIR org.hl7.fhir-core.r4.model.BackboneType * * @category Base Models * @see [FHIR BackboneType](http://hl7.org/fhir/StructureDefinition/BackboneType) */ export declare abstract class BackboneType extends DataType implements IBackboneType { protected constructor(); /** * BackboneType.modifierExtension Element * * @remarks * **FHIR Specification** * - **Short:** Extensions that cannot be ignored even if unrecognized * - **Definition:** May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained 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 managable, 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. 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 are expected to modify the meaning or interpretation of the element that contains them * - **isSummary:** true */ private modifierExtension?; /** * @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 `modifierExtension` property exists for the provided `url` * * @param url - the url that identifies a specific Extension * @returns `true` if the `modifierExtension` property exists and has at least one element; false otherwise */ 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` exists and if not initializes it to an empty array. */ private initModifierExtension; /** * Determines if `modifierExtension` property exists, and if not, determines if the `modifierExtension` * array is empty. * * @returns `true` if the `modifierExtension` property exists and has at least one element; false otherwise */ private existsModifierExtension; /** * @returns the FHIR type defined in the FHIR standard */ 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(): BackboneType; /** * Copies the current instance's elements into the provided object. * * @param dest - the copied instance * @protected */ protected copyValues(dest: BackboneType): void; /** * @returns the JSON value */ toJSON(): JSON.Value | undefined; } /** * Abstract PrimitiveType Class * * @remarks * PrimitiveType Type: The base type for all re-useable types defined that have a simple property. * * **FHIR Specification** * - **Short:** Parent type for DataTypes with a simple value * - **Definition:** The base type for all re-useable types defined that have a simple property. * - **FHIR Version:** 5.0.0; Normative since 4.0.0 * * @privateRemarks * Loosely based on HAPI FHIR org.hl7.fhir-core.r4.model.PrimitiveType * * @category Base Models * @typeParam T - the primitive type * @see [FHIR PrimitiveType](http://hl7.org/fhir/StructureDefinition/PrimitiveType) */ export declare abstract class PrimitiveType extends DataType implements IPrimitiveType { protected constructor(); /** * T - primitive type defined in primitive-types.ts */ private coercedValue; /** * `string` representation of T */ private stringValue; /** * @returns the generic T property value */ getValue(): T | undefined; /** * Assigns the provided `value`. * * @param value - the generic T value * @returns this * @throws {@link PrimitiveTypeError} for invalid value */ setValue(value?: T): this; /** * @returns `true` if the generic T value exists and has a value; `false` otherwise */ hasValue(): boolean; /** * @returns the generic T property value as a `string` */ getValueAsString(): string | undefined; /** * Assigns the provided value and coerces it to the T type. * * @param value - the `string` value of the primitive type * @throws {@link PrimitiveTypeError} for invalid value */ setValueAsString(value?: string): void; /** * Updates this.stringValue based on the current this.coercedValue. * * @throws {@link PrimitiveTypeError} for invalid value */ private updateStringValue; /** * Encodes the provided generic T value as a `string`. * * @param value - the generic T value * @returns the `string` representation of T * @throws {@link PrimitiveTypeError} for invalid value */ abstract encodeToString(value: T): string; /** * Parses the provided `string` value and coerces it into the generic T value. * * @param value - the `string` representation of the generic T value * @returns the generic T value * @throws {@link PrimitiveTypeError} for invalid value */ abstract parseToPrimitive(value: string): T; /** * @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(): PrimitiveType; /** * Copies the current instance's elements into the provided object. * * @param dest - the copied instance * @protected */ protected copyValues(dest: PrimitiveType): void; /** * @returns `true` if the instance is a FHIR primitive datatype; `false` otherwise */ isPrimitive(): boolean; /** * @returns the primitive data type's JSON value containing the actual primitive's value * * @see [Representations - JSON](https://hl7.org/fhir/R5/datatypes.html#representations) * @see {@link PrimitiveType.toSiblingJSON} */ toJSON(): JSON.Value | undefined; /** * @returns the primitive data type's sibling JSON value containing the `id` and/or `extension` properties * * @see [Representations - JSON](https://hl7.org/fhir/R5/datatypes.html#representations) * @see {@link PrimitiveType.toJSON} */ toSiblingJSON(): JSON.Value | undefined; } /** * Extension Class * * @remarks * Base StructureDefinition for Extension Type: Optional Extension Element - found in all resources. * * The ability to add extensions in a structured way is what keeps FHIR resources simple. * * **FHIR Specification** * - **Short:** Optional Extensions Element * - **Definition:** Optional Extension Element - found in all resources. * - **FHIR Version:** 4.0.1; Normative since 4.0.0 * * @category Base Models * @see [FHIR Extension](http://hl7.org/fhir/StructureDefinition/Extension) * @see [FHIR Extensibility](https://hl7.org/fhir/R4/extensibility.html) */ export declare class Extension extends Element implements IExtension { constructor(url: fhirUri | null, value?: IDataType); /** * Extension.url Element * * @remarks * **FHIR Specification** * - **Short:** identifies the meaning of the extension * - **Definition:** Source of the definition for the extension code - a logical name or a URL. * - **Comment:** The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension. * - **FHIR Type:** `uri` * - **Cardinality:** 1..1 * - **isModifier:** false * - **isSummary:** false */ protected url: fhirUri | null; /** * Extension.value[x] Element * * @remarks * **FHIR Specification** * - **Short:** Value of extension * - **Definition:** Value of extension - must be one of a constrained set of the data types (see [Extensibility](https://hl7.org/fhir/extensibility.html) for a list). * - **FHIR Types:** * - Refer to [Open Type Element](https://hl7.org/fhir/R4/datatypes.html#open) * - **Cardinality:** 0..1 * - **isModifier:** false * - **isSummary:** false */ protected value?: IDataType | undefined; /** * @returns the `url` property value as a fhirUri if defined; else null */ getUrl(): fhirUri | null; /** * Assigns the provided primitive value to the `url` property. * * @param value - the `url` value * @returns this * @throws {@link PrimitiveTypeError} for invalid primitive types */ setUrl(value: fhirUri): this; /** * @returns `true` if the `url` property exists and has a value; `false` otherwise */ hasUrl(): boolean; /** * @returns the `value` property value as a DataType object if defined; else undefined */ getValue(): IDataType | undefined; /** * Assigns the provided DataType object value to the `value` property. * * @decorator `@OpenDataTypes()` * * @param value - the `value` object value * @returns this */ setValue(value: IDataType | undefined): this; /** * @returns `true` if the `value` property exists and has a value; `false` otherwise */ hasValue(): boolean; /** * @returns the FHIR type defined in the FHIR standard */ 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 */ copy(): Extension; /** * Copies the current instance's elements into the provided object. * * @param dest - the copied instance * @protected */ protected copyValues(dest: Extension): void; /** * @returns `true` if the instance is a FHIR complex datatype; `false` otherwise */ isComplexDataType(): boolean; /** * @returns the JSON value or undefined if the instance is empty * @throws {@link FhirError} if the instance is missing required properties */ toJSON(): JSON.Value | undefined; } /** * FHIR JSON Helpers * * @privateRemarks * Due to TypeScript circular references, the following JSON helpers are included in this and other modules. * Other JSON helpers are included in fhir-core/utility/json-helpers.ts */ /** * Transforms the provided FHIR DataType to its JSON representation and adds it to the provided JSON.Object. * Does nothing if the FHIR DataType's value is undefined. * * @param value - Polymorphic DataType value * @param propName - the property name for the provided FHIR DataType * @param jsonObj - JSON.Object to which to add the transformed FHIR DataType * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setPolymorphicValueJson(value: IDataType, propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided FHIR Extensions to their JSON representations and adds them to the provided JSON.Object. * Does nothing if the individual FHIR Extensions are undefined. * * @param extensions - FHIR Extensions to be transformed (can be empty array) * @param jsonObj - JSON.Object to which to add the transformed Extensions * @param isModifierExtension - optional boolean (default: `false`); sets JSON object key name to `modifierExtension` if true; otherwise `extension` * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setFhirExtensionJson(extensions: IExtension[], jsonObj: JSON.Object, isModifierExtension?: boolean): void; /** * Transforms the provided FHIR primitive DataType to its JSON representation and adds it to the provided JSON.Object. * Does nothing if the FHIR primitive DataType's value is undefined. * * @typeParam T - the FHIR primitive type * @param ptElement - FHIR primitive DataType to transform * @param propName - the property name for the provided FHIR primitive DataType * @param jsonObj - JSON.Object to which to add the transformed FHIR primitive DataType * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @see [JSON representation of primitive elements](https://hl7.org/fhir/R4/json.html#primitive) * @category Utilities: JSON */ export declare function setFhirPrimitiveJson(ptElement: IPrimitiveType, propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided array of FHIR primitive DataType to their JSON representation and adds it to the provided * JSON.Object. Does nothing if the FHIR primitive DataType's value is undefined. * * @typeParam T - the FHIR primitive type * @param ptElements - array of FHIR primitive DataTypes to transform (can be empty array) * @param propName - the property name for the provided FHIR complex DataTypes * @param jsonObj - JSON.Object to which to add the transformed FHIR complex DataTypes * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @see [JSON representation of primitive elements](https://hl7.org/fhir/R4/json.html#primitive) * @category Utilities: JSON */ export declare function setFhirPrimitiveListJson(ptElements: IPrimitiveType[], propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided FHIR complex DataType to its JSON representation and adds it to the provided JSON.Object. * Does nothing if the FHIR complex DataType's value is undefined. * * @param cElement - FHIR complex DataType to transform * @param propName - the property name for the provided FHIR complex DataType * @param jsonObj - JSON.Object to which to add the transformed FHIR complex DataType * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setFhirComplexJson(cElement: IDataType, propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided array of FHIR complex DataType to their JSON representation and adds it to the provided * JSON.Object. Does nothing if the FHIR complex DataType's value is undefined. * * @param cElements - array of FHIR complex DataTypes to transform (can be empty array) * @param propName - the property name for the provided FHIR complex DataTypes * @param jsonObj - JSON.Object to which to add the transformed FHIR complex DataTypes * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setFhirComplexListJson(cElements: IDataType[], propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided FHIR BackboneElement to its JSON representation and adds it to the provided JSON.Object. * Does nothing if the FHIR BackboneElement's value is undefined. * * @param bElement - FHIR BackboneElement to transform * @param propName - the property name for the provided FHIR BackboneElement * @param jsonObj - JSON.Object to which to add the transformed FHIR BackboneElement * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setFhirBackboneElementJson(bElement: IBackboneElement, propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided array of FHIR BackboneElement to their JSON representation and adds it to the provided * JSON.Object. Does nothing if the FHIR BackboneElement's value is undefined. * * @param bElements - array of FHIR BackboneElements to transform (can be empty array) * @param propName - the property name for the provided FHIR BackboneElements * @param jsonObj - JSON.Object to which to add the transformed FHIR BackboneElements * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setFhirBackboneElementListJson(bElements: IBackboneElement[], propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided FHIR BackboneType to its JSON representation and adds it to the provided JSON.Object. * Does nothing if the FHIR BackboneElement's value is undefined. * * @param bType - FHIR BackboneType to transform * @param propName - the property name for the provided FHIR BackboneType * @param jsonObj - JSON.Object to which to add the transformed FHIR BackboneType * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setFhirBackboneTypeJson(bType: IBackboneType, propName: string, jsonObj: JSON.Object): void; /** * Transforms the provided array of FHIR BackboneType to their JSON representation and adds it to the provided * JSON.Object. Does nothing if the FHIR BackboneType's value is undefined. * * @param bTypes - array of FHIR BackboneType to transform (can be empty array) * @param propName - the property name for the provided FHIR BackboneTypes * @param jsonObj - JSON.Object to which to add the transformed FHIR BackboneTypes * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid parameters * * @category Utilities: JSON */ export declare function setFhirBackboneTypeListJson(bTypes: IBackboneType[], propName: string, jsonObj: JSON.Object): void; /** * TypeScript Decorators * * @privateRemarks * Due to TypeScript circular references, the following decorator definitions are included in this module. * Other decorator definitions are included in fhir-core/utility/decorators.ts */ /** * Factory function for OpenDataTypes decorator for open data type "set" methods * * @remarks * This decorator validates the data type of the provided "set" method argument against the list * of the FhirOpenDataType. The FhirOpenDataType are expressed as FHIR primitive and/or * complex data type names. These values are available in each data type class as `instance.fhirType()`. * FhirOpenDataTypes are used in the following places: ElementDefinition, Extension, Parameters, Task, * and Transport (R5). * * @privateRemarks * The OpenDataTypesMeta() decorator exists in fhir-core/utility/decorators.ts * * @param sourceField - source field name * @returns OpenDataTypes decorator * @throws [AssertionError](https://nodejs.org/docs/latest-v22.x/api/assert.html#class-assertassertionerror) for invalid uses * @throws {@link InvalidTypeError} for actual data type does not agree with the specified FhirOpenDataType * * @category Decorators */ export declare function OpenDataTypes(sourceField: string): (originalMethod: (this: This, ...args: Args) => Return, context: ClassMethodDecoratorContext Return>) => (this: This, ...args: Args) => Return; /** * TypeScript Type Assertions * * @privateRemarks * Due to TypeScript circular references, the following type assertion definitions are included in this module. * Other type assertion definitions are included in fhir-core/utility/type-guards.ts */ /** * FHIR BackboneElement assertion for any FHIR data type class * * @param classInstance - class instance to evaluate * @param errorMessage - optional error message to override the default * @throws {@link InvalidTypeError} when BackboneElement assertion is false * * @category Type Guards/Assertions */ export declare function assertFhirBackboneElement(classInstance: unknown, errorMessage?: string): asserts classInstance is BackboneElement; /** * FHIR BackboneType assertion for any FHIR data type class * * @param classInstance - class instance to evaluate * @param errorMessage - optional error message to override the default * @throws {@link InvalidTypeError} when BackboneType assertion is false * * @category Type Guards/Assertions */ export declare function assertFhirBackboneType(classInstance: unknown, errorMessage?: string): asserts classInstance is BackboneType; /** * FHIR DataType assertion for any FHIR data type class * * @param classInstance - class instance to evaluate * @param errorMessage - optional error message to override the default * @throws {@link InvalidTypeError} when DataType assertion is false * * @category Type Guards/Assertions */ export declare function assertFhirDataType(classInstance: unknown, errorMessage?: string): asserts classInstance is IDataType; /** * FHIR DataType assertion for any FHIR primitive type class * * @typeParam T - the FHIR primitive type * @param classInstance - class instance to evaluate * @param errorMessage - optional error message to override the default * @throws {@link InvalidTypeError} when DataType assertion is false * * @category Type Guards/Assertions */ export declare function assertFhirPrimitiveType(classInstance: unknown, errorMessage?: string): asserts classInstance is PrimitiveType; //# sourceMappingURL=core-fhir-models.d.ts.map