private function mapGender(\Patient $patient) { if (property_exists($this, 'Gender')) { $patient->gender = strtoupper($this->getAssignedProperty('Gender')); } else { if (!$this->partial_record) { $patient->gender = null; } } }