Encounter constructor

Encounter({
  1. String? id,
  2. Meta? meta,
  3. FixedList<Identifier>? identifier,
  4. EncounterStatus? status,
  5. CodeableConcept? classCode,
  6. FixedList<CodeableConcept>? type,
  7. CodeableConcept? serviceType,
  8. CodeableConcept? priority,
  9. Reference? subject,
  10. FixedList<Participant>? participant,
  11. Period? period,
  12. Length? length,
  13. FixedList<CodeableConcept>? reasonCode,
  14. Hospitalization? hospitalization,
  15. FixedList<Reference>? location,
})

Constructs a new Encounter.

Implementation

Encounter({
  String? id,
  Meta? meta,
  FixedList<Identifier>? identifier,
  EncounterStatus? status,
  CodeableConcept? classCode,
  FixedList<CodeableConcept>? type,
  CodeableConcept? serviceType,
  CodeableConcept? priority,
  Reference? subject,
  FixedList<Participant>? participant,
  Period? period,
  Length? length,
  FixedList<CodeableConcept>? reasonCode,
  Hospitalization? hospitalization,
  FixedList<Reference>? location,
}) : super._internal(
        JsonObject({
          if (id != null) 'id': JsonString(id),
          if (meta != null) 'meta': meta.json,
          if (identifier != null)
            identifierField.name:
                JsonArray.unmodifiable(identifier.map((e) => e.json)),
          if (status != null) statusField.name: JsonString(status.code),
          if (classCode != null) classField.name: classCode.json,
          if (type != null)
            typeField.name: JsonArray.unmodifiable(type.map((e) => e.json)),
          if (serviceType != null) serviceTypeField.name: serviceType.json,
          if (priority != null) priorityField.name: priority.json,
          if (subject != null) subjectField.name: subject.json,
          if (participant != null)
            participantField.name:
                JsonArray.unmodifiable(participant.map((e) => e.json)),
          if (period != null) periodField.name: period.json,
          if (length != null) lengthField.name: length.json,
          if (reasonCode != null)
            reasonCodeField.name:
                JsonArray.unmodifiable(reasonCode.map((e) => e.json)),
          if (hospitalization != null)
            hospitalizationField.name: hospitalization.json,
          if (location != null)
            locationField.name:
                JsonArray.unmodifiable(location.map((e) => e.json)),
        }),
      );