fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
155 lines (154 loc) • 5.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ObservationComponent = void 0;
const base_1 = require("../base");
const base_2 = require("../../../core/r4/validators/base");
/**
* @version R4 (v4.0.1)
* @summary FHIR® Specification by HL7®
* @description Class for ObservationComponent BackboneElement
* @property {ICodeableConcept} code
* @property {IQuantity} valueQuantity
* @property {ICodeableConcept} valueCodeableConcept
* @property {string} valueString
* @property {IElement} _valueString
* @property {boolean} valueBoolean
* @property {IElement} _valueBoolean
* @property {number} valueInteger
* @property {IElement} _valueInteger
* @property {IRange} valueRange
* @property {IRatio} valueRatio
* @property {ISampledData} valueSampledData
* @property {string} valueTime
* @property {IElement} _valueTime
* @property {string} valueDateTime
* @property {IElement} _valueDateTime
* @property {IPeriod} valuePeriod
* @property {ICodeableConcept} dataAbsentReason
* @property {ICodeableConcept[]} interpretation
* @property {IObservationReferenceRange[]} referenceRange
* @author Roberto Araneda Espinoza
*/
class ObservationComponent extends base_1.BackboneElement {
/**
* @description Describes what was observed. Sometimes this is called the observation "code".
*/
code;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueQuantity;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueCodeableConcept;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueString;
/**
* @description Extensions for valueString
*/
_valueString;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueBoolean;
/**
* @description Extensions for valueBoolean
*/
_valueBoolean;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueInteger;
/**
* @description Extensions for valueInteger
*/
_valueInteger;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueRange;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueRatio;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueSampledData;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueTime;
/**
* @description Extensions for valueTime
*/
_valueTime;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valueDateTime;
/**
* @description Extensions for valueDateTime
*/
_valueDateTime;
/**
* @description The information determined as a result of making the observation, if the information has a simple value.
*/
valuePeriod;
/**
* @description Provides a reason why the expected value in the element Observation.component.value[x] is missing.
*/
dataAbsentReason;
/**
* @description A categorical assessment of an observation value. For example, high, low, normal.
*/
interpretation;
/**
* @description Guidance on how to interpret the value by comparison to a normal or recommended range.
*/
referenceRange;
/**
* @description Returns a JSON representation of the model
* @returns {Record<string, any>}
*/
toJson() {
return JSON.parse(JSON.stringify(this));
}
/**
* @description Returns a string representation of the model
* @returns {string}
*/
toString() {
return `ObservationComponent${JSON.stringify(this.toJson())}`;
}
/**
* @description Returns a pretty string representation of the model
* @returns {string}
*/
toPrettyString() {
return `ObservationComponent${JSON.stringify(this.toJson(), null, 2)}`;
}
/**
* @description Returns a serialized string representation of the model
* @returns {string}
*/
serialize() {
return JSON.stringify(this.toJson());
}
/**
* @description Validates the model
* @returns {isValid: boolean, operationOutcome: IOperationOutcome}
*/
validate() {
return (0, base_2.ConformanceValidator)('ObservationComponent', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
}
exports.ObservationComponent = ObservationComponent;