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

项目:AvoinApotti    文件:Logic.java   
private void selectPatient() 
{
    if(form.grdDetails().getSelectedRow() == null)
        return;

    if ( form.grdDetails().getSelectedRow().getValue() instanceof PatientCustomItemVo) 
    {
        form.getGlobalContext().Core.clearPatientShort();

        PatientShort ps = ((PatientCustomItemVo)form.grdDetails().getSelectedRow().getValue()).getPatient();
        form.getGlobalContext().Core.setPatientToBeDisplayed(ps);

        updateSearchCriteriaGC(ps.getID_Patient(), true);

        engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdDetailsGridHeaderClicked(int column) throws PresentationLogicException 
{
    if (column == 8)
    {
        if (form.getLocalContext().getSortOrder() == null)
        {
            form.getLocalContext().setSortOrder(SortOrder.ASCENDING);
        }

        PatientCustomItemVoCollection voColl = form.grdDetails().getValues();
        voColl.sort(PatientCustomItemVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));

        if (form.getLocalContext().getSortOrder().equals(SortOrder.ASCENDING))
            form.getLocalContext().setSortOrder(SortOrder.DESCENDING);
        else if (form.getLocalContext().getSortOrder().equals(SortOrder.DESCENDING))
            form.getLocalContext().setSortOrder(SortOrder.ASCENDING);

        form.grdDetails().getRows().clear();
        populateGrid(voColl);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void selectPatient() 
{
    if(form.grdDetails().getSelectedRow() == null)
        return;

    if ( form.grdDetails().getSelectedRow().getValue() instanceof PatientCustomItemVo) 
    {
        form.getGlobalContext().Core.clearPatientShort();

        PatientShort ps = ((PatientCustomItemVo)form.grdDetails().getSelectedRow().getValue()).getPatient();
        form.getGlobalContext().Core.setPatientToBeDisplayed(ps);

        updateSearchCriteriaGC(ps.getID_Patient(), true);

        engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void selectPatient() 
{
    if(form.grdDetails().getSelectedRow() == null)
        return;

    if ( form.grdDetails().getSelectedRow().getValue() instanceof PatientCustomItemVo) 
    {
        form.getGlobalContext().Core.clearPatientShort();

        PatientShort ps = ((PatientCustomItemVo)form.grdDetails().getSelectedRow().getValue()).getPatient();
        form.getGlobalContext().Core.setPatientToBeDisplayed(ps);

        updateSearchCriteriaGC(ps.getID_Patient(), true);

        engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdDetailsGridHeaderClicked(int column) throws PresentationLogicException 
{
    if (column == 8)
    {
        if (form.getLocalContext().getSortOrder() == null)
        {
            form.getLocalContext().setSortOrder(SortOrder.ASCENDING);
        }

        PatientCustomItemVoCollection voColl = form.grdDetails().getValues();
        voColl.sort(PatientCustomItemVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));

        if (form.getLocalContext().getSortOrder().equals(SortOrder.ASCENDING))
            form.getLocalContext().setSortOrder(SortOrder.DESCENDING);
        else if (form.getLocalContext().getSortOrder().equals(SortOrder.DESCENDING))
            form.getLocalContext().setSortOrder(SortOrder.ASCENDING);

        form.grdDetails().getRows().clear();
        populateGrid(voColl);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void selectPatient() 
{
    if(form.grdDetails().getSelectedRow() == null)
        return;

    if ( form.grdDetails().getSelectedRow().getValue() instanceof PatientCustomItemVo) 
    {
        form.getGlobalContext().Core.clearPatientShort();

        PatientShort ps = ((PatientCustomItemVo)form.grdDetails().getSelectedRow().getValue()).getPatient();
        form.getGlobalContext().Core.setPatientToBeDisplayed(ps);

        updateSearchCriteriaGC(ps.getID_Patient(), true);

        engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue());
    }
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onGrdDetailsGridHeaderClicked(int column) throws PresentationLogicException 
{
    if (column == 8)
    {
        if (form.getLocalContext().getSortOrder() == null)
        {
            form.getLocalContext().setSortOrder(SortOrder.ASCENDING);
        }

        PatientCustomItemVoCollection voColl = form.grdDetails().getValues();
        voColl.sort(PatientCustomItemVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));

        if (form.getLocalContext().getSortOrder().equals(SortOrder.ASCENDING))
            form.getLocalContext().setSortOrder(SortOrder.DESCENDING);
        else if (form.getLocalContext().getSortOrder().equals(SortOrder.DESCENDING))
            form.getLocalContext().setSortOrder(SortOrder.ASCENDING);

        form.grdDetails().getRows().clear();
        populateGrid(voColl);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addGridRow(PatientCustomItemVo voItem)
{
    grdDetailsRow row = form.grdDetails().getRows().newRow();

    PatientShort ps = voItem.getPatient();

    if ( (ps.getIsActiveIsNotNull() && ps.getIsActive()) 
            || ps.getAssociatedPatientIsNotNull())
    {
        row.setColSurname(ps.getNameIsNotNull() ? ps.getName().getSurname() : "");      
        row.setColForename(ps.getNameIsNotNull() ? ps.getName().getForename() : "");        

        // WDEV-16083 - display PatientIdType for the DISPLAY_PATID_TYPE flag rather than hardcoding to NHS Number
        PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());
        row.setColPatId(ps.getPatId(dispIdType) != null ? (ps.getPatId(dispIdType).getValueIsNotNull() ? ps.getPatId(dispIdType).getValue().toString() : "") : "");         
        row.setColSex(ps.getSexIsNotNull() ? ps.getSex().toString() : "");      
        row.setColAge(ps.getDobIsNotNull() ? ps.calculateAge().toString() : "");        
        row.setColDOB(ps.getDobIsNotNull() ? ps.getDob().toString() : "");      
        row.setColAddedBy(voItem.getAddedByIsNotNull() ? voItem.getAddedBy().getName().toString() : "");        
        row.setColDateTime(voItem.getAddedDateTimeIsNotNull() ? voItem.getAddedDateTime().toString() : "");

        tickCol(row, voItem);

        if(voItem.getPatient().getAssociatedPatientIsNotNull())
            row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

        if (voItem.getPatient().getIsDead().booleanValue())
            row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());          

        row.setValue(voItem);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void tickCol(grdDetailsRow row, PatientCustomItemVo voItem) 
{
    if (form.getGlobalContext().Core.getCustomListSearchCriteriaVoIsNotNull())
    {
        CustomListSearchCriteriaVo voCurrent = form.getGlobalContext().Core.getCustomListSearchCriteriaVo();
        for (int i = 0; voCurrent != null && i < voCurrent.getViewedItems().length; i++)
        {
            if (voCurrent.getViewedItems()[i] != null && voCurrent.getViewedItems()[i].equals(voItem.getPatient().getID_Patient()))
            {
                row.setColViewed(form.getImages().Core.Tick);
                row.setTooltipForColViewed("Patient viewed");//WDEV-14694
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addGridRow(PatientCustomItemVo voItem)
{
    grdDetailsRow row = form.grdDetails().getRows().newRow();

    PatientShort ps = voItem.getPatient();

    if ( (ps.getIsActiveIsNotNull() && ps.getIsActive()) 
            || ps.getAssociatedPatientIsNotNull())
    {
        row.setColSurname(ps.getNameIsNotNull() ? ps.getName().getSurname() : "");      
        row.setColForename(ps.getNameIsNotNull() ? ps.getName().getForename() : "");        

        // WDEV-16083 - display PatientIdType for the DISPLAY_PATID_TYPE flag rather than hardcoding to NHS Number
        PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());
        row.setColPatId(ps.getPatId(dispIdType) != null ? (ps.getPatId(dispIdType).getValueIsNotNull() ? ps.getPatId(dispIdType).getValue().toString() : "") : "");         
        row.setColSex(ps.getSexIsNotNull() ? ps.getSex().toString() : "");      
        row.setColAge(ps.getDobIsNotNull() ? ps.calculateAgeText() : "");       
        row.setColDOB(ps.getDobIsNotNull() ? ps.getDob().toString() : "");      
        row.setColAddedBy(voItem.getAddedByIsNotNull() ? voItem.getAddedBy().getName().toString() : "");        
        row.setColDateTime(voItem.getAddedDateTimeIsNotNull() ? voItem.getAddedDateTime().toString() : "");

        tickCol(row, voItem);

        if(voItem.getPatient().getAssociatedPatientIsNotNull())
            row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

        if (voItem.getPatient().getIsDead().booleanValue())
            row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());          

        row.setValue(voItem);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void tickCol(grdDetailsRow row, PatientCustomItemVo voItem) 
{
    if (form.getGlobalContext().Core.getCustomListSearchCriteriaVoIsNotNull())
    {
        CustomListSearchCriteriaVo voCurrent = form.getGlobalContext().Core.getCustomListSearchCriteriaVo();
        for (int i = 0; voCurrent != null && i < voCurrent.getViewedItems().length; i++)
        {
            if (voCurrent.getViewedItems()[i] != null && voCurrent.getViewedItems()[i].equals(voItem.getPatient().getID_Patient()))
            {
                row.setColViewed(form.getImages().Core.Tick);
                row.setTooltipForColViewed("Patient viewed");//WDEV-14694
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof PatientCustomItemVo )
    {
        PatientCustomItemVo ps1 = (PatientCustomItemVo)ob1;
        rez1 = (ps1.getPatient() != null && ps1.getPatient().getName() != null) ? ps1.getPatient().getName().getSurname():null;
    }
    if(ob2 instanceof PatientCustomItemVo)
    {
        PatientCustomItemVo ps2 = (PatientCustomItemVo)ob2;
        rez2 = (ps2.getPatient() != null && ps2.getPatient().getName() != null) ? ps2.getPatient().getName().getSurname():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof PatientCustomItemVo )
    {
        PatientCustomItemVo ps1 = (PatientCustomItemVo)ob1;
        rez1 = (ps1.getPatient() != null && ps1.getPatient().getName() != null) ? ps1.getPatient().getName().getForename():null;
    }
    if(ob2 instanceof PatientCustomItemVo)
    {
        PatientCustomItemVo ps2 = (PatientCustomItemVo)ob2;
        rez2 = (ps2.getPatient() != null && ps2.getPatient().getName() != null) ? ps2.getPatient().getName().getForename():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());

    if(ob1 instanceof PatientCustomItemVo )
    {
        PatientCustomItemVo ps1 = (PatientCustomItemVo)ob1;
        rez1 = (ps1.getPatient() != null && ps1.getPatient().getPatId(dispIdType) != null && ps1.getPatient().getPatId(dispIdType).getValue() != null) ? ps1.getPatient().getPatId(dispIdType).getValue().toString():null;
    }
    if(ob2 instanceof PatientCustomItemVo)
    {
        PatientCustomItemVo ps2 = (PatientCustomItemVo)ob2;
        rez2 = (ps2.getPatient() != null && ps2.getPatient().getPatId(dispIdType) != null && ps2.getPatient().getPatId(dispIdType).getValue() != null) ? ps2.getPatient().getPatId(dispIdType).getValue().toString():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof PatientCustomItemVo )
    {
        PatientCustomItemVo ps1 = (PatientCustomItemVo)ob1;
        rez1 = (ps1.getPatient() != null && ps1.getPatient().getSex() != null) ? ps1.getPatient().getSex().getText():null;
    }
    if(ob2 instanceof PatientCustomItemVo)
    {
        PatientCustomItemVo ps2 = (PatientCustomItemVo)ob2;
        rez2 = (ps2.getPatient() != null && ps2.getPatient().getSex() != null) ? ps2.getPatient().getSex().getText():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PartialDate rez1 = null;
    PartialDate rez2 = null;

    if(ob1 instanceof PatientCustomItemVo )
    {
        PatientCustomItemVo ps1 = (PatientCustomItemVo)ob1;
        rez1 = (ps1.getPatient() != null && ps1.getPatient().getDob() != null) ? ps1.getPatient().getDob():null;
    }
    if(ob2 instanceof PatientCustomItemVo)
    {
        PatientCustomItemVo ps2 = (PatientCustomItemVo)ob2;
        rez2 = (ps2.getPatient() != null && ps2.getPatient().getDob() != null) ? ps2.getPatient().getDob():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareTo(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof PatientCustomItemVo)
    {
        PatientCustomItemVo ps1 = (PatientCustomItemVo)ob1;
        rez1 = (ps1.getAddedBy() != null && ps1.getAddedBy().getName() != null) ? ps1.getAddedBy().getName().toString() : null;
    }
    if(ob2 instanceof PatientCustomItemVo)
    {
        PatientCustomItemVo ps2 = (PatientCustomItemVo)ob2;
        rez2 = (ps2.getAddedBy() != null && ps2.getAddedBy().getName() != null)? ps2.getAddedBy().getName().toString() : null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private void addGridRow(PatientCustomItemVo voItem)
{
    grdDetailsRow row = form.grdDetails().getRows().newRow();

    PatientShort ps = voItem.getPatient();

    if ( (ps.getIsActiveIsNotNull() && ps.getIsActive()) 
            || ps.getAssociatedPatientIsNotNull())
    {
        row.setColSurname(ps.getNameIsNotNull() ? ps.getName().getSurname() : "");      
        row.setColForename(ps.getNameIsNotNull() ? ps.getName().getForename() : "");        

        // WDEV-16083 - display PatientIdType for the DISPLAY_PATID_TYPE flag rather than hardcoding to NHS Number
        PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());
        row.setColPatId(ps.getPatId(dispIdType) != null ? (ps.getPatId(dispIdType).getValueIsNotNull() ? ps.getPatId(dispIdType).getValue().toString() : "") : "");         
        row.setColSex(ps.getSexIsNotNull() ? ps.getSex().toString() : "");      
        row.setColAge(ps.getDobIsNotNull() ? ps.calculateAge().toString() : "");        
        row.setColDOB(ps.getDobIsNotNull() ? ps.getDob().toString() : "");      
        row.setColAddedBy(voItem.getAddedByIsNotNull() ? voItem.getAddedBy().getName().toString() : "");        
        row.setColDateTime(voItem.getAddedDateTimeIsNotNull() ? voItem.getAddedDateTime().toString() : "");

        tickCol(row, voItem);

        if(voItem.getPatient().getAssociatedPatientIsNotNull())
            row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

        if (voItem.getPatient().getIsDead().booleanValue())
            row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());          

        row.setValue(voItem);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void tickCol(grdDetailsRow row, PatientCustomItemVo voItem) 
{
    if (form.getGlobalContext().Core.getCustomListSearchCriteriaVoIsNotNull())
    {
        CustomListSearchCriteriaVo voCurrent = form.getGlobalContext().Core.getCustomListSearchCriteriaVo();
        for (int i = 0; voCurrent != null && i < voCurrent.getViewedItems().length; i++)
        {
            if (voCurrent.getViewedItems()[i] != null && voCurrent.getViewedItems()[i].equals(voItem.getPatient().getID_Patient()))
            {
                row.setColViewed(form.getImages().Core.Tick);
                row.setTooltipForColViewed("Patient viewed");//WDEV-14694
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void addGridRow(PatientCustomItemVo voItem)
{
    grdDetailsRow row = form.grdDetails().getRows().newRow();

    PatientShort ps = voItem.getPatient();

    if ( (ps.getIsActiveIsNotNull() && ps.getIsActive()) 
            || ps.getAssociatedPatientIsNotNull())
    {
        row.setColSurname(ps.getNameIsNotNull() ? ps.getName().getSurname() : "");      
        row.setColForename(ps.getNameIsNotNull() ? ps.getName().getForename() : "");        

        // WDEV-16083 - display PatientIdType for the DISPLAY_PATID_TYPE flag rather than hardcoding to NHS Number
        PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());
        row.setColPatId(ps.getPatId(dispIdType) != null ? (ps.getPatId(dispIdType).getValueIsNotNull() ? ps.getPatId(dispIdType).getValue().toString() : "") : "");         
        row.setColSex(ps.getSexIsNotNull() ? ps.getSex().toString() : "");      
        row.setColAge(ps.getDobIsNotNull() ? ps.calculateAge().toString() : "");        
        row.setColDOB(ps.getDobIsNotNull() ? ps.getDob().toString() : "");      
        row.setColAddedBy(voItem.getAddedByIsNotNull() ? voItem.getAddedBy().getName().toString() : "");        
        row.setColDateTime(voItem.getAddedDateTimeIsNotNull() ? voItem.getAddedDateTime().toString() : "");

        tickCol(row, voItem);

        if(voItem.getPatient().getAssociatedPatientIsNotNull())
            row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

        if (voItem.getPatient().getIsDead().booleanValue())
            row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());          

        row.setValue(voItem);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void tickCol(grdDetailsRow row, PatientCustomItemVo voItem) 
{
    if (form.getGlobalContext().Core.getCustomListSearchCriteriaVoIsNotNull())
    {
        CustomListSearchCriteriaVo voCurrent = form.getGlobalContext().Core.getCustomListSearchCriteriaVo();
        for (int i = 0; voCurrent != null && i < voCurrent.getViewedItems().length; i++)
        {
            if (voCurrent.getViewedItems()[i] != null && voCurrent.getViewedItems()[i].equals(voItem.getPatient().getID_Patient()))
            {
                row.setColViewed(form.getImages().Core.Tick);
                row.setTooltipForColViewed("Patient viewed");//WDEV-14694
            }
        }
    }
}