public SeenByHcpForEventHistoryVoCollection getSeenByHcp(CareContextRefVo careContextRef) { if (careContextRef == null || careContextRef.getID_CareContext() == null) { throw new CodingRuntimeException("Cannot get SeenByHcpForEventHistoryVoCollection on null Id for CareContext "); } DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); StringBuffer hql = new StringBuffer(); hql.append(" select seenByHcp from SeenByHCP as seenByHcp left join seenByHcp.attendance as contextID where contextID.id = :contextID"); markers.add("contextID"); values.add(careContextRef.getID_CareContext()); return SeenByHcpForEventHistoryVoAssembler.createSeenByHcpForEventHistoryVoCollectionFromSeenByHCP(factory.find(hql.toString(), markers, values)); }
public void save(SeenByHcpForEventHistoryVo seenBy, ReferralToSpecialtyTeamForEventHistoryVo referralToSpecialty) throws ims.domain.exceptions.StaleObjectException { if(seenBy != null && !seenBy.isValidated()) throw new CodingRuntimeException("SeenByHcpForEventHistoryVo is not validated."); if(referralToSpecialty != null && !referralToSpecialty.isValidated()) throw new CodingRuntimeException("ReferralToSpecialtyTeamForEventHistoryVo is not validated."); DomainFactory factory = getDomainFactory(); if(seenBy != null) { SeenByHCP doSeenBy = SeenByHcpForEventHistoryVoAssembler.extractSeenByHCP(factory, seenBy); factory.save(doSeenBy); } if(referralToSpecialty != null) { ReferralToSpecTeam doReferralToSpecialty = ReferralToSpecialtyTeamForEventHistoryVoAssembler.extractReferralToSpecTeam(factory, referralToSpecialty); factory.save(doReferralToSpecialty); } }
public ims.emergency.vo.SeenByHcpForEventHistoryVo getSeenBy(ims.emergency.vo.SeenByHCPRefVo seenByRef) { if(seenByRef == null || seenByRef.getID_SeenByHCP() == null) return null; SeenByHCP doSeenBy = (SeenByHCP) getDomainFactory().getDomainObject(SeenByHCP.class, seenByRef.getID_SeenByHCP()); return SeenByHcpForEventHistoryVoAssembler.create(doSeenBy); }