Java 类ims.core.vo.CustomListVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void removeCustomList() 
{
    CustomListVo voCL = form.cmbCustomLists().getValue();

    voCL.setIsActive(false);

    String[] errors = voCL.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }

    try 
    {
        domain.saveCustomList(voCL);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    }
    listCustomLists();

    updateButtonState();
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.cmbSpecialty().getValue()==null){
        engine.showMessage("Please select a Specialty for search");
        return;
    }
    if(form.dteDate().getValue()==null){
        engine.showMessage("Please select a Date for search");
        return;
    }
    CustomListVo voCustomList = form.cmbCustomLists().getValue();
    if(voCustomList!=null){
        populatePatientsGrid(domain.getCustomList(voCustomList));
        if(form.grdPatients().getRows().size()==0)
            engine.showMessage("No Care Contexts exist for Patients in this list.");
    }
    else{
        form.grdPatients().getRows().clear();
        engine.showMessage("Please select a List Name for search");
    }

    form.getContextMenus().Core.hideAllMDTCustomListsMenuItems();
}
项目:AvoinApotti    文件:CustomListMaintenanceImpl.java   
public MDTPatientCustomListVo saveCustomList(CustomListVo customListVo, MDTPatientCustomListVo patientCustomListVo) throws StaleObjectException {
    if (!patientCustomListVo.isValidated())
    {
        throw new DomainRuntimeException("CustomList has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    CustomList doCustomList = CustomListVoAssembler.extractCustomList(factory, customListVo);
    factory.save(doCustomList);

    MDTPatientCustomList doPatientCustomList = MDTPatientCustomListVoAssembler.extractMDTPatientCustomList(factory, patientCustomListVo);
    doPatientCustomList.setCustomListType(doCustomList);
    factory.save(doPatientCustomList);

    return MDTPatientCustomListVoAssembler.create(doPatientCustomList);
}
项目:openMAXIMS    文件:Logic.java   
private void setAccessType(CustomListVo selectedCustomList)
{
    if (selectedCustomList == null)
        return;

    form.CustomListAccess().setValue(CustomListAccessEnumeration.rdoPrivate); //default

    if (Boolean.TRUE.equals(selectedCustomList.getIsReadOnly()) && selectedCustomList.getIsFullAccess() == null)
        form.CustomListAccess().setValue(CustomListAccessEnumeration.rdoReadOnlyAll);

    else if (selectedCustomList.getIsReadOnly() == null && Boolean.TRUE.equals(selectedCustomList.getIsFullAccess()))
        form.CustomListAccess().setValue(CustomListAccessEnumeration.rdoFull);

    else
    {
        form.CustomListAccess().setValue(CustomListAccessEnumeration.rdoPrivate);
    }

}
项目:openMAXIMS    文件:Logic.java   
private void updateCustomList(CustomListVo customList)
{
    if (customList == null)
        return;

    if (customList.validate() != null)
    {
        engine.showErrors(customList.validate());
        return;
    }

    try 
    {
        domain.saveCustomList(customList);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    } 
    search();
}
项目:openMAXIMS    文件:Logic.java   
private void removeCustomList() 
{
    CustomListVo voCL = form.cmbCustomLists().getValue();

    voCL.setIsActive(false);

    String[] errors = voCL.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }

    try 
    {
        domain.saveCustomList(voCL);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    }
    listCustomLists();

    updateButtonState();
}
项目:openMAXIMS    文件:Logic.java   
private boolean search()
{
    if(form.cmbSpecialty().getValue()==null){
        engine.showMessage("Please select a Specialty for search");
        return false;
    }
    if(form.dteDate().getValue()==null){
        engine.showMessage("Please select a Date for search");
        return false;
    }
    CustomListVo voCustomList = form.cmbCustomLists().getValue();
    if(voCustomList!=null){
        populatePatientsGrid(domain.getCustomList(voCustomList));
        if(form.grdPatients().getRows().size()==0)
            engine.showMessage("No Care Contexts exist for Patients in this list.");
    }
    else{
        form.grdPatients().getRows().clear();
        engine.showMessage("Please select a List Name for search");
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:CustomListMaintenanceImpl.java   
public MDTPatientCustomListVo saveCustomList(CustomListVo customListVo, MDTPatientCustomListVo patientCustomListVo) throws StaleObjectException {
    if (!patientCustomListVo.isValidated())
    {
        throw new DomainRuntimeException("CustomList has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    CustomList doCustomList = CustomListVoAssembler.extractCustomList(factory, customListVo);
    factory.save(doCustomList);

    MDTPatientCustomList doPatientCustomList = MDTPatientCustomListVoAssembler.extractMDTPatientCustomList(factory, patientCustomListVo);
    doPatientCustomList.setCustomListType(doCustomList);
    factory.save(doPatientCustomList);

    return MDTPatientCustomListVoAssembler.create(doPatientCustomList);
}
项目:openMAXIMS    文件:Logic.java   
private void removeCustomList() 
{
    CustomListVo voCL = form.cmbCustomLists().getValue();

    voCL.setIsActive(false);

    String[] errors = voCL.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }

    try 
    {
        domain.saveCustomList(voCL);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    }
    listCustomLists();

    updateButtonState();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.cmbSpecialty().getValue()==null){
        engine.showMessage("Please select a Specialty for search");
        return;
    }
    if(form.dteDate().getValue()==null){
        engine.showMessage("Please select a Date for search");
        return;
    }
    CustomListVo voCustomList = form.cmbCustomLists().getValue();
    if(voCustomList!=null){
        populatePatientsGrid(domain.getCustomList(voCustomList));
        if(form.grdPatients().getRows().size()==0)
            engine.showMessage("No Care Contexts exist for Patients in this list.");
    }
    else{
        form.grdPatients().getRows().clear();
        engine.showMessage("Please select a List Name for search");
    }

    form.getContextMenus().Core.hideAllMDTCustomListsMenuItems();
}
项目:openMAXIMS    文件:CustomListMaintenanceImpl.java   
public MDTPatientCustomListVo saveCustomList(CustomListVo customListVo, MDTPatientCustomListVo patientCustomListVo) throws StaleObjectException {
    if (!patientCustomListVo.isValidated())
    {
        throw new DomainRuntimeException("CustomList has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    CustomList doCustomList = CustomListVoAssembler.extractCustomList(factory, customListVo);
    factory.save(doCustomList);

    MDTPatientCustomList doPatientCustomList = MDTPatientCustomListVoAssembler.extractMDTPatientCustomList(factory, patientCustomListVo);
    doPatientCustomList.setCustomListType(doCustomList);
    factory.save(doPatientCustomList);

    return MDTPatientCustomListVoAssembler.create(doPatientCustomList);
}
项目:openmaxims-linux    文件:Logic.java   
private void removeCustomList() 
{
    CustomListVo voCL = form.cmbCustomLists().getValue();

    voCL.setIsActive(false);

    String[] errors = voCL.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }

    try 
    {
        domain.saveCustomList(voCL);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    }
    listCustomLists();

    updateButtonState();
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onImbSearchClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.cmbSpecialty().getValue()==null){
        engine.showMessage("Please select a Specialty for search");
        return;
    }
    if(form.dteDate().getValue()==null){
        engine.showMessage("Please select a Date for search");
        return;
    }
    CustomListVo voCustomList = form.cmbCustomLists().getValue();
    if(voCustomList!=null){
        populatePatientsGrid(domain.getCustomList(voCustomList));
        if(form.grdPatients().getRows().size()==0)
            engine.showMessage("No Care Contexts exist for Patients in this list.");
    }
    else{
        form.grdPatients().getRows().clear();
        engine.showMessage("Please select a List Name for search");
    }

    form.getContextMenus().Core.hideAllMDTCustomListsMenuItems();
}
项目:openmaxims-linux    文件:CustomListMaintenanceImpl.java   
public MDTPatientCustomListVo saveCustomList(CustomListVo customListVo, MDTPatientCustomListVo patientCustomListVo) throws StaleObjectException {
    if (!patientCustomListVo.isValidated())
    {
        throw new DomainRuntimeException("CustomList has not been validated");
    }

    DomainFactory factory = getDomainFactory();
    CustomList doCustomList = CustomListVoAssembler.extractCustomList(factory, customListVo);
    factory.save(doCustomList);

    MDTPatientCustomList doPatientCustomList = MDTPatientCustomListVoAssembler.extractMDTPatientCustomList(factory, patientCustomListVo);
    doPatientCustomList.setCustomListType(doCustomList);
    factory.save(doPatientCustomList);

    return MDTPatientCustomListVoAssembler.create(doPatientCustomList);
}
项目:AvoinApotti    文件:Logic.java   
private void refreshSearchCriteria() 
{
    if (form.getGlobalContext().Core.getCustomListSearchCriteriaVoIsNotNull())
    {
        if ( ! form.cmbCustomLists().getValues().isEmpty())
        {
            for(int i = 0 ; i < form.cmbCustomLists().getValues().size() ; i++)
            {
                if (form.cmbCustomLists().getValues() != null
                    && form.getGlobalContext().Core.getCustomListSearchCriteriaVo().getCustomListRefIsNotNull()
                    && form.cmbCustomLists().getValues().get(i) != null
                    && ((CustomListVo)form.cmbCustomLists().getValues().get(i)).getID_CustomList().equals(form.getGlobalContext().Core.getCustomListSearchCriteriaVo().getCustomListRef().getID_CustomList()))
                {
                    form.cmbCustomLists().setValue(((CustomListVo)form.cmbCustomLists().getValues().get(i)));

                    //if(domain.getHcpLiteUser()!=null)//WDEV-9696 
                    //{
                        form.imbRemoveList().setEnabled(true);
                    //}

                    search();

                    break;
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void saveNewCustomList() 
{
    CustomListVo voCL = new CustomListVo();

    voCL.setListType(CustomListType.CUSTOM_PATIENT_LIST);
    voCL.setListName(form.getGlobalContext().Core.getCustomListName());
    voCL.setDate(new Date());
    voCL.setIsActive(true);
    voCL.setListOwner((MemberOfStaffLiteVo) domain.getMosUser());

    String[] errors = voCL.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }

    try 
    {
        domain.saveCustomList(voCL);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    } 
    listCustomLists();
}
项目:AvoinApotti    文件:Logic.java   
private void loadListCombo(CustomListVoCollection collCustomListVo) {
    form.cmbCustomLists().clear();
    if(collCustomListVo!=null)
        for(int i=0;i<collCustomListVo.size();i++)
        {
            CustomListVo voCustomList = collCustomListVo.get(i);
            form.cmbCustomLists().newRow(voCustomList, voCustomList.getListName());
        }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDteDateValueChanged() throws PresentationLogicException {
    if(form.dteDate().getValue()!=null && form.dteDate().getValue()!=null){
        CustomListVo voCustomList = new CustomListVo();
        voCustomList.setDate(form.dteDate().getValue());
        voCustomList.setSpecialty(form.cmbSpecialty().getValue());
        loadListCombo(domain.listCustomListTypes(voCustomList));
    }
    form.grdPatients().getRows().clear();
    form.getContextMenus().Core.hideAllMDTCustomListsMenuItems();       
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onCmbSpecialtyValueChanged() throws PresentationLogicException {
    if(form.dteDate().getValue()!=null && form.dteDate().getValue()!=null){
        CustomListVo voCustomList = new CustomListVo();
        voCustomList.setDate(form.dteDate().getValue());
        voCustomList.setSpecialty(form.cmbSpecialty().getValue());
        loadListCombo(domain.listCustomListTypes(voCustomList));
    }
    form.grdPatients().getRows().clear();
    form.getContextMenus().Core.hideAllMDTCustomListsMenuItems();       
}
项目:AvoinApotti    文件:Logic.java   
private void populateListControl(CustomListVoCollection collCustomListVo) {
    if (collCustomListVo != null)
    {
        if (collCustomListVo.size() == 0)
        {
            engine.showMessage("No matching Custom List entries found.");
            return;
        }

        for (int i = 0; i < collCustomListVo.size(); i++)
        {
            CustomListVo voCustomListType = collCustomListVo.get(i);
            grdPatientsRow row = form.lyrCustomListSearch().tabCustomListSearch().grdPatients().getRows().newRow();

            if(voCustomListType.getListTypeIsNotNull())
                row.setColListType(voCustomListType.getListType().toString());
            if(voCustomListType.getListNameIsNotNull())
                row.setColListName(voCustomListType.getListName());
            if(voCustomListType.getSpecialtyIsNotNull())
                row.setColSpecialty(voCustomListType.getSpecialty().toString());
            if(voCustomListType.getDateIsNotNull())
                row.setColDate(voCustomListType.getDate().toString());
            if(voCustomListType.getListOwnerIsNotNull())
                row.setColListOwner(voCustomListType.getListOwner().toString());
            if(voCustomListType.getIsActiveIsNotNull())
                row.setColStatus(voCustomListType.getIsActive());

            row.setValue(voCustomListType);
        }
    }
    else
        engine.showMessage("No results match search criteria");

}
项目:AvoinApotti    文件:Logic.java   
private CustomListVo populateFilter() {
    CustomListVo voFilter = new CustomListVo();

    voFilter.setListType(form.lyrCustomListSearch().tabCustomListSearch().cmbListType().getValue());
    voFilter.setListName(form.lyrCustomListSearch().tabCustomListSearch().txtListName().getValue());
    voFilter.setSpecialty(form.lyrCustomListSearch().tabCustomListSearch().cmbSpecialty().getValue());
    voFilter.setDate(form.lyrCustomListSearch().tabCustomListSearch().dteDate().getValue());
    voFilter.setListOwner((MemberOfStaffLiteVo) form.lyrCustomListSearch().tabCustomListSearch().customControlMos().getValue());
    if(form.lyrCustomListSearch().tabCustomListSearch().chkActiveOnly().getValue())
        voFilter.setIsActive(true);

    return voFilter;
}
项目:AvoinApotti    文件:Logic.java   
private CustomListVo populateCustomListVo(CustomListVo voCustomList) {
    voCustomList.setListType(form.lyrCustomListSearch().tabCustomListDetails().cmbListTypeDetails().getValue());
    voCustomList.setListName(form.lyrCustomListSearch().tabCustomListDetails().txtListNameDetails().getValue());
    voCustomList.setSpecialty(form.lyrCustomListSearch().tabCustomListDetails().cmbSpecialtyDetails().getValue());
    voCustomList.setDate(form.lyrCustomListSearch().tabCustomListDetails().dteDateDetails().getValue());
    voCustomList.setListOwner((MemberOfStaffLiteVo) form.lyrCustomListSearch().tabCustomListDetails().customControlMosDetails().getValue());
    voCustomList.setIsActive(form.lyrCustomListSearch().tabCustomListDetails().chkActiveOnlydetails().getValue());

    return voCustomList;
}
项目:AvoinApotti    文件:Logic.java   
private void populateDetailsScreen() {
    CustomListVo voCustomList = form.getLocalContext().getSelectedCustomList();
    if(voCustomList==null)
        return;
    form.lyrCustomListSearch().tabCustomListDetails().cmbListTypeDetails().setValue(voCustomList.getListType());
    form.lyrCustomListSearch().tabCustomListDetails().txtListNameDetails().setValue(voCustomList.getListName());
    form.lyrCustomListSearch().tabCustomListDetails().cmbSpecialtyDetails().setValue(voCustomList.getSpecialty());
    form.lyrCustomListSearch().tabCustomListDetails().dteDateDetails().setValue(voCustomList.getDate());
    form.lyrCustomListSearch().tabCustomListDetails().customControlMosDetails().setValue(voCustomList.getListOwner());
    form.lyrCustomListSearch().tabCustomListDetails().chkActiveOnlydetails().setValue(voCustomList.getIsActive());

    MDTPatientCustomListVo voPatientCustomList = form.getLocalContext().getPatientCustomListVo();

    if(voPatientCustomList!=null && voPatientCustomList.getPatientsIsNotNull()){
        PatientShortCollection collPatientShort = voPatientCustomList.getPatients().sort(SortOrder.ASCENDING);

        form.lyrCustomListSearch().tabCustomListDetails().grdCustomList().getRows().clear();
        if(collPatientShort!=null)
            for (int i = 0; i < collPatientShort.size(); i++) 
            {
                grdCustomListRow row = form.lyrCustomListSearch().tabCustomListDetails().grdCustomList().getRows().newRow();

                PatientShort patientShort = collPatientShort.get(i);
                if(patientShort.getName().getForenameIsNotNull())
                    row.setColForename(patientShort.getName().getForename());
                row.setColSurname(patientShort.getName().getSurname());
                if(patientShort.getDobIsNotNull())
                    row.setColDOB(patientShort.getDob().toString(DateFormat.STANDARD));
                if (patientShort.getDisplayId() != null)
                    row.setColHospNum(patientShort.getDisplayId().getValue());

                row.setValue(patientShort);
            }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    CustomListVo selectedList = form.getLocalContext().getSelectedCustomList();

    if (selectedList != null)
    {   
        if (CustomListAccessEnumeration.rdoPrivate.equals(form.CustomListAccess().getValue()))
        {
            selectedList.setIsReadOnly(null);
            selectedList.setIsFullAccess(null);
        }

        else if (CustomListAccessEnumeration.rdoReadOnlyAll.equals(form.CustomListAccess().getValue()))
        {
            selectedList.setIsReadOnly(Boolean.TRUE);
            selectedList.setIsFullAccess(null);
        }

        else if (CustomListAccessEnumeration.rdoFull.equals(form.CustomListAccess().getValue()))
        {
            selectedList.setIsReadOnly(null);
            selectedList.setIsFullAccess(Boolean.TRUE);
        }
    }
    form.getGlobalContext().Core.setCustomList(selectedList);
    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
private void refreshSearchCriteria() 
{
    if (form.getGlobalContext().Core.getCustomListSearchCriteriaVoIsNotNull())
    {
        if ( ! form.cmbCustomLists().getValues().isEmpty())
        {
            for(int i = 0 ; i < form.cmbCustomLists().getValues().size() ; i++)
            {
                if (form.cmbCustomLists().getValues() != null
                    && form.getGlobalContext().Core.getCustomListSearchCriteriaVo().getCustomListRefIsNotNull()
                    && form.cmbCustomLists().getValues().get(i) != null
                    && ((CustomListVo)form.cmbCustomLists().getValues().get(i)).getID_CustomList().equals(form.getGlobalContext().Core.getCustomListSearchCriteriaVo().getCustomListRef().getID_CustomList()))
                {
                    form.cmbCustomLists().setValue(((CustomListVo)form.cmbCustomLists().getValues().get(i)));

                    //if(domain.getHcpLiteUser()!=null)//WDEV-9696 
                    //{
                        updateButtonState(); //WDEV-18640
                    //}

                    search();

                    break;
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean isCurrentMosUserCustomListOwner(CustomListVo list)
{
    Object user = domain.getMosUser();

    if (list != null && list.getListOwnerIsNotNull() && user != null)
    {
        return ((MemberOfStaffShortVo) user).getID_MemberOfStaff().equals(list.getListOwner().getID_MemberOfStaff());
    }
    return false;

}
项目:openMAXIMS    文件:Logic.java   
private void saveNewCustomList() 
{
    CustomListVo voCL = new CustomListVo();

    voCL.setListType(CustomListType.CUSTOM_PATIENT_LIST);
    voCL.setListName(form.getGlobalContext().Core.getCustomListName());
    voCL.setDate(new Date());
    voCL.setIsActive(true);
    voCL.setListOwner((MemberOfStaffLiteVo) domain.getMosUser());

    String[] errors = voCL.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }

    try 
    {
        domain.saveCustomList(voCL);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    } 
    listCustomLists();
}
项目:openMAXIMS    文件:Logic.java   
private void loadListCombo(CustomListVoCollection collCustomListVo) {
    form.cmbCustomLists().clear();
    if(collCustomListVo!=null)
        for(int i=0;i<collCustomListVo.size();i++)
        {
            CustomListVo voCustomList = collCustomListVo.get(i);
            form.cmbCustomLists().newRow(voCustomList, voCustomList.getListName());
        }
}
项目:openMAXIMS    文件:Logic.java   
private void setSearchCriteria(MDTCustomListSearchCriteriaVo mdtCustomListSearchCriteriaVo) 
{
    form.cmbSpecialty().setValue(mdtCustomListSearchCriteriaVo.getSpecialty());
    form.dteDate().setValue(mdtCustomListSearchCriteriaVo.getDate());

    if (form.cmbSpecialty().getValue() != null && form.dteDate().getValue() != null)
    {
        CustomListVo voCustomList = new CustomListVo();
        voCustomList.setDate(form.dteDate().getValue());
        voCustomList.setSpecialty(form.cmbSpecialty().getValue());
        loadListCombo(domain.listCustomListTypes(voCustomList));
    }

    form.cmbCustomLists().setValue(mdtCustomListSearchCriteriaVo.getListName());
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDteDateValueChanged() throws PresentationLogicException {
    if(form.dteDate().getValue()!=null && form.dteDate().getValue()!=null){
        CustomListVo voCustomList = new CustomListVo();
        voCustomList.setDate(form.dteDate().getValue());
        voCustomList.setSpecialty(form.cmbSpecialty().getValue());
        loadListCombo(domain.listCustomListTypes(voCustomList));
    }
    form.grdPatients().getRows().clear();
    form.getContextMenus().Core.hideAllMDTCustomListsMenuItems();       
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCmbSpecialtyValueChanged() throws PresentationLogicException {
    if(form.dteDate().getValue()!=null && form.dteDate().getValue()!=null){
        CustomListVo voCustomList = new CustomListVo();
        voCustomList.setDate(form.dteDate().getValue());
        voCustomList.setSpecialty(form.cmbSpecialty().getValue());
        loadListCombo(domain.listCustomListTypes(voCustomList));
    }
    form.grdPatients().getRows().clear();
    form.getContextMenus().Core.hideAllMDTCustomListsMenuItems();       
}
项目:openMAXIMS    文件:Logic.java   
private void populateListControl(CustomListVoCollection collCustomListVo) {
    if (collCustomListVo != null)
    {
        if (collCustomListVo.size() == 0)
        {
            engine.showMessage("No matching Custom List entries found.");
            return;
        }

        for (int i = 0; i < collCustomListVo.size(); i++)
        {
            CustomListVo voCustomListType = collCustomListVo.get(i);
            grdPatientsRow row = form.lyrCustomListSearch().tabCustomListSearch().grdPatients().getRows().newRow();

            if(voCustomListType.getListTypeIsNotNull())
                row.setColListType(voCustomListType.getListType().toString());
            if(voCustomListType.getListNameIsNotNull())
                row.setColListName(voCustomListType.getListName());
            if(voCustomListType.getSpecialtyIsNotNull())
                row.setColSpecialty(voCustomListType.getSpecialty().toString());
            if(voCustomListType.getDateIsNotNull())
                row.setColDate(voCustomListType.getDate().toString());
            if(voCustomListType.getListOwnerIsNotNull())
                row.setColListOwner(voCustomListType.getListOwner().toString());
            if(voCustomListType.getIsActiveIsNotNull())
                row.setColStatus(voCustomListType.getIsActive());

            row.setValue(voCustomListType);
        }
    }
    else
        engine.showMessage("No results match search criteria");

}
项目:openMAXIMS    文件:Logic.java   
private CustomListVo populateFilter() {
    CustomListVo voFilter = new CustomListVo();

    voFilter.setListType(form.lyrCustomListSearch().tabCustomListSearch().cmbListType().getValue());
    voFilter.setListName(form.lyrCustomListSearch().tabCustomListSearch().txtListName().getValue());
    voFilter.setSpecialty(form.lyrCustomListSearch().tabCustomListSearch().cmbSpecialty().getValue());
    voFilter.setDate(form.lyrCustomListSearch().tabCustomListSearch().dteDate().getValue());
    voFilter.setListOwner((MemberOfStaffLiteVo) form.lyrCustomListSearch().tabCustomListSearch().customControlMos().getValue());
    if(form.lyrCustomListSearch().tabCustomListSearch().chkActiveOnly().getValue())
        voFilter.setIsActive(true);

    return voFilter;
}
项目:openMAXIMS    文件:Logic.java   
private CustomListVo populateCustomListVo(CustomListVo voCustomList) {
    voCustomList.setListType(form.lyrCustomListSearch().tabCustomListDetails().cmbListTypeDetails().getValue());
    voCustomList.setListName(form.lyrCustomListSearch().tabCustomListDetails().txtListNameDetails().getValue());
    voCustomList.setSpecialty(form.lyrCustomListSearch().tabCustomListDetails().cmbSpecialtyDetails().getValue());
    voCustomList.setDate(form.lyrCustomListSearch().tabCustomListDetails().dteDateDetails().getValue());
    voCustomList.setListOwner((MemberOfStaffLiteVo) form.lyrCustomListSearch().tabCustomListDetails().customControlMosDetails().getValue());
    voCustomList.setIsActive(form.lyrCustomListSearch().tabCustomListDetails().chkActiveOnlydetails().getValue());

    return voCustomList;
}
项目:openMAXIMS    文件:Logic.java   
private void populateDetailsScreen() {
    CustomListVo voCustomList = form.getLocalContext().getSelectedCustomList();
    if(voCustomList==null)
        return;
    form.lyrCustomListSearch().tabCustomListDetails().cmbListTypeDetails().setValue(voCustomList.getListType());
    form.lyrCustomListSearch().tabCustomListDetails().txtListNameDetails().setValue(voCustomList.getListName());
    form.lyrCustomListSearch().tabCustomListDetails().cmbSpecialtyDetails().setValue(voCustomList.getSpecialty());
    form.lyrCustomListSearch().tabCustomListDetails().dteDateDetails().setValue(voCustomList.getDate());
    form.lyrCustomListSearch().tabCustomListDetails().customControlMosDetails().setValue(voCustomList.getListOwner());
    form.lyrCustomListSearch().tabCustomListDetails().chkActiveOnlydetails().setValue(voCustomList.getIsActive());

    MDTPatientCustomListVo voPatientCustomList = form.getLocalContext().getPatientCustomListVo();

    if(voPatientCustomList!=null && voPatientCustomList.getPatientsIsNotNull()){
        PatientShortCollection collPatientShort = voPatientCustomList.getPatients().sort(SortOrder.ASCENDING);

        form.lyrCustomListSearch().tabCustomListDetails().grdCustomList().getRows().clear();
        if(collPatientShort!=null)
            for (int i = 0; i < collPatientShort.size(); i++) 
            {
                grdCustomListRow row = form.lyrCustomListSearch().tabCustomListDetails().grdCustomList().getRows().newRow();

                PatientShort patientShort = collPatientShort.get(i);
                if(patientShort.getName().getForenameIsNotNull())
                    row.setColForename(patientShort.getName().getForename());
                row.setColSurname(patientShort.getName().getSurname());
                if(patientShort.getDobIsNotNull())
                    row.setColDOB(patientShort.getDob().toString(DateFormat.STANDARD));
                if (patientShort.getDisplayId() != null)
                    row.setColHospNum(patientShort.getDisplayId().getValue());

                row.setValue(patientShort);
            }
    }
}
项目:openMAXIMS    文件:CustomPatientListImpl.java   
/**
* save a service and associated functions/activities
*/
public ims.core.vo.CustomListVo saveCustomList(ims.core.vo.CustomListVo voCustomList) throws ims.domain.exceptions.StaleObjectException
{
    if (!voCustomList.isValidated())
    {
        throw new DomainRuntimeException("This voCustomList has not been validated");
    }

    DomainFactory factory = getDomainFactory();         
    CustomList domCL = CustomListVoAssembler.extractCustomList(factory, voCustomList);
    factory.save(domCL);
    return CustomListVoAssembler.create(domCL);
}
项目:openMAXIMS    文件:CustomPatientListImpl.java   
public CustomListVo getCustomList(CustomListRefVo customListRef)
{
    if (customListRef == null || customListRef.getID_CustomList() == null)
        throw new CodingRuntimeException("Cannot get CustomListVo record details for a null CustomListRefVo reference");

    DomainFactory factory = getDomainFactory();

    CustomList customListDO = (CustomList) factory.getDomainObject(CustomList.class, customListRef.getID_CustomList());

    return CustomListVoAssembler.create(customListDO);
}
项目:openMAXIMS    文件:Logic.java   
private void refreshSearchCriteria() 
{
    if (form.getGlobalContext().Core.getCustomListSearchCriteriaVoIsNotNull())
    {
        if ( ! form.cmbCustomLists().getValues().isEmpty())
        {
            for(int i = 0 ; i < form.cmbCustomLists().getValues().size() ; i++)
            {
                if (form.cmbCustomLists().getValues() != null
                    && form.getGlobalContext().Core.getCustomListSearchCriteriaVo().getCustomListRefIsNotNull()
                    && form.cmbCustomLists().getValues().get(i) != null
                    && ((CustomListVo)form.cmbCustomLists().getValues().get(i)).getID_CustomList().equals(form.getGlobalContext().Core.getCustomListSearchCriteriaVo().getCustomListRef().getID_CustomList()))
                {
                    form.cmbCustomLists().setValue(((CustomListVo)form.cmbCustomLists().getValues().get(i)));

                    //if(domain.getHcpLiteUser()!=null)//WDEV-9696 
                    //{
                        form.imbRemoveList().setEnabled(true);
                    //}

                    search();

                    break;
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void saveNewCustomList() 
{
    CustomListVo voCL = new CustomListVo();

    voCL.setListType(CustomListType.CUSTOM_PATIENT_LIST);
    voCL.setListName(form.getGlobalContext().Core.getCustomListName());
    voCL.setDate(new Date());
    voCL.setIsActive(true);
    voCL.setListOwner((MemberOfStaffLiteVo) domain.getMosUser());

    String[] errors = voCL.validate();
    if (errors != null)
    {
        engine.showErrors(errors);
        return;
    }

    try 
    {
        domain.saveCustomList(voCL);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return;
    } 
    listCustomLists();
}
项目:openMAXIMS    文件:Logic.java   
private void loadListCombo(CustomListVoCollection collCustomListVo) {
    form.cmbCustomLists().clear();
    if(collCustomListVo!=null)
        for(int i=0;i<collCustomListVo.size();i++)
        {
            CustomListVo voCustomList = collCustomListVo.get(i);
            form.cmbCustomLists().newRow(voCustomList, voCustomList.getListName());
        }
}