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

项目:AvoinApotti    文件:Logic.java   
private void ccHCPValueChanged() 
{
    if (form.lyr1().tabPageDetails().ccHcp().getValue() != null)
    {
        form.lyr1().tabPageDetails().treContactTypes().clear();

        if (form.lyr1().tabPageDetails().ccHcp().getValue() != null
            && form.lyr1().tabPageDetails().ccHcp().getValue() instanceof HcpLiteVo)
        {
            Hcp voHcp = domain.getHCP((HcpRefVo)form.lyr1().tabPageDetails().ccHcp().getValue());
            if (voHcp instanceof MedicVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((MedicVo) voHcp).getMedicType());
            else if (voHcp instanceof NurseVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((NurseVo) voHcp).getNurseType());
            else if (voHcp instanceof TherapistVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((TherapistVo) voHcp).getTherapistType());
            else 
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(voHcp.getHcpType());
        }
        disciplineChanged();
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkLoggedOnUser()
{
    if (form.qmbConfirmedBy().getVisible())
    {
        if (form.qmbConfirmedBy().getValue() == null)
        {
            Hcp voHcp = (Hcp) domain.getHcpUser();
            if (voHcp != null)
            {
                if (HcpDisType.NURSING.equals(voHcp.getHcpType()))
                {
                    NurseVo voNurse = (NurseVo) voHcp;
                    //wdev-4938
                    if (voNurse != null && voNurse.getNurseTypeIsNotNull() && voNurse.getNurseType().equals(HcpDisType.STUDENTNURSE))
                    {
                        engine.showMessage("'Confirmed by' is a mandatory field as you are logged in as a student nurse");
                        return true;
                    }
                }
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:ClinicalAdmissionImpl.java   
public NurseVo getNurse(HcpRefVo id) 
{   
    if(id == null)
        throw new CodingRuntimeException("HCP id must not be null ");

    DomainFactory factory = getDomainFactory();
    String hql = "from Nurse as n1_1 where n1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {id.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        NurseVoCollection voColl =  NurseVoAssembler.createNurseVoCollectionFromNurse(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:AvoinApotti    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedWaitingPatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedWaitingPatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedWaitingPatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void newInstance()
{
    clearInstanceControls();
    form.recbrSeenByHCP().clear();//WDEV-17348

    form.getLocalContext().setselectedSeenByHCP(null);

    Object mos = domain.getHcpUser();

    if (mos instanceof MedicVo)
    {
        form.ccSeenByMedic().setValue((MedicVo) mos);
    }
    else if (mos instanceof NurseVo)
    {
        form.ccSeenByANP().setValue((NurseVo) mos);
    }

    form.dtimSeen().setValue(new DateTime());

    form.setMode(FormMode.EDIT);
}
项目:AvoinApotti    文件:Logic.java   
private void defaultSeenControls()
{
    Object mos = domain.getHcpUser();

    if (form.ccSeenByMedic().getValue()==null && mos instanceof MedicVo)
    {
        form.ccSeenByMedic().setValue((MedicVo) mos);
    }
    else if (form.ccSeenByANP().getValue()==null && mos instanceof NurseVo)
    {
        form.ccSeenByANP().setValue((NurseVo) mos);
    }

    if (form.dtimSeen().getValue()==null)
    {
        form.dtimSeen().setValue(new DateTime());
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen()
{       
    form.setMode(form.getGlobalContext().getMosFormMode());
    loadAllCombos();
    if (form.getGlobalContext().getHcp() != null)
    {
        if (form.getGlobalContext().getHcp() instanceof MedicVo)
            populateScreenFromDataVoSpecific((MedicVo) form.getGlobalContext().getHcp());
        else if (form.getGlobalContext().getHcp() instanceof NurseVo)
            populateScreenFromDataVoSpecific((NurseVo) form.getGlobalContext().getHcp());
        else if (form.getGlobalContext().getHcp() instanceof TherapistVo)
            populateScreenFromDataVoSpecific((TherapistVo) form.getGlobalContext().getHcp());
        else
            populateScreenFromDataVoSpecific(form.getGlobalContext().getHcp()); 
    }
    fillNameDetails(form.getGlobalContext().getMosFullName());                      

}
项目:AvoinApotti    文件:Logic.java   
private void populateDataFromScreenVoSpecific(Hcp value)
{
    if (value instanceof NurseVo)
    {
        populateDataFromScreenVoSpecific((NurseVo)value);
    }
    else if (value instanceof MedicVo)
    {
        populateDataFromScreenVoSpecific((MedicVo)value);
    }
    else if (value instanceof TherapistVo)
    {
        populateDataFromScreenVoSpecific((TherapistVo)value);
    }
    else 
    {   
        value.setHcpType(form.lyrDetails().tabHcp().cmbHcpType().getValue()!=null?form.lyrDetails().tabHcp().cmbHcpType().getValue():HcpDisType.OTHER);

        // WDEV-13888
        value.setIsHCPaResponsibleHCP(form.lyrDetails().tabHcp().chkIsOtherDisciplineResponsibleHCP().getValue());
    }
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof NurseVo )
    {
        NurseVo ps1 = (NurseVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof NurseVo)
    {
        NurseVo ps2 = (NurseVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof NurseVo )
    {
        NurseVo ps1 = (NurseVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof NurseVo)
    {
        NurseVo ps2 = (NurseVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private void ccHCPValueChanged() 
{
    if (form.lyr1().tabPageDetails().ccHcp().getValue() != null)
    {
        form.lyr1().tabPageDetails().treContactTypes().clear();

        if (form.lyr1().tabPageDetails().ccHcp().getValue() != null
            && form.lyr1().tabPageDetails().ccHcp().getValue() instanceof HcpLiteVo)
        {
            Hcp voHcp = domain.getHCP((HcpRefVo)form.lyr1().tabPageDetails().ccHcp().getValue());
            if (voHcp instanceof MedicVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((MedicVo) voHcp).getMedicType());
            else if (voHcp instanceof NurseVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((NurseVo) voHcp).getNurseType());
            else if (voHcp instanceof TherapistVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((TherapistVo) voHcp).getTherapistType());
            else 
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(voHcp.getHcpType());
        }
        disciplineChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean checkLoggedOnUser()
{
    if (form.qmbConfirmedBy().getVisible())
    {
        if (form.qmbConfirmedBy().getValue() == null)
        {
            Hcp voHcp = (Hcp) domain.getHcpUser();
            if (voHcp != null)
            {
                if (HcpDisType.NURSING.equals(voHcp.getHcpType()))
                {
                    NurseVo voNurse = (NurseVo) voHcp;
                    //wdev-4938
                    if (voNurse != null && voNurse.getNurseTypeIsNotNull() && voNurse.getNurseType().equals(HcpDisType.STUDENTNURSE))
                    {
                        engine.showMessage("'Confirmed by' is a mandatory field as you are logged in as a student nurse");
                        return true;
                    }
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:ClinicalAdmissionImpl.java   
public NurseVo getNurse(HcpRefVo id) 
{   
    if(id == null)
        throw new CodingRuntimeException("HCP id must not be null ");

    DomainFactory factory = getDomainFactory();
    String hql = "from Nurse as n1_1 where n1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {id.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        NurseVoCollection voColl =  NurseVoAssembler.createNurseVoCollectionFromNurse(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:openMAXIMS    文件:Logic.java   
private void newInstance()
{
    clearInstanceControls();
    form.recbrSeenByHCP().clear();//WDEV-17348

    form.getLocalContext().setselectedSeenByHCP(null);

    Object mos = domain.getHcpUser();

    if (mos instanceof NurseVo)
    {
        form.ccSeenByANP().setValue((NurseVo) mos);
    }

    form.dtimSeen().setValue(new DateTime());

    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen()
{       
    form.setMode(form.getGlobalContext().getMosFormMode());
    loadAllCombos();
    if (form.getGlobalContext().getHcp() != null)
    {
        if (form.getGlobalContext().getHcp() instanceof MedicVo)
            populateScreenFromDataVoSpecific((MedicVo) form.getGlobalContext().getHcp());
        else if (form.getGlobalContext().getHcp() instanceof NurseVo)
            populateScreenFromDataVoSpecific((NurseVo) form.getGlobalContext().getHcp());
        else if (form.getGlobalContext().getHcp() instanceof TherapistVo)
            populateScreenFromDataVoSpecific((TherapistVo) form.getGlobalContext().getHcp());
        else
            populateScreenFromDataVoSpecific(form.getGlobalContext().getHcp()); 
    }
    fillNameDetails(form.getGlobalContext().getMosFullName());                      

}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreenVoSpecific(Hcp value)
{
    if (value instanceof NurseVo)
    {
        populateDataFromScreenVoSpecific((NurseVo)value);
    }
    else if (value instanceof MedicVo)
    {
        populateDataFromScreenVoSpecific((MedicVo)value);
    }
    else if (value instanceof TherapistVo)
    {
        populateDataFromScreenVoSpecific((TherapistVo)value);
    }
    else 
    {   
        value.setHcpType(form.lyrDetails().tabHcp().cmbHcpType().getValue()!=null?form.lyrDetails().tabHcp().cmbHcpType().getValue():HcpDisType.OTHER);

        // WDEV-13888
        value.setIsHCPaResponsibleHCP(form.lyrDetails().tabHcp().chkIsOtherDisciplineResponsibleHCP().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof NurseVo )
    {
        NurseVo ps1 = (NurseVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof NurseVo)
    {
        NurseVo ps2 = (NurseVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof NurseVo )
    {
        NurseVo ps1 = (NurseVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof NurseVo)
    {
        NurseVo ps2 = (NurseVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private void ccHCPValueChanged() 
{
    if (form.lyr1().tabPageDetails().ccHcp().getValue() != null)
    {
        form.lyr1().tabPageDetails().treContactTypes().clear();

        if (form.lyr1().tabPageDetails().ccHcp().getValue() != null
            && form.lyr1().tabPageDetails().ccHcp().getValue() instanceof HcpLiteVo)
        {
            Hcp voHcp = domain.getHCP((HcpRefVo)form.lyr1().tabPageDetails().ccHcp().getValue());
            if (voHcp instanceof MedicVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((MedicVo) voHcp).getMedicType());
            else if (voHcp instanceof NurseVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((NurseVo) voHcp).getNurseType());
            else if (voHcp instanceof TherapistVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((TherapistVo) voHcp).getTherapistType());
            else 
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(voHcp.getHcpType());
        }
        disciplineChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean checkLoggedOnUser()
{
    if (form.qmbConfirmedBy().getVisible())
    {
        if (form.qmbConfirmedBy().getValue() == null)
        {
            Hcp voHcp = (Hcp) domain.getHcpUser();
            if (voHcp != null)
            {
                if (HcpDisType.NURSING.equals(voHcp.getHcpType()))
                {
                    NurseVo voNurse = (NurseVo) voHcp;
                    //wdev-4938
                    if (voNurse != null && voNurse.getNurseTypeIsNotNull() && voNurse.getNurseType().equals(HcpDisType.STUDENTNURSE))
                    {
                        engine.showMessage("'Confirmed by' is a mandatory field as you are logged in as a student nurse");
                        return true;
                    }
                }
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:ClinicalAdmissionImpl.java   
public NurseVo getNurse(HcpRefVo id) 
{   
    if(id == null)
        throw new CodingRuntimeException("HCP id must not be null ");

    DomainFactory factory = getDomainFactory();
    String hql = "from Nurse as n1_1 where n1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {id.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        NurseVoCollection voColl =  NurseVoAssembler.createNurseVoCollectionFromNurse(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:openMAXIMS    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedWaitingPatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedWaitingPatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedWaitingPatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void newInstance()
{
    clearInstanceControls();
    form.recbrSeenByHCP().clear();//WDEV-17348

    form.getLocalContext().setselectedSeenByHCP(null);

    Object mos = domain.getHcpUser();

    if (mos instanceof MedicVo)
    {
        form.ccSeenByMedic().setValue((MedicVo) mos);
    }
    else if (mos instanceof NurseVo)
    {
        form.ccSeenByANP().setValue((NurseVo) mos);
    }

    form.dtimSeen().setValue(new DateTime());

    form.setMode(FormMode.EDIT);
}
项目:openMAXIMS    文件:Logic.java   
private void defaultSeenControls()
{
    Object mos = domain.getHcpUser();

    if (form.ccSeenByMedic().getValue()==null && mos instanceof MedicVo)
    {
        form.ccSeenByMedic().setValue((MedicVo) mos);
    }
    else if (form.ccSeenByANP().getValue()==null && mos instanceof NurseVo)
    {
        form.ccSeenByANP().setValue((NurseVo) mos);
    }

    if (form.dtimSeen().getValue()==null)
    {
        form.dtimSeen().setValue(new DateTime());
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormOpen()
{       
    form.setMode(form.getGlobalContext().getMosFormMode());
    loadAllCombos();
    if (form.getGlobalContext().getHcp() != null)
    {
        if (form.getGlobalContext().getHcp() instanceof MedicVo)
            populateScreenFromDataVoSpecific((MedicVo) form.getGlobalContext().getHcp());
        else if (form.getGlobalContext().getHcp() instanceof NurseVo)
            populateScreenFromDataVoSpecific((NurseVo) form.getGlobalContext().getHcp());
        else if (form.getGlobalContext().getHcp() instanceof TherapistVo)
            populateScreenFromDataVoSpecific((TherapistVo) form.getGlobalContext().getHcp());
        else
            populateScreenFromDataVoSpecific(form.getGlobalContext().getHcp()); 
    }
    fillNameDetails(form.getGlobalContext().getMosFullName());                      

}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreenVoSpecific(Hcp value)
{
    if (value instanceof NurseVo)
    {
        populateDataFromScreenVoSpecific((NurseVo)value);
    }
    else if (value instanceof MedicVo)
    {
        populateDataFromScreenVoSpecific((MedicVo)value);
    }
    else if (value instanceof TherapistVo)
    {
        populateDataFromScreenVoSpecific((TherapistVo)value);
    }
    else 
    {   
        value.setHcpType(form.lyrDetails().tabHcp().cmbHcpType().getValue()!=null?form.lyrDetails().tabHcp().cmbHcpType().getValue():HcpDisType.OTHER);

        // WDEV-13888
        value.setIsHCPaResponsibleHCP(form.lyrDetails().tabHcp().chkIsOtherDisciplineResponsibleHCP().getValue());
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof NurseVo )
    {
        NurseVo ps1 = (NurseVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof NurseVo)
    {
        NurseVo ps2 = (NurseVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof NurseVo )
    {
        NurseVo ps1 = (NurseVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof NurseVo)
    {
        NurseVo ps2 = (NurseVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
private void ccHCPValueChanged() 
{
    if (form.lyr1().tabPageDetails().ccHcp().getValue() != null)
    {
        form.lyr1().tabPageDetails().treContactTypes().clear();

        if (form.lyr1().tabPageDetails().ccHcp().getValue() != null
            && form.lyr1().tabPageDetails().ccHcp().getValue() instanceof HcpLiteVo)
        {
            Hcp voHcp = domain.getHCP((HcpRefVo)form.lyr1().tabPageDetails().ccHcp().getValue());
            if (voHcp instanceof MedicVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((MedicVo) voHcp).getMedicType());
            else if (voHcp instanceof NurseVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((NurseVo) voHcp).getNurseType());
            else if (voHcp instanceof TherapistVo)
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(((TherapistVo) voHcp).getTherapistType());
            else 
                form.lyr1().tabPageDetails().cmbDiscipline().setValue(voHcp.getHcpType());
        }
        disciplineChanged();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean checkLoggedOnUser()
{
    if (form.qmbConfirmedBy().getVisible())
    {
        if (form.qmbConfirmedBy().getValue() == null)
        {
            Hcp voHcp = (Hcp) domain.getHcpUser();
            if (voHcp != null)
            {
                if (HcpDisType.NURSING.equals(voHcp.getHcpType()))
                {
                    NurseVo voNurse = (NurseVo) voHcp;
                    //wdev-4938
                    if (voNurse != null && voNurse.getNurseTypeIsNotNull() && voNurse.getNurseType().equals(HcpDisType.STUDENTNURSE))
                    {
                        engine.showMessage("'Confirmed by' is a mandatory field as you are logged in as a student nurse");
                        return true;
                    }
                }
            }
        }
    }
    return false;
}
项目:openmaxims-linux    文件:ClinicalAdmissionImpl.java   
public NurseVo getNurse(HcpRefVo id) 
{   
    if(id == null)
        throw new CodingRuntimeException("HCP id must not be null ");

    DomainFactory factory = getDomainFactory();
    String hql = "from Nurse as n1_1 where n1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {id.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        NurseVoCollection voColl =  NurseVoAssembler.createNurseVoCollectionFromNurse(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:openmaxims-linux    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedWaitingPatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedWaitingPatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedWaitingPatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedWaitingPatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private SeenByHCPVo populateAllocatedNurse()
{
    if( form.getLocalContext().getAllocatedNurseIsNotNull())
    {
        SeenByHCPVo tempVo = form.getLocalContext().getAllocatedNurse();
        tempVo.setPatient(form.getLocalContext().getSelectedTriagePatient().getPatient());
        tempVo.setAttendance(form.getLocalContext().getSelectedTriagePatient().getAttendance().getCareContext());
        tempVo.setEpisode(form.getLocalContext().getSelectedTriagePatient().getEpisode().getEpisodeOfCare());
        tempVo.setTrackingArea(form.getLocalContext().getSelectedTriagePatient().getCurrentArea());
        tempVo.setAllocatedDateTime(new DateTime());
        tempVo.setSeenDateTime(new DateTime());
        if(domain.getHcpUser() instanceof NurseVo)
        {
            NurseVo tempHcpVo = (NurseVo) domain.getHcpUser();
            tempVo.setAllocatedNurse(tempHcpVo);
        }

        return tempVo;

    }

    return null;
}