using System.Collections.Generic;
public static void Main()
var patientNames = new Dictionary<string, string> {
{ "a", "a"},{ "ab", "ab"},{ "abc", "abc*"},{ "****", "*"},{"taco*bell","tacobell*"},{"",""}
foreach(var patientNameSet in patientNames) {
var patientName = patientNameSet.Key;
var testName = string.IsNullOrEmpty(patientName) || (patientName.IndexOf("*") < 0 && patientName.Length < 3) ? patientName : patientName.Replace("*", "") + "*";
Console.WriteLine("Source: "+patientName + " | Expected: "+patientNameSet.Value + " | Result: "+testName + " | => " + (patientNameSet.Value == testName));