//Removes a specific medicalservice to a patients bill public void RemoveTreatmentFromBill(Patient _patient, MedicalService _medicalService) { if (_patient.RecordList.Last().IsActive == true) { _patient.RecordList.Last().CurrentBill.BillItemList.Remove(_medicalService); } else { throw new Exception("No active record for patient"); } }
//Adds a MedicalService to the a patient's record's bill. public void RegisterTreatmentToBill(Patient _patient, MedicalService _medicalService) { Record currentRecord = _patient.RecordList.Find(x => x.IsActive == true); if (currentRecord != null) { currentRecord.CurrentBill.BillItemList.Add(_medicalService); } else { throw new Exception("No active record for patient"); } }
public static void ReadMedicalServiceFromFile(string FilePath) { Stream ServicesFile = File.Open(FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); using (StreamReader sr = new StreamReader(ServicesFile)) { string _tempString; string[] _subStrings; while ((_tempString = sr.ReadLine()) != null) { _subStrings = _tempString.Split(' '); MedicalService currentService = new MedicalService(Convert.ToDecimal(_subStrings[2]), _subStrings[1], _subStrings[0]); Ward.MedicalServicesList.Add(currentService); TextEditor.values.Add(_subStrings[0], _subStrings[1]); } } }
public void AddToBillItemList(MedicalService BI) { _billItemList.Add(BI); }