fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
164 lines (163 loc) • 4.96 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Repeat = void 0;
const Element_1 = require("../base/Element");
const base_1 = require("../../../core/r4/validators/base");
const builders_1 = require("../../builders");
class Repeat extends Element_1.Element {
/**
* @description A duration for the length of the timing schedule.
*/
boundsDuration;
/**
* @description A set of ordered Quantity values defined by a low and high limit of possible length of the timing schedule.
*/
boundsRange;
/**
* @description A time period defined by a start and end date/time of the timing schedule.
*/
boundsPeriod;
/**
* @description A total count of the desired number of repetitions across the duration of the entire timing specification.
*/
count;
/**
* @description If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times.
*/
countMax;
/**
* @description How long this thing happens for when it happens.
*/
duration;
/**
* @description If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.
*/
durationMax;
/**
* @description The units of time for the period in UCUM units.
* @description s | min | h | d | wk | mo | a - unit of time (UCUM)
* @see <a href="https://hl7.org/fhir/R4/valueset-units-of-time.html">UnitsOfTime</a>
*/
durationUnit;
/**
* @description The number of times to repeat the action within the specified period.
*/
frequency;
/**
* @description If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range.
*/
frequencyMax;
/**
* @description Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period.
*/
period;
/**
* @description If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days.
*/
periodMax;
/**
* @description The units of time for the period in UCUM units.
* @description s | min | h | d | wk | mo | a - unit of time (UCUM)
* @see <a href="https://hl7.org/fhir/R4/valueset-units-of-time.html">UnitsOfTime</a>
*/
periodUnit;
/**
* @description If one or more days of week is provided, then the action happens only on the specified day(s).
* @description mon | tue | wed | thu | fri | sat | sun
* @see <a href="https://hl7.org/fhir/R4/valueset-days-of-week.html">DaysOfWeek</a>
*/
dayOfWeek;
/**
* @description Specified time of day for action to take place.
*/
timeOfDay;
/**
* @description An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur.
* @see <a href="https://hl7.org/fhir/R4/valueset-event-timing.html">EventTiming</a>
*/
when;
/**
* @description The number of minutes from the event.
*/
offset;
/**
* @description Extension for count.
*/
_count;
/**
* @description Extension for countMax.
*/
_countMax;
/**
* @description Extension for duration.
*/
_duration;
/**
* @description Extension for durationUnit.
*/
_durationUnit;
/**
* @description Extension for durationMax.
*/
_durationMax;
/**
* @description Extension for frecuency.
*/
_frequency;
/**
* @description Extension for frequencyMax.
*/
_frequencyMax;
/**
* @description Extension for period.
*/
_period;
/**
* @description Extension for periodMax.
*/
_periodMax;
/**
* @description Extension for periodUnit.
*/
_periodUnit;
/**
* @description Extension for dayOfWeek.
*/
_dayOfWeek;
/**
* @description Extension for timeOfDay.
*/
_timeOfDay;
/**
* @description Extension for when.
*/
_when;
/**
* @description Extension for offset.
*/
_offset;
toJson() {
return JSON.parse(JSON.stringify(this));
}
toPrettyString() {
return `Repeat${JSON.stringify(this.toJson(), null, 2)}`;
}
toString() {
return `Repeat${JSON.stringify(this.toJson())}`;
}
validate() {
return (0, base_1.ConformanceValidator)('Repeat', this);
}
constructor(args) {
super();
if (args)
Object.assign(this, args);
}
builderInstance() {
return new builders_1.RepeatBuilder();
}
serialize() {
return JSON.stringify(this.toJson());
}
}
exports.Repeat = Repeat;