public static bool SavePatientGoalBarriers(PostPatientGoalRequest request) { bool result = false; try { if (request.Goal.Barriers != null && request.Goal.Barriers.Count > 0) { List <PatientBarrierData> pbd = new List <PatientBarrierData>(); request.Goal.Barriers.ForEach(b => { PatientBarrierData data = ConvertToPatientBarrierData(b); pbd.Add(ConvertToPatientBarrierData(b)); }); pbd.ForEach(bd => { result = GoalsEndpointUtil.PostUpdateBarrierRequest(request, bd); }); } else if (request.Goal.Barriers.Count == 0) { PatientBarrierData pbd = new PatientBarrierData { Id = "0", PatientGoalId = request.PatientGoalId }; result = GoalsEndpointUtil.PostUpdateBarrierRequest(request, pbd); } return(result); } catch (Exception ex) { throw new Exception("AD:SavePatientGoalBarriers()::" + ex.Message, ex.InnerException); } }
public PostPatientBarrierResponse SavePatientBarrier(PostPatientBarrierRequest request) { try { PostPatientBarrierResponse response = new PostPatientBarrierResponse(); response.Barrier = GoalsEndpointUtil.PostUpdateBarrierRequest(request); response.Version = request.Version; return(response); } catch (Exception ex) { throw new Exception("AD:SavePatientBarrier()::" + ex.Message, ex.InnerException); } }