public List <MedicationMapData> DeleteMedicationMaps(PutDeleteMedMapDataRequest request) { try { var repo = MedicationRepositoryFactory.GetMedicationRepository(request, RepositoryType.MedicationMapping); if (request.MedicationMaps != null) { request.MedicationMaps.ForEach(m => { string id = (string)repo.Find(m); if (!string.IsNullOrEmpty(id)) { m.Id = id; repo.Delete(id); } }); } return(request.MedicationMaps); } catch (Exception ex) { throw ex; } }
public PutDeleteMedMapDataResponse Put(PutDeleteMedMapDataRequest request) { PutDeleteMedMapDataResponse response = new PutDeleteMedMapDataResponse { Version = request.Version }; try { RequireUserId(request); response.MedicationMapsData = Manager.DeleteMedicationMaps(request); } catch (Exception ex) { RaiseException(response, ex); } return(response); }
public List <MedicationMapData> DeleteMedicationMaps(PutDeleteMedMapDataRequest request) { throw new NotImplementedException(); }