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

项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
/**
* listPendingElectiveAdmission
*/
public ims.core.vo.PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status  and pea.tCIType = :tciType ", new String[]{"today","yesterday", "idWard","status","tciType"}, new Object[]{new Date().getDate(),new Date().addDay(-1).getDate(), voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.BOOKED)});
        return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPlannedElectiveAdmission(Date dateFrom, Date dateTo, LocationRefVo ward)
{
    if(dateFrom == null)
        throw new CodingRuntimeException("dateFrom is mandatory in method listPlannedElectiveAdmission");   
    if(dateTo == null)
        throw new CodingRuntimeException("dateTo is mandatory in method listPlannedElectiveAdmission");
    if(ward == null)
        throw new CodingRuntimeException("ward is null in method listPlannedElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where pea.tCIDate >= :dateFrom and pea.tCIDate <= :dateTo and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status and pea.tCIType = :tciType ", new String[]{"dateFrom","dateTo","idWard","status", "tciType"}, new Object[]{dateFrom.getDate(), dateTo.getDate(), ward.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.PLANNED)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:AvoinApotti    文件:WardViewImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status", new String[]{"today","yesterday", "idWard","status"}, new Object[]{new Date().getDate(), new Date().addDay(-1).getDate(),voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openMAXIMS    文件:BedAdmissionComponentImpl.java   
/**
 * listPendingElectiveAdmission
 */
public ims.core.vo.PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status  and pea.tCIType = :tciType ", new String[]{"today","yesterday", "idWard","status","tciType"}, new Object[]{new Date().getDate(),new Date().addDay(-1).getDate(), voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.BOOKED)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openMAXIMS    文件:BedAdmissionComponentImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPlannedElectiveAdmission(Date dateFrom, Date dateTo, LocationRefVo ward)
{
    if(dateFrom == null)
        throw new CodingRuntimeException("dateFrom is mandatory in method listPlannedElectiveAdmission");   
    if(dateTo == null)
        throw new CodingRuntimeException("dateTo is mandatory in method listPlannedElectiveAdmission");
    if(ward == null)
        throw new CodingRuntimeException("ward is null in method listPlannedElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where pea.tCIDate >= :dateFrom and pea.tCIDate <= :dateTo and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status and pea.tCIType = :tciType ", new String[]{"dateFrom","dateTo","idWard","status", "tciType"}, new Object[]{dateFrom.getDate(), dateTo.getDate(), ward.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.PLANNED)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openMAXIMS    文件:WardViewImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status", new String[]{"today","yesterday", "idWard","status"}, new Object[]{new Date().getDate(), new Date().addDay(-1).getDate(),voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openMAXIMS    文件:BedAdmissionComponentImpl.java   
/**
* listPendingElectiveAdmission
*/
public ims.core.vo.PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status  and pea.tCIType = :tciType ", new String[]{"today","yesterday", "idWard","status","tciType"}, new Object[]{new Date().getDate(),new Date().addDay(-1).getDate(), voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.BOOKED)});
        return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openMAXIMS    文件:BedAdmissionComponentImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPlannedElectiveAdmission(Date dateFrom, Date dateTo, LocationRefVo ward)
{
    if(dateFrom == null)
        throw new CodingRuntimeException("dateFrom is mandatory in method listPlannedElectiveAdmission");   
    if(dateTo == null)
        throw new CodingRuntimeException("dateTo is mandatory in method listPlannedElectiveAdmission");
    if(ward == null)
        throw new CodingRuntimeException("ward is null in method listPlannedElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where pea.tCIDate >= :dateFrom and pea.tCIDate <= :dateTo and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status and pea.tCIType = :tciType ", new String[]{"dateFrom","dateTo","idWard","status", "tciType"}, new Object[]{dateFrom.getDate(), dateTo.getDate(), ward.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.PLANNED)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openMAXIMS    文件:WardViewImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status", new String[]{"today","yesterday", "idWard","status"}, new Object[]{new Date().getDate(), new Date().addDay(-1).getDate(),voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openmaxims-linux    文件:BedAdmissionComponentImpl.java   
/**
* listPendingElectiveAdmission
*/
public ims.core.vo.PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status  and pea.tCIType = :tciType ", new String[]{"today","yesterday", "idWard","status","tciType"}, new Object[]{new Date().getDate(),new Date().addDay(-1).getDate(), voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.BOOKED)});
        return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openmaxims-linux    文件:BedAdmissionComponentImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPlannedElectiveAdmission(Date dateFrom, Date dateTo, LocationRefVo ward)
{
    if(dateFrom == null)
        throw new CodingRuntimeException("dateFrom is mandatory in method listPlannedElectiveAdmission");   
    if(dateTo == null)
        throw new CodingRuntimeException("dateTo is mandatory in method listPlannedElectiveAdmission");
    if(ward == null)
        throw new CodingRuntimeException("ward is null in method listPlannedElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where pea.tCIDate >= :dateFrom and pea.tCIDate <= :dateTo and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status and pea.tCIType = :tciType ", new String[]{"dateFrom","dateTo","idWard","status", "tciType"}, new Object[]{dateFrom.getDate(), dateTo.getDate(), ward.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI), getDomLookup(TCIType.PLANNED)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:openmaxims-linux    文件:WardViewImpl.java   
public PendingElectiveAdmissionAdmitVoCollection listPendingElectiveAdmission(LocationRefVo voLocation)
{
    if(voLocation == null)
        throw new CodingRuntimeException("voLocation is null in method listPendingElectiveAdmission");

    DomainFactory factory = getDomainFactory();
    List pendingElectives = factory.find("from PendingElectiveAdmission pea where (pea.tCIDate = :today or pea.tCIDate = :yesterday) and pea.allocatedWard.id = :idWard and pea.electiveAdmissionStatus = :status", new String[]{"today","yesterday", "idWard","status"}, new Object[]{new Date().getDate(), new Date().addDay(-1).getDate(),voLocation.getID_Location(), getDomLookup(ElectiveAdmissionStatus.TCI)});
    return PendingElectiveAdmissionAdmitVoAssembler.createPendingElectiveAdmissionAdmitVoCollectionFromPendingElectiveAdmission(pendingElectives);
}
项目:AvoinApotti    文件:Logic.java   
private void searchPlanned()
{
    if(validatePlannedSearchCriteria())
    {
        form.lyrAdmission().tabPlanned().grdTCI().getRows().clear();

        PendingElectiveAdmissionAdmitVoCollection voCollPlanned = null;
        BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
        if(voBed != null)
            voCollPlanned = domain.listPlannedElectiveAdmission(form.lyrAdmission().tabPlanned().dteFrom().getValue(), form.lyrAdmission().tabPlanned().dteTo().getValue(), voBed.getWard());
        else
            throw new CodingRuntimeException("Ward has not been set for bed in configuration");

        if(voCollPlanned == null || voCollPlanned.size() == 0)
        {
            engine.showMessage("No records found.");    //wdev-11257
            return;
        }

        for (PendingElectiveAdmissionAdmitVo voPlannedAdmission : voCollPlanned)
        {
            grdTCIRow row = form.lyrAdmission().tabPlanned().grdTCI().getRows().newRow();

            PatientShort voPatient = (voPlannedAdmission.getPasEventIsNotNull() && voPlannedAdmission.getPasEvent().getPatientIsNotNull()) ? voPlannedAdmission.getPasEvent().getPatient() : null;
            if(voPatient != null)
            {
                if(voPatient.getNameIsNotNull())
                {
                    row.setColForename(voPatient.getName().getForename());
                    row.setColSurname(voPatient.getName().getSurname());
                }

                PatientId patId = voPatient.getDisplayId();
                row.setColDisplayId(patId != null ? patId.getValue() : null);
                row.setColSex(voPatient.getSexIsNotNull() ? voPatient.getSex().toString() : null);

                Integer age = voPatient.calculateAge();
                if(age != null)
                    row.setColAge(String.valueOf(age));

                row.setColDob(voPatient.getDobIsNotNull() ? voPatient.getDob().toString() : null);

                if(voPatient.getAssociatedPatientIsNotNull())       //wdev-13105
                    row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

                if(voPatient.getDodIsNotNull())                 //wdev-13105
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());
            }
            row.setValue(voPlannedAdmission);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateBookedTabFromData() 
{
    form.getLocalContext().setRecordSelected(false);
    form.lyrAdmission().tabBooked().grdElective().getRows().clear();

    PendingElectiveAdmissionAdmitVoCollection voCollPendingElectiveAdmission = null;
    BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
    if(voBed != null)
    {

        voCollPendingElectiveAdmission = domain.listPendingElectiveAdmission( voBed.getWard() );
        if(voCollPendingElectiveAdmission == null || voCollPendingElectiveAdmission.size() == 0)
            return;
    }

    if(voCollPendingElectiveAdmission == null)
        return;

    for(PendingElectiveAdmissionAdmitVo voPendingElectiveAdmission : voCollPendingElectiveAdmission)
    {
        grdElectiveRow row = form.lyrAdmission().tabBooked().grdElective().getRows().newRow();

        PatientShort voPatient = (voPendingElectiveAdmission.getPasEventIsNotNull() && voPendingElectiveAdmission.getPasEvent().getPatientIsNotNull()) ? voPendingElectiveAdmission.getPasEvent().getPatient() : null;
        if(voPatient != null)
        {
            if(voPatient.getNameIsNotNull())
            {
                row.setColForename(voPatient.getName().getForename());
                row.setColSurname(voPatient.getName().getSurname());
            }

            PatientId patId = voPatient.getDisplayId();
            row.setColDisplayId(patId != null ? patId.getValue() : null);
            row.setColSex(voPatient.getSexIsNotNull() ? voPatient.getSex().toString() : null);

            Integer age = voPatient.calculateAge();
            if(age != null)
                row.setColAge(String.valueOf(age));

            row.setColDOB(voPatient.getDobIsNotNull() ? voPatient.getDob().toString() : null);

            if(voPatient.getAssociatedPatientIsNotNull())   //wdev-13105
                row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

            if(voPatient.getDodIsNotNull())     //wdev-13105
                row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());      
        }
        row.setValue(voPendingElectiveAdmission);
    }

    form.fireCustomControlValueChanged();
}
项目:openMAXIMS    文件:Logic.java   
private void searchPlanned()
{
    if(validatePlannedSearchCriteria())
    {
        form.lyrAdmission().tabPlanned().grdTCI().getRows().clear();

        PendingElectiveAdmissionAdmitVoCollection voCollPlanned = null;
        BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
        if(voBed != null)
            voCollPlanned = domain.listPlannedElectiveAdmission(form.lyrAdmission().tabPlanned().dteFrom().getValue(), form.lyrAdmission().tabPlanned().dteTo().getValue(), voBed.getWard());
        else
            throw new CodingRuntimeException("Ward has not been set up with a bed configuration");

        if(voCollPlanned == null || voCollPlanned.size() == 0)
        {
            engine.showMessage("No records found.");    //wdev-11257
            return;
        }

        for (PendingElectiveAdmissionAdmitVo voPlannedAdmission : voCollPlanned)
        {
            grdTCIRow row = form.lyrAdmission().tabPlanned().grdTCI().getRows().newRow();

            PatientLite_IdentifiersVo voPatient = (voPlannedAdmission.getPasEventIsNotNull() && voPlannedAdmission.getPasEvent().getPatientIsNotNull()) ? voPlannedAdmission.getPasEvent().getPatient() : null;
            if(voPatient != null)
            {
                if(voPatient.getNameIsNotNull())
                {
                    row.setColForename(voPatient.getName().getForename());
                    row.setColSurname(voPatient.getName().getSurname());
                }

                PatientId patId = voPatient.getDisplayId();
                row.setColDisplayId(patId != null ? patId.getValue() : null);
                row.setColSex(voPatient.getSexIsNotNull() ? voPatient.getSex().toString() : null);

                Integer age = voPatient.calculateAge();
                if (age != null)
                    row.setColAge(voPatient.calculateAgeText());

                row.setColDob(voPatient.getDobIsNotNull() ? voPatient.getDob().toString() : null);

                if (voPatient.getAssociatedPatientIsNotNull())      //wdev-13105
                    row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

                if (voPatient.getDodIsNotNull())    //wdev-13105
                {   
                    row.setBackColor(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS")  ? Color.Yellow : ConfigFlag.UI.RIP_COLOUR.getValue());
                    row.setTooltip(getRIPInfo(voPatient));
                }   
            }
            row.setValue(voPlannedAdmission);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateBookedTabFromData() 
{
    form.getLocalContext().setRecordSelected(false);
    form.lyrAdmission().tabBooked().grdElective().getRows().clear();

    PendingElectiveAdmissionAdmitVoCollection voCollPendingElectiveAdmission = null;
    BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
    if(voBed != null)
    {

        voCollPendingElectiveAdmission = domain.listPendingElectiveAdmission( voBed.getWard() );
        if(voCollPendingElectiveAdmission == null || voCollPendingElectiveAdmission.size() == 0)
            return;
    }

    if(voCollPendingElectiveAdmission == null)
        return;

    for(PendingElectiveAdmissionAdmitVo voPendingElectiveAdmission : voCollPendingElectiveAdmission)
    {
        grdElectiveRow row = form.lyrAdmission().tabBooked().grdElective().getRows().newRow();

        PatientLite_IdentifiersVo patient = (voPendingElectiveAdmission.getPasEventIsNotNull() && voPendingElectiveAdmission.getPasEvent().getPatientIsNotNull()) ? voPendingElectiveAdmission.getPasEvent().getPatient() : null;
        if(patient != null)
        {
            if(patient.getNameIsNotNull())
            {
                row.setColForename(patient.getName().getForename());
                row.setColSurname(patient.getName().getSurname());
            }

            PatientId patId = patient.getDisplayId();
            row.setColDisplayId(patId != null ? patId.getValue() : null);
            row.setColSex(patient.getSexIsNotNull() ? patient.getSex().toString() : null);

            Integer age = patient.calculateAge();
            if(age != null)
                row.setColAge(patient.calculateAgeText());

            row.setColDOB(patient.getDobIsNotNull() ? patient.getDob().toString() : null);

            if (patient.getAssociatedPatientIsNotNull())    //wdev-13105
                row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

            if (patient.getDodIsNotNull())      //wdev-13105
            {   
                row.setBackColor(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS")  ? Color.Yellow : ConfigFlag.UI.RIP_COLOUR.getValue());
                row.setTooltip(getRIPInfo(patient));
            }   

        }
        row.setValue(voPendingElectiveAdmission);
    }

    form.fireCustomControlValueChanged();
}
项目:openMAXIMS    文件:Logic.java   
private void searchPlanned()
{
    if(validatePlannedSearchCriteria())
    {
        form.lyrAdmission().tabPlanned().grdTCI().getRows().clear();

        PendingElectiveAdmissionAdmitVoCollection voCollPlanned = null;
        BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
        if(voBed != null)
            voCollPlanned = domain.listPlannedElectiveAdmission(form.lyrAdmission().tabPlanned().dteFrom().getValue(), form.lyrAdmission().tabPlanned().dteTo().getValue(), voBed.getWard());
        else
            throw new CodingRuntimeException("Ward has not been set for bed in configuration");

        if(voCollPlanned == null || voCollPlanned.size() == 0)
        {
            engine.showMessage("No records found.");    //wdev-11257
            return;
        }

        for (PendingElectiveAdmissionAdmitVo voPlannedAdmission : voCollPlanned)
        {
            grdTCIRow row = form.lyrAdmission().tabPlanned().grdTCI().getRows().newRow();

            PatientShort voPatient = (voPlannedAdmission.getPasEventIsNotNull() && voPlannedAdmission.getPasEvent().getPatientIsNotNull()) ? voPlannedAdmission.getPasEvent().getPatient() : null;
            if(voPatient != null)
            {
                if(voPatient.getNameIsNotNull())
                {
                    row.setColForename(voPatient.getName().getForename());
                    row.setColSurname(voPatient.getName().getSurname());
                }

                PatientId patId = voPatient.getDisplayId();
                row.setColDisplayId(patId != null ? patId.getValue() : null);
                row.setColSex(voPatient.getSexIsNotNull() ? voPatient.getSex().toString() : null);

                Integer age = voPatient.calculateAge();
                if(age != null)
                    row.setColAge(String.valueOf(age));

                row.setColDob(voPatient.getDobIsNotNull() ? voPatient.getDob().toString() : null);

                if(voPatient.getAssociatedPatientIsNotNull())       //wdev-13105
                    row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

                if(voPatient.getDodIsNotNull())                 //wdev-13105
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());
            }
            row.setValue(voPlannedAdmission);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateBookedTabFromData() 
{
    form.getLocalContext().setRecordSelected(false);
    form.lyrAdmission().tabBooked().grdElective().getRows().clear();

    PendingElectiveAdmissionAdmitVoCollection voCollPendingElectiveAdmission = null;
    BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
    if(voBed != null)
    {

        voCollPendingElectiveAdmission = domain.listPendingElectiveAdmission( voBed.getWard() );
        if(voCollPendingElectiveAdmission == null || voCollPendingElectiveAdmission.size() == 0)
            return;
    }

    if(voCollPendingElectiveAdmission == null)
        return;

    for(PendingElectiveAdmissionAdmitVo voPendingElectiveAdmission : voCollPendingElectiveAdmission)
    {
        grdElectiveRow row = form.lyrAdmission().tabBooked().grdElective().getRows().newRow();

        PatientShort voPatient = (voPendingElectiveAdmission.getPasEventIsNotNull() && voPendingElectiveAdmission.getPasEvent().getPatientIsNotNull()) ? voPendingElectiveAdmission.getPasEvent().getPatient() : null;
        if(voPatient != null)
        {
            if(voPatient.getNameIsNotNull())
            {
                row.setColForename(voPatient.getName().getForename());
                row.setColSurname(voPatient.getName().getSurname());
            }

            PatientId patId = voPatient.getDisplayId();
            row.setColDisplayId(patId != null ? patId.getValue() : null);
            row.setColSex(voPatient.getSexIsNotNull() ? voPatient.getSex().toString() : null);

            Integer age = voPatient.calculateAge();
            if(age != null)
                row.setColAge(String.valueOf(age));

            row.setColDOB(voPatient.getDobIsNotNull() ? voPatient.getDob().toString() : null);

            if(voPatient.getAssociatedPatientIsNotNull())   //wdev-13105
                row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

            if(voPatient.getDodIsNotNull())     //wdev-13105
                row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());      
        }
        row.setValue(voPendingElectiveAdmission);
    }

    form.fireCustomControlValueChanged();
}
项目:openmaxims-linux    文件:Logic.java   
private void searchPlanned()
{
    if(validatePlannedSearchCriteria())
    {
        form.lyrAdmission().tabPlanned().grdTCI().getRows().clear();

        PendingElectiveAdmissionAdmitVoCollection voCollPlanned = null;
        BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
        if(voBed != null)
            voCollPlanned = domain.listPlannedElectiveAdmission(form.lyrAdmission().tabPlanned().dteFrom().getValue(), form.lyrAdmission().tabPlanned().dteTo().getValue(), voBed.getWard());
        else
            throw new CodingRuntimeException("Ward has not been set for bed in configuration");

        if(voCollPlanned == null || voCollPlanned.size() == 0)
        {
            engine.showMessage("No records found.");    //wdev-11257
            return;
        }

        for (PendingElectiveAdmissionAdmitVo voPlannedAdmission : voCollPlanned)
        {
            grdTCIRow row = form.lyrAdmission().tabPlanned().grdTCI().getRows().newRow();

            PatientShort voPatient = (voPlannedAdmission.getPasEventIsNotNull() && voPlannedAdmission.getPasEvent().getPatientIsNotNull()) ? voPlannedAdmission.getPasEvent().getPatient() : null;
            if(voPatient != null)
            {
                if(voPatient.getNameIsNotNull())
                {
                    row.setColForename(voPatient.getName().getForename());
                    row.setColSurname(voPatient.getName().getSurname());
                }

                PatientId patId = voPatient.getDisplayId();
                row.setColDisplayId(patId != null ? patId.getValue() : null);
                row.setColSex(voPatient.getSexIsNotNull() ? voPatient.getSex().toString() : null);

                Integer age = voPatient.calculateAge();
                if(age != null)
                    row.setColAge(String.valueOf(age));

                row.setColDob(voPatient.getDobIsNotNull() ? voPatient.getDob().toString() : null);

                if(voPatient.getAssociatedPatientIsNotNull())       //wdev-13105
                    row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

                if(voPatient.getDodIsNotNull())                 //wdev-13105
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());
            }
            row.setValue(voPlannedAdmission);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateBookedTabFromData() 
{
    form.getLocalContext().setRecordSelected(false);
    form.lyrAdmission().tabBooked().grdElective().getRows().clear();

    PendingElectiveAdmissionAdmitVoCollection voCollPendingElectiveAdmission = null;
    BedSpaceStateLiteVo voBed = form.getGlobalContext().Core.getSelectedBedSpaceState();
    if(voBed != null)
    {

        voCollPendingElectiveAdmission = domain.listPendingElectiveAdmission( voBed.getWard() );
        if(voCollPendingElectiveAdmission == null || voCollPendingElectiveAdmission.size() == 0)
            return;
    }

    if(voCollPendingElectiveAdmission == null)
        return;

    for(PendingElectiveAdmissionAdmitVo voPendingElectiveAdmission : voCollPendingElectiveAdmission)
    {
        grdElectiveRow row = form.lyrAdmission().tabBooked().grdElective().getRows().newRow();

        PatientShort voPatient = (voPendingElectiveAdmission.getPasEventIsNotNull() && voPendingElectiveAdmission.getPasEvent().getPatientIsNotNull()) ? voPendingElectiveAdmission.getPasEvent().getPatient() : null;
        if(voPatient != null)
        {
            if(voPatient.getNameIsNotNull())
            {
                row.setColForename(voPatient.getName().getForename());
                row.setColSurname(voPatient.getName().getSurname());
            }

            PatientId patId = voPatient.getDisplayId();
            row.setColDisplayId(patId != null ? patId.getValue() : null);
            row.setColSex(voPatient.getSexIsNotNull() ? voPatient.getSex().toString() : null);

            Integer age = voPatient.calculateAge();
            if(age != null)
                row.setColAge(String.valueOf(age));

            row.setColDOB(voPatient.getDobIsNotNull() ? voPatient.getDob().toString() : null);

            if(voPatient.getAssociatedPatientIsNotNull())   //wdev-13105
                row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

            if(voPatient.getDodIsNotNull())     //wdev-13105
                row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());      
        }
        row.setValue(voPendingElectiveAdmission);
    }

    form.fireCustomControlValueChanged();
}