public GetPatientInterventionByTemplateIdResponse GetPatientInterventionByTemplateId(GetPatientInterventionByTemplateIdRequest request) { GetPatientInterventionByTemplateIdResponse result = null; try { result = new GetPatientInterventionByTemplateIdResponse(); IGoalRepository repo = Factory.GetRepository(request, RepositoryType.PatientIntervention); PatientInterventionData patientInterventionData = repo.FindByTemplateId(request.GoalId, request.TemplateId) as PatientInterventionData; //if (patientGoalData != null) //{ // //Get all barriers for a given goal // patientGoalData.BarriersData = getBarriersByPatientGoalId(request, patientGoalData.Id); // //Get all tasks for a given goal // patientGoalData.TasksData = getTasksByPatientGoalId(request, patientGoalData.Id); // //Get all interventions for a given goal // patientGoalData.InterventionsData = getInterventionsByPatientGoalId(request, patientGoalData.Id); //} result.InterventionData = patientInterventionData; result.Version = request.Version; return(result); } catch (Exception ex) { throw ex; } }
public GetPatientGoalByTemplateIdResponse GetPatientByTemplateIdGoal(GetPatientGoalByTemplateIdRequest request) { GetPatientGoalByTemplateIdResponse result = null; try { result = new GetPatientGoalByTemplateIdResponse(); IGoalRepository repo = Factory.GetRepository(request, RepositoryType.PatientGoal); PatientGoalData patientGoalData = repo.FindByTemplateId(request.PatientId, request.TemplateId) as PatientGoalData; result.GoalData = patientGoalData; result.Version = request.Version; return(result); } catch (Exception ex) { throw ex; } }