public static bool SavePatientGoalInterventions(PostPatientGoalRequest request) { bool result = false; try { if (request.Goal.Interventions != null && request.Goal.Interventions.Count > 0) { List <PatientInterventionData> pid = new List <PatientInterventionData>(); request.Goal.Interventions.ForEach(i => { PatientInterventionData data = ConvertToInterventionData(i); pid.Add(data); }); pid.ForEach(pi => { result = GoalsEndpointUtil.PostUpdateInterventionRequest(request, pi); }); } else if (request.Goal.Interventions.Count == 0) { // just delete all of them PatientInterventionData pbd = new PatientInterventionData { Id = "0", PatientGoalId = request.PatientGoalId }; result = GoalsEndpointUtil.PostUpdateInterventionRequest(request, pbd); } return(result); } catch (Exception ex) { throw new Exception("AD:SavePatientGoalInterventions()::" + ex.Message, ex.InnerException); } }
public PostPatientInterventionResponse SavePatientIntervention(PostPatientInterventionRequest request) { try { PostPatientInterventionResponse response = new PostPatientInterventionResponse(); response.Intervention = GoalsEndpointUtil.PostUpdateInterventionRequest(request); response.Version = request.Version; return(response); } catch (Exception ex) { throw new Exception("AD:SavePatientIntervention()::" + ex.Message, ex.InnerException); } }