private void SavePatient(TherapyPatient patient, bool openDialog) { var workspacePath = _settings.UseDefaultDir ? _settings.DefaultWorkingDir : _settings.WorkingDirectory; var filename = Path.Combine(workspacePath, patient.PatientStringId + ".trck"); File.WriteAllText(filename, JsonConvert.SerializeObject(patient, Formatting.Indented)); }
public void AddNewPatient(TherapyPatient newPatient, bool setActive = true) { _patients.Add(newPatient); if (setActive) { ActivePatient = newPatient; } }