Observation constructor

Observation({
  1. String? id,
  2. Meta? meta,
  3. FixedList<Identifier>? identifier,
  4. FixedList<Reference>? basedOn,
  5. FixedList<Reference>? partOf,
  6. String? status,
  7. FixedList<CodeableConcept>? category,
  8. CodeableConcept? code,
  9. Reference? subject,
  10. Reference? encounter,
  11. DateTime? effectiveDateTime,
  12. Period? effectivePeriod,
  13. Timing? effectiveTiming,
  14. DateTime? effectiveInstant,
  15. DateTime? issued,
  16. Quantity? valueQuantity,
  17. CodeableConcept? valueCodeableConcept,
  18. String? valueString,
  19. bool? valueBoolean,
  20. int? valueInteger,
  21. Range? valueRange,
  22. Ratio? valueRatio,
  23. SampledData? valueSampledData,
  24. Time? valueTime,
  25. DateTime? valueDateTime,
  26. Period? valuePeriod,
  27. CodeableConcept? dataAbsentReason,
  28. FixedList<CodeableConcept>? interpretation,
  29. FixedList<Annotation>? note,
  30. CodeableConcept? bodySite,
  31. CodeableConcept? method,
  32. Reference? specimen,
  33. Reference? device,
  34. FixedList<ObservationReferenceRange>? referenceRange,
  35. FixedList<Reference>? hasMember,
  36. FixedList<Reference>? derivedFrom,
  37. FixedList<ObservationComponent>? component,
  38. FixedList<CodeableReference>? complicatedBy,
  39. FixedList<CodeableReference>? contextOfUse,
})

Constructs a new Observation.

Implementation

Observation({
  String? id,
  Meta? meta,
  FixedList<Identifier>? identifier,
  FixedList<Reference>? basedOn,
  FixedList<Reference>? partOf,
  String? status,
  FixedList<CodeableConcept>? category,
  CodeableConcept? code,
  Reference? subject,
  Reference? encounter,
  DateTime? effectiveDateTime,
  Period? effectivePeriod,
  Timing? effectiveTiming,
  DateTime? effectiveInstant,
  DateTime? issued,
  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<Annotation>? note,
  CodeableConcept? bodySite,
  CodeableConcept? method,
  Reference? specimen,
  Reference? device,
  FixedList<ObservationReferenceRange>? referenceRange,
  FixedList<Reference>? hasMember,
  FixedList<Reference>? derivedFrom,
  FixedList<ObservationComponent>? component,
  FixedList<CodeableReference>? complicatedBy,
  FixedList<CodeableReference>? contextOfUse,
}) : super._internal(
        JsonObject({
          if (id != null) Resource.idField.name: JsonString(id),
          if (meta != null) Resource.metaField.name: meta.json,
          if (identifier != null)
            identifierField.name:
                JsonArray.unmodifiable(identifier.map((e) => e.json)),
          if (basedOn != null)
            basedOnField.name:
                JsonArray.unmodifiable(basedOn.map((e) => e.json)),
          if (partOf != null)
            partOfField.name:
                JsonArray.unmodifiable(partOf.map((e) => e.json)),
          if (status != null) statusField.name: JsonString(status),
          if (category != null)
            categoryField.name:
                JsonArray.unmodifiable(category.map((e) => e.json)),
          if (code != null) codeField.name: code.json,
          if (subject != null) subjectField.name: subject.json,
          if (encounter != null) encounterField.name: encounter.json,
          if (effectiveDateTime != null)
            effectiveDateTimeField.name:
                JsonString(effectiveDateTime.toIso8601String()),
          if (effectivePeriod != null)
            effectivePeriodField.name: effectivePeriod.json,
          if (effectiveTiming != null)
            effectiveTimingField.name: effectiveTiming.json,
          if (effectiveInstant != null)
            effectiveInstantField.name:
                JsonString(effectiveInstant.toIso8601String()),
          if (issued != null)
            issuedField.name: JsonString(issued.toIso8601String()),
          if (valueQuantity != null)
            valueQuantityField.name: valueQuantity.json,
          if (valueCodeableConcept != null)
            valueCodeableConceptField.name: valueCodeableConcept.json,
          if (valueString != null)
            valueStringField.name: JsonString(valueString),
          if (valueBoolean != null)
            valueBooleanField.name: JsonBoolean(valueBoolean),
          if (valueInteger != null)
            valueIntegerField.name: JsonNumber(valueInteger),
          if (valueRange != null) valueRangeField.name: valueRange.json,
          if (valueRatio != null) valueRatioField.name: valueRatio.json,
          if (valueSampledData != null)
            valueSampledDataField.name: valueSampledData.json,
          if (valueTime != null)
            valueTimeField.name: JsonString(valueTime.toString()),
          if (valueDateTime != null)
            valueDateTimeField.name:
                JsonString(valueDateTime.toIso8601String()),
          if (valuePeriod != null) valuePeriodField.name: valuePeriod.json,
          if (dataAbsentReason != null)
            dataAbsentReasonField.name: dataAbsentReason.json,
          if (interpretation != null)
            interpretationField.name:
                JsonArray.unmodifiable(interpretation.map((e) => e.json)),
          if (note != null)
            noteField.name: JsonArray.unmodifiable(note.map((e) => e.json)),
          if (bodySite != null) bodySiteField.name: bodySite.json,
          if (method != null) methodField.name: method.json,
          if (specimen != null) specimenField.name: specimen.json,
          if (device != null) deviceField.name: device.json,
          if (referenceRange != null)
            referenceRangeField.name:
                JsonArray.unmodifiable(referenceRange.map((e) => e.json)),
          if (hasMember != null)
            hasMemberField.name:
                JsonArray.unmodifiable(hasMember.map((e) => e.json)),
          if (derivedFrom != null)
            derivedFromField.name:
                JsonArray.unmodifiable(derivedFrom.map((e) => e.json)),
          if (component != null)
            componentField.name:
                JsonArray.unmodifiable(component.map((e) => e.json)),
          if (complicatedBy != null)
            complicatedByField.name:
                JsonArray.unmodifiable(complicatedBy.map((e) => e.json)),
          if (contextOfUse != null)
            contextOfUseField.name:
                JsonArray.unmodifiable(contextOfUse.map((e) => e.json)),
        }),
      );