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

项目:AvoinApotti    文件:Logic.java   
private MedicationLiteVo getGenericRowMedicationConfig(boolean bAll)
{
    MedicationLiteVo voMedicationConfig = new MedicationLiteVo();

    if (bAll)
    {
        voMedicationConfig.setID_Medication(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voMedicationConfig.setMedicationName(SEARCH_ALL_ITEM_SELECTED + "Medications");
    }
    else
    {
        voMedicationConfig.setID_Medication(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voMedicationConfig.setMedicationName(NO_CODE_ITEM_SELECTED);
    }
    return voMedicationConfig;
}
项目:openMAXIMS    文件:Logic.java   
private MedicationLiteVo getGenericRowMedicationConfig(boolean bAll)
{
    MedicationLiteVo voMedicationConfig = new MedicationLiteVo();

    if (bAll)
    {
        voMedicationConfig.setID_Medication(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voMedicationConfig.setMedicationName(SEARCH_ALL_ITEM_SELECTED + "Medications");
    }
    else
    {
        voMedicationConfig.setID_Medication(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voMedicationConfig.setMedicationName(NO_CODE_ITEM_SELECTED);
    }
    return voMedicationConfig;
}
项目:openMAXIMS    文件:Logic.java   
private MedicationLiteVo getGenericRowMedicationConfig(boolean bAll)
{
    MedicationLiteVo voMedicationConfig = new MedicationLiteVo();

    if (bAll)
    {
        voMedicationConfig.setID_Medication(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voMedicationConfig.setMedicationName(SEARCH_ALL_ITEM_SELECTED + "Medications");
    }
    else
    {
        voMedicationConfig.setID_Medication(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voMedicationConfig.setMedicationName(NO_CODE_ITEM_SELECTED);
    }
    return voMedicationConfig;
}
项目:openmaxims-linux    文件:Logic.java   
private MedicationLiteVo getGenericRowMedicationConfig(boolean bAll)
{
    MedicationLiteVo voMedicationConfig = new MedicationLiteVo();

    if (bAll)
    {
        voMedicationConfig.setID_Medication(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID));
        voMedicationConfig.setMedicationName(SEARCH_ALL_ITEM_SELECTED + "Medications");
    }
    else
    {
        voMedicationConfig.setID_Medication(new Integer(NO_CODE_ITEM_SELECTED_ID));
        voMedicationConfig.setMedicationName(NO_CODE_ITEM_SELECTED);
    }
    return voMedicationConfig;
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    IClinicalCodingValue clinicalCoding = form.ccMedication().getValue();


    if (clinicalCoding == null || clinicalCoding.getIClinicalCodingValueDescription() == null || clinicalCoding.getIClinicalCodingValueDescription().length() == 0)
    {
        engine.showErrors(new String[]{"Clinical Term is mandatory ","Medication Description is mandatory."});
        return;
    }


    ValueObject medication = clinicalCoding.getIClinicalCodingValue();  
    if(medication != null && medication instanceof MedicationLiteVo)
    {
        if (((MedicationLiteVo) medication).getID_MedicationIsNotNull() && ((MedicationLiteVo) medication).getID_Medication() == -1)
        {
            //MedicationLiteVo med = (MedicationLiteVo) medication;
            //med.setMedicationName(clinicalCoding.getIClinicalCodingValueDescription());
            //med.setIsActive(true);

            //form.getGlobalContext().Oncology.setSelectedMedication(med);
            engine.showErrors(new String[]{"Select a medication"});
            form.ccMedication().setValue(null);
            initialise();
            return;
        }
        else
            form.getGlobalContext().Oncology.setSelectedMedication((MedicationLiteVo)clinicalCoding.getIClinicalCodingValue());

        engine.close(DialogResult.OK);  
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setInstanceRowDetails(grdMedicationRow row, MedicationLiteVo vo)
{
    row.setcolMedicationName(vo.getMedicationName());
    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 void addPrescriptionDrug(MedicationLiteVo medicationLiteVo, PatientMedicationLiteVo patientMedication, DynamicGridRow row, boolean readOnly, boolean newRecord) 
{           
    if (form.dyngrdPrescription().getSelectedRow() != null)
    {
        if(row == null)
            row = form.dyngrdPrescription().getSelectedRow();

        if (row != null)
        {
            if (newRecord)
            {
                if (row.getIdentifier() != null && row.getIdentifier().equals(NewPrescriptionRecord))
                {
                    addPrescriptionDrugRow(row.getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
                }   
            }
            else
            {
                if (row.getIdentifier() != null && row.getIdentifier().equals(PrescriptionRecord))
                {
                    addPrescriptionDrugRow(row.getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
                }
            }


            if (row.getIdentifier() != null && row.getIdentifier().equals(PrescriptionDrug))
            {
                addPrescriptionDrugRow(row.getParent().getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
            }
            row.setExpanded(true);
        }

    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientMedicationForNursingNotesVo getPatientMedication(MedicationLiteVo value)
{
    PatientMedicationForNursingNotesVo med = new PatientMedicationForNursingNotesVo();
    med.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    med.setMedication(value);
    med.setOtherMedicationText(value.getMedicationName());
    med.setPatient(form.getGlobalContext().Core.getPatientShort());
    return med;
}
项目: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 boolean isMedicationInGrid(MedicationLiteVo medication)
{
    if (medication == null)
        return false;
    DynamicGridRowCollection rows = form.lyrMain().tabDetails().dyngrdMedication().getRows();
    for (int i = 0; i < rows.size(); i++)
    {
        if (medication.equals(rows.get(i).getCellArray()[0].getValue()))
            return true;
    }
    return false;
}
项目:AvoinApotti    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVo getMedicationLiteVo(MedicationRefVo voRef)
{
    if(voRef == null) {
        throw new DomainRuntimeException("Invalid Medication record to get");
    }

    return MedicationLiteVoAssembler.create((Medication)getDomainFactory().getDomainObject(Medication.class, voRef.getID_Medication()));
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    IClinicalCodingValue clinicalCoding = form.ccMedication().getValue();


    if (clinicalCoding == null || clinicalCoding.getIClinicalCodingValueDescription() == null || clinicalCoding.getIClinicalCodingValueDescription().length() == 0)
    {
        engine.showErrors(new String[]{"Clinical Term is mandatory ","Medication Description is mandatory."});
        return;
    }


    ValueObject medication = clinicalCoding.getIClinicalCodingValue();  
    if(medication != null && medication instanceof MedicationLiteVo)
    {
        if (((MedicationLiteVo) medication).getID_MedicationIsNotNull() && ((MedicationLiteVo) medication).getID_Medication() == -1)
        {
            //MedicationLiteVo med = (MedicationLiteVo) medication;
            //med.setMedicationName(clinicalCoding.getIClinicalCodingValueDescription());
            //med.setIsActive(true);

            //form.getGlobalContext().Oncology.setSelectedMedication(med);
            engine.showErrors(new String[]{"Select a medication"});
            form.ccMedication().setValue(null);
            initialise();
            return;
        }
        else
            form.getGlobalContext().Oncology.setSelectedMedication((MedicationLiteVo)clinicalCoding.getIClinicalCodingValue());

        engine.close(DialogResult.OK);  
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setInstanceRowDetails(grdMedicationRow row, MedicationLiteVo vo)
{
    row.setcolMedicationName(vo.getMedicationName());
    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 void addPrescriptionDrug(MedicationLiteVo medicationLiteVo, PatientMedicationLiteVo patientMedication, DynamicGridRow row, boolean readOnly, boolean newRecord) 
{           
    if (form.dyngrdPrescription().getSelectedRow() != null)
    {
        if(row == null)
            row = form.dyngrdPrescription().getSelectedRow();

        if (row != null)
        {
            if (newRecord)
            {
                if (row.getIdentifier() != null && row.getIdentifier().equals(NewPrescriptionRecord))
                {
                    addPrescriptionDrugRow(row.getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
                }   
            }
            else
            {
                if (row.getIdentifier() != null && row.getIdentifier().equals(PrescriptionRecord))
                {
                    addPrescriptionDrugRow(row.getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
                }
            }


            if (row.getIdentifier() != null && row.getIdentifier().equals(PrescriptionDrug))
            {
                addPrescriptionDrugRow(row.getParent().getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
            }
            row.setExpanded(true);
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientMedicationForNursingNotesVo getPatientMedication(MedicationLiteVo value)
{
    PatientMedicationForNursingNotesVo med = new PatientMedicationForNursingNotesVo();
    med.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    med.setMedication(value);
    med.setOtherMedicationText(value.getMedicationName());
    med.setPatient(form.getGlobalContext().Core.getPatientShort());
    return med;
}
项目: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 void addGenericMedicationRow(boolean canSetValue) {
    if (Boolean.TRUE.equals(form.getLocalContext().getbAllowFreeTextMedication())) //WDEV-18980
    {
        MedicationLiteVo genericMedicationVo = getGenericRowMedicationRecord();
        form.qmbMedication().newRow(genericMedicationVo,genericMedicationVo.getMedicationName(), Color.Red);
        if (canSetValue)
            form.qmbMedication().setValue(genericMedicationVo);
    }
}
项目:openMAXIMS    文件:Logic.java   
private MedicationLiteVo getGenericRowMedicationRecord()
{
    MedicationLiteVo voMedicationConfig = new MedicationLiteVo();

    voMedicationConfig.setID_Medication(new Integer(NO_CODE_ITEM_SELECTED_ID));
    voMedicationConfig.setMedicationName(NO_CODE_ITEM_SELECTED);

    return voMedicationConfig;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isMedicationInGrid(MedicationLiteVo medication)
{
    if (medication == null)
        return false;
    DynamicGridRowCollection rows = form.lyrMain().tabDetails().dyngrdMedication().getRows();
    for (int i = 0; i < rows.size(); i++)
    {
        if (medication.equals(rows.get(i).getCellArray()[0].getValue()))
            return true;
    }
    return false;
}
项目:openMAXIMS    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVo getMedicationLiteVo(MedicationRefVo voRef)
{
    if(voRef == null) {
        throw new DomainRuntimeException("Invalid Medication record to get");
    }

    return MedicationLiteVoAssembler.create((Medication)getDomainFactory().getDomainObject(Medication.class, voRef.getID_Medication()));
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    IClinicalCodingValue clinicalCoding = form.ccMedication().getValue();


    if (clinicalCoding == null || clinicalCoding.getIClinicalCodingValueDescription() == null || clinicalCoding.getIClinicalCodingValueDescription().length() == 0)
    {
        engine.showErrors(new String[]{"Clinical Term is mandatory ","Medication Description is mandatory."});
        return;
    }


    ValueObject medication = clinicalCoding.getIClinicalCodingValue();  
    if(medication != null && medication instanceof MedicationLiteVo)
    {
        if (((MedicationLiteVo) medication).getID_MedicationIsNotNull() && ((MedicationLiteVo) medication).getID_Medication() == -1)
        {
            //MedicationLiteVo med = (MedicationLiteVo) medication;
            //med.setMedicationName(clinicalCoding.getIClinicalCodingValueDescription());
            //med.setIsActive(true);

            //form.getGlobalContext().Oncology.setSelectedMedication(med);
            engine.showErrors(new String[]{"Select a medication"});
            form.ccMedication().setValue(null);
            initialise();
            return;
        }
        else
            form.getGlobalContext().Oncology.setSelectedMedication((MedicationLiteVo)clinicalCoding.getIClinicalCodingValue());

        engine.close(DialogResult.OK);  
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setInstanceRowDetails(grdMedicationRow row, MedicationLiteVo vo)
{
    row.setcolMedicationName(vo.getMedicationName());
    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 void addPrescriptionDrug(MedicationLiteVo medicationLiteVo, PatientMedicationLiteVo patientMedication, DynamicGridRow row, boolean readOnly, boolean newRecord) 
{           
    if (form.dyngrdPrescription().getSelectedRow() != null)
    {
        if(row == null)
            row = form.dyngrdPrescription().getSelectedRow();

        if (row != null)
        {
            if (newRecord)
            {
                if (row.getIdentifier() != null && row.getIdentifier().equals(NewPrescriptionRecord))
                {
                    addPrescriptionDrugRow(row.getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
                }   
            }
            else
            {
                if (row.getIdentifier() != null && row.getIdentifier().equals(PrescriptionRecord))
                {
                    addPrescriptionDrugRow(row.getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
                }
            }


            if (row.getIdentifier() != null && row.getIdentifier().equals(PrescriptionDrug))
            {
                addPrescriptionDrugRow(row.getParent().getRows().newRow(), medicationLiteVo, patientMedication, readOnly);
            }
            row.setExpanded(true);
        }

    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientMedicationForNursingNotesVo getPatientMedication(MedicationLiteVo value)
{
    PatientMedicationForNursingNotesVo med = new PatientMedicationForNursingNotesVo();
    med.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    med.setMedication(value);
    med.setOtherMedicationText(value.getMedicationName());
    med.setPatient(form.getGlobalContext().Core.getPatientShort());
    return med;
}
项目: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");

    }

}
项目:openMAXIMS    文件:Logic.java   
private boolean isMedicationInGrid(MedicationLiteVo medication)
{
    if (medication == null)
        return false;
    DynamicGridRowCollection rows = form.lyrMain().tabDetails().dyngrdMedication().getRows();
    for (int i = 0; i < rows.size(); i++)
    {
        if (medication.equals(rows.get(i).getCellArray()[0].getValue()))
            return true;
    }
    return false;
}
项目:openMAXIMS    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVo getMedicationLiteVo(MedicationRefVo voRef)
{
    if(voRef == null) {
        throw new DomainRuntimeException("Invalid Medication record to get");
    }

    return MedicationLiteVoAssembler.create((Medication)getDomainFactory().getDomainObject(Medication.class, voRef.getID_Medication()));
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
    IClinicalCodingValue clinicalCoding = form.ccMedication().getValue();


    if (clinicalCoding == null || clinicalCoding.getIClinicalCodingValueDescription() == null || clinicalCoding.getIClinicalCodingValueDescription().length() == 0)
    {
        engine.showErrors(new String[]{"Clinical Term is mandatory ","Medication Description is mandatory."});
        return;
    }


    ValueObject medication = clinicalCoding.getIClinicalCodingValue();  
    if(medication != null && medication instanceof MedicationLiteVo)
    {
        if (((MedicationLiteVo) medication).getID_MedicationIsNotNull() && ((MedicationLiteVo) medication).getID_Medication() == -1)
        {
            //MedicationLiteVo med = (MedicationLiteVo) medication;
            //med.setMedicationName(clinicalCoding.getIClinicalCodingValueDescription());
            //med.setIsActive(true);

            //form.getGlobalContext().Oncology.setSelectedMedication(med);
            engine.showErrors(new String[]{"Select a medication"});
            form.ccMedication().setValue(null);
            initialise();
            return;
        }
        else
            form.getGlobalContext().Oncology.setSelectedMedication((MedicationLiteVo)clinicalCoding.getIClinicalCodingValue());

        engine.close(DialogResult.OK);  
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void setInstanceRowDetails(grdMedicationRow row, MedicationLiteVo vo)
{
    row.setcolMedicationName(vo.getMedicationName());
    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   
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-linux    文件: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-linux    文件: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-linux    文件:Logic.java   
private boolean isMedicationInGrid(MedicationLiteVo medication)
{
    if (medication == null)
        return false;
    DynamicGridRowCollection rows = form.lyrMain().tabDetails().dyngrdMedication().getRows();
    for (int i = 0; i < rows.size(); i++)
    {
        if (medication.equals(rows.get(i).getCellArray()[0].getValue()))
            return true;
    }
    return false;
}
项目:openmaxims-linux    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVo getMedicationLiteVo(MedicationRefVo voRef)
{
    if(voRef == null) {
        throw new DomainRuntimeException("Invalid Medication record to get");
    }

    return MedicationLiteVoAssembler.create((Medication)getDomainFactory().getDomainObject(Medication.class, voRef.getID_Medication()));
}
项目:AvoinApotti    文件:Logic.java   
private grdMedicationRow newInstanceRow(MedicationLiteVo vo)
{
    return newInstanceRow(vo, false);
}