public void AddMedicationOrder(MedicationOrderRaw medicationOrder) { foreach (var patientId in medicationOrder.PatientIdList) { MedicationOrders.Add($"{_session.From,10}{_session.To,10}{"MOA",16}\\moid:{0}\\pid:{patientId}\\item{medicationOrder.PocketNurseItemId}\\phyid:{0}\\phynm:{"Doctor"}\\frq:{medicationOrder.Frequency}\\mrte:{medicationOrder.Route}\\dose:{medicationOrder.Dose}"); } }
public void WriteToFiles() { if (Patients != null && Patients.Any()) { File.WriteAllLines(@"Patients.txt", Patients); } else { if (File.Exists(@"Patients.txt")) { File.Delete(@"Patients.txt"); } } if (MedicationOrders != null && MedicationOrders.Any()) { File.WriteAllLines(@"MedicationOrders.txt", MedicationOrders); } else { if (File.Exists(@"MedicationOrders.txt")) { File.Delete(@"MedicationOrders.txt"); } } if (NotInFormulary != null && NotInFormulary.Any()) { File.WriteAllLines(@"Items.txt", NotInFormulary); } else { if (File.Exists(@"Items.txt")) { File.Delete(@"Items.txt"); } } }