Java 类ims.emergency.vo.ReferralToSpecialtyTeamVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void getSelectedInstance()
{
    if (!form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
    {
        return;
    }

    ReferralToSpecialtyTeamVo voReferralToSpecialty = domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty().getID_ReferralToSpecTeam());

    if (voReferralToSpecialty == null)
    {
        return;
    }

    form.getLocalContext().setSelectedReferralToSpecialty(voReferralToSpecialty);
    clearControls();
    populateInstanceControls(voReferralToSpecialty);
    updateControlsState();

}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControls(ReferralToSpecialtyTeamVo voReferralToSpecialty)
{
    clearInstanceControls();

    if (voReferralToSpecialty==null)
        return;

    form.ccRefferedBy().setValue(voReferralToSpecialty.getReferredBy());
    form.dtimReffered().setValue(voReferralToSpecialty.getReferredDateTime());
    form.cmbConsultantTeam().setValue(voReferralToSpecialty.getTeamConsultant());
    form.cmbSpecialty().setValue(voReferralToSpecialty.getSpecialty());
    form.dtimSeen().setValue(voReferralToSpecialty.getSeenDateTime());
    form.dtimCompletion().setValue(voReferralToSpecialty.getCompletionDateTime());

    populateCommentGrid(voReferralToSpecialty.getComments());
}
项目:AvoinApotti    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(ReferralToSpecTeamRefVo referralToSpecialtyRef)
{
    DomainFactory factory = getDomainFactory();

    if (referralToSpecialtyRef == null || referralToSpecialtyRef.getID_ReferralToSpecTeam()==null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralToSpecialtyRef.getID_ReferralToSpecTeam() });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:AvoinApotti    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:AvoinApotti    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:AvoinApotti    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getUncompletedReferralToSpecialtyByCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allRefSpecTeam from ReferralToSpecTeam as allRefSpecTeam where allRefSpecTeam.attendance.id = :attID and allRefSpecTeam.completionDateTime is null and ( allRefSpecTeam.notAccepted is null or allRefSpecTeam.notAccepted = 0) order by allRefSpecTeam.referredDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] { "attID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list!=null && list.size()>0)
        return ReferralToSpecialtyTeamVoAssembler.create((ReferralToSpecTeam)list.get(0));

    return null;
}
项目:AvoinApotti    文件:ReferralToSpecialtyImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(Integer referralID)
{
    DomainFactory factory = getDomainFactory();

    if (referralID == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralID });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:AvoinApotti    文件:ReferralToSpecialtyImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:AvoinApotti    文件:ReferralToSpecialtyImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void getSelectedInstance()
{
    if (!form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
    {
        return;
    }

    ReferralToSpecialtyTeamVo voReferralToSpecialty = domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty().getID_ReferralToSpecTeam());

    if (voReferralToSpecialty == null)
    {
        return;
    }

    form.getLocalContext().setSelectedReferralToSpecialty(voReferralToSpecialty);
    clearControls();
    populateInstanceControls(voReferralToSpecialty);
    updateControlsState();

}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(ReferralToSpecialtyTeamVo voReferralToSpecialty)
{
    clearInstanceControls();

    if (voReferralToSpecialty==null)
        return;

    form.ccRefferedBy().setValue(voReferralToSpecialty.getReferredBy());
    form.dtimReffered().setValue(voReferralToSpecialty.getReferredDateTime());
    form.cmbConsultantTeam().setValue(voReferralToSpecialty.getTeamConsultant());
    form.cmbSpecialty().setValue(voReferralToSpecialty.getSpecialty());
    //WDEV-21081
    if(Boolean.TRUE.equals(voReferralToSpecialty.getIsSafeguardingConcern()))
        form.GroupSafeGuardConc().setValue(GroupSafeGuardConcEnumeration.rdoSafeGuardConcYes);
    else if(Boolean.FALSE.equals(voReferralToSpecialty.getIsSafeguardingConcern()))
        form.GroupSafeGuardConc().setValue(GroupSafeGuardConcEnumeration.rdoSafeGuardConcNo);
    form.txtSafeguardingCom().setValue(voReferralToSpecialty.getSafeguardingComments());
    form.dtimSeen().setValue(voReferralToSpecialty.getSeenDateTime());
    form.dtimCompletion().setValue(voReferralToSpecialty.getCompletionDateTime());

    populateCommentGrid(voReferralToSpecialty.getComments());
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(ReferralToSpecTeamRefVo referralToSpecialtyRef)
{
    DomainFactory factory = getDomainFactory();

    if (referralToSpecialtyRef == null || referralToSpecialtyRef.getID_ReferralToSpecTeam()==null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralToSpecialtyRef.getID_ReferralToSpecTeam() });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getUncompletedReferralToSpecialtyByCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allRefSpecTeam from ReferralToSpecTeam as allRefSpecTeam where allRefSpecTeam.attendance.id = :attID and allRefSpecTeam.completionDateTime is null and ( allRefSpecTeam.notAccepted is null or allRefSpecTeam.notAccepted = 0) order by allRefSpecTeam.referredDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] { "attID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list!=null && list.size()>0)
        return ReferralToSpecialtyTeamVoAssembler.create((ReferralToSpecTeam)list.get(0));

    return null;
}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(Integer referralID)
{
    DomainFactory factory = getDomainFactory();

    if (referralID == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralID });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void getSelectedInstance()
{
    if (!form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
    {
        return;
    }

    ReferralToSpecialtyTeamVo voReferralToSpecialty = domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty().getID_ReferralToSpecTeam());

    if (voReferralToSpecialty == null)
    {
        return;
    }

    form.getLocalContext().setSelectedReferralToSpecialty(voReferralToSpecialty);
    clearControls();
    populateInstanceControls(voReferralToSpecialty);
    updateControlsState();

}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(ReferralToSpecialtyTeamVo voReferralToSpecialty)
{
    clearInstanceControls();

    if (voReferralToSpecialty==null)
        return;

    form.ccRefferedBy().setValue(voReferralToSpecialty.getReferredBy());
    form.dtimReffered().setValue(voReferralToSpecialty.getReferredDateTime());
    form.cmbConsultantTeam().setValue(voReferralToSpecialty.getTeamConsultant());
    form.cmbSpecialty().setValue(voReferralToSpecialty.getSpecialty());
    form.dtimSeen().setValue(voReferralToSpecialty.getSeenDateTime());
    form.dtimCompletion().setValue(voReferralToSpecialty.getCompletionDateTime());

    populateCommentGrid(voReferralToSpecialty.getComments());
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(ReferralToSpecTeamRefVo referralToSpecialtyRef)
{
    DomainFactory factory = getDomainFactory();

    if (referralToSpecialtyRef == null || referralToSpecialtyRef.getID_ReferralToSpecTeam()==null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralToSpecialtyRef.getID_ReferralToSpecTeam() });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:openMAXIMS    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getUncompletedReferralToSpecialtyByCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allRefSpecTeam from ReferralToSpecTeam as allRefSpecTeam where allRefSpecTeam.attendance.id = :attID and allRefSpecTeam.completionDateTime is null and ( allRefSpecTeam.notAccepted is null or allRefSpecTeam.notAccepted = 0) order by allRefSpecTeam.referredDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] { "attID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list!=null && list.size()>0)
        return ReferralToSpecialtyTeamVoAssembler.create((ReferralToSpecTeam)list.get(0));

    return null;
}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(Integer referralID)
{
    DomainFactory factory = getDomainFactory();

    if (referralID == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralID });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:openMAXIMS    文件:ReferralToSpecialtyImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void getSelectedInstance()
{
    if (!form.getLocalContext().getSelectedReferralToSpecialtyIsNotNull())
    {
        return;
    }

    ReferralToSpecialtyTeamVo voReferralToSpecialty = domain.getReferralToSpecialty(form.getLocalContext().getSelectedReferralToSpecialty().getID_ReferralToSpecTeam());

    if (voReferralToSpecialty == null)
    {
        return;
    }

    form.getLocalContext().setSelectedReferralToSpecialty(voReferralToSpecialty);
    clearControls();
    populateInstanceControls(voReferralToSpecialty);
    updateControlsState();

}
项目:openmaxims-linux    文件:Logic.java   
private void populateInstanceControls(ReferralToSpecialtyTeamVo voReferralToSpecialty)
{
    clearInstanceControls();

    if (voReferralToSpecialty==null)
        return;

    form.ccRefferedBy().setValue(voReferralToSpecialty.getReferredBy());
    form.dtimReffered().setValue(voReferralToSpecialty.getReferredDateTime());
    form.cmbConsultantTeam().setValue(voReferralToSpecialty.getTeamConsultant());
    form.cmbSpecialty().setValue(voReferralToSpecialty.getSpecialty());
    form.dtimSeen().setValue(voReferralToSpecialty.getSeenDateTime());
    form.dtimCompletion().setValue(voReferralToSpecialty.getCompletionDateTime());

    populateCommentGrid(voReferralToSpecialty.getComments());
}
项目:openmaxims-linux    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(ReferralToSpecTeamRefVo referralToSpecialtyRef)
{
    DomainFactory factory = getDomainFactory();

    if (referralToSpecialtyRef == null || referralToSpecialtyRef.getID_ReferralToSpecTeam()==null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralToSpecialtyRef.getID_ReferralToSpecTeam() });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:openmaxims-linux    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:openmaxims-linux    文件:EDReferralToSpecialtyDialogImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:openmaxims-linux    文件:EDReferralToSpecialtyDialogImpl.java   
public ReferralToSpecialtyTeamVo getUncompletedReferralToSpecialtyByCareContext(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SeenByHCPVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allRefSpecTeam from ReferralToSpecTeam as allRefSpecTeam where allRefSpecTeam.attendance.id = :attID and allRefSpecTeam.completionDateTime is null and ( allRefSpecTeam.notAccepted is null or allRefSpecTeam.notAccepted = 0) order by allRefSpecTeam.referredDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] { "attID" }, new Object[] { careContextRef.getID_CareContext() });

    if (list!=null && list.size()>0)
        return ReferralToSpecialtyTeamVoAssembler.create((ReferralToSpecTeam)list.get(0));

    return null;
}
项目:openmaxims-linux    文件:ReferralToSpecialtyImpl.java   
public ReferralToSpecialtyTeamVo getReferralToSpecialty(Integer referralID)
{
    DomainFactory factory = getDomainFactory();

    if (referralID == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralsToSpec on null Id ");
    }

    StringBuffer hql = new StringBuffer();

    hql.append(" select Referral from ReferralToSpecTeam as Referral where Referral.id = :referralID");

    List<?> list = factory.find(hql.toString(), new String[] { "referralID" }, new Object[] { referralID });

    if (list != null && list.size() > 0)
        return ReferralToSpecialtyTeamVoAssembler.createReferralToSpecialtyTeamVoCollectionFromReferralToSpecTeam(list).get(0);

    return null;
}
项目:openmaxims-linux    文件:ReferralToSpecialtyImpl.java   
public Boolean isStale(ReferralToSpecialtyTeamVo referralToSave)
{
    if (referralToSave == null || referralToSave.getID_ReferralToSpecTeam() == null)
    {
        throw new CodingRuntimeException("Cannot get ReferralToSpecialtyTeamVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();
    ReferralToSpecTeam domainReferralToSave = (ReferralToSpecTeam) factory.getDomainObject(ReferralToSpecTeam.class, referralToSave.getID_ReferralToSpecTeam());

    if (domainReferralToSave == null)
    {
        return true;
    }

    if (domainReferralToSave.getVersion() > referralToSave.getVersion_ReferralToSpecTeam())
    {
        return true;
    }

    return false;
}
项目:openmaxims-linux    文件:ReferralToSpecialtyImpl.java   
public Boolean isLastEntry(CareContextRefVo careContext, ReferralToSpecialtyTeamVo referralToSpecialty)
{
    if (careContext == null || careContext.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get check if ReferralToSpecialty is the last one without a valid CareContext record.");
    }

    String query = "SELECT COUNT (referral.id) FROM ReferralToSpecTeam AS referral LEFT JOIN referral.attendance AS context WHERE referral.systemInformation.creationDateTime >= :DATE_TO_CHECK AND referral.id <> :REFFERRAL_ID AND context.id = :CONTEXT_ID";

    long records = getDomainFactory().countWithHQL(query, new String[] {"DATE_TO_CHECK", "REFFERRAL_ID", "CONTEXT_ID"}, new Object[] {referralToSpecialty.getSystemInformation().getCreationDateTime().getJavaDate(), referralToSpecialty.getID_ReferralToSpecTeam(), careContext.getID_CareContext()} );

    if (records > 0)
        return false;

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControls(ReferralToSpecialtyTeamVo voReferralToSpecialty)
{

    form.ccRefferedBy().setValue(voReferralToSpecialty.getReferredBy());
    form.dtimReffered().setValue(voReferralToSpecialty.getReferredDateTime());
    form.cmbConsultantTeam().setValue(voReferralToSpecialty.getTeamConsultant());
    form.cmbSpecialty().setValue(voReferralToSpecialty.getSpecialty());
    form.dtimSeen().setValue(voReferralToSpecialty.getSeenDateTime());
    form.dtimCompletion().setValue(voReferralToSpecialty.getCompletionDateTime());

    //populateCommentGrid(voReferralToSpecialty.getComments());

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
    if (args != null && args.length == 1 && args[0] != null && args[0] instanceof TrackingRefVo)
    {
        form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission((TrackingRefVo) args[0]));

        initializeControls();
        open();

        if(form.getLocalContext().getCurrentTrackingForEdPartialAdmissionIsNotNull() && form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentPartialAdmission()==null)
        {
            newInstance();
        }
    }
    else if(args != null && args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof TrackingRefVo && args[1] instanceof ReferralToSpecialtyTeamVo) //wdev-19307
    {

        form.getLocalContext().setCurrentTrackingForEdPartialAdmission(domain.getTrackingForEdPartialAdmission((TrackingRefVo) args[0]));
        form.getLocalContext().setCurrentReferral((ReferralToSpecialtyTeamVo) args[1]);

        initializeControls();
        open();

        if(form.getLocalContext().getCurrentTrackingForEdPartialAdmissionIsNotNull() && form.getLocalContext().getCurrentTrackingForEdPartialAdmission().getCurrentPartialAdmission()==null)
        {
            newInstance();
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(ReferralToSpecialtyTeamVo voReferralToSpecialty)
{

    form.ccRefferedBy().setValue(voReferralToSpecialty.getReferredBy());
    form.dtimReffered().setValue(voReferralToSpecialty.getReferredDateTime());
    form.cmbConsultantTeam().setValue(voReferralToSpecialty.getTeamConsultant());
    form.cmbSpecialty().setValue(voReferralToSpecialty.getSpecialty());
    form.dtimSeen().setValue(voReferralToSpecialty.getSeenDateTime());
    form.dtimCompletion().setValue(voReferralToSpecialty.getCompletionDateTime());

    //populateCommentGrid(voReferralToSpecialty.getComments());

}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControls(ReferralToSpecialtyTeamVo voReferralToSpecialty)
{

    form.ccRefferedBy().setValue(voReferralToSpecialty.getReferredBy());
    form.dtimReffered().setValue(voReferralToSpecialty.getReferredDateTime());
    form.cmbConsultantTeam().setValue(voReferralToSpecialty.getTeamConsultant());
    form.cmbSpecialty().setValue(voReferralToSpecialty.getSpecialty());
    form.dtimSeen().setValue(voReferralToSpecialty.getSeenDateTime());
    form.dtimCompletion().setValue(voReferralToSpecialty.getCompletionDateTime());

    //populateCommentGrid(voReferralToSpecialty.getComments());

}