public MedicationOverViewVo getMedicationOverView(MedicationOverviewRefVo voRefMedication) { if(voRefMedication == null) throw new DomainRuntimeException("Invalid Medication record to get"); return MedicationOverViewVoAssembler.create((MedicationOverview)getDomainFactory().getDomainObject(MedicationOverview.class, voRefMedication.getID_MedicationOverview())); }
public PatientMedicationVoCollection listMedications(MedicationOverviewRefVo medOverview) { if (medOverview==null) { throw new DomainRuntimeException("Invalid Medication Overview"); } String hql = "from PatientMedication as p1_1 where (p1_1.id in (select p1_1.id from MedicationOverview as m1_1 left join m1_1.medication as p1_1 where (m1_1.id = :MedicationOverview_id)))"; return PatientMedicationVoAssembler.createPatientMedicationVoCollectionFromPatientMedication(getDomainFactory().find(hql, new String[]{"MedicationOverview_id"}, new Object[]{medOverview.getID_MedicationOverview()})); }