/** * List Intervention Header Records */ public InterventionChartHeaderVoCollection listInterventionHeaderRecords(CareContextRefVo voCareContext) throws DomainInterfaceException { if(voCareContext == null) throw new CodingRuntimeException("Care Context not provided"); DomainFactory factory = getDomainFactory(); String hql = " from InterventionChart interventionChart "; StringBuffer condStr = new StringBuffer(); String andStr = " "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); if(voCareContext != null && voCareContext.getID_CareContextIsNotNull()) { condStr.append(andStr + " interventionChart.careContext.id = :rcc"); markers.add("rcc"); values.add(voCareContext.getID_CareContext()); andStr = " and "; } if (andStr.equals(" and ")) hql += " where "; hql += condStr.toString(); return InterventionChartHeaderVoAssembler.createInterventionChartHeaderVoCollectionFromInterventionChart(factory.find(hql, markers, values)); }
public ims.nursing.vo.InterventionChartHeaderVo saveIntervention(ims.nursing.vo.InterventionChartVo interventionChart, ClinicalContactShortVo contact) throws ims.domain.exceptions.StaleObjectException { if (!interventionChart.isValidated()) throw new DomainRuntimeException("This Intervention Chart has not been validated"); DomainFactory factory = getDomainFactory(); InterventionChart doInterventionChart = InterventionChartVoAssembler.extractInterventionChart(factory, interventionChart); factory.save(doInterventionChart); return InterventionChartHeaderVoAssembler.create(doInterventionChart); }