toMap method
Implementation
@override
Map<String, dynamic> toMap() {
return <String, dynamic>{
'patientID': patientID,
'names': names.map(_mapPayloadInputListToMap).toList(),
'phoneNumbers': phoneNumbers.map(_mapPayloadInputListToMap).toList(),
'emails': emails?.map(_mapPayloadInputListToMap).toList(),
'gender': gender.name.toLowerCase(),
'birthDate': DateFormat('yyyy-MM-dd').format(birthDate),
'relationship': relationship.fhirName,
'active': active,
};
}