Java 类ims.core.vo.lookups.ActivityType 实例源码

项目:AvoinApotti    文件:Logic.java   
private void loadActivities()
{
    form.cmbActivity().clear();

    ActivitySchedVoCollection voCollActivities = domain.listActivitiesForType(ActivityType.APPOINTMENTTYPES);
    //wdev-12812
    if(voCollActivities != null)
    {
        voCollActivities.sort(new ActivityComparator(SortOrder.ASCENDING)); //wdev-12812
        for (int i = 0; i < voCollActivities.size(); i++)
        {
            if (voCollActivities.get(i).getNameIsNotNull())
                form.cmbActivity().newRow(voCollActivities.get(i), voCollActivities.get(i).getName());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void loadActivities()
{
    form.cmbActivity().clear();

    ActivitySchedVoCollection voCollActivities = domain.listActivitiesForType(ActivityType.APPOINTMENTTYPES);
    //wdev-12812
    if(voCollActivities != null)
    {
        voCollActivities.sort(new ActivityComparator(SortOrder.ASCENDING)); //wdev-12812
        for (int i = 0; i < voCollActivities.size(); i++)
        {
            if (voCollActivities.get(i).getNameIsNotNull())
                form.cmbActivity().newRow(voCollActivities.get(i), voCollActivities.get(i).getName());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:ServiceConfigurationImpl.java   
public ActivityLiteVoCollection listActivities(String searchText)
{
    DomainFactory factory = getDomainFactory();
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    String hql = "select act from Activity as act left join act.activityType as actType where actType.id = :AppointmentType and act.isActive = 1 ";
    markers.add("AppointmentType");
    values.add(ActivityType.APPOINTMENTTYPES.getID());

    if(searchText != null)
    {
        hql += " and UPPER(act.name) like :ActivityName ";
        markers.add("ActivityName");
        values.add(searchText.toUpperCase() + "%");
    }

    hql += " order by UPPER(act.name) asc";

    List<?> list = factory.find(hql, markers, values);

    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(list);
}
项目:openMAXIMS    文件:Logic.java   
private void loadActivities()
{
    form.cmbActivity().clear();

    ActivitySchedVoCollection voCollActivities = domain.listActivitiesForType(ActivityType.APPOINTMENTTYPES);
    //wdev-12812
    if(voCollActivities != null)
    {
        voCollActivities.sort(new ActivityComparator(SortOrder.ASCENDING)); //wdev-12812
        for (int i = 0; i < voCollActivities.size(); i++)
        {
            if (voCollActivities.get(i).getNameIsNotNull())
                form.cmbActivity().newRow(voCollActivities.get(i), voCollActivities.get(i).getName());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void loadActivities()
{
    form.cmbActivity().clear();

    ActivitySchedVoCollection voCollActivities = domain.listActivitiesForType(ActivityType.APPOINTMENTTYPES);
    //wdev-12812
    if(voCollActivities != null)
    {
        voCollActivities.sort(new ActivityComparator(SortOrder.ASCENDING)); //wdev-12812
        for (int i = 0; i < voCollActivities.size(); i++)
        {
            if (voCollActivities.get(i).getNameIsNotNull())
                form.cmbActivity().newRow(voCollActivities.get(i), voCollActivities.get(i).getName());
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void addRecord()
{
    form.setMode(FormMode.EDIT);

    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabNtpf().txtActivity().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabNtpf().chkItem().setValue(true);
        form.lyrActivity().tabNtpf().chkActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivityVo());
        form.getLocalContext().setAlertVo(new CodingAlertConfigurationVo());
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode()), (ActivityType) form.treActivity().getSelectedNode().getValue());
    }
    else if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("SCHED"))
    {
        if (form.treActivity().getSelectedNode() != null)
            form.lyrActivity().tabSchedulling().txtActType().setValue(form.treActivity().getSelectedNode().getText());
        form.lyrActivity().tabSchedulling().chkActActive().setValue(true);
        form.getLocalContext().setActivityVo(new ActivitySchedVo());
    }
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @return
 */
private boolean adminInstanceExists()
{
    ActivityVoCollection collActivityVo = form.getLocalContext().getActivityVoCollection();
    if (collActivityVo == null)
        return false;

    for (int i = 0; i < collActivityVo.size(); i++)
    {
        ActivityVo voActivity = collActivityVo.get(i);

        if (voActivity.getActivityType().equals(ActivityType.ADMINFUNCTIONS))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:ProfilesSlotGenericImpl.java   
/**
* listActivities
*/
public ActivityVoCollection listActivities() 
{   
    DomainFactory factory = getDomainFactory();
    // For profile Slot, we want to list
    // all activities for appointment activity type
    String hql = " from Activity act where act.activityType.id = :activityType and act.isActive = :active";
    List lst = factory.find(hql, new String[]{"activityType", "active"}, new Object[]{new Integer(ActivityType.APPOINTMENTTYPES.getId()), Boolean.TRUE});
    return (ActivityVoAssembler.createActivityVoCollectionFromActivity(lst));
}
项目:AvoinApotti    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

    if(andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:AvoinApotti    文件:Logic.java   
private void showActivityFunctionTabs()
{

    if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("ACT"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true));
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageActivity();
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().cmbActivityType().setValue(ActivityType.PROCEDURE);
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("FUNC"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true));
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageFunction();
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(false);
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("ALL"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true) + " / " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true) + " found.");
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageActivity();
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("NONE"))
    {
        form.getLocalContext().settreMessage("");
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().settabPageFunctionEnabled(false);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().settabPageActivityEnabled(false);
        form.lyr1().Edit().lyrActivityFunction().hide();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updateRecord()
{
    form.setMode(FormMode.EDIT);
    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode().getParent()), (ActivityType) form.treActivity().getSelectedNode().getParent().getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void showAlertDetails(boolean b, ActivityType type)
{
    form.lyrActivity().tabNtpf().pnlAlert().setVisible(b);
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setVisible(b);
    form.lyrActivity().tabNtpf().lblAlertDescription().setVisible(b);
    form.lyrActivity().tabNtpf().lblStaffMember().setVisible(b);
    form.lyrActivity().tabNtpf().txtEmailAlert().setVisible(b);
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setVisible(b);
    form.lyrActivity().tabNtpf().txtAlertDescription().setVisible(b);

    form.lyrActivity().tabNtpf().pnlAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblStaffMember().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtEmailAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));

    // If type is Appointments, we always want to disable the work queue checkbox
    if (type.equals(ActivityType.APPOINTMENTTYPES))
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(false);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(false);
    }
    else
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(true);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(true);
        form.lyrActivity().tabNtpf().chkItem().setEnabled(form.getMode().equals(FormMode.EDIT));
    }

}
项目:AvoinApotti    文件:Logic.java   
private void loadActivities() {
    form.cmbActivity().clear();

    ActivitySchedVoCollection voCollActivities = domain
            .listActivitiesForType(ActivityType.APPOINTMENTTYPES,
                    form.getGlobalContext().RefMan.getCatsReferral());
    if (voCollActivities != null) {
        for (int i = 0; i < voCollActivities.size(); i++) {
            if (voCollActivities.get(i).getNameIsNotNull())
                form.cmbActivity().newRow(voCollActivities.get(i),
                        voCollActivities.get(i).getName());
        }
    }
}
项目:openMAXIMS    文件:SessionSlotDialogImpl.java   
/**
* listActivities
*/  
//WDEV-22973 
public ActivityVoCollection listActivities(CatsReferralRefVo catsReferralRef, ServiceRefVo serviceRef)
{
    if (catsReferralRef != null && serviceRef != null)
    {   
        DomainFactory factory = getDomainFactory();
        String query = null;

        Long noConsultationActivityRequiredForReferral = factory.countWithHQL("select count(cats.id) from CatsReferral as cats where cats.id = :CatsReferralId and (cats.consultationActivityRequired = 0 or cats.consultationActivityRequired is null) ", new String[] {"CatsReferralId"}, new Object[] {catsReferralRef.getID_CatsReferral()});

        if (noConsultationActivityRequiredForReferral == null || noConsultationActivityRequiredForReferral == 0) //WDEV-22672
        {
            Long appointmentsCount = factory.countWithHQL("select count(appts.id) from CatsReferral as cats right join cats.appointments as appts where appts.theatreBooking is null and cats.id = :CatsReferralId", new String[] {"CatsReferralId"}, new Object[] {catsReferralRef.getID_CatsReferral()});
            query = "select act from ServiceActivity as servActivity left join servActivity.activity as act left join servActivity.service as serv where serv.id = :serviceID and act.activityType.id = :actType and servActivity.isActive = :isActive" + ((appointmentsCount == null || appointmentsCount == 0) ? " and (act.firstAppointment = 1 or act.diagnostic = 1)" : "") + " order by act.name asc";            }
        else
        {
            query = "select act from ServiceActivity as servActivity left join servActivity.activity as act left join servActivity.service as serv where serv.id = :serviceID and act.activityType.id = :actType and servActivity.isActive = :isActive order by act.name asc";
        }

        if(query != null && query.length() > 0)
        {
            List<?> results = factory.find(query, new String[]{"serviceID", "actType", "isActive"}, new Object[]{serviceRef.getID_Service(), ActivityType.APPOINTMENTTYPES.getId(), Boolean.TRUE});
            if (results == null || results.isEmpty())
                return null;
            return ActivityVoAssembler.createActivityVoCollectionFromActivity(results);
        }       

    }
    ProfilesSlotGeneric impl = (ProfilesSlotGeneric) getDomainImpl(ProfilesSlotGenericImpl.class);
    return impl.listActivities();

}
项目:openMAXIMS    文件:ProfilesSlotGenericImpl.java   
/**
* listActivities
*/
public ActivityVoCollection listActivities() 
{   
    DomainFactory factory = getDomainFactory();
    // For profile Slot, we want to list
    // all activities for appointment activity type
    String hql = " from Activity act where act.activityType.id = :activityType and act.isActive = :active";
    List lst = factory.find(hql, new String[]{"activityType", "active"}, new Object[]{new Integer(ActivityType.APPOINTMENTTYPES.getId()), Boolean.TRUE});
    return (ActivityVoAssembler.createActivityVoCollectionFromActivity(lst));
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

    if(andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:openMAXIMS    文件:Logic.java   
private void updateRecord()
{
    form.setMode(FormMode.EDIT);
    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode().getParent()), (ActivityType) form.treActivity().getSelectedNode().getParent().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void showAlertDetails(boolean b, ActivityType type)
{
    form.lyrActivity().tabNtpf().pnlAlert().setVisible(b);
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setVisible(b);
    form.lyrActivity().tabNtpf().lblAlertDescription().setVisible(b);
    form.lyrActivity().tabNtpf().lblStaffMember().setVisible(b);
    form.lyrActivity().tabNtpf().txtEmailAlert().setVisible(b);
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setVisible(b);
    form.lyrActivity().tabNtpf().txtAlertDescription().setVisible(b);

    form.lyrActivity().tabNtpf().pnlAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblStaffMember().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtEmailAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));

    // If type is Appointments, we always want to disable the work queue checkbox
    if (type.equals(ActivityType.APPOINTMENTTYPES))
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(false);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(false);
    }
    else
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(true);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(true);
        form.lyrActivity().tabNtpf().chkItem().setEnabled(form.getMode().equals(FormMode.EDIT));
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadActivities()
{
    form.cmbActivity().clear();

    ActivitySchedVoCollection voCollActivities = domain.listActivitiesForType(ActivityType.APPOINTMENTTYPES, form.getGlobalContext().RefMan.getCatsReferral(), form.cmbService().getValue());

    if (voCollActivities != null)
    {
        for (int i = 0; i < voCollActivities.size(); i++)
        {
            if (voCollActivities.get(i).getNameIsNotNull())
                form.cmbActivity().newRow(voCollActivities.get(i), voCollActivities.get(i).getName());
        }
    }
}
项目:openMAXIMS    文件:ProfilesSlotGenericImpl.java   
/**
* listActivities
*/
public ActivityVoCollection listActivities() 
{   
    DomainFactory factory = getDomainFactory();
    // For profile Slot, we want to list
    // all activities for appointment activity type
    String hql = " from Activity act where act.activityType.id = :activityType and act.isActive = :active";
    List lst = factory.find(hql, new String[]{"activityType", "active"}, new Object[]{new Integer(ActivityType.APPOINTMENTTYPES.getId()), Boolean.TRUE});
    return (ActivityVoAssembler.createActivityVoCollectionFromActivity(lst));
}
项目:openMAXIMS    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

    if(andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:openMAXIMS    文件:Logic.java   
private void showActivityFunctionTabs()
{

    if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("ACT"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true));
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageActivity();
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().cmbActivityType().setValue(ActivityType.PROCEDURE);
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("FUNC"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true));
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageFunction();
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(false);
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("ALL"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true) + " / " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true) + " found.");
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageActivity();
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("NONE"))
    {
        form.getLocalContext().settreMessage("");
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().settabPageFunctionEnabled(false);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().settabPageActivityEnabled(false);
        form.lyr1().Edit().lyrActivityFunction().hide();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updateRecord()
{
    form.setMode(FormMode.EDIT);
    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode().getParent()), (ActivityType) form.treActivity().getSelectedNode().getParent().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void showAlertDetails(boolean b, ActivityType type)
{
    form.lyrActivity().tabNtpf().pnlAlert().setVisible(b);
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setVisible(b);
    form.lyrActivity().tabNtpf().lblAlertDescription().setVisible(b);
    form.lyrActivity().tabNtpf().lblStaffMember().setVisible(b);
    form.lyrActivity().tabNtpf().txtEmailAlert().setVisible(b);
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setVisible(b);
    form.lyrActivity().tabNtpf().txtAlertDescription().setVisible(b);

    form.lyrActivity().tabNtpf().pnlAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblStaffMember().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtEmailAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));

    // If type is Appointments, we always want to disable the work queue checkbox
    if (type.equals(ActivityType.APPOINTMENTTYPES))
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(false);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(false);
    }
    else
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(true);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(true);
        form.lyrActivity().tabNtpf().chkItem().setEnabled(form.getMode().equals(FormMode.EDIT));
    }

}
项目:openMAXIMS    文件:Logic.java   
private void loadActivities() {
    form.cmbActivity().clear();

    ActivitySchedVoCollection voCollActivities = domain
            .listActivitiesForType(ActivityType.APPOINTMENTTYPES,
                    form.getGlobalContext().RefMan.getCatsReferral());
    if (voCollActivities != null) {
        for (int i = 0; i < voCollActivities.size(); i++) {
            if (voCollActivities.get(i).getNameIsNotNull())
                form.cmbActivity().newRow(voCollActivities.get(i),
                        voCollActivities.get(i).getName());
        }
    }
}
项目:openmaxims-linux    文件:ProfilesSlotGenericImpl.java   
/**
* listActivities
*/
public ActivityVoCollection listActivities() 
{   
    DomainFactory factory = getDomainFactory();
    // For profile Slot, we want to list
    // all activities for appointment activity type
    String hql = " from Activity act where act.activityType.id = :activityType and act.isActive = :active";
    List lst = factory.find(hql, new String[]{"activityType", "active"}, new Object[]{new Integer(ActivityType.APPOINTMENTTYPES.getId()), Boolean.TRUE});
    return (ActivityVoAssembler.createActivityVoCollectionFromActivity(lst));
}
项目:openmaxims-linux    文件:ProfilesImpl.java   
public ActivityLiteVoCollection listActivity()
{
    DomainFactory factory = getDomainFactory();
    String hql = "from Activity act";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";
    StringBuffer condStr = new StringBuffer();

    condStr.append(andStr + " act.isActive = :active");
    markers.add("active");
    values.add(Boolean.TRUE);   
    andStr = " and ";

    condStr.append(andStr + " act.activityType != :investigation");
    markers.add("investigation");
    values.add(getDomLookup(ActivityType.INVESTIGATION));   
    andStr = " and ";

    if(andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();  
    List activities =  factory.find(hql, markers, values);
    return ActivityLiteVoAssembler.createActivityLiteVoCollectionFromActivity(activities);
}
项目:openmaxims-linux    文件:Logic.java   
private void showActivityFunctionTabs()
{

    if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("ACT"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true));
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageActivity();
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().cmbActivityType().setValue(ActivityType.PROCEDURE);
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("FUNC"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true));
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageFunction();
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(false);
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("ALL"))
    {
        form.getLocalContext().settreMessage("No " + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(true) + " / " + ConfigFlag.UI.DISPLAY_NAME_FUNCTION.getValue(true) + " found.");
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(true);
        form.lyr1().Edit().lyrActivityFunction().showtabPageActivity();
    }
    else if (ConfigFlag.UI.SERVICE_TABS.getValue().equals("NONE"))
    {
        form.getLocalContext().settreMessage("");
        form.lyr1().Edit().lyrActivityFunction().tabPageFunction().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().settabPageFunctionEnabled(false);
        form.lyr1().Edit().lyrActivityFunction().tabPageActivity().setHeaderVisible(false);
        form.lyr1().Edit().lyrActivityFunction().settabPageActivityEnabled(false);
        form.lyr1().Edit().lyrActivityFunction().hide();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void updateRecord()
{
    form.setMode(FormMode.EDIT);
    if (ConfigFlag.UI.ACTIVITY_VIEW.getValue().equals("NTPF"))
    {
        showAlertDetails(enableAlertControls(form.treActivity().getSelectedNode().getParent()), (ActivityType) form.treActivity().getSelectedNode().getParent().getValue());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void showAlertDetails(boolean b, ActivityType type)
{
    form.lyrActivity().tabNtpf().pnlAlert().setVisible(b);
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setVisible(b);
    form.lyrActivity().tabNtpf().lblAlertDescription().setVisible(b);
    form.lyrActivity().tabNtpf().lblStaffMember().setVisible(b);
    form.lyrActivity().tabNtpf().txtEmailAlert().setVisible(b);
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setVisible(b);
    form.lyrActivity().tabNtpf().txtAlertDescription().setVisible(b);

    form.lyrActivity().tabNtpf().pnlAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblEmailAlertTo().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().lblStaffMember().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtEmailAlert().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().qmbMemberOfStaff().setEnabled(form.getMode().equals(FormMode.EDIT));
    form.lyrActivity().tabNtpf().txtAlertDescription().setEnabled(form.getMode().equals(FormMode.EDIT));

    // If type is Appointments, we always want to disable the work queue checkbox
    if (type.equals(ActivityType.APPOINTMENTTYPES))
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(false);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(false);
    }
    else
    {
        form.lyrActivity().tabNtpf().chkItem().setVisible(true);
        form.lyrActivity().tabNtpf().lblWorkQueue().setVisible(true);
        form.lyrActivity().tabNtpf().chkItem().setEnabled(form.getMode().equals(FormMode.EDIT));
    }

}
项目:AvoinApotti    文件:BookAppointmentImpl.java   
public ActivitySchedVoCollection listActivitiesForType(ActivityType actType)
{
    DomainFactory factory = getDomainFactory();
    return ActivitySchedVoAssembler.createActivitySchedVoCollectionFromActivity(factory.find("from Activity act where act.activityType = :actType and act.isActive = :isActive", new String[]{"actType", "isActive"}, new Object[]{getDomLookup(actType), Boolean.TRUE}));
}
项目:AvoinApotti    文件:Logic.java   
private void populateActivityVoFromScreen(ActivityVo voActivity)
{
    if (voActivity == null)
        return;

    if (voActivity instanceof ActivitySchedVo)
    {
        //scheduling
        if (voActivity.getActivityType() == null)
            voActivity.setActivityType((ActivityType) form.treActivity().getSelectedNode().getValue());

        //if (form.lyrActivity().tabSchedulling().txtActName().getValue() != null)      WDEV-15167
        voActivity.setName(form.lyrActivity().tabSchedulling().txtActName().getValue());

        if (form.lyrActivity().tabSchedulling().intTimeRequired().getValue() != null)
            ((ActivitySchedVo) voActivity).setTmReq(form.lyrActivity().tabSchedulling().intTimeRequired().getValue());

        if (form.lyrActivity().tabSchedulling().intIntervalRequired().getValue() != null)
            ((ActivitySchedVo) voActivity).setIntReq(form.lyrActivity().tabSchedulling().intIntervalRequired().getValue());

        if (form.getGlobalContext().Admin.getSelectedImageIsNotNull())
            ((ActivitySchedVo) voActivity).setActivityImage(form.getGlobalContext().Admin.getSelectedImage());

        ((ActivitySchedVo) voActivity).setIsPatReq(new Boolean(form.lyrActivity().tabSchedulling().chkPatientRequired().getValue()));
        ((ActivitySchedVo) voActivity).setIsScheduled(new Boolean(form.lyrActivity().tabSchedulling().chkScheduled().getValue()));
        voActivity.setIsActive(new Boolean(form.lyrActivity().tabSchedulling().chkActActive().getValue()));

        // Save Activity special requirements.
        ActivitySpecRequirementsCollection asrColl = new ActivitySpecRequirementsCollection();

        GenForm.lyrActivityLayer.tabSchedullingContainer.grdActSpecialRequirementsRow row;
        for (int i = 0; i < form.lyrActivity().tabSchedulling().grdActSpecialRequirements().getRows().size(); i++)
        {
            row = form.lyrActivity().tabSchedulling().grdActSpecialRequirements().getRows().get(i);
            if (row.getcolSelected())
                asrColl.add(row.getValue());
        }
        ((ActivitySchedVo) voActivity).setSpecialRequirements(asrColl);

        // Save Activity taxonomy mappings (WDEV-6108)
        voActivity.setCodeMappings(form.lyrActivity().tabSchedulling().ccTaxonomyTab2().getValue());
        voActivity.setFirstAppointment(form.lyrActivity().tabSchedulling().chkFirstAppointment().getValue());
        voActivity.setDiagnostic(form.lyrActivity().tabSchedulling().chkDiagnosticActivity().getValue());
    }
    else
    {
        if (voActivity.getActivityType() == null)
            voActivity.setActivityType((ActivityType) form.treActivity().getSelectedNode().getValue());

        if (form.lyrActivity().tabNtpf().txtName().getValue() != null)
            voActivity.setName(form.lyrActivity().tabNtpf().txtName().getValue());

        voActivity.setIsWorkQueue(new Boolean(form.lyrActivity().tabNtpf().chkItem().getValue()));
        voActivity.setIsActive(new Boolean(form.lyrActivity().tabNtpf().chkActive().getValue()));

        // Save Activity taxonomy mappings (WDEV-6108)
        voActivity.setCodeMappings(form.lyrActivity().tabNtpf().ccTaxonomyTab1().getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onTreActivityTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    if (node.getValue() instanceof ActivityVo)
    {
        form.getContextMenus().getGenericGridAddItem().setVisible(false);
        form.getContextMenus().getGenericGridUpdateItem().setVisible(true);
        form.getLocalContext().setActivityVo((ActivityVo) form.treActivity().getSelectedNode().getValue());
        clearActivityDetails();

        ActivityVo voActivity = (ActivityVo) form.treActivity().getSelectedNode().getValue();
        populateScreenFromActivityVo(voActivity);

        if (!(node.getValue() instanceof ActivitySchedVo))
        {
            CodingAlertConfigurationVo alertVo = domain.getAlert(voActivity);
            form.getLocalContext().setAlertVo(alertVo);
            populateScreenFromAlertVo(alertVo);
            showAlertDetails(enableAlertControls(node.getParent()), voActivity.getActivityType());
        }
    }
    else if (node.getValue() instanceof ActivityType)
    {
        form.getContextMenus().getGenericGridAddItem().setVisible(true);
        form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
        clearActivityDetails();

        ActivityType activityType = (ActivityType) node.getValue();
        if (activityType.equals(ActivityType.ADMINFUNCTIONS))
        {
            if (adminInstanceExists())
                form.getContextMenus().getGenericGridAddItem().setVisible(false);
        }

        showAlertDetails(enableAlertControls(node), activityType);

        if (oneChildOnlyAllowed(node))
            form.getContextMenus().getGenericGridAddItem().setVisible(false);
    }
    else
    {
        form.getContextMenus().getGenericGridAddItem().setVisible(false);
        form.getContextMenus().getGenericGridUpdateItem().setVisible(false);
    }
}
项目:AvoinApotti    文件:ServiceImpl.java   
public ActivityVoCollection listActivity(String nameFilter, ActivityType activityType, Boolean bActive) throws DomainInterfaceException
{
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";
    String hql = null;
    DomainFactory factory = getDomainFactory();

    if (ConfigFlag.DOM.LINK_ACTIVITY_TO_PROCEDURE.getValue() && activityType.equals(ActivityType.PROCEDURE))
    {
        hql = "select act from Activity act, Procedure proc join proc.keywords as kw";
        condStr.append(andStr + " where act = proc.activity");
        andStr = " and ";

    }
    else
    {
        hql = "select act from Activity act";
        condStr.append(" where");
        andStr = " ";
    }

    if (bActive != null)
    {
        condStr.append(andStr + " act.isActive = :isActive");
        markers.add("isActive");
        values.add(bActive);
        andStr = " and ";
    }
    if (activityType != null)
    {
        condStr.append(andStr + " act.activityType =:actType");
        markers.add("actType");
        values.add(getDomLookup(activityType));
        andStr = " and ";
    }
    if (!ConfigFlag.DOM.LINK_ACTIVITY_TO_PROCEDURE.getValue() && nameFilter != "")
    {
        condStr.append(andStr + " act.name like :filterStr ");
        markers.add("filterStr");
        values.add(nameFilter + "%");
    }

    hql += condStr.toString();
    List activities = null;
    if (ConfigFlag.DOM.LINK_ACTIVITY_TO_PROCEDURE.getValue() && activityType.equals(ActivityType.PROCEDURE))
        activities = Keywords.searchByKeywords(factory, nameFilter, hql.toString(), markers, values);
    else
        activities = factory.find(hql, markers, values, 1000);

    return ActivityVoAssembler.createActivityVoCollectionFromActivity(activities).sort();
}