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

项目:AvoinApotti    文件:Logic.java   
private void setInstanceRowDetails(grdDiagnosisRow row, DiagLiteVo vo)
{
    row.setcolDiagnsosisName(vo.getDiagnosisName());

    row.setValue(vo);           
    if (vo.getIsActiveIsNotNull() && !vo.getIsActive().booleanValue())
    {
        row.setBold(false);
        row.setTextColor(Color.Gray);
    }
    else
    {
        row.setBold(true);
        row.setTextColor(Color.Default);
    }   
}
项目:AvoinApotti    文件:Logic.java   
private PatientDiagnosisApptDetailVo populatePatientDiagnoseFromScreen(DiagLiteVo diagnose, Boolean isMain, CatsReferralForClinicalNotesVo referral)
{
    if(diagnose == null)
        return null;

    PatientDiagnosisApptDetailVo patientDiagnose = new PatientDiagnosisApptDetailVo();
    patientDiagnose.setAppointment(form.getGlobalContext().RefMan.getAppointmentForPatientDiagnosisOrProcedures());

    patientDiagnose.setDiagnosis(diagnose);
    patientDiagnose.setDiagnosisDescription(diagnose.getDiagnosisName());
    patientDiagnose.setSourceofInformation(SourceofInformation.CLINICALCONTACT);
    patientDiagnose.setAuthoringInfo(form.ccAuthoringInfo().getValue());
    patientDiagnose.setEpisodeOfCare(referral.getCareContext().getEpisodeOfCare());
    patientDiagnose.setCareContext(referral.getCareContext());
    patientDiagnose.setDiagnosedDate(new PartialDate(new Date()));

    setCsPrimaryDiagnosis(patientDiagnose, isMain);

    return patientDiagnose;
}
项目:AvoinApotti    文件:Logic.java   
private void populateSelectedDiagnosisGrid(DiagLiteVoCollection diagnosis, HashMap<DiagLiteVo, Integer> diagCollection)
{
    form.dyngrdDiagnosis().getRows().clear();

    if(diagnosis == null)
        return;

    for(DiagLiteVo diagnose : diagnosis)
    {
        if(diagnose == null)
            continue;

        Integer numberOfSameDiagnosis = diagCollection.get(diagnose);

        for(int i=0; i<numberOfSameDiagnosis; i++)
        {
            addSelectedDiagnoseRow(diagnose);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdCoMorbitiesMutableComboBoxSelected(int column, grdCoMorbitiesRow row, Object value) throws PresentationLogicException 
{
    if(value instanceof DiagLiteVo)
    {
        PatientDiagnosisLiteVo patDiag = new PatientDiagnosisLiteVo();
        patDiag.setIsComorbidity(true);
        patDiag.setDiagnosis((DiagLiteVo) value);
        patDiag.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        patDiag.setEpisodeOfCare(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare()); //WDEV-15293
        patDiag.setSourceofInformation(SourceofInformation.CORRESPONDENCE);
        patDiag.setDiagnosisDescription(((DiagLiteVo) value).getDiagnosisNameIsNotNull() ? ((DiagLiteVo) value).getDiagnosisName() : "");

        row.setValue(patDiag);
    }

}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColumnSelect())
        {
            if (form.grdDiagnosis().getRows().get(i).getValue() instanceof PatientDiagnosisListVo)
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo((PatientDiagnosisListVo)form.grdDiagnosis().getRows().get(i).getValue());
            else if (form.grdDiagnosis().getRows().get(i).getValue() instanceof DiagLiteVo)
            {
                PatientDiagnosisListVo voPD = new PatientDiagnosisListVo();
                voPD.setDiagnosis((DiagLiteVo) form.grdDiagnosis().getRows().get(i).getValue());
                voPD.setDiagnosisDescription( ((DiagLiteVo)form.grdDiagnosis().getRows().get(i).getValue()).getDiagnosisName());
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo(voPD);
            }
        }
    }

    engine.close(DialogResult.OK);
}
项目:AvoinApotti    文件:Logic.java   
private PatientAbsentDiagnosisVo populateAbsentDiagnosisData(grdChecklistRow row) 
{
    PatientAbsentDiagnosisVo voPatientAbsentDiagnosis = new PatientAbsentDiagnosisVo();
    DiagLiteVo diagnosis = null;

    if (row.getValue() != null)
    {
        if (row.getValue() instanceof PatientDiagnosisVo)
        {
            diagnosis = (((PatientDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof PatientAbsentDiagnosisVo)
        {
            diagnosis = (((PatientAbsentDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof DiagLiteVo)
        {
            diagnosis =((DiagLiteVo) row.getValue());
        }
    }

    voPatientAbsentDiagnosis.setDiagnosis(diagnosis);
    voPatientAbsentDiagnosis.setStatus(row.getColSelect());
    voPatientAbsentDiagnosis.setSourceofInformation(row.getColSource());
    return voPatientAbsentDiagnosis;
}
项目:openMAXIMS    文件:Logic.java   
private void setInstanceRowDetails(grdDiagnosisRow row, DiagLiteVo vo)
{
    row.setcolDiagnsosisName(vo.getDiagnosisName());

    row.setValue(vo);           
    if (vo.getIsActiveIsNotNull() && !vo.getIsActive().booleanValue())
    {
        row.setBold(false);
        row.setTextColor(Color.Gray);
    }
    else
    {
        row.setBold(true);
        row.setTextColor(Color.Default);
    }   
}
项目:openMAXIMS    文件:Logic.java   
private PatientDiagnosisApptDetailVo populatePatientDiagnoseFromScreen(DiagLiteVo diagnose, Boolean isMain, CatsReferralForClinicalNotesVo referral)
{
    if(diagnose == null)
        return null;

    PatientDiagnosisApptDetailVo patientDiagnose = new PatientDiagnosisApptDetailVo();
    patientDiagnose.setAppointment(form.getGlobalContext().RefMan.getAppointmentForPatientDiagnosisOrProcedures());

    patientDiagnose.setDiagnosis(diagnose);
    patientDiagnose.setDiagnosisDescription(diagnose.getDiagnosisName());
    patientDiagnose.setSourceofInformation(SourceofInformation.CLINICALCONTACT);
    patientDiagnose.setAuthoringInfo(form.ccAuthoringInfo().getValue());
    patientDiagnose.setEpisodeOfCare(referral.getCareContext().getEpisodeOfCare());
    patientDiagnose.setCareContext(referral.getCareContext());
    patientDiagnose.setDiagnosedDate(new PartialDate(new Date()));

    setCsPrimaryDiagnosis(patientDiagnose, isMain);

    return patientDiagnose;
}
项目:openMAXIMS    文件:Logic.java   
private void populateSelectedDiagnosisGrid(DiagLiteVoCollection diagnosis, HashMap<DiagLiteVo, Integer> diagCollection)
{
    form.dyngrdDiagnosis().getRows().clear();

    if(diagnosis == null)
        return;

    for(DiagLiteVo diagnose : diagnosis)
    {
        if(diagnose == null)
            continue;

        Integer numberOfSameDiagnosis = diagCollection.get(diagnose);

        for(int i=0; i<numberOfSameDiagnosis; i++)
        {
            addSelectedDiagnoseRow(diagnose);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdCoMorbitiesMutableComboBoxSelected(int column, grdCoMorbitiesRow row, Object value) throws PresentationLogicException 
{
    if(value instanceof DiagLiteVo)
    {
        PatientDiagnosisLiteVo patDiag = new PatientDiagnosisLiteVo();
        patDiag.setIsComorbidity(true);
        patDiag.setDiagnosis((DiagLiteVo) value);
        patDiag.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        patDiag.setEpisodeOfCare(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare()); //WDEV-15293
        patDiag.setSourceofInformation(SourceofInformation.CORRESPONDENCE);
        patDiag.setDiagnosisDescription(((DiagLiteVo) value).getDiagnosisNameIsNotNull() ? ((DiagLiteVo) value).getDiagnosisName() : "");

        row.setValue(patDiag);
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColumnSelect())
        {
            if (form.grdDiagnosis().getRows().get(i).getValue() instanceof PatientDiagnosisListVo)
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo((PatientDiagnosisListVo)form.grdDiagnosis().getRows().get(i).getValue());
            else if (form.grdDiagnosis().getRows().get(i).getValue() instanceof DiagLiteVo)
            {
                PatientDiagnosisListVo voPD = new PatientDiagnosisListVo();
                voPD.setDiagnosis((DiagLiteVo) form.grdDiagnosis().getRows().get(i).getValue());
                voPD.setDiagnosisDescription( ((DiagLiteVo)form.grdDiagnosis().getRows().get(i).getValue()).getDiagnosisName());
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo(voPD);
            }
        }
    }

    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
private PatientAbsentDiagnosisVo populateAbsentDiagnosisData(grdChecklistRow row) 
{
    PatientAbsentDiagnosisVo voPatientAbsentDiagnosis = new PatientAbsentDiagnosisVo();
    DiagLiteVo diagnosis = null;

    if (row.getValue() != null)
    {
        if (row.getValue() instanceof PatientDiagnosisVo)
        {
            diagnosis = (((PatientDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof PatientAbsentDiagnosisVo)
        {
            diagnosis = (((PatientAbsentDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof DiagLiteVo)
        {
            diagnosis =((DiagLiteVo) row.getValue());
        }
    }

    voPatientAbsentDiagnosis.setDiagnosis(diagnosis);
    voPatientAbsentDiagnosis.setStatus(row.getColSelect());
    voPatientAbsentDiagnosis.setSourceofInformation(row.getColSource());
    return voPatientAbsentDiagnosis;
}
项目:openMAXIMS    文件:Logic.java   
private void setInstanceRowDetails(grdDiagnosisRow row, DiagLiteVo vo)
{
    row.setcolDiagnsosisName(vo.getDiagnosisName());

    row.setValue(vo);           
    if (vo.getIsActiveIsNotNull() && !vo.getIsActive().booleanValue())
    {
        row.setBold(false);
        row.setTextColor(Color.Gray);
    }
    else
    {
        row.setBold(true);
        row.setTextColor(Color.Default);
    }   
}
项目:openMAXIMS    文件:Logic.java   
private PatientDiagnosisApptDetailVo populatePatientDiagnoseFromScreen(DiagLiteVo diagnose, Boolean isMain, CatsReferralForClinicalNotesVo referral)
{
    if(diagnose == null)
        return null;

    PatientDiagnosisApptDetailVo patientDiagnose = new PatientDiagnosisApptDetailVo();
    patientDiagnose.setAppointment(form.getGlobalContext().RefMan.getAppointmentForPatientDiagnosisOrProcedures());

    patientDiagnose.setDiagnosis(diagnose);
    patientDiagnose.setDiagnosisDescription(diagnose.getDiagnosisName());
    patientDiagnose.setSourceofInformation(SourceofInformation.CLINICALCONTACT);
    patientDiagnose.setAuthoringInfo(form.ccAuthoringInfo().getValue());
    patientDiagnose.setEpisodeOfCare(referral.getCareContext().getEpisodeOfCare());
    patientDiagnose.setCareContext(referral.getCareContext());
    patientDiagnose.setDiagnosedDate(new PartialDate(new Date()));

    setCsPrimaryDiagnosis(patientDiagnose, isMain);

    return patientDiagnose;
}
项目:openMAXIMS    文件:Logic.java   
private void populateSelectedDiagnosisGrid(DiagLiteVoCollection diagnosis, HashMap<DiagLiteVo, Integer> diagCollection)
{
    form.dyngrdDiagnosis().getRows().clear();

    if(diagnosis == null)
        return;

    for(DiagLiteVo diagnose : diagnosis)
    {
        if(diagnose == null)
            continue;

        Integer numberOfSameDiagnosis = diagCollection.get(diagnose);

        for(int i=0; i<numberOfSameDiagnosis; i++)
        {
            addSelectedDiagnoseRow(diagnose);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdCoMorbitiesMutableComboBoxSelected(int column, grdCoMorbitiesRow row, Object value) throws PresentationLogicException 
{
    if(value instanceof DiagLiteVo)
    {
        PatientDiagnosisLiteVo patDiag = new PatientDiagnosisLiteVo();
        patDiag.setIsComorbidity(true);
        patDiag.setDiagnosis((DiagLiteVo) value);
        patDiag.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        patDiag.setEpisodeOfCare(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare()); //WDEV-15293
        patDiag.setSourceofInformation(SourceofInformation.CORRESPONDENCE);
        patDiag.setDiagnosisDescription(((DiagLiteVo) value).getDiagnosisNameIsNotNull() ? ((DiagLiteVo) value).getDiagnosisName() : "");

        row.setValue(patDiag);
    }

}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColumnSelect())
        {
            if (form.grdDiagnosis().getRows().get(i).getValue() instanceof PatientDiagnosisListVo)
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo((PatientDiagnosisListVo)form.grdDiagnosis().getRows().get(i).getValue());
            else if (form.grdDiagnosis().getRows().get(i).getValue() instanceof DiagLiteVo)
            {
                PatientDiagnosisListVo voPD = new PatientDiagnosisListVo();
                voPD.setDiagnosis((DiagLiteVo) form.grdDiagnosis().getRows().get(i).getValue());
                voPD.setDiagnosisDescription( ((DiagLiteVo)form.grdDiagnosis().getRows().get(i).getValue()).getDiagnosisName());
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo(voPD);
            }
        }
    }

    engine.close(DialogResult.OK);
}
项目:openMAXIMS    文件:Logic.java   
private PatientAbsentDiagnosisVo populateAbsentDiagnosisData(grdChecklistRow row) 
{
    PatientAbsentDiagnosisVo voPatientAbsentDiagnosis = new PatientAbsentDiagnosisVo();
    DiagLiteVo diagnosis = null;

    if (row.getValue() != null)
    {
        if (row.getValue() instanceof PatientDiagnosisVo)
        {
            diagnosis = (((PatientDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof PatientAbsentDiagnosisVo)
        {
            diagnosis = (((PatientAbsentDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof DiagLiteVo)
        {
            diagnosis =((DiagLiteVo) row.getValue());
        }
    }

    voPatientAbsentDiagnosis.setDiagnosis(diagnosis);
    voPatientAbsentDiagnosis.setStatus(row.getColSelect());
    voPatientAbsentDiagnosis.setSourceofInformation(row.getColSource());
    return voPatientAbsentDiagnosis;
}
项目:openmaxims-linux    文件:Logic.java   
private void setInstanceRowDetails(grdDiagnosisRow row, DiagLiteVo vo)
{
    row.setcolDiagnsosisName(vo.getDiagnosisName());

    row.setValue(vo);           
    if (vo.getIsActiveIsNotNull() && !vo.getIsActive().booleanValue())
    {
        row.setBold(false);
        row.setTextColor(Color.Gray);
    }
    else
    {
        row.setBold(true);
        row.setTextColor(Color.Default);
    }   
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    for (int i = 0 ; i < form.grdDiagnosis().getRows().size() ; i++)
    {
        if (form.grdDiagnosis().getRows().get(i).getColumnSelect())
        {
            if (form.grdDiagnosis().getRows().get(i).getValue() instanceof PatientDiagnosisListVo)
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo((PatientDiagnosisListVo)form.grdDiagnosis().getRows().get(i).getValue());
            else if (form.grdDiagnosis().getRows().get(i).getValue() instanceof DiagLiteVo)
            {
                PatientDiagnosisListVo voPD = new PatientDiagnosisListVo();
                voPD.setDiagnosis((DiagLiteVo) form.grdDiagnosis().getRows().get(i).getValue());
                voPD.setDiagnosisDescription( ((DiagLiteVo)form.grdDiagnosis().getRows().get(i).getValue()).getDiagnosisName());
                form.getGlobalContext().Clinical.setSelectedPatientDiagnosisListVo(voPD);
            }
        }
    }

    engine.close(DialogResult.OK);
}
项目:openmaxims-linux    文件:Logic.java   
private PatientAbsentDiagnosisVo populateAbsentDiagnosisData(grdChecklistRow row) 
{
    PatientAbsentDiagnosisVo voPatientAbsentDiagnosis = new PatientAbsentDiagnosisVo();
    DiagLiteVo diagnosis = null;

    if (row.getValue() != null)
    {
        if (row.getValue() instanceof PatientDiagnosisVo)
        {
            diagnosis = (((PatientDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof PatientAbsentDiagnosisVo)
        {
            diagnosis = (((PatientAbsentDiagnosisVo)row.getValue()).getDiagnosis());
        }
        else if (row.getValue() instanceof DiagLiteVo)
        {
            diagnosis =((DiagLiteVo) row.getValue());
        }
    }

    voPatientAbsentDiagnosis.setDiagnosis(diagnosis);
    voPatientAbsentDiagnosis.setStatus(row.getColSelect());
    voPatientAbsentDiagnosis.setSourceofInformation(row.getColSource());
    return voPatientAbsentDiagnosis;
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException
{
    if(form.grdSelectedItems().getRows().size() == 0)
    {
        engine.showMessage("No items were selected.");
        return;
    }

    ProcedureLiteVoCollection procColl = new ProcedureLiteVoCollection();
    DiagLiteVoCollection diagColl = new DiagLiteVoCollection();
    ClinicalProblemShortVoCollection probColl = new ClinicalProblemShortVoCollection();
    VaccineLiteVoCollection vaccColl = new VaccineLiteVoCollection();

    for (int j = 0; j < form.grdSelectedItems().getRows().size(); j++)
    {
        grdSelectedItemsRow selRow = form.grdSelectedItems().getRows().get(j);

        if(selRow.getValue() instanceof ProcedureLiteVo)
            procColl.add((ProcedureLiteVo)selRow.getValue());
        else if(selRow.getValue() instanceof DiagLiteVo)
            diagColl.add((DiagLiteVo)selRow.getValue());
        else if(selRow.getValue() instanceof ClinicalProblemShortVo)
            probColl.add((ClinicalProblemShortVo)selRow.getValue());
        else if(selRow.getValue() instanceof VaccineLiteVo)
            vaccColl.add((VaccineLiteVo) selRow.getValue());
    }

    if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("P"))
        form.getGlobalContext().Clinical.setSelectedProcedures(procColl);
    else if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("D"))
        form.getGlobalContext().Clinical.setSelectedDiagnosis(diagColl);
    else if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("PR"))
        form.getGlobalContext().Clinical.setSelectedProblems(probColl);
    else if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("VACCINE"))
        form.getGlobalContext().Clinical.CCISearch.setSelectedVaccines(vaccColl);

    engine.close(DialogResult.OK);
}
项目:AvoinApotti    文件:DiagnosisProceduresSearchImpl.java   
public DiagLiteVoCollection listDiagnosis(String filter) throws DomainInterfaceException
{
    DiagLiteVoCollection coll = new DiagLiteVoCollection();
    IGenericItem[] items = listIGenericItems(filter, CciType.DIAGNOSIS, true);
    if (items != null)
    {
        for ( int i = 0; i < items.length; i++)
        {
            coll.add((DiagLiteVo)items[i]);
        }

        return coll;
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void removeItem()
{
    if(!form.getLocalContext().getCurrentConfigIsNotNull())
        return;

    Object value = form.treConfig().getValue();

    PMHChecklistConfigVo config = form.getLocalContext().getCurrentConfig();

    if(value instanceof DiagLiteVo)
    {
        for(int i = 0; i < config.getDiagnosisList().size(); i++)
        {
            if(config.getDiagnosisList().get(i).getDiagnosis().equals(value))
            {
                config.getDiagnosisList().remove(i);
                break;
            }
        }
    }
    else if(value instanceof ProcedureLiteVo)
    {
        for(int i = 0; i < config.getProcedureList().size(); i++)
        {
            if(config.getProcedureList().get(i).getProcedure().equals(value))
            {
                config.getProcedureList().remove(i);
                break;
            }
        }
    }

    form.getLocalContext().setCurrentConfig(config);
    form.treConfig().getNodes().remove(form.treConfig().getSelectedNode());
    displaySubmenus();
}
项目:AvoinApotti    文件:Logic.java   
private void updateContextMenuState()
{
    boolean bView = form.getMode().equals(FormMode.VIEW);

    if (form.treConfig().getSelectedNode() == null)
    {
        form.getContextMenus().hideAllPMHCheckListMenuItems();
        return;
    }

    boolean bDiagnosisAddMenuVisible = (bView == false) && 
      (form.treConfig().getSelectedNode().isEnabled()) &&
      (form.treConfig().getSelectedNode().getText().equals("Diagnoses")); 

    boolean bProcedureAddMenuVisible = (bView == false) && 
      (form.treConfig().getSelectedNode().isEnabled()) &&
      (form.treConfig().getSelectedNode().getText().equals("Procedures")); 

    boolean bRemoveMenuVisible = (bView == false)  && 
                                 (form.treConfig().getSelectedNode() != null) &&
                                 (form.treConfig().getSelectedNode().isEnabled());

    bRemoveMenuVisible = bRemoveMenuVisible && 
                        (form.treConfig().getSelectedNode().getValue() instanceof DiagLiteVo 
                        || form.treConfig().getSelectedNode().getValue() instanceof ProcedureLiteVo);                                           

    form.getContextMenus().getPMHCheckListAddDiagnosisItem().setVisible(bDiagnosisAddMenuVisible);
    form.getContextMenus().getPMHCheckListAddProcedureItem().setVisible(bProcedureAddMenuVisible);
    form.getContextMenus().getPMHCheckListRemoveItem().setVisible(bRemoveMenuVisible);


}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to populate ICP Diagnosis
 * 
 * @param diagnosisCollection
 */
private void populateICPDiagnosis(DiagLiteVoCollection diagnosisCollection)
{
    // Clear diagnosis
    form.ctnConfiguration().lyrICPTabs().ICP().qmbICPDiagnosis().clear();

    // Terminate function if the list is null
    if (diagnosisCollection == null)
        return;

    for (DiagLiteVo diagnose : diagnosisCollection)
    {
        // Skip null diagnose
        if (diagnose == null)
            continue;

        form.ctnConfiguration().lyrICPTabs().ICP().qmbICPDiagnosis().newRow(diagnose, diagnose.getDiagnosisName());
    }

    if (diagnosisCollection.size() == 1)
    {
        form.ctnConfiguration().lyrICPTabs().ICP().qmbICPDiagnosis().setValue(diagnosisCollection.get(0));
    }
    else
    {
        form.ctnConfiguration().lyrICPTabs().ICP().qmbICPDiagnosis().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private ReferralClinicalNotesVo populateReferralClinicalNotes(ReferralClinicalNotesVo referralClinicalNotes)
{
    if(referralClinicalNotes == null)
        referralClinicalNotes = new ReferralClinicalNotesVo();

    if(referralClinicalNotes.getCatsReferral() == null)
        referralClinicalNotes.setCatsReferral(form.getGlobalContext().RefMan.getCatsReferral());

    if(referralClinicalNotes.getDiagnosis() == null)
        referralClinicalNotes.setDiagnosis(new PatientDiagnosisApptDetailVoCollection());

    CatsReferralForClinicalNotesVo referral = domain.getReferral(form.getGlobalContext().RefMan.getCatsReferral());

    for(int i=0; i<form.dyngrdDiagnosis().getRows().size(); i++)
    {
        if(form.dyngrdDiagnosis().getRows().get(i).getValue() instanceof DiagLiteVo)
        {
            PatientDiagnosisApptDetailVo patientDiagnose = populatePatientDiagnoseFromScreen((DiagLiteVo) form.dyngrdDiagnosis().getRows().get(i).getValue(), (Boolean) form.dyngrdDiagnosis().getRows().get(i).getCells().get(getSelectedColumn(COLMAIN)).getValue(), referral);

            CSPrimaryDiagnosisForClinicalNotesVo primary = getPrimaryDiagnosisRecord(patientDiagnose);

            if(primary != null)
            {
                clearPreviousPrimaryDiagnosis(referralClinicalNotes, patientDiagnose);
            }

            referralClinicalNotes.getDiagnosis().add(patientDiagnose);
        }
    }

    return referralClinicalNotes;
}
项目:AvoinApotti    文件:Logic.java   
private String getListOfSelectedDiagnosis()
{
    String ids = "";

    for(int i=0; i<form.dyngrdDiagnosis().getRows().size(); i++)
    {
        if(form.dyngrdDiagnosis().getRows().get(i).getValue() instanceof DiagLiteVo)
        {
            ids += (i>0 ? "," : "") + ((DiagLiteVo) form.dyngrdDiagnosis().getRows().get(i).getValue()).getID_Diagnosis();
        }
    }

    return ids.length() > 0 ? ids : null;
}
项目:AvoinApotti    文件:Logic.java   
private void sortSelectedDiagnosisGrid()
{
    if(form.dyngrdDiagnosis().getRows().size() == 0)
        return;

    DiagLiteVoCollection diagnosis = new DiagLiteVoCollection();
    HashMap<DiagLiteVo, Integer> diagCollection = new HashMap<DiagLiteVo, Integer>(); 

    for(int i=0; i<form.dyngrdDiagnosis().getRows().size(); i++)
    {
        if(form.dyngrdDiagnosis().getRows().get(i).getValue() instanceof DiagLiteVo)
        {
            DiagLiteVo diag = (DiagLiteVo) form.dyngrdDiagnosis().getRows().get(i).getValue();

            diagnosis.add(diag);

            if(diagCollection.containsKey(diag))
            {
                Integer diagValue = diagCollection.get(diag);
                diagCollection.put(diag, ++diagValue);
            }
            else
            {
                diagCollection.put(diag, 1);
            }
        }
    }

    diagnosis.sort();

    populateSelectedDiagnosisGrid(diagnosis, diagCollection);
}
项目:AvoinApotti    文件:Logic.java   
private DynamicGridRow addSelectedDiagnoseRow(DiagLiteVo diagnose)
{
    if(diagnose == null)
        return null;

    DynamicGridRow row = form.dyngrdDiagnosis().getRows().newRow();

    DynamicGridCell cell = row.getCells().newCell(getSelectedColumn(COLDIAGNOSE), DynamicCellType.LABEL);
    cell.setValue(diagnose.getDiagnosisName());
    cell.setIdentifier(diagnose.getDiagnosisName());
    cell.setTooltip(diagnose.getDiagnosisName());
    cell.setReadOnly(true);

    cell = row.getCells().newCell(getSelectedColumn(COLMAIN), DynamicCellType.BOOL);
    cell.setAutoPostBack(true);

    if(diagnose.equals(form.getLocalContext().getMainDiagnosis()) && !isDiagnosisAlreadyAdded(diagnose))
    {
        cell.setValue(true);
    }

    cell = row.getCells().newCell(getSelectedColumn(COLIMAGE), DynamicCellType.IMAGEBUTTON);
    cell.setValue(form.getImages().Core.Minus);
    cell.setTooltip("Remove Diagnosis");
    cell.setAutoPostBack(true);

    row.setValue(diagnose);

    return row;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isDiagnosisAlreadyAdded(DiagLiteVo diagnose)
{
    if(diagnose == null)
        return false;

    for(int i=0; i<form.dyngrdDiagnosis().getRows().size(); i++)
    {
        if(diagnose.equals(form.dyngrdDiagnosis().getRows().get(i).getValue()))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdDiagnosisCellValueChanged(DynamicGridCell cell)
{
    if(cell.getColumn().equals(getSelectedColumn(COLMAIN)) && cell.getValue() instanceof Boolean && (Boolean) cell.getValue())
    {
        if(cell.getRow().getValue() instanceof DiagLiteVo)
            form.getLocalContext().setMainDiagnosis((DiagLiteVo) cell.getRow().getValue());

        clearOtherRowsCheck(cell.getRow());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addDiagnosisTwice()
{
    if(form.dyngrdDiagnosis().getValue() instanceof DiagLiteVo)
    {
        addSelectedDiagnoseRow((DiagLiteVo) form.dyngrdDiagnosis().getValue());

        sortSelectedDiagnosisGrid();
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdDiagnosisCellButtonClicked(DynamicGridCell cell)
{
    if(cell.getColumn().equals(getSelectedColumn(COLIMAGE)) && cell.getRow().getValue() instanceof DiagLiteVo)
    {
        form.dyngrdDiagnosis().getRows().remove(cell.getRow());
    }

    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
private PatientDiagnosisForNursingNotesVo getPatientDiagnosis(DiagLiteVo value)
{
    PatientDiagnosisForNursingNotesVo result = new PatientDiagnosisForNursingNotesVo();
    result.setDiagnosis(value);
    result.setDiagnosisDescription(value.getDiagnosisName());
    result.setEpisodeOfCare(form.getGlobalContext().Core.getCurrentCareContext()!=null?form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare():null);
    result.setIsComorbidity(true);
    result.setSourceofInformation(SourceofInformation.CLINICALCONTACT);
    return result;
}
项目:AvoinApotti    文件:Logic.java   
private grdPMHChecklistRow getDiagnosisRowFromCheckList(DiagLiteVo diagnosis)
{
    for(int i = 0; i < form.grdPMHChecklist().getRows().get(0).getRows().size(); i++)
    {
        grdPMHChecklistRow row = form.grdPMHChecklist().getRows().get(0).getRows().get(i);

        if(row.getValue() != null && row.getValue() instanceof DiagLiteVo && row.getValue().equals(diagnosis))
            return row;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDiagnosisVo getExistingPatientDiagnosisOrCreateNew(DiagLiteVo voDiagnosis)
{
    PatientDiagnosisVoCollection collDiag = form.getLocalContext().getPatientDiagnosis();

    if(collDiag == null)
        return new PatientDiagnosisVo();

    for(int i = 0; i < collDiag.size(); i++)
    {
        if(collDiag.get(i).getDiagnosis().getID_Diagnosis().equals(voDiagnosis.getID_Diagnosis()))
            return collDiag.get(i);
    }

    return new PatientDiagnosisVo();
}
项目:AvoinApotti    文件:Logic.java   
private DiagLiteVo getDiagnosis(ValueObject voItem) 
{
    DiagLiteVo voDiagnosis = null;

    if (voItem instanceof DiagnosisHotlistItemVo)
    {
        DiagnosisHotlistItemVo hotlistItem = (DiagnosisHotlistItemVo)voItem;
        voDiagnosis = hotlistItem.getDiagnosis();           
    }   
    else if (voItem instanceof DiagLiteVo)
        voDiagnosis = ((DiagLiteVo)voItem);

    return voDiagnosis;
}
项目:AvoinApotti    文件:Logic.java   
private void addItemRow(Object item) 
{
    if (item instanceof AllergenVo)
    {
        AllergenVo voAllergen = (AllergenVo)item;
        form.qmbCodingItem().newRow(voAllergen, voAllergen.getAllergenName(), voAllergen.getIsActiveIsNotNull() && !voAllergen.getIsActive().booleanValue() ? Color.Gray : Color.Default);
    }

    else if (item instanceof DiagLiteVo)
    {
        DiagLiteVo voDiagnosis = (DiagLiteVo)item;
        form.qmbCodingItem().newRow(voDiagnosis, voDiagnosis.getDiagnosisName(), voDiagnosis.getIsActiveIsNotNull() && !voDiagnosis.getIsActive().booleanValue() ? Color.Gray : Color.Default);
    }                               

    else if (item instanceof ClinicalProblemShortVo)
    {
        ClinicalProblemShortVo voProblem = (ClinicalProblemShortVo)item;
        form.qmbCodingItem().newRow(voProblem, voProblem.getPCName(), voProblem.getIsActiveIsNotNull() && !voProblem.getIsActive().booleanValue() ? Color.Gray : Color.Default);                    
    }

    else if (item instanceof ProcedureLiteVo)               
    {               
        ProcedureLiteVo voProcedure = (ProcedureLiteVo)item;
        form.qmbCodingItem().newRow(voProcedure, voProcedure.getProcedureName(), voProcedure.getIsActiveIsNotNull() && !voProcedure.getIsActive().booleanValue() ? Color.Gray : Color.Default);
    }

    else if (item instanceof MedicationLiteVo)
    {
        MedicationLiteVo voMedication = (MedicationLiteVo)item;
        form.qmbCodingItem().newRow(voMedication, voMedication.getMedicationName(), voMedication.getIsActiveIsNotNull() && !voMedication.getIsActive().booleanValue() ? Color.Gray : Color.Default);
    }

    else if (item instanceof CancerImagingEventLiteVo)
    {
        CancerImagingEventLiteVo voCIE = (CancerImagingEventLiteVo)item;
        form.qmbCodingItem().newRow(voCIE, voCIE.getImagingEventName(), voCIE.getIsActiveIsNotNull() && !voCIE.getIsActive().booleanValue() ? Color.Gray : Color.Default);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void checkInstanceType(CodingItemType lkpCodingType, ValueObject vo) throws CodingRuntimeException
{
    if (lkpCodingType == null || vo == null)
        return;

    if (lkpCodingType.equals(CodingItemType.ALLERGY))               
    {
        if (!(vo instanceof AllergenVo))
            throw new CodingRuntimeException("Lookup Type / Vo Mismatch : Allergen lookup and non AllergenVo");                         
    }
    else if (lkpCodingType.equals(CodingItemType.DIAGNOSIS) || lkpCodingType.equals(CodingItemType.FAMILY_HISTORY))  
    {
        if (!(vo instanceof DiagLiteVo))
            throw new CodingRuntimeException("Lookup Type / Vo Mismatch : Diagnosis lookup and non DiagLiteVo");

    }
    else if (lkpCodingType.equals(CodingItemType.PROBLEM))      
    {
        if (!(vo instanceof ClinicalProblemShortVo))
            throw new CodingRuntimeException("Lookup Type / Vo Mismatch : Problem lookup and non ClinicalProblemShortVo");
    }
    else if (lkpCodingType.equals(CodingItemType.PROCEDURE))
    {
        if (!(vo instanceof ProcedureLiteVo))
            throw new CodingRuntimeException("Lookup Type / Vo Mismatch : Procedure lookup and non ProcedureLiteVo");
    }
    else if (lkpCodingType.equals(CodingItemType.IMAGING_EVENT))
    {
        if (!(vo instanceof CancerImagingEventLiteVo))
            throw new CodingRuntimeException("Lookup Type / Vo Mismatch : Cancer Imaging Event lookup and non ProcedureLiteVo");
    }
    else if (lkpCodingType.equals(CodingItemType.MEDICATION)) 
    {
        if (!(vo instanceof MedicationLiteVo))
            throw new CodingRuntimeException("Lookup Type / Vo Mismatch : Medication lookup and non MedicationLiteVo");

    }

}