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

项目:AvoinApotti    文件:Logic.java   
protected void onGrdMedicationGridQueryComboBoxTextSubmited(int column, grdMedicationRow row, String text) throws PresentationLogicException
{
    //load medications into memory
    if(text != null)
    {
        //wdev-10792
        row.getColMedication().clear();
        //------------------------------
        MedicationLiteVoCollection voCollMeds = domain.listMedication(text);

        if(voCollMeds == null || voCollMeds.size()==0)
            return;


        for(int i=0;i<voCollMeds.size();i++)
            row.getColMedication().newRow(voCollMeds.get(i),voCollMeds.get(i).getMedicationName());

        row.getColMedication().showOpened();
    }

}
项目:AvoinApotti    文件:Logic.java   
private void populateMedicationQcmb(String value)
{
    form.qmbMedication().clear();

    MedicationLiteVoCollection listMedications = domain.listMedications(value, form.getGlobalContext().RefMan.getDrugsAlreadyAddedToPrescription(), getSpecialty());
    if (listMedications == null || listMedications.size() == 0)
    {
        form.qmbMedication().showOpened();
        return;
    }

    for (int i = 0 ; i < listMedications.size() ; i++)
    {
        form.qmbMedication().newRow(listMedications.get(i),listMedications.get(i).getMedicationName());
    }

    form.qmbMedication().showOpened();
}
项目:AvoinApotti    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listMedicationHotlist(String text, HcpRefVo hcp) throws DomainInterfaceException//WDEV-11888//WDEV-11979
{
    //  WDEV-11979 - Start
    String hql = "select distinct med from MedicationFavourtiesForHCP as medFav left join medFav.hCP as hcp " +
            "left join medFav.medication as med left join med.keywords as kw where " +
            "(hcp.id = :hcpId and med.isActive = 1 and medFav.isRIE is null)";
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("hcpId");
    values.add(hcp.getID_Hcp());
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    //WDEV-11979 - End
    /*WDEV-11979
    String hql = "select distinct med from MedicationHotlist as medhot left join medhot.user as usr " +
            "left join medhot.hotListItem as hli left join hli.medication as med left join med.keywords as kw where" +
            "(medhot.user.id = :medicId and med.isActive = :active)" ;
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("medicId");
    values.add(hcp.getID_Hcp());
    names.add("active");
    values.add(true);
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    */
}
项目:AvoinApotti    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listFrequentMedications(Integer count, HcpRefVo hcp)//WDEV-11979
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new DomainRuntimeException("Provided Hcp is invalid");
    if (count == null || count < 1)
        throw new DomainRuntimeException("Count must be 1 or greater");

    String hql = "select medcation from MedicationFavourtiesForHCP as medFav" +
            " left join medFav.hCP as hcp left join medFav.medication as medcation where " +
            "(hcp.id = :hcpId and medFav.isRIE is null and medcation.isActive = 1) order by medFav.count desc, upper(medcation.medicationName) asc ";
    List dos = getDomainFactory().find(hql,"hcpId",(Object)hcp.getID_Hcp());
    if (dos == null || dos.size() == 0)
        return null;
    int i = 0 ;
    MedicationLiteVoCollection coll = new MedicationLiteVoCollection();
    while (coll.size() < count && i < dos.size())
    {
        coll.add(MedicationLiteVoAssembler.create((Medication) dos.get(i)));
        i++;
    }

    return coll;
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdMedicationGridQueryComboBoxTextSubmited(int column, grdMedicationRow row, String text) throws PresentationLogicException
{
    //load medications into memory
    if(text != null)
    {
        //wdev-10792
        row.getColMedication().clear();
        //------------------------------
        MedicationLiteVoCollection voCollMeds = domain.listMedication(text);

        if(voCollMeds == null || voCollMeds.size()==0)
            return;


        for(int i=0;i<voCollMeds.size();i++)
            row.getColMedication().newRow(voCollMeds.get(i),voCollMeds.get(i).getMedicationName());

        row.getColMedication().showOpened();
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateMedicationQcmb(String value)
{
    form.qmbMedication().clear();

    boolean excludeControlledDrugs = ConfigFlag.GEN.PRESCRIPTION_EXCLUDE_CONTROLLED_DRUGS_ON_SEARCH.getValue(); //WDEV-18980

    String drugsAlreadyInPresc = form.getGlobalContext().RefMan.getDrugsAlreadyAddedToPrescription() != null ? form.getGlobalContext().RefMan.getDrugsAlreadyAddedToPrescription() : getListofExistingMeds();
    MedicationLiteVoCollection listMedications = domain.listMedications(value, drugsAlreadyInPresc, getSpecialty(),excludeControlledDrugs); //WDEV-18980

    if (listMedications == null || listMedications.size() == 0)
    {
        addGenericMedicationRow(false); 
        form.qmbMedication().showOpened(); //WDEV-18980
        return;
    }
    for (int i = 0 ; i < listMedications.size() ; i++)
    {
        form.qmbMedication().newRow(listMedications.get(i),listMedications.get(i).getMedicationName());
    }
    addGenericMedicationRow(false); //WDEV-18980
    form.qmbMedication().showOpened();
}
项目:openMAXIMS    文件:ClinicalCodingImpl.java   
public MedicationLiteVoCollection listMedications(String filterMedication, String ignoredListMedications) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("select distinct m from Medication m join m.keywords as kw "); 
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where m.isActive = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);   

    //WDEV-20283
    if (ignoredListMedications != null && ignoredListMedications.trim().length() > 0)
    {
        hql.append(" and m.id not in ("+ignoredListMedications+")");
    }

    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(factory, filterMedication, hql.toString(), names, values));
}
项目:openMAXIMS    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listMedicationHotlist(String text, HcpRefVo hcp) throws DomainInterfaceException//WDEV-11888//WDEV-11979
{
    //  WDEV-11979 - Start
    String hql = "select distinct med from MedicationFavourtiesForHCP as medFav left join medFav.hCP as hcp " +
            "left join medFav.medication as med left join med.keywords as kw where " +
            "(hcp.id = :hcpId and med.isActive = 1 and medFav.isRIE is null)";
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("hcpId");
    values.add(hcp.getID_Hcp());
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    //WDEV-11979 - End
    /*WDEV-11979
    String hql = "select distinct med from MedicationHotlist as medhot left join medhot.user as usr " +
            "left join medhot.hotListItem as hli left join hli.medication as med left join med.keywords as kw where" +
            "(medhot.user.id = :medicId and med.isActive = :active)" ;
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("medicId");
    values.add(hcp.getID_Hcp());
    names.add("active");
    values.add(true);
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    */
}
项目:openMAXIMS    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listFrequentMedications(Integer count, HcpRefVo hcp)//WDEV-11979
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new DomainRuntimeException("Provided Hcp is invalid");
    if (count == null || count < 1)
        throw new DomainRuntimeException("Count must be 1 or greater");

    String hql = "select medcation from MedicationFavourtiesForHCP as medFav" +
            " left join medFav.hCP as hcp left join medFav.medication as medcation where " +
            "(hcp.id = :hcpId and medFav.isRIE is null and medcation.isActive = 1) order by medFav.count desc, upper(medcation.medicationName) asc ";
    List dos = getDomainFactory().find(hql,"hcpId",(Object)hcp.getID_Hcp());
    if (dos == null || dos.size() == 0)
        return null;
    int i = 0 ;
    MedicationLiteVoCollection coll = new MedicationLiteVoCollection();
    while (coll.size() < count && i < dos.size())
    {
        coll.add(MedicationLiteVoAssembler.create((Medication) dos.get(i)));
        i++;
    }

    return coll;
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdMedicationGridQueryComboBoxTextSubmited(int column, grdMedicationRow row, String text) throws PresentationLogicException
{
    //load medications into memory
    if(text != null)
    {
        //wdev-10792
        row.getColMedication().clear();
        //------------------------------
        MedicationLiteVoCollection voCollMeds = domain.listMedication(text);

        if(voCollMeds == null || voCollMeds.size()==0)
            return;


        for(int i=0;i<voCollMeds.size();i++)
            row.getColMedication().newRow(voCollMeds.get(i),voCollMeds.get(i).getMedicationName());

        row.getColMedication().showOpened();
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateMedicationQcmb(String value)
{
    form.qmbMedication().clear();

    MedicationLiteVoCollection listMedications = domain.listMedications(value, form.getGlobalContext().RefMan.getDrugsAlreadyAddedToPrescription(), getSpecialty());
    if (listMedications == null || listMedications.size() == 0)
    {
        form.qmbMedication().showOpened();
        return;
    }

    for (int i = 0 ; i < listMedications.size() ; i++)
    {
        form.qmbMedication().newRow(listMedications.get(i),listMedications.get(i).getMedicationName());
    }

    form.qmbMedication().showOpened();
}
项目:openMAXIMS    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listMedicationHotlist(String text, HcpRefVo hcp) throws DomainInterfaceException//WDEV-11888//WDEV-11979
{
    //  WDEV-11979 - Start
    String hql = "select distinct med from MedicationFavourtiesForHCP as medFav left join medFav.hCP as hcp " +
            "left join medFav.medication as med left join med.keywords as kw where " +
            "(hcp.id = :hcpId and med.isActive = 1 and medFav.isRIE is null)";
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("hcpId");
    values.add(hcp.getID_Hcp());
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    //WDEV-11979 - End
    /*WDEV-11979
    String hql = "select distinct med from MedicationHotlist as medhot left join medhot.user as usr " +
            "left join medhot.hotListItem as hli left join hli.medication as med left join med.keywords as kw where" +
            "(medhot.user.id = :medicId and med.isActive = :active)" ;
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("medicId");
    values.add(hcp.getID_Hcp());
    names.add("active");
    values.add(true);
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    */
}
项目:openMAXIMS    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listFrequentMedications(Integer count, HcpRefVo hcp)//WDEV-11979
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new DomainRuntimeException("Provided Hcp is invalid");
    if (count == null || count < 1)
        throw new DomainRuntimeException("Count must be 1 or greater");

    String hql = "select medcation from MedicationFavourtiesForHCP as medFav" +
            " left join medFav.hCP as hcp left join medFav.medication as medcation where " +
            "(hcp.id = :hcpId and medFav.isRIE is null and medcation.isActive = 1) order by medFav.count desc, upper(medcation.medicationName) asc ";
    List dos = getDomainFactory().find(hql,"hcpId",(Object)hcp.getID_Hcp());
    if (dos == null || dos.size() == 0)
        return null;
    int i = 0 ;
    MedicationLiteVoCollection coll = new MedicationLiteVoCollection();
    while (coll.size() < count && i < dos.size())
    {
        coll.add(MedicationLiteVoAssembler.create((Medication) dos.get(i)));
        i++;
    }

    return coll;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onGrdMedicationGridQueryComboBoxTextSubmited(int column, grdMedicationRow row, String text) throws PresentationLogicException
{
    //load medications into memory
    if(text != null)
    {
        //wdev-10792
        row.getColMedication().clear();
        //------------------------------
        MedicationLiteVoCollection voCollMeds = domain.listMedication(text);

        if(voCollMeds == null || voCollMeds.size()==0)
            return;


        for(int i=0;i<voCollMeds.size();i++)
            row.getColMedication().newRow(voCollMeds.get(i),voCollMeds.get(i).getMedicationName());

        row.getColMedication().showOpened();
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void populateMedicationQcmb(String value)
{
    form.qmbMedication().clear();

    MedicationLiteVoCollection listMedications = domain.listMedications(value, form.getGlobalContext().CareUk.getDrugsAlreadyAddedToPrescription(), getSpecialty());
    if (listMedications == null || listMedications.size() == 0)
    {
        form.qmbMedication().showOpened();
        return;
    }

    for (int i = 0 ; i < listMedications.size() ; i++)
    {
        form.qmbMedication().newRow(listMedications.get(i),listMedications.get(i).getMedicationName());
    }

    form.qmbMedication().showOpened();
}
项目:openmaxims-linux    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listMedicationHotlist(String text, HcpRefVo hcp) throws DomainInterfaceException//WDEV-11888//WDEV-11979
{
    //  WDEV-11979 - Start
    String hql = "select distinct med from MedicationFavourtiesForHCP as medFav left join medFav.hCP as hcp " +
            "left join medFav.medication as med left join med.keywords as kw where " +
            "(hcp.id = :hcpId and med.isActive = 1 and medFav.isRIE is null)";
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("hcpId");
    values.add(hcp.getID_Hcp());
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    //WDEV-11979 - End
    /*WDEV-11979
    String hql = "select distinct med from MedicationHotlist as medhot left join medhot.user as usr " +
            "left join medhot.hotListItem as hli left join hli.medication as med left join med.keywords as kw where" +
            "(medhot.user.id = :medicId and med.isActive = :active)" ;
    ArrayList<String> names = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    names.add("medicId");
    values.add(hcp.getID_Hcp());
    names.add("active");
    values.add(true);
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(getDomainFactory(), text, hql, names, values));
    */
}
项目:openmaxims-linux    文件:EDischargeMedsSthkDialogImpl.java   
public MedicationLiteVoCollection listFrequentMedications(Integer count, HcpRefVo hcp)//WDEV-11979
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new DomainRuntimeException("Provided Hcp is invalid");
    if (count == null || count < 1)
        throw new DomainRuntimeException("Count must be 1 or greater");

    String hql = "select medcation from MedicationFavourtiesForHCP as medFav" +
            " left join medFav.hCP as hcp left join medFav.medication as medcation where " +
            "(hcp.id = :hcpId and medFav.isRIE is null and medcation.isActive = 1) order by medFav.count desc, upper(medcation.medicationName) asc ";
    List dos = getDomainFactory().find(hql,"hcpId",(Object)hcp.getID_Hcp());
    if (dos == null || dos.size() == 0)
        return null;
    int i = 0 ;
    MedicationLiteVoCollection coll = new MedicationLiteVoCollection();
    while (coll.size() < count && i < dos.size())
    {
        coll.add(MedicationLiteVoAssembler.create((Medication) dos.get(i)));
        i++;
    }

    return coll;
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdMedsGridQueryComboBoxTextSubmited(int column, grdMedsRow row, String text) throws PresentationLogicException
{
    if(text != null)
    {
        MedicationLiteVoCollection voCollMeds = domain.listMedication(text);

        if(voCollMeds == null || voCollMeds.size() == 0)
            return;

        for(int i=0;i<voCollMeds.size();i++)
            row.getColMedication().newRow(voCollMeds.get(i),voCollMeds.get(i).getMedicationName());

        row.getColMedication().showOpened();
    }
}
项目:AvoinApotti    文件:NurAssessmentComponentImpl.java   
public MedicationLiteVoCollection listMedication(String filterMedication)
{
    MedicationList impl = (MedicationList) getDomainImpl(MedicationListImpl.class);
    try {
        return impl.listActiveMedication(filterMedication);
    } catch (DomainInterfaceException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        return null;
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateMedicationFromData(ChemoRegimensDrugConfigVo record)
{
    form.grdMerdications().getRows().clear();
    if(record == null)
        return;
    MedicationLiteVoCollection tempcoll = record.getLinkedDrug();
    if(tempcoll == null)
        return;
    for(int i = 0; i < tempcoll.size();i++)
    {
        addMedicationRow(tempcoll.get(i));
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param szSearchCriteria
 */
private void listMedications(String szSearchCriteria) 
{
    form.grdMedication().getRows().clear();
    clearInstanceControls();

    MedicationLiteVoCollection rcColl;
    try 
    {
        rcColl = domain.listMedicationIncludeInactive(szSearchCriteria);
    } 
    catch (DomainInterfaceException e) 
    {
        engine.showMessage(e.getMessage());
        return;
    }       
    if (rcColl.size() == 0) 
    {
        engine.showMessage("No matching Medications found");
        return;
    }

    for (int i = 0; i< rcColl.size(); i++)
    {
        newInstanceRow(rcColl.get(i));
    }
    if (rcColl.size() == 1)
    {
        form.grdMedication().setValue(rcColl.get(0));
        onGrdMedicationSelectionChanged();          
    }
}
项目:AvoinApotti    文件:Logic.java   
private void setMedicationHotlist()//WDEV - 11979
{
    form.ccMedication().setCustomHotlist(new IClinicalCodingCustomHotlistProvider()
    {

        public ValueObjectCollection listCodingItems(String value) throws DomainInterfaceException
        {
                HcpRefVo hcp = (HcpRefVo) domain.getHcpUser();
                MedicationLiteVoCollection listMedicationHotlist = domain.listMedicationHotlist(value, hcp);
                if (listMedicationHotlist != null)
                    listMedicationHotlist.sort(false);
                return listMedicationHotlist;
        }
    });
}
项目:AvoinApotti    文件:Logic.java   
private void rebindAllMedications()
{
    DynamicGridRowCollection rows = form.lyrMain().tabDetails().dyngrdMedication().getRows();
    MedicationLiteVoCollection allMedications = (MedicationLiteVoCollection) form.getLocalContext().getAllMedications().clone();
    if (allMedications == null)
        return;
    MedicationLiteVoCollection availableMedications = new MedicationLiteVoCollection();
    for (int i = 0; i < allMedications.size(); i++)
    {
        if (!isMedicationInGrid(allMedications.get(i)))
        {
            availableMedications.add(allMedications.get(i));
        }
    }
    availableMedications.sort();
    for (int i = 0; i < rows.size(); i++)
    {
        DynamicGridCell cell = rows.get(i).getCellArray()[0];
        Object value = cell.getValue();
        cell.getItems().clear();

        DynamicGridCellItem item = null;
        if (value != null)
        {
            item = cell.getItems().newItem(value);
            item.setValue(value);
        }
        for (int j = 0; j < availableMedications.size(); j++)
        {
            item = cell.getItems().newItem(availableMedications.get(j).getMedicationName());
            item.setValue(availableMedications.get(j));
        }
        cell.setValue(value);
    }
    for (int i = 0; i < availableMedications.size(); i++)
    {

    }
}
项目:AvoinApotti    文件:ClinicalCodingImpl.java   
public MedicationLiteVoCollection listHotlistMedication(String name, Specialty specialty)  throws DomainInterfaceException
{
    if(name == null)
        throw new DomainRuntimeException("Invalid Search criteria. Medication name filter must be supplied.");

    if(specialty == null)
        throw new DomainRuntimeException("Invalid Search criteria. Specialty must be supplied.");

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("select distinct medHotListItem from MedicationHotlist as medHotList left join medHotList.hotListItem as medHotListItem left join medHotListItem.medication as med left join med.keywords as kw "); 

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where med.isActive = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);   

    hql.append(" and medHotList.specialty = :spec");
    names.add("spec");
    values.add(getDomLookup(specialty));            

    List hits = Keywords.searchByKeywords(factory, name, hql.toString(), names, values);        

    List meds = new ArrayList();        
    for (int i = 0; i < hits.size(); i++)
    {
        meds.add(((MedicationHotlistItem)hits.get(i)).getMedication());
    }

    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(meds);
}
项目:AvoinApotti    文件:ClinicalCodingImpl.java   
public MedicationLiteVoCollection listMedications(String filterMedication) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("select distinct m from Medication m join m.keywords as kw "); 
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where m.isActive = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);           
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(Keywords.searchByKeywords(factory, filterMedication, hql.toString(), names, values));           
}
项目:AvoinApotti    文件:CataractIntraOperativeCareRecordImpl.java   
public MedicationLiteVoCollection listMedicationsForSpeciality(
        Specialty speciality) {
    if (speciality == null) return null;
    DomainFactory factory = getDomainFactory();
    String condStr = "select m3_1 from MedicationHotlist as m1_1 left";
    condStr += " join m1_1.hotListItem as m2_1 left join " ;
    condStr += "m2_1.medication as m3_1 left join m1_1.specialty ";
    condStr +="as l1_1 where (m3_1.isActive = 1 and m1_1.specialty.id = :speciality)";
    ArrayList<String> markers = new  ArrayList<String>();
    ArrayList<Serializable> values = new ArrayList<Serializable>();
    markers.add("speciality");
    values.add(speciality.getID());
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(factory.find(condStr,markers,values));
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdMedsGridQueryComboBoxTextSubmited(int column, grdMedsRow row, String text) throws PresentationLogicException
{
    if(text != null)
    {
        MedicationLiteVoCollection voCollMeds = domain.listMedication(text);

        if(voCollMeds == null || voCollMeds.size() == 0)
            return;

        for(int i=0;i<voCollMeds.size();i++)
            row.getColMedication().newRow(voCollMeds.get(i),voCollMeds.get(i).getMedicationName());

        row.getColMedication().showOpened();
    }
}
项目:openMAXIMS    文件:NurAssessmentComponentImpl.java   
public MedicationLiteVoCollection listMedication(String filterMedication)
{
    MedicationList impl = (MedicationList) getDomainImpl(MedicationListImpl.class);
    try {
        return impl.listActiveMedication(filterMedication);
    } catch (DomainInterfaceException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        return null;
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateMedicationFromData(ChemoRegimensDrugConfigVo record)
{
    form.grdMerdications().getRows().clear();
    if(record == null)
        return;
    MedicationLiteVoCollection tempcoll = record.getLinkedDrug();
    if(tempcoll == null)
        return;
    for(int i = 0; i < tempcoll.size();i++)
    {
        addMedicationRow(tempcoll.get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param szSearchCriteria
 */
private void listMedications(String szSearchCriteria) 
{
    form.grdMedication().getRows().clear();
    clearInstanceControls();

    MedicationLiteVoCollection rcColl;
    try 
    {
        rcColl = domain.listMedicationIncludeInactive(szSearchCriteria);
    } 
    catch (DomainInterfaceException e) 
    {
        engine.showMessage(e.getMessage());
        return;
    }       
    if (rcColl.size() == 0) 
    {
        engine.showMessage("No matching Medications found");
        return;
    }

    for (int i = 0; i< rcColl.size(); i++)
    {
        newInstanceRow(rcColl.get(i));
    }
    if (rcColl.size() == 1)
    {
        form.grdMedication().setValue(rcColl.get(0));
        onGrdMedicationSelectionChanged();          
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setMedicationHotlist()//WDEV - 11979
{
    form.ccMedication().setCustomHotlist(new IClinicalCodingCustomHotlistProvider()
    {

        public ValueObjectCollection listCodingItems(String value) throws DomainInterfaceException
        {
                HcpRefVo hcp = (HcpRefVo) domain.getHcpUser();
                MedicationLiteVoCollection listMedicationHotlist = domain.listMedicationHotlist(value, hcp);
                if (listMedicationHotlist != null)
                    listMedicationHotlist.sort(false);
                return listMedicationHotlist;
        }
    });
}
项目:openMAXIMS    文件:Logic.java   
private void rebindAllMedications()
{
    DynamicGridRowCollection rows = form.lyrMain().tabDetails().dyngrdMedication().getRows();
    MedicationLiteVoCollection allMedications = (MedicationLiteVoCollection) form.getLocalContext().getAllMedications().clone();
    if (allMedications == null)
        return;
    MedicationLiteVoCollection availableMedications = new MedicationLiteVoCollection();
    for (int i = 0; i < allMedications.size(); i++)
    {
        if (!isMedicationInGrid(allMedications.get(i)))
        {
            availableMedications.add(allMedications.get(i));
        }
    }
    availableMedications.sort();
    for (int i = 0; i < rows.size(); i++)
    {
        DynamicGridCell cell = rows.get(i).getCellArray()[0];
        Object value = cell.getValue();
        cell.getItems().clear();

        DynamicGridCellItem item = null;
        if (value != null)
        {
            item = cell.getItems().newItem(value);
            item.setValue(value);
        }
        for (int j = 0; j < availableMedications.size(); j++)
        {
            item = cell.getItems().newItem(availableMedications.get(j).getMedicationName());
            item.setValue(availableMedications.get(j));
        }
        cell.setValue(value);
    }
    for (int i = 0; i < availableMedications.size(); i++)
    {

    }
}
项目:openMAXIMS    文件:ClinicalCodingImpl.java   
public MedicationLiteVoCollection listHotlistMedication(String name, Specialty specialty, String ignoredListMedications) throws DomainInterfaceException
{
    if(name == null)
        throw new DomainRuntimeException("Invalid Search criteria. Medication name filter must be supplied.");

    if(specialty == null)
        throw new DomainRuntimeException("Invalid Search criteria. Specialty must be supplied.");

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("select distinct medHotListItem from MedicationHotlist as medHotList left join medHotList.hotListItem as medHotListItem left join medHotListItem.medication as med left join med.keywords as kw "); 

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where med.isActive = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);   

    hql.append(" and medHotList.specialty = :spec");
    names.add("spec");
    values.add(getDomLookup(specialty));            

    //WDEV-20283
    if (ignoredListMedications != null && ignoredListMedications.trim().length() > 0)
    {
        hql.append(" and med.id not in ("+ignoredListMedications+")");
    }

    List hits = Keywords.searchByKeywords(factory, name, hql.toString(), names, values);        

    List meds = new ArrayList();        
    for (int i = 0; i < hits.size(); i++)
    {
        meds.add(((MedicationHotlistItem)hits.get(i)).getMedication());
    }

    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(meds);
}
项目:openMAXIMS    文件:CataractIntraOperativeCareRecordImpl.java   
public MedicationLiteVoCollection listMedicationsForSpeciality(
        Specialty speciality) {
    if (speciality == null) return null;
    DomainFactory factory = getDomainFactory();
    String condStr = "select m3_1 from MedicationHotlist as m1_1 left";
    condStr += " join m1_1.hotListItem as m2_1 left join " ;
    condStr += "m2_1.medication as m3_1 left join m1_1.specialty ";
    condStr +="as l1_1 where (m3_1.isActive = 1 and m1_1.specialty.id = :speciality)";
    ArrayList<String> markers = new  ArrayList<String>();
    ArrayList<Serializable> values = new ArrayList<Serializable>();
    markers.add("speciality");
    values.add(speciality.getID());
    return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(factory.find(condStr,markers,values));
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdMedsGridQueryComboBoxTextSubmited(int column, grdMedsRow row, String text) throws PresentationLogicException
{
    if(text != null)
    {
        MedicationLiteVoCollection voCollMeds = domain.listMedication(text);

        if(voCollMeds == null || voCollMeds.size() == 0)
            return;

        for(int i=0;i<voCollMeds.size();i++)
            row.getColMedication().newRow(voCollMeds.get(i),voCollMeds.get(i).getMedicationName());

        row.getColMedication().showOpened();
    }
}
项目:openMAXIMS    文件:NurAssessmentComponentImpl.java   
public MedicationLiteVoCollection listMedication(String filterMedication)
{
    MedicationList impl = (MedicationList) getDomainImpl(MedicationListImpl.class);
    try {
        return impl.listActiveMedication(filterMedication);
    } catch (DomainInterfaceException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        return null;
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateMedicationFromData(ChemoRegimensDrugConfigVo record)
{
    form.grdMerdications().getRows().clear();
    if(record == null)
        return;
    MedicationLiteVoCollection tempcoll = record.getLinkedDrug();
    if(tempcoll == null)
        return;
    for(int i = 0; i < tempcoll.size();i++)
    {
        addMedicationRow(tempcoll.get(i));
    }
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param szSearchCriteria
 */
private void listMedications(String szSearchCriteria) 
{
    form.grdMedication().getRows().clear();
    clearInstanceControls();

    MedicationLiteVoCollection rcColl;
    try 
    {
        rcColl = domain.listMedicationIncludeInactive(szSearchCriteria);
    } 
    catch (DomainInterfaceException e) 
    {
        engine.showMessage(e.getMessage());
        return;
    }       
    if (rcColl.size() == 0) 
    {
        engine.showMessage("No matching Medications found");
        return;
    }

    for (int i = 0; i< rcColl.size(); i++)
    {
        newInstanceRow(rcColl.get(i));
    }
    if (rcColl.size() == 1)
    {
        form.grdMedication().setValue(rcColl.get(0));
        onGrdMedicationSelectionChanged();          
    }
}
项目:openMAXIMS    文件:Logic.java   
private void setMedicationHotlist()//WDEV - 11979
{
    form.ccMedication().setCustomHotlist(new IClinicalCodingCustomHotlistProvider()
    {

        public ValueObjectCollection listCodingItems(String value) throws DomainInterfaceException
        {
                HcpRefVo hcp = (HcpRefVo) domain.getHcpUser();
                MedicationLiteVoCollection listMedicationHotlist = domain.listMedicationHotlist(value, hcp);
                if (listMedicationHotlist != null)
                    listMedicationHotlist.sort(false);
                return listMedicationHotlist;
        }
    });
}
项目:openMAXIMS    文件:Logic.java   
private void rebindAllMedications()
{
    DynamicGridRowCollection rows = form.lyrMain().tabDetails().dyngrdMedication().getRows();
    MedicationLiteVoCollection allMedications = (MedicationLiteVoCollection) form.getLocalContext().getAllMedications().clone();
    if (allMedications == null)
        return;
    MedicationLiteVoCollection availableMedications = new MedicationLiteVoCollection();
    for (int i = 0; i < allMedications.size(); i++)
    {
        if (!isMedicationInGrid(allMedications.get(i)))
        {
            availableMedications.add(allMedications.get(i));
        }
    }
    availableMedications.sort();
    for (int i = 0; i < rows.size(); i++)
    {
        DynamicGridCell cell = rows.get(i).getCellArray()[0];
        Object value = cell.getValue();
        cell.getItems().clear();

        DynamicGridCellItem item = null;
        if (value != null)
        {
            item = cell.getItems().newItem(value);
            item.setValue(value);
        }
        for (int j = 0; j < availableMedications.size(); j++)
        {
            item = cell.getItems().newItem(availableMedications.get(j).getMedicationName());
            item.setValue(availableMedications.get(j));
        }
        cell.setValue(value);
    }
    for (int i = 0; i < availableMedications.size(); i++)
    {

    }
}