ObservationComponent constructor
ObservationComponent({
- CodeableConcept? code,
- Quantity? valueQuantity,
- CodeableConcept? valueCodeableConcept,
- String? valueString,
- bool? valueBoolean,
- int? valueInteger,
- Range? valueRange,
- Ratio? valueRatio,
- SampledData? valueSampledData,
- Time? valueTime,
- DateTime? valueDateTime,
- Period? valuePeriod,
- CodeableConcept? dataAbsentReason,
- FixedList<
CodeableConcept> ? interpretation, - FixedList<
ObservationReferenceRange> ? referenceRange,
Constructs a new ObservationComponent with various optional measurement values and attributes.
Implementation
ObservationComponent({
CodeableConcept? code,
Quantity? valueQuantity,
CodeableConcept? valueCodeableConcept,
String? valueString,
bool? valueBoolean,
int? valueInteger,
Range? valueRange,
Ratio? valueRatio,
SampledData? valueSampledData,
Time? valueTime,
DateTime? valueDateTime,
Period? valuePeriod,
CodeableConcept? dataAbsentReason,
FixedList<CodeableConcept>? interpretation,
FixedList<ObservationReferenceRange>? referenceRange,
}) : this.fromJson(
JsonObject({
if (code != null) 'code': code.json,
if (valueQuantity != null) 'valueQuantity': valueQuantity.json,
if (valueCodeableConcept != null)
'valueCodeableConcept': valueCodeableConcept.json,
if (valueString != null) 'valueString': JsonString(valueString),
if (valueBoolean != null) 'valueBoolean': JsonBoolean(valueBoolean),
if (valueInteger != null) 'valueInteger': JsonNumber(valueInteger),
if (valueRange != null) 'valueRange': valueRange.json,
if (valueRatio != null) 'valueRatio': valueRatio.json,
if (valueSampledData != null)
'valueSampledData': valueSampledData.json,
if (valueTime != null)
'valueTime': JsonString(valueTime.toString()),
if (valueDateTime != null)
'valueDateTime': JsonString(valueDateTime.toIso8601String()),
if (valuePeriod != null) 'valuePeriod': valuePeriod.json,
if (dataAbsentReason != null)
'dataAbsentReason': dataAbsentReason.json,
if (interpretation != null)
'interpretation':
JsonArray(interpretation.map((e) => e.json).toList()),
if (referenceRange != null)
'referenceRange':
JsonArray(referenceRange.map((e) => e.json).toList()),
}),
);