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

项目: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    文件:RadioTherapyDetailsImpl.java   
public MedicVo getMedic(HcpRefVo hcpId) 
{
    if(hcpId == null)
        throw new CodingRuntimeException("HCP id must not be null ");



    DomainFactory factory = getDomainFactory();
    String hql = "from Medic as m1_1 where m1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {hcpId.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        MedicVoCollection voColl =  MedicVoAssembler.createMedicVoCollectionFromMedic(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:AvoinApotti    文件:ADTAdmissionDetailsComponentImpl.java   
public Specialty getSpecialtyForConsultant(Integer mosID)
{

    StringBuffer hql = new StringBuffer("select medic from Medic as medic left join medic.mos as mos where mos.id= :mosID ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"mosID"}, new Object[] {mosID});

    if (list!=null && list.size()>0)
    {   
        MedicVo tempMedic = (MedicVoAssembler.createMedicVoCollectionFromMedic(list)).get(0);
        return tempMedic.getSpecialty();
    }

    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   
private void populateDataFromScreenVoSpecific(MedicVo value)
{
    value.setHcpType(HcpDisType.MEDICAL);
    value.setMedicType(form.lyrDetails().tabMedic().cmbMedicType().getValue());
    value.setSpecialty(form.lyrDetails().tabMedic().cmbMedicSpecialty().getValue());
    value.setGrade(form.lyrDetails().tabMedic().cmbMedicGrade().getValue());

    // WDEV-13888
    value.setIsHCPaResponsibleHCP(form.lyrDetails().tabMedic().chkIsMedicResponsibleHCP().getValue());

    //WDEV-15544
    value.setIsALocalConsultant(form.lyrDetails().tabMedic().chkIsLocalConsultant().getValue());

    //WDEV-15899 
    value.setIsAResponsibleEDClinician(form.lyrDetails().tabMedic().chkEdResponsibleTabMedic().getValue());

    //WDEV-12587
    if(value.getMosIsNotNull())
        value.getMos().setCanReferPatient(form.lyrDetails().tabMedic().chkCanReferPatient().getValue());
    else
        form.getGlobalContext().Admin.setCanReferPatient(form.lyrDetails().tabMedic().chkCanReferPatient().getValue());
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromDataVoSpecific(MedicVo value)
{
    if(value == null)
        return;

    form.lyrDetails().showtabMedic();

    form.lyrDetails().tabMedic().cmbMedicType().setValue(value.getMedicType());
    form.lyrDetails().tabMedic().cmbMedicSpecialty().setValue(value.getSpecialty());
    form.lyrDetails().tabMedic().cmbMedicGrade().setValue(value.getGrade());

    // WDEV-13888
    form.lyrDetails().tabMedic().chkIsMedicResponsibleHCP().setValue(value.getIsHCPaResponsibleHCP());

    //WDEV-15544
    form.lyrDetails().tabMedic().chkIsLocalConsultant().setValue(value.getIsALocalConsultant());

    //WDEV-15899
    form.lyrDetails().tabMedic().chkEdResponsibleTabMedic().setValue(value.getIsAResponsibleEDClinician());

    //WDEV-12587
    if(value.getMosIsNotNull())
        form.lyrDetails().tabMedic().chkCanReferPatient().setValue(value.getMos().getCanReferPatient());
    else
        form.lyrDetails().tabMedic().chkCanReferPatient().setValue(form.getGlobalContext().Admin.getCanReferPatient());
}
项目:AvoinApotti    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();
    // -------------------------------------------
    form.getLocalContext().setCurrentRecord(null);
    // -------------------------------------------
    form.ccAuthInfo().setIsRequiredPropertyToControls(true);

    form.getLocalContext().setisAnaesthetist(false);

    Object medic = domain.getHcpUser();

    if (medic instanceof MedicVo)
    {
        if (((MedicVo) medic).getMedicTypeIsNotNull() && ((MedicVo) medic).getMedicType().equals(HcpDisType.ANAESTHETIST))
        {
            form.getLocalContext().setisAnaesthetist(true);
        }
    }
    form.getLocalContext().setLoggedInHcp(medic instanceof HcpRefVo ? (HcpRefVo) medic : null);

    initGridComments();
}
项目: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    文件:RadioTherapyDetailsImpl.java   
public MedicVo getMedic(HcpRefVo hcpId) 
{
    if(hcpId == null)
        throw new CodingRuntimeException("HCP id must not be null ");



    DomainFactory factory = getDomainFactory();
    String hql = "from Medic as m1_1 where m1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {hcpId.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        MedicVoCollection voColl =  MedicVoAssembler.createMedicVoCollectionFromMedic(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo populatePendingTransferOnAcceptFromScreen(PendingTransfersLiteVo value)
{
    if (value == null)
        return null;

    if (value.getPatientStatus() == null )
        value.setPatientStatus(value.getInpatientEpisode().getPasEvent().getPatient().getPatientCategory() != null ? value.getInpatientEpisode().getPasEvent().getPatient().getPatientCategory() : PatientStatus.NHS);
    value.setWardType(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbWardType().getValue());
    value.setService(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().qmbInService().getValue());
    value.setSpecialty(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().getValue());
    value.setTransferRequestDateTime(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().dtimTransfer().getValue());
    value.setCurrentStatus(TransferStatus.TRANSFERRED);

    if (form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue() instanceof MedicVo)
    {       
        value.setConsultant((MedicVo)form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue());
    }
    return value;
}
项目:openMAXIMS    文件:Logic.java   
private PendingTransfersLiteVo populatePendingTransferDataFromScreen(PendingTransfersLiteVo selectedPendingTransfer)
{
    if (selectedPendingTransfer == null)
        return null;
    selectedPendingTransfer.setPatientStatus(form.cmbPatientStatus().getValue());
    selectedPendingTransfer.setWardType(form.cmbWardType().getValue());
    selectedPendingTransfer.setService(form.qmbService().getValue());
    selectedPendingTransfer.setSpecialty(form.cmbSpecialty().getValue());
    selectedPendingTransfer.setTransferRequestDateTime(form.dtimTransferAccept().getValue());
    selectedPendingTransfer.setCurrentStatus(TransferStatus.TRANSFERRED);

    if (form.ccConsultant().getValue() instanceof MedicVo)
    {       
        selectedPendingTransfer.setConsultant((MedicVo)form.ccConsultant().getValue());
    }

    return selectedPendingTransfer;
}
项目:openMAXIMS    文件:ADTAdmissionDetailsComponentImpl.java   
public Specialty getSpecialtyForConsultant(Integer mosID)
{

    StringBuffer hql = new StringBuffer("select medic from Medic as medic left join medic.mos as mos where mos.id= :mosID ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"mosID"}, new Object[] {mosID});

    if (list!=null && list.size()>0)
    {   
        MedicVo tempMedic = (MedicVoAssembler.createMedicVoCollectionFromMedic(list)).get(0);
        return tempMedic.getSpecialty();
    }

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

    form.getLocalContext().setselectedSeenByHCP(null);

    Object mos = domain.getHcpUser();

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

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

    form.setMode(FormMode.EDIT);
}
项目:openmaxims-linux    文件:ADTAdmissionDetailsComponentImpl.java   
public Specialty getSpecialtyForConsultant(Integer mosID)
{

    StringBuffer hql = new StringBuffer("select medic from Medic as medic left join medic.mos as mos where mos.id= :mosID ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"mosID"}, new Object[] {mosID});

    if (list!=null && list.size()>0)
    {   
        MedicVo tempMedic = (MedicVoAssembler.createMedicVoCollectionFromMedic(list)).get(0);
        return tempMedic.getSpecialty();
    }

    return null;
}
项目:openmaxims-linux    文件: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-linux    文件: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-linux    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();
    // -------------------------------------------
    form.getLocalContext().setCurrentRecord(null);
    // -------------------------------------------
    form.ccAuthInfo().setIsRequiredPropertyToControls(true);

    form.getLocalContext().setisAnaesthetist(false);

    Object medic = domain.getHcpUser();

    if (medic instanceof MedicVo)
    {
        if (((MedicVo) medic).getMedicTypeIsNotNull() && ((MedicVo) medic).getMedicType().equals(HcpDisType.ANAESTHETIST))
        {
            form.getLocalContext().setisAnaesthetist(true);
        }
    }
    form.getLocalContext().setLoggedInHcp(medic instanceof HcpRefVo ? (HcpRefVo) medic : null);

    initGridComments();
}
项目: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    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();
    // -------------------------------------------
    form.getLocalContext().setCurrentRecord(null);
    // -------------------------------------------
    form.ccAuthInfo().setIsRequiredPropertyToControls(true);

    form.getLocalContext().setisAnaesthetist(false);

    Object medic = domain.getHcpUser();

    if (medic instanceof MedicVo)
    {
        if (((MedicVo) medic).getMedicTypeIsNotNull() && ((MedicVo) medic).getMedicType().equals(HcpDisType.ANAESTHETIST))
        {
            form.getLocalContext().setisAnaesthetist(true);
        }
    }
    form.getLocalContext().setLoggedInHcp(medic instanceof HcpRefVo ? (HcpRefVo) medic : null);

    initGridComments();
}
项目:openmaxims-linux    文件:RadioTherapyDetailsImpl.java   
public MedicVo getMedic(HcpRefVo hcpId) 
{
    if(hcpId == null)
        throw new CodingRuntimeException("HCP id must not be null ");



    DomainFactory factory = getDomainFactory();
    String hql = "from Medic as m1_1 where m1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {hcpId.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        MedicVoCollection voColl =  MedicVoAssembler.createMedicVoCollectionFromMedic(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目: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    文件:RadioTherapyDetailsImpl.java   
public MedicVo getMedic(HcpRefVo hcpId) 
{
    if(hcpId == null)
        throw new CodingRuntimeException("HCP id must not be null ");



    DomainFactory factory = getDomainFactory();
    String hql = "from Medic as m1_1 where m1_1.id = :idHCP";
    List list = factory.find(hql, new String[] {"idHCP"}, new Object[] {hcpId.getID_Hcp()});
    if(list != null && list.size() > 0)
    {
        MedicVoCollection voColl =  MedicVoAssembler.createMedicVoCollectionFromMedic(list);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:ADTAdmissionDetailsComponentImpl.java   
public Specialty getSpecialtyForConsultant(Integer mosID)
{

    StringBuffer hql = new StringBuffer("select medic from Medic as medic left join medic.mos as mos where mos.id= :mosID ");

    DomainFactory factory = getDomainFactory();
    List<?> list = factory.find(hql.toString(), new String[] {"mosID"}, new Object[] {mosID});

    if (list!=null && list.size()>0)
    {   
        MedicVo tempMedic = (MedicVoAssembler.createMedicVoCollectionFromMedic(list)).get(0);
        return tempMedic.getSpecialty();
    }

    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-linux    文件: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(MedicVo value)
{
    value.setHcpType(HcpDisType.MEDICAL);
    value.setMedicType(form.lyrDetails().tabMedic().cmbMedicType().getValue());
    value.setSpecialty(form.lyrDetails().tabMedic().cmbMedicSpecialty().getValue());
    value.setGrade(form.lyrDetails().tabMedic().cmbMedicGrade().getValue());

    // WDEV-13888
    value.setIsHCPaResponsibleHCP(form.lyrDetails().tabMedic().chkIsMedicResponsibleHCP().getValue());

    //WDEV-15544
    value.setIsALocalConsultant(form.lyrDetails().tabMedic().chkIsLocalConsultant().getValue());

    //WDEV-15899 
    value.setIsAResponsibleEDClinician(form.lyrDetails().tabMedic().chkEdResponsibleTabMedic().getValue());

    //WDEV-12587
    if(value.getMosIsNotNull())
        value.getMos().setCanReferPatient(form.lyrDetails().tabMedic().chkCanReferPatient().getValue());
    else
        form.getGlobalContext().Admin.setCanReferPatient(form.lyrDetails().tabMedic().chkCanReferPatient().getValue());
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromDataVoSpecific(MedicVo value)
{
    if(value == null)
        return;

    form.lyrDetails().showtabMedic();

    form.lyrDetails().tabMedic().cmbMedicType().setValue(value.getMedicType());
    form.lyrDetails().tabMedic().cmbMedicSpecialty().setValue(value.getSpecialty());
    form.lyrDetails().tabMedic().cmbMedicGrade().setValue(value.getGrade());

    // WDEV-13888
    form.lyrDetails().tabMedic().chkIsMedicResponsibleHCP().setValue(value.getIsHCPaResponsibleHCP());

    //WDEV-15544
    form.lyrDetails().tabMedic().chkIsLocalConsultant().setValue(value.getIsALocalConsultant());

    //WDEV-15899
    form.lyrDetails().tabMedic().chkEdResponsibleTabMedic().setValue(value.getIsAResponsibleEDClinician());

    //WDEV-12587
    if(value.getMosIsNotNull())
        form.lyrDetails().tabMedic().chkCanReferPatient().setValue(value.getMos().getCanReferPatient());
    else
        form.lyrDetails().tabMedic().chkCanReferPatient().setValue(form.getGlobalContext().Admin.getCanReferPatient());
}
项目:openMAXIMS    文件:Logic.java   
public void initialize() throws ims.framework.exceptions.FormOpenException
{
    super.initialize();
    // -------------------------------------------
    form.getLocalContext().setCurrentRecord(null);
    // -------------------------------------------
    form.ccAuthInfo().setIsRequiredPropertyToControls(true);

    form.getLocalContext().setisAnaesthetist(false);

    Object medic = domain.getHcpUser();

    if (medic instanceof MedicVo)
    {
        if (((MedicVo) medic).getMedicTypeIsNotNull() && ((MedicVo) medic).getMedicType().equals(HcpDisType.ANAESTHETIST))
        {
            form.getLocalContext().setisAnaesthetist(true);
        }
    }
    form.getLocalContext().setLoggedInHcp(medic instanceof HcpRefVo ? (HcpRefVo) medic : null);

    initGridComments();
}
项目:AvoinApotti    文件:Logic.java   
private void populateQmbConsultants()
{
    MedicLiteVo voMedic = new MedicLiteVo();
    // WDEV-8199
    HcpLiteVo currHcpUser = (HcpLiteVo) domain.getHcpLiteUser();

    if (domain.getHcpUser() instanceof MedicVo && MedicGrade.CONS.equals(((MedicVo) domain.getHcpUser()).getGrade()))
    {
        voMedic.setMos(currHcpUser.getMos());
        voMedic.setID_Hcp(currHcpUser.getID_Hcp());// wdev-10188
        form.qmbConsultant().newRow(voMedic, voMedic.getName().toString());
        form.qmbConsultant().setValue(voMedic);
    }
}
项目:AvoinApotti    文件:GlossaryAdminConfigurationImpl.java   
private ICspTypeSpecifier getConsultant(Integer id) 
{
    if (id == null)
        throw new CodingRuntimeException("Invalid argiment:Medic Id is null.");

    DomainFactory factory = getDomainFactory();
    Medic doMed = (Medic) factory.getDomainObject(Medic.class, id);

    MedicVo medic = MedicVoAssembler.create(doMed);
    return (ICspTypeSpecifier) medic;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isHcpType(Hcp voHcpResult)
{
    if (voHcpResult == null)
        return false;
    HcpDisType hcpType = form.lyrProServices().tabProfessional().cmbProfessional().getValue();
    HcpDisType hcpSubType = form.lyrProServices().tabProfessional().cmbHcpSubType().getValue();
    // Don't check "Other Discipline"
    if (hcpType != null && isOtherDiscipline(hcpType) == false)
    {
        if (hcpSubType != null && voHcpResult != null && voHcpResult.getID_HcpIsNotNull())
        {
            HcpFilter filter = new HcpFilter();
            filter.setID_Hcp(voHcpResult.getID_Hcp());
            Hcp voHcp = domain.getHcp(filter);
            if (voHcp != null)
            {
                if (voHcp instanceof NurseVo)
                {
                    if (hcpSubType.equals(((NurseVo) voHcp).getNurseType()))
                        return true;
                }
                if (voHcp instanceof MedicVo)
                {
                    if (hcpSubType.equals(((MedicVo) voHcp).getMedicType()))
                        return true;
                }
                if (voHcp instanceof TherapistVo)
                {
                    if (hcpSubType.equals(((TherapistVo) voHcp).getTherapistType()))
                        return true;
                }

                return false;
            }
        }
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void prePopulateConsultantCombo()
{
    Object currUser = domain.getHcpUser();
    if (currUser instanceof MedicVo && MedicGrade.CONS.equals(((MedicVo)currUser).getGrade()))
    {
        HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();
        form.qmbConsultants().clear();
        form.qmbConsultants().newRow(hcpUser,hcpUser.getName()!= null ? hcpUser.getName().toString() : "");
        form.qmbConsultants().setValue(hcpUser);
    }

}
项目:AvoinApotti    文件:Logic.java   
private void populateQmbConsultants()
{
    MedicLiteVo voMedic = new MedicLiteVo();
    //WDEV-8199
    HcpLiteVo currHcpUser = (HcpLiteVo) domain.getHcpLiteUser();

    if (domain.getHcpUser() instanceof MedicVo && MedicGrade.CONS.equals(((MedicVo)domain.getHcpUser()).getGrade()))
    {
        voMedic.setMos(currHcpUser.getMos());
        voMedic.setID_Hcp(currHcpUser.getID_Hcp());//wdev-10188
        form.qmbConsultant().newRow(voMedic, voMedic.getName().toString());
        form.qmbConsultant().setValue(voMedic);
    }
}
项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
public MedicVo getMedic(HcpRefVo hcp)
{
    if (hcp == null || hcp.getID_Hcp() == null)
        return null;

    String query = "SELECT medic FROM Medic AS medic WHERE medic.id = :ID";

    return MedicVoAssembler.create((Medic) getDomainFactory().findFirst(query, "ID", hcp.getID_Hcp()));
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveSeenByHcp(TrackingForClinicianWorklistVo tracking, MedicRefVo medic)
{
    try
    {
        // Create the SeenByHcp record to be associated with tracking
        SeenByHCPVo seenByHcp = new SeenByHCPVo();
        seenByHcp.setPatient(tracking.getPatient());
        seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
        seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
        seenByHcp.setTrackingArea(tracking.getCurrentArea());

        seenByHcp.setAllocatedDateTime(new DateTime());         
        seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());      
        seenByHcp.setSeenDateTime(new DateTime());

        // Validate SeenByHcp record
        String[] errors = seenByHcp.validate();

        if (errors != null && errors.length > 0)
        {
            engine.showErrors(errors);
            return false;
        }

        form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

        return true;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
}