We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7852832 commit f8911daCopy full SHA for f8911da
src/sr/valueTypes.js
@@ -320,12 +320,15 @@ class NumContentItem extends ContentItem {
320
"Option 'unit' is required for NumContentItem with 'value'."
321
);
322
}
323
+ if (options.unit.constructor !== CodedConcept) {
324
+ throw new Error("Option 'unit' must have type CodedConcept.");
325
+ }
326
const item = {};
327
item.NumericValue = options.value;
328
if (isFloat(options.value)) {
329
item.FloatingPointValue = options.value;
330
- item.MeasurementUnitsCodeSequence = options.unit;
331
+ item.MeasurementUnitsCodeSequence = [options.unit];
332
this.MeasuredValueSequence = [item];
333
} else if (options.qualifier !== undefined) {
334
if (
0 commit comments