fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
123 lines (122 loc) • 4.34 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EncounterHospitalizationBuilder = 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 EncounterHospitalization
* @class EncounterHospitalizationBuilder
* @extends {BackboneBuilder}
* @implements {IEncounterHospitalizationBuilder}
* @author Roberto Araneda Espinoza
*/
class EncounterHospitalizationBuilder extends base_1.BackboneBuilder {
encounterHospitalization;
constructor() {
super();
this.encounterHospitalization = new models_1.EncounterHospitalization();
}
/**
* @description Builds the model
* @returns {EncounterHospitalization}
*/
build() {
return Object.assign(this.encounterHospitalization, super.build());
}
/**
* @description Sets the preAdmissionIdentifier value
* @description Pre-admission identifier.
* @param value - the value to set
* @returns {this}
*/
setPreAdmissionIdentifier(value) {
this.encounterHospitalization.preAdmissionIdentifier = value;
return this;
}
/**
* @description Sets the origin value
* @description The location/organization from which the patient came before admission.
* @param value - the value to set
* @returns {this}
*/
setOrigin(value) {
this.encounterHospitalization.origin = value;
return this;
}
/**
* @description Sets the admitSource value
* @description From where patient was admitted (physician referral, transfer).
* @param value - the value to set
* @returns {this}
*/
setAdmitSource(value) {
this.encounterHospitalization.admitSource = value;
return this;
}
/**
* @description Sets the reAdmission value
* @description Whether this hospitalization is a readmission and why if known.
* @param value - the value to set
* @returns {this}
*/
setReAdmission(value) {
this.encounterHospitalization.reAdmission = value;
return this;
}
/**
* @description Adds a value to the dietPreference array
* @description Diet preferences reported by the patient.
* @param value - the value to add
* @returns {this}
*/
addDietPreference(value) {
this.encounterHospitalization.dietPreference = this.encounterHospitalization.dietPreference || [];
this.encounterHospitalization.dietPreference.push(value);
return this;
}
/**
* @description Adds a value to the specialCourtesy array
* @description Special courtesies (VIP, board member).
* @param value - the value to add
* @returns {this}
*/
addSpecialCourtesy(value) {
this.encounterHospitalization.specialCourtesy = this.encounterHospitalization.specialCourtesy || [];
this.encounterHospitalization.specialCourtesy.push(value);
return this;
}
/**
* @description Adds a value to the specialArrangement array
* @description Any special requests that have been made for this hospitalization encounter, such as the provision of specific equipment or other things.
* @param value - the value to add
* @returns {this}
*/
addSpecialArrangement(value) {
this.encounterHospitalization.specialArrangement = this.encounterHospitalization.specialArrangement || [];
this.encounterHospitalization.specialArrangement.push(value);
return this;
}
/**
* @description Sets the destination value
* @description Location/organization to which the patient is discharged.
* @param value - the value to set
* @returns {this}
*/
setDestination(value) {
this.encounterHospitalization.destination = value;
return this;
}
/**
* @description Sets the dischargeDisposition value
* @description Category or kind of location after discharge.
* @param value - the value to set
* @returns {this}
*/
setDischargeDisposition(value) {
this.encounterHospitalization.dischargeDisposition = value;
return this;
}
}
exports.EncounterHospitalizationBuilder = EncounterHospitalizationBuilder;