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

项目:AvoinApotti    文件:Logic.java   
private AllergenVoCollection getUsedAllergens()
{
    AllergenVoCollection usedAllergens = new AllergenVoCollection();

    for (int i = 0; i < form.grdAlergies().getRows().size(); i++)
    {
        usedAllergens.add((AllergenVo) form.grdAlergies().getRows().get(i).getAllergy().getValue());
    }

    if (usedAllergens.size() > 0)
    {
        return usedAllergens;
    }
    else
    {
        return null;
    }

}
项目:AvoinApotti    文件:Logic.java   
private AllergenVo getGenericRowAllergen(boolean bAll)
{
    AllergenVo voAllergen = new AllergenVo();
    if (bAll)
    {
        voAllergen.setID_Allergen(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voAllergen.setAllergenName(SEARCH_ALL_ITEM_SELECTED + "Allergies");
    }
    else
    {
        voAllergen.setID_Allergen(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voAllergen.setAllergenName(NO_CODE_ITEM_SELECTED);
    }   

    return voAllergen;
}
项目:AvoinApotti    文件:Logic.java   
protected void onCustomControlCodingItemValueChanged() throws PresentationLogicException 
{
    AllergenVo voAllergen = (AllergenVo) form.ctnDetails().customControlCodingItem().getSelectedItem();
    form.ctnDetails().cmbType().setValue(voAllergen != null ? voAllergen.getAllergenType() : null);
    fillReactionCombo();

    if( ! ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("WST"))
        return;

    if (form.getMode().equals(FormMode.EDIT))
        form.ctnDetails().cmbSource().setEnabled(true);

    if (form.ctnDetails().cmbSource().getValue() != null
        &&form.ctnDetails().cmbSource().getValue().equals(SourceofInformation.PAS))
            form.ctnDetails().cmbSource().setValue(null);

    if (voAllergen != null)
        defaultSourceCombo(voAllergen);
}
项目:AvoinApotti    文件:Logic.java   
private void defaultSourceCombo(AllergenVo voAllergen)
{

    if (form.getMode().equals(FormMode.EDIT))
    {

        if (voAllergen != null
            && voAllergen.getTaxonomyMapIsNotNull()
            && voAllergen.getTaxonomyMap().size() > 0)
        {   
            for ( int i = 0 ; i < voAllergen.getTaxonomyMap().size() ; i++)
            {
                if (voAllergen.getTaxonomyMap().get(i).getTaxonomyCodeIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyCode().equals("ALLE")
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyName().getText().equals("PAS"))
                {
                    form.ctnDetails().cmbSource().setEnabled(false);
                    form.ctnDetails().cmbSource().setValue(SourceofInformation.PAS);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setInstanceRowDetails(grdAllergenRow row, AllergenVo vo)
{
    row.setcolAllergenName(vo.getAllergenName());

    if (vo.getAllergenType() != null)
        row.setcolAllergenType(vo.getAllergenType().getText());

    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 AllergenVoCollection getUsedAllergens()
{
    AllergenVoCollection usedAllergens = new AllergenVoCollection();

    for (int i = 0; i < form.grdAlergies().getRows().size(); i++)
    {
        usedAllergens.add((AllergenVo) form.grdAlergies().getRows().get(i).getAllergy().getValue());
    }

    if (usedAllergens.size() > 0)
    {
        return usedAllergens;
    }
    else
    {
        return null;
    }

}
项目:openMAXIMS    文件:Logic.java   
private AllergenVo getGenericRowAllergen(boolean bAll)
{
    AllergenVo voAllergen = new AllergenVo();
    if (bAll)
    {
        voAllergen.setID_Allergen(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voAllergen.setAllergenName(SEARCH_ALL_ITEM_SELECTED + "Allergies");
    }
    else
    {
        voAllergen.setID_Allergen(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voAllergen.setAllergenName(NO_CODE_ITEM_SELECTED);
    }   

    return voAllergen;
}
项目:openMAXIMS    文件:Logic.java   
protected void onCustomControlCodingItemValueChanged() throws PresentationLogicException 
{
    AllergenVo voAllergen = (AllergenVo) form.ctnDetails().customControlCodingItem().getSelectedItem();
    form.ctnDetails().cmbType().setValue(voAllergen != null ? voAllergen.getAllergenType() : null);
    fillReactionCombo();

    if( ! ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("WST"))
        return;

    if (form.getMode().equals(FormMode.EDIT))
        form.ctnDetails().cmbSource().setEnabled(true);

    if (form.ctnDetails().cmbSource().getValue() != null
        &&form.ctnDetails().cmbSource().getValue().equals(SourceofInformation.PAS))
            form.ctnDetails().cmbSource().setValue(null);

    if (voAllergen != null)
        defaultSourceCombo(voAllergen);
}
项目:openMAXIMS    文件:Logic.java   
private void defaultSourceCombo(AllergenVo voAllergen)
{

    if (form.getMode().equals(FormMode.EDIT))
    {

        if (voAllergen != null
            && voAllergen.getTaxonomyMapIsNotNull()
            && voAllergen.getTaxonomyMap().size() > 0)
        {   
            for ( int i = 0 ; i < voAllergen.getTaxonomyMap().size() ; i++)
            {
                if (voAllergen.getTaxonomyMap().get(i).getTaxonomyCodeIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyCode().equals("ALLE")
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyName().getText().equals("PAS"))
                {
                    form.ctnDetails().cmbSource().setEnabled(false);
                    form.ctnDetails().cmbSource().setValue(SourceofInformation.PAS);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private AllergenVoCollection getUsedAllergens()
{
    AllergenVoCollection usedAllergens = new AllergenVoCollection();

    for (int i = 0; i < form.grdAlergies().getRows().size(); i++)
    {
        usedAllergens.add((AllergenVo) form.grdAlergies().getRows().get(i).getAllergy().getValue());
    }

    if (usedAllergens.size() > 0)
    {
        return usedAllergens;
    }
    else
    {
        return null;
    }

}
项目:openMAXIMS    文件:Logic.java   
private AllergenVo getGenericRowAllergen(boolean bAll)
{
    AllergenVo voAllergen = new AllergenVo();
    if (bAll)
    {
        voAllergen.setID_Allergen(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voAllergen.setAllergenName(SEARCH_ALL_ITEM_SELECTED + "Allergies");
    }
    else
    {
        voAllergen.setID_Allergen(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voAllergen.setAllergenName(NO_CODE_ITEM_SELECTED);
    }   

    return voAllergen;
}
项目:openMAXIMS    文件:Logic.java   
protected void onCustomControlCodingItemValueChanged() throws PresentationLogicException 
{
    AllergenVo voAllergen = (AllergenVo) form.ctnDetails().customControlCodingItem().getSelectedItem();
    form.ctnDetails().cmbType().setValue(voAllergen != null ? voAllergen.getAllergenType() : null);
    fillReactionCombo();

    if( ! ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("WST"))
        return;

    if (form.getMode().equals(FormMode.EDIT))
        form.ctnDetails().cmbSource().setEnabled(true);

    if (form.ctnDetails().cmbSource().getValue() != null
        &&form.ctnDetails().cmbSource().getValue().equals(SourceofInformation.PAS))
            form.ctnDetails().cmbSource().setValue(null);

    if (voAllergen != null)
        defaultSourceCombo(voAllergen);
}
项目:openMAXIMS    文件:Logic.java   
private void defaultSourceCombo(AllergenVo voAllergen)
{

    if (form.getMode().equals(FormMode.EDIT))
    {

        if (voAllergen != null
            && voAllergen.getTaxonomyMapIsNotNull()
            && voAllergen.getTaxonomyMap().size() > 0)
        {   
            for ( int i = 0 ; i < voAllergen.getTaxonomyMap().size() ; i++)
            {
                if (voAllergen.getTaxonomyMap().get(i).getTaxonomyCodeIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyCode().equals("ALLE")
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyName().getText().equals("PAS"))
                {
                    form.ctnDetails().cmbSource().setEnabled(false);
                    form.ctnDetails().cmbSource().setValue(SourceofInformation.PAS);
                }
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private AllergenVo getGenericRowAllergen(boolean bAll)
{
    AllergenVo voAllergen = new AllergenVo();
    if (bAll)
    {
        voAllergen.setID_Allergen(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voAllergen.setAllergenName(SEARCH_ALL_ITEM_SELECTED + "Allergies");
    }
    else
    {
        voAllergen.setID_Allergen(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voAllergen.setAllergenName(NO_CODE_ITEM_SELECTED);
    }   

    return voAllergen;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onCustomControlCodingItemValueChanged() throws PresentationLogicException 
{
    AllergenVo voAllergen = (AllergenVo) form.ctnDetails().customControlCodingItem().getSelectedItem();
    form.ctnDetails().cmbType().setValue(voAllergen != null ? voAllergen.getAllergenType() : null);
    fillReactionCombo();

    if( ! ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("WST"))
        return;

    if (form.getMode().equals(FormMode.EDIT))
        form.ctnDetails().cmbSource().setEnabled(true);

    if (form.ctnDetails().cmbSource().getValue() != null
        &&form.ctnDetails().cmbSource().getValue().equals(SourceofInformation.PAS))
            form.ctnDetails().cmbSource().setValue(null);

    if (voAllergen != null)
        defaultSourceCombo(voAllergen);
}
项目:openmaxims-linux    文件:Logic.java   
private void defaultSourceCombo(AllergenVo voAllergen)
{

    if (form.getMode().equals(FormMode.EDIT))
    {

        if (voAllergen != null
            && voAllergen.getTaxonomyMapIsNotNull()
            && voAllergen.getTaxonomyMap().size() > 0)
        {   
            for ( int i = 0 ; i < voAllergen.getTaxonomyMap().size() ; i++)
            {
                if (voAllergen.getTaxonomyMap().get(i).getTaxonomyCodeIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyCode().equals("ALLE")
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voAllergen.getTaxonomyMap().get(i).getTaxonomyName().getText().equals("PAS"))
                {
                    form.ctnDetails().cmbSource().setEnabled(false);
                    form.ctnDetails().cmbSource().setValue(SourceofInformation.PAS);
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientAllergyForNursingNotesVo getPatientAllergy(AllergenVo value)
{
    PatientAllergyForNursingNotesVo result = new PatientAllergyForNursingNotesVo();
    result.setAllergen(value);
    result.setAllergenDescription(value.getAllergenName());
    result.setPatient(form.getGlobalContext().Core.getPatientShort());
    result.setSourceofInformation(SourceofInformation.CLINICALCONTACT);
    //wdev-12860
    result.setIsCurrentlyActiveAllergy(new Boolean(Boolean.TRUE));
    //--------
    return result;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onGrdAlergiesMutableComboBoxSelected(int column, grdAlergiesRow row, Object value) throws PresentationLogicException 
{
    if(value instanceof AllergenVo)
    {
        PatientAllergy patAl = new PatientAllergy();
        patAl.setPatient(form.getGlobalContext().Core.getPatientShort().toPatientRefVo());
        patAl.setSourceofInformation(SourceofInformation.CORRESPONDENCE);
        patAl.setAllergen((AllergenVo) value);
        patAl.setAllergenDescription(((AllergenVo) value).getAllergenNameIsNotNull() ? ((AllergenVo) value).getAllergenName() : "");

        row.setValue(patAl);
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onCustomControlCodingItemValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    AllergenVo voAllergen = (AllergenVo) form.ctnAllergy().ccAllergyTerm().getSelectedItem();
    form.ctnAllergy().cmbAllergyType().setValue(voAllergen != null ? voAllergen.getAllergenType() : null);
    fillReactionCombo();        
}
项目: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 addGenericRow(boolean bAll) 
{               
    CodingItemType lkpCodingType = form.getLocalContext().getCodingLookupType();
    if (lkpCodingType.equals(CodingItemType.ALLERGY))       
    {
        AllergenVo voAllergen = getGenericRowAllergen(bAll);
        form.qmbCodingItem().newRow(voAllergen, voAllergen.getAllergenName(), Color.Red);                                               
    }
    else if (lkpCodingType.equals(CodingItemType.DIAGNOSIS) || lkpCodingType.equals(CodingItemType.FAMILY_HISTORY))
    {
        DiagnosisVo voDiagnosis = getGenericRowDiagnosis(bAll);
        form.qmbCodingItem().newRow(voDiagnosis, voDiagnosis.getDiagnosisName(), Color.Red);                        
    }
    else if (lkpCodingType.equals(CodingItemType.PROBLEM))      
    {
        ClinicalProblemShortVo voProblem = getGenericRowProblem(bAll);
        form.qmbCodingItem().newRow(voProblem, voProblem.getPCName(), Color.Red);                       
    }
    else if (lkpCodingType.equals(CodingItemType.PROCEDURE))
    {
        ProcedureLiteVo voProcedure = getGenericRowProcedure(bAll);
        form.qmbCodingItem().newRow(voProcedure, voProcedure.getProcedureName(), Color.Red);            
    }
    else if (lkpCodingType.equals(CodingItemType.IMAGING_EVENT))
    {
        CancerImagingEventLiteVo voImagingEvent = getGenericRowImagingEvent(bAll);
        form.qmbCodingItem().newRow(voImagingEvent, voImagingEvent.getImagingEventName(), Color.Red);           
    }
    else if (lkpCodingType.getId() == CodingItemType.MEDICATION.getId() && (form.imbSearch().isVisible() || engine.getFormName().getID() == 123215)) //WDEV-13956
    {
        MedicationLiteVo voMedication = getGenericRowMedicationConfig(bAll);
        form.qmbCodingItem().newRow(voMedication, voMedication.getMedicationName(), Color.Red);                             
    }
}
项目: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");

    }

}
项目:AvoinApotti    文件:Logic.java   
private PatientAllergy populateInstanceData(PatientAllergy voPatientAllergy)
{
    voPatientAllergy.setIsCurrentlyActiveAllergy(Boolean.TRUE);     
    voPatientAllergy.setSourceofInformation(form.cmbSourceOfInformation().getValue());          
    voPatientAllergy.setPatient(form.getGlobalContext().Core.getPatientShort());

    IClinicalCodingValue voResult = form.cc1().getValue();
    if (voResult != null)
    {
        if (voResult.getIClinicalCodingValue() instanceof AllergenVo)
        {
            voPatientAllergy.setAllergen((AllergenVo) voResult.getIClinicalCodingValue());
            voPatientAllergy.setAllergenDescription(voResult.getIClinicalCodingValueDescription());
        }
        else
        {
            throw new CodingRuntimeException("AllergenVo expected from component");
        }
    }
    else 
    {
        voPatientAllergy.setAllergenDescription(null);
    }       

    voPatientAllergy.setReactions(null);

    voPatientAllergy.setAuthoringInformation(form.cc2().getValue());

    return voPatientAllergy;
}
项目:AvoinApotti    文件:Logic.java   
private void editAllergy()
{
    form.setMode(FormMode.EDIT);

    if (form.getLocalContext().getPatientNoAllergyInfoIsNotNull()
        && form.getLocalContext().getPatientNoAllergyInfo().getAllergyStatusIsNotNull()
        && form.getLocalContext().getPatientNoAllergyInfo().getAllergyStatus().equals(PatientAllergyStatus.NOKNOWNALLERGIES))
    {
        form.ctnDetails().chkNoKnownAllergies().setVisible(true);
        form.ctnDetails().chkNoKnownAllergies().setEnabled(false);
        form.ctnDetails().chkNoKnownAllergies().setValue(true);
    }


    // these fields are not to be updated by the user
    enableAllergyDetailControls(false);

    form.ctnDetails().cmbReaction().setEnabled(true);
    form.ctnDetails().txtEffect().setEnabled(true);
    form.ctnDetails().cmbSource().setEnabled(true);
    form.ctnDetails().pdtDateIdentified().setEnabled(true);

    AllergenVo voAllergen = (AllergenVo) form.ctnDetails().customControlCodingItem().getSelectedItem();
    if (voAllergen != null)
        defaultSourceCombo(voAllergen);

    form.ctnDetails().setcustomControlAuthoringInfoEnabled(false);
    form.ctnDetails().customControlCodingItem().setEnabled(false);

    checkNoAlergyStatus( form.getLocalContext().getPatientNoAllergyInfo());

    if(form.ctnDetails().chkNoKnownAllergies().getValue())
    {
        form.ctnDetails().setcustomControlCodingItemEnabled(false);
        enableAllergyDetailControls(false);
    }


}
项目:AvoinApotti    文件:ClinicalCodingImpl.java   
public AllergenVo saveAllergenVo(AllergenVo allergenVo) throws StaleObjectException, UniqueKeyViolationException
{
    AllergenDetails detVo = new AllergenDetails(allergenVo.getID_Allergen(), allergenVo.getVersion_Allergen());
    detVo.setAllergenName(allergenVo.getAllergenName());
    detVo.setAllergenType(allergenVo.getAllergenType());
    detVo.setIsActive(allergenVo.getIsActive());
    detVo.setIsRIE(allergenVo.getIsRIE());
    String[] arrErrors = detVo.validate();
    if( arrErrors != null)
    {
        throw new DomainRuntimeException("Error saving Allergen - Allergen not vlaidated correctly");
    }
    return  saveAllergenDetails(detVo);
}
项目:openMAXIMS    文件:AllergenListImpl.java   
public AllergenVo saveAllergenVo(AllergenVo allergenVo) throws StaleObjectException, UniqueKeyViolationException
{
    AllergenDetails detVo = new AllergenDetails(allergenVo.getID_Allergen(), allergenVo.getVersion_Allergen());
    detVo.setAllergenName(allergenVo.getAllergenName());
    detVo.setAllergenType(allergenVo.getAllergenType());
    detVo.setIsActive(allergenVo.getIsActive());
    detVo.setIsRIE(allergenVo.getIsRIE());
    String[] arrErrors = detVo.validate();
    if( arrErrors != null)
    {
        throw new DomainRuntimeException("Error saving Allergen - Allergen not vlaidated correctly");
    }
    return  saveAllergenDetails(detVo);
}
项目:openMAXIMS    文件:Logic.java   
private PatientAllergyForNursingNotesVo getPatientAllergy(AllergenVo value)
{
    PatientAllergyForNursingNotesVo result = new PatientAllergyForNursingNotesVo();
    result.setAllergen(value);
    result.setAllergenDescription(value.getAllergenName());
    result.setPatient(form.getGlobalContext().Core.getPatientShort());
    result.setSourceofInformation(SourceofInformation.CLINICALCONTACT);
    //wdev-12860
    result.setIsCurrentlyActiveAllergy(new Boolean(Boolean.TRUE));
    //--------
    return result;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdAlergiesMutableComboBoxSelected(int column, grdAlergiesRow row, Object value) throws PresentationLogicException 
{
    if(value instanceof AllergenVo)
    {
        PatientAllergy patAl = new PatientAllergy();
        patAl.setPatient(form.getGlobalContext().Core.getPatientShort().toPatientRefVo());
        patAl.setSourceofInformation(SourceofInformation.CORRESPONDENCE);
        patAl.setAllergen((AllergenVo) value);
        patAl.setAllergenDescription(((AllergenVo) value).getAllergenNameIsNotNull() ? ((AllergenVo) value).getAllergenName() : "");

        row.setValue(patAl);
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCustomControlCodingItemValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    AllergenVo voAllergen = (AllergenVo) form.ctnAllergy().ccAllergyTerm().getSelectedItem();
    form.ctnAllergy().cmbAllergyType().setValue(voAllergen != null ? voAllergen.getAllergenType() : null);
    fillReactionCombo();        
}
项目:openMAXIMS    文件:Logic.java   
private void addGenericRow(boolean bAll) 
{               
    CodingItemType lkpCodingType = form.getLocalContext().getCodingLookupType();
    if (lkpCodingType.equals(CodingItemType.ALLERGY))       
    {
        AllergenVo voAllergen = getGenericRowAllergen(bAll);
        form.qmbCodingItem().newRow(voAllergen, voAllergen.getAllergenName(), Color.Red);                                               
    }
    else if (lkpCodingType.equals(CodingItemType.DIAGNOSIS) || lkpCodingType.equals(CodingItemType.FAMILY_HISTORY))
    {
        DiagnosisVo voDiagnosis = getGenericRowDiagnosis(bAll);
        form.qmbCodingItem().newRow(voDiagnosis, voDiagnosis.getDiagnosisName(), Color.Red);                        
    }
    else if (lkpCodingType.equals(CodingItemType.PROBLEM))      
    {
        ClinicalProblemShortVo voProblem = getGenericRowProblem(bAll);
        form.qmbCodingItem().newRow(voProblem, voProblem.getPCName(), Color.Red);                       
    }
    else if (lkpCodingType.equals(CodingItemType.PROCEDURE))
    {
        ProcedureLiteVo voProcedure = getGenericRowProcedure(bAll);
        form.qmbCodingItem().newRow(voProcedure, voProcedure.getProcedureName(), Color.Red);            
    }
    else if (lkpCodingType.equals(CodingItemType.IMAGING_EVENT))
    {
        CancerImagingEventLiteVo voImagingEvent = getGenericRowImagingEvent(bAll);
        form.qmbCodingItem().newRow(voImagingEvent, voImagingEvent.getImagingEventName(), Color.Red);           
    }
    else if (lkpCodingType.getId() == CodingItemType.MEDICATION.getId() && (form.imbSearch().isVisible() || engine.getFormName().getID() == 123215)) //WDEV-13956
    {
        MedicationLiteVo voMedication = getGenericRowMedicationConfig(bAll);
        form.qmbCodingItem().newRow(voMedication, voMedication.getMedicationName(), Color.Red);                             
    }
}
项目:openMAXIMS    文件: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");

    }

}
项目:openMAXIMS    文件:Logic.java   
private PatientAllergy populateInstanceData(PatientAllergy voPatientAllergy)
{
    voPatientAllergy.setIsCurrentlyActiveAllergy(Boolean.TRUE);     
    voPatientAllergy.setSourceofInformation(form.cmbSourceOfInformation().getValue());          
    voPatientAllergy.setPatient(form.getGlobalContext().Core.getPatientShort());

    IClinicalCodingValue voResult = form.cc1().getValue();
    if (voResult != null)
    {
        if (voResult.getIClinicalCodingValue() instanceof AllergenVo)
        {
            voPatientAllergy.setAllergen((AllergenVo) voResult.getIClinicalCodingValue());
            voPatientAllergy.setAllergenDescription(voResult.getIClinicalCodingValueDescription());
        }
        else
        {
            throw new CodingRuntimeException("AllergenVo expected from component");
        }
    }
    else 
    {
        voPatientAllergy.setAllergenDescription(null);
    }       

    voPatientAllergy.setReactions(null);

    voPatientAllergy.setAuthoringInformation(form.cc2().getValue());

    return voPatientAllergy;
}
项目:openMAXIMS    文件:Logic.java   
private void editAllergy()
{
    form.setMode(FormMode.EDIT);

    if (form.getLocalContext().getPatientNoAllergyInfoIsNotNull()
        && form.getLocalContext().getPatientNoAllergyInfo().getAllergyStatusIsNotNull()
        && form.getLocalContext().getPatientNoAllergyInfo().getAllergyStatus().equals(PatientAllergyStatus.NOKNOWNALLERGIES))
    {
        form.ctnDetails().chkNoKnownAllergies().setVisible(true);
        form.ctnDetails().chkNoKnownAllergies().setEnabled(false);
        form.ctnDetails().chkNoKnownAllergies().setValue(true);
    }


    // these fields are not to be updated by the user
    enableAllergyDetailControls(false);

    form.ctnDetails().cmbReaction().setEnabled(true);
    form.ctnDetails().txtEffect().setEnabled(true);
    form.ctnDetails().cmbSource().setEnabled(true);
    form.ctnDetails().pdtDateIdentified().setEnabled(true);

    AllergenVo voAllergen = (AllergenVo) form.ctnDetails().customControlCodingItem().getSelectedItem();
    if (voAllergen != null)
        defaultSourceCombo(voAllergen);

    form.ctnDetails().setcustomControlAuthoringInfoEnabled(false);
    form.ctnDetails().customControlCodingItem().setEnabled(false);

    checkNoAlergyStatus( form.getLocalContext().getPatientNoAllergyInfo());

    if(form.ctnDetails().chkNoKnownAllergies().getValue())
    {
        form.ctnDetails().setcustomControlCodingItemEnabled(false);
        enableAllergyDetailControls(false);
    }


}
项目:openMAXIMS    文件:ClinicalCodingImpl.java   
public AllergenVo saveAllergenVo(AllergenVo allergenVo) throws StaleObjectException, UniqueKeyViolationException
{
    AllergenDetails detVo = new AllergenDetails(allergenVo.getID_Allergen(), allergenVo.getVersion_Allergen());
    detVo.setAllergenName(allergenVo.getAllergenName());
    detVo.setAllergenType(allergenVo.getAllergenType());
    detVo.setIsActive(allergenVo.getIsActive());
    detVo.setIsRIE(allergenVo.getIsRIE());
    String[] arrErrors = detVo.validate();
    if( arrErrors != null)
    {
        throw new DomainRuntimeException("Error saving Allergen - Allergen not vlaidated correctly");
    }
    return  saveAllergenDetails(detVo);
}
项目:openMAXIMS    文件:Logic.java   
private PatientAllergyForNursingNotesVo getPatientAllergy(AllergenVo value)
{
    PatientAllergyForNursingNotesVo result = new PatientAllergyForNursingNotesVo();
    result.setAllergen(value);
    result.setAllergenDescription(value.getAllergenName());
    result.setPatient(form.getGlobalContext().Core.getPatientShort());
    result.setSourceofInformation(SourceofInformation.CLINICALCONTACT);
    //wdev-12860
    result.setIsCurrentlyActiveAllergy(new Boolean(Boolean.TRUE));
    //--------
    return result;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onGrdAlergiesMutableComboBoxSelected(int column, grdAlergiesRow row, Object value) throws PresentationLogicException 
{
    if(value instanceof AllergenVo)
    {
        PatientAllergy patAl = new PatientAllergy();
        patAl.setPatient(form.getGlobalContext().Core.getPatientShort().toPatientRefVo());
        patAl.setSourceofInformation(SourceofInformation.CORRESPONDENCE);
        patAl.setAllergen((AllergenVo) value);
        patAl.setAllergenDescription(((AllergenVo) value).getAllergenNameIsNotNull() ? ((AllergenVo) value).getAllergenName() : "");

        row.setValue(patAl);
    }
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onCustomControlCodingItemValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    AllergenVo voAllergen = (AllergenVo) form.ctnAllergy().ccAllergyTerm().getSelectedItem();
    form.ctnAllergy().cmbAllergyType().setValue(voAllergen != null ? voAllergen.getAllergenType() : null);
    fillReactionCombo();        
}
项目:openMAXIMS    文件: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);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void addGenericRow(boolean bAll) 
{               
    CodingItemType lkpCodingType = form.getLocalContext().getCodingLookupType();
    if (lkpCodingType.equals(CodingItemType.ALLERGY))       
    {
        AllergenVo voAllergen = getGenericRowAllergen(bAll);
        form.qmbCodingItem().newRow(voAllergen, voAllergen.getAllergenName(), Color.Red);                                               
    }
    else if (lkpCodingType.equals(CodingItemType.DIAGNOSIS) || lkpCodingType.equals(CodingItemType.FAMILY_HISTORY))
    {
        DiagnosisVo voDiagnosis = getGenericRowDiagnosis(bAll);
        form.qmbCodingItem().newRow(voDiagnosis, voDiagnosis.getDiagnosisName(), Color.Red);                        
    }
    else if (lkpCodingType.equals(CodingItemType.PROBLEM))      
    {
        ClinicalProblemShortVo voProblem = getGenericRowProblem(bAll);
        form.qmbCodingItem().newRow(voProblem, voProblem.getPCName(), Color.Red);                       
    }
    else if (lkpCodingType.equals(CodingItemType.PROCEDURE))
    {
        ProcedureLiteVo voProcedure = getGenericRowProcedure(bAll);
        form.qmbCodingItem().newRow(voProcedure, voProcedure.getProcedureName(), Color.Red);            
    }
    else if (lkpCodingType.equals(CodingItemType.IMAGING_EVENT))
    {
        CancerImagingEventLiteVo voImagingEvent = getGenericRowImagingEvent(bAll);
        form.qmbCodingItem().newRow(voImagingEvent, voImagingEvent.getImagingEventName(), Color.Red);           
    }
    else if (lkpCodingType.getId() == CodingItemType.MEDICATION.getId() && (form.imbSearch().isVisible() || engine.getFormName().getID() == 123215)) //WDEV-13956
    {
        MedicationLiteVo voMedication = getGenericRowMedicationConfig(bAll);
        form.qmbCodingItem().newRow(voMedication, voMedication.getMedicationName(), Color.Red);                             
    }
}
项目:openMAXIMS    文件: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");

    }

}