fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
52 lines (51 loc) • 1.69 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConditionEvidenceBuilder = void 0;
const models_1 = require("../../models");
const base_1 = require("../base");
/**
* @version R4 (v4.0.1)
* @summary FHIR® Specification by HL7®
* @description Class for building a ConditionEvidence
* @class ConditionEvidenceBuilder
* @extends {BackboneBuilder}
* @implements {IConditionEvidenceBuilder}
* @author Roberto Araneda Espinoza
*/
class ConditionEvidenceBuilder extends base_1.BackboneBuilder {
conditionEvidence;
constructor() {
super();
this.conditionEvidence = new models_1.ConditionEvidence();
}
/**
* @description Builds the model
* @returns {ConditionEvidence}
*/
build() {
return Object.assign(this.conditionEvidence, super.build());
}
/**
* @description Adds a value to the code array
* @description A manifestation or symptom that led to the recording of this condition.
* @param value - the value to add
* @returns {this}
*/
addCode(value) {
this.conditionEvidence.code = this.conditionEvidence.code || [];
this.conditionEvidence.code.push(value);
return this;
}
/**
* @description Adds a value to the detail array
* @description Links to other relevant information, including pathology reports.
* @param value - the value to add
* @returns {this}
*/
addDetail(value) {
this.conditionEvidence.detail = this.conditionEvidence.detail || [];
this.conditionEvidence.detail.push(value);
return this;
}
}
exports.ConditionEvidenceBuilder = ConditionEvidenceBuilder;