Java 类ims.clinical.vo.DischargeMedicationDetailsVo 实例源码

项目:openMAXIMS    文件:Logic.java   
private String getMedicationDisplayText(DischargeMedicationDetailsVo voMeds)
{
    if (voMeds == null || voMeds.getTTARequired() == null)
    {   
        form.getLocalContext().setSummaryMedicationParamColour(Color.Default); //WDEV-19000
        return null;
    }   

    if (TTORequired.REQUIRED.equals(voMeds.getTTARequired()))
    {
        if (Boolean.TRUE.equals(voMeds.getTTAReceived())) //WDEV-19271
        {   
            form.getLocalContext().setSummaryMedicationParamColour(Color.LightGreen);
            return "Required and Received" ;
        }   
        form.getLocalContext().setSummaryMedicationParamColour(Color.DarkOrange);
        return "Required and NOT Received";

    }
    form.getLocalContext().setSummaryMedicationParamColour(Color.LightGreen);
    return voMeds.getTTARequired().getText(); 


}
项目:AvoinApotti    文件:Logic.java   
public void open()
{
    DischargeMedicationDetailsVo voMeds = domain.getMedication(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedRecord(voMeds);

    populateScreenFromData(voMeds);

    manageReadOnly();
    //WDEV-8369
    updateControlStateLblRefreshDateTime();
}
项目:AvoinApotti    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:AvoinApotti    文件:EDischargeMedicationComponentImpl.java   
/**
* saveFuturePlan
*/
public ims.clinical.vo.DischargeMedicationDetailsVo saveMedication(ims.clinical.vo.DischargeMedicationDetailsVo voMeds) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    if(voMeds == null)
        throw new CodingRuntimeException("DischargeMedicationDetailsVo is null");

    if(!voMeds.isValidated())
        throw new CodingRuntimeException("DischargeMedicationDetailsVo Value Object has not been validated");



    DomainFactory factory = getDomainFactory();
    MedicationDetails doMeds = DischargeMedicationDetailsVoAssembler.extractMedicationDetails(factory, voMeds);


    //WDEV-8813
    //Workaround for the case when 2 users save in the same time a new DischargeMedicationDetailsVo
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case

    if (!voMeds.getID_MedicationDetailsIsNotNull())
    {
        DischargeMedicationDetailsVo dmDetail = getMedication(voMeds.getCareContext());
        if (dmDetail != null)
            throw new StaleObjectException(doMeds,"A Discharge Medication Detail has been saved by another user");

    }
    factory.save(doMeds);
    return DischargeMedicationDetailsVoAssembler.create(doMeds);
}
项目:AvoinApotti    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:AvoinApotti    文件:EDischargePreViewComponentImpl.java   
public DischargeMedicationDetailsVo getDischargeMedicationDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeMedication = factory.find("select md from MedicationDetails as md left join md.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeMedicationDetailsVoCollection medication = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(dischargeMedication);       

    return medication != null && medication.size() > 0 ? (medication.get(0) != null ? medication.get(0) : null) : null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onBtnTTACommentsClick() throws PresentationLogicException
{
    DischargeMedicationDetailsVo selectedRecord = form.getLocalContext().getSelectedRecord();

    engine.open(form.getForms().Clinical.TTANotesDialog, new Object[] {selectedRecord}, false);
}
项目:openMAXIMS    文件:Logic.java   
public void open()
{
    DischargeMedicationDetailsVo voMeds = domain.getMedication(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedRecord(voMeds);

    populateScreenFromData(voMeds);

    manageReadOnly();

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException
{
    TTANoteRefVoCollection comments = null;

    // Get notes from argument
    if (args != null && args.length > 0)
    {
        if (args[0] instanceof DischargeMedicationDetailsVo)
        {
            DischargeMedicationDetailsVo dischargeMedication = (DischargeMedicationDetailsVo) args[0];
            comments = dischargeMedication.getTTAComments();
        }
        else if (args[0] instanceof TTAMedicationVo)
        {
            TTAMedicationVo medication = (TTAMedicationVo) args[0];
            comments = new TTANoteRefVoCollection();

            if (medication.getMedComments() != null)
            {
                for (TTANoteVo note : medication.getMedComments())
                    comments.add(note);
            }
        }
    }

    // Refresh the screen
    open(comments);
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:openMAXIMS    文件:EDischargeMedicationComponentImpl.java   
/**
* saveFuturePlan
*/
public DischargeMedicationDetailsVo saveMedication(DischargeMedicationDetailsVo voMeds, RTLSummaryVo rTLSummary) throws DomainInterfaceException, StaleObjectException
{
    if(voMeds == null)
        throw new CodingRuntimeException("DischargeMedicationDetailsVo is null");

    if(!voMeds.isValidated())
        throw new CodingRuntimeException("DischargeMedicationDetailsVo Value Object has not been validated");



    DomainFactory factory = getDomainFactory();
    MedicationDetails doMeds = DischargeMedicationDetailsVoAssembler.extractMedicationDetails(factory, voMeds);
    RTLSummary doRTLSummary = RTLSummaryVoAssembler.extractRTLSummary(factory, rTLSummary); //WDEV-18622


    //WDEV-8813
    //Workaround for the case when 2 users save in the same time a new DischargeMedicationDetailsVo
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case

    if (!voMeds.getID_MedicationDetailsIsNotNull())
    {
        DischargeMedicationDetailsVo dmDetail = getMedication(voMeds.getCareContext());
        if (dmDetail != null)
            throw new StaleObjectException(doMeds,"A Discharge Medication Detail has been saved by another user");

    }
    factory.save(doMeds);
    factory.save(doRTLSummary); //WDEV-18622
    return DischargeMedicationDetailsVoAssembler.create(doMeds);
}
项目:openMAXIMS    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
public void open()
{
    DischargeMedicationDetailsVo voMeds = domain.getMedication(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedRecord(voMeds);

    populateScreenFromData(voMeds);

    manageReadOnly();
    //WDEV-8369
    updateControlStateLblRefreshDateTime();
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:openMAXIMS    文件:EDischargeMedicationComponentImpl.java   
/**
* saveFuturePlan
*/
public ims.clinical.vo.DischargeMedicationDetailsVo saveMedication(ims.clinical.vo.DischargeMedicationDetailsVo voMeds) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    if(voMeds == null)
        throw new CodingRuntimeException("DischargeMedicationDetailsVo is null");

    if(!voMeds.isValidated())
        throw new CodingRuntimeException("DischargeMedicationDetailsVo Value Object has not been validated");



    DomainFactory factory = getDomainFactory();
    MedicationDetails doMeds = DischargeMedicationDetailsVoAssembler.extractMedicationDetails(factory, voMeds);


    //WDEV-8813
    //Workaround for the case when 2 users save in the same time a new DischargeMedicationDetailsVo
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case

    if (!voMeds.getID_MedicationDetailsIsNotNull())
    {
        DischargeMedicationDetailsVo dmDetail = getMedication(voMeds.getCareContext());
        if (dmDetail != null)
            throw new StaleObjectException(doMeds,"A Discharge Medication Detail has been saved by another user");

    }
    factory.save(doMeds);
    return DischargeMedicationDetailsVoAssembler.create(doMeds);
}
项目:openMAXIMS    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargePreViewComponentImpl.java   
public DischargeMedicationDetailsVo getDischargeMedicationDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeMedication = factory.find("select md from MedicationDetails as md left join md.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeMedicationDetailsVoCollection medication = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(dischargeMedication);       

    return medication != null && medication.size() > 0 ? (medication.get(0) != null ? medication.get(0) : null) : null;
}
项目:openmaxims-linux    文件:Logic.java   
public void open()
{
    DischargeMedicationDetailsVo voMeds = domain.getMedication(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setSelectedRecord(voMeds);

    populateScreenFromData(voMeds);

    manageReadOnly();
    //WDEV-8369
    updateControlStateLblRefreshDateTime();
}
项目:openmaxims-linux    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
    {
//TODO Put following two lines back in when the MEDS Componetn for STHK is implemented.
    //  EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    //  return impl.getMedication(careContextRefvo);

        if(careContextRefvo == null)
            throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

        if(careContextRefvo != null)
        {
            DomainFactory factory = getDomainFactory();
            StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
            String andStr = " ";

            ArrayList<String> markers = new ArrayList<String>();
            ArrayList<Serializable> values = new ArrayList<Serializable>();

            hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
            values.add(careContextRefvo.getID_CareContext());
            andStr = " and ";   

            List list = factory.find(hql.toString(), markers,values);
            if(list != null && list.size() > 0)
            { 
                DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
                if(voColl != null && voColl.size() > 0)
                    return voColl.get(0);
            }
        }
        return null;
    }
项目:openmaxims-linux    文件:EDischargeMedicationComponentImpl.java   
/**
* saveFuturePlan
*/
public ims.clinical.vo.DischargeMedicationDetailsVo saveMedication(ims.clinical.vo.DischargeMedicationDetailsVo voMeds) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    if(voMeds == null)
        throw new CodingRuntimeException("DischargeMedicationDetailsVo is null");

    if(!voMeds.isValidated())
        throw new CodingRuntimeException("DischargeMedicationDetailsVo Value Object has not been validated");



    DomainFactory factory = getDomainFactory();
    MedicationDetails doMeds = DischargeMedicationDetailsVoAssembler.extractMedicationDetails(factory, voMeds);


    //WDEV-8813
    //Workaround for the case when 2 users save in the same time a new DischargeMedicationDetailsVo
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case

    if (!voMeds.getID_MedicationDetailsIsNotNull())
    {
        DischargeMedicationDetailsVo dmDetail = getMedication(voMeds.getCareContext());
        if (dmDetail != null)
            throw new StaleObjectException(doMeds,"A Discharge Medication Detail has been saved by another user");

    }
    factory.save(doMeds);
    return DischargeMedicationDetailsVoAssembler.create(doMeds);
}
项目:openmaxims-linux    文件:EDischargeMedicationComponentImpl.java   
public ims.clinical.vo.DischargeMedicationDetailsVo getMedication(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from MedicationDetails md where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " md.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeMedicationDetailsVoCollection voColl = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openmaxims-linux    文件:EDischargePreViewComponentImpl.java   
public DischargeMedicationDetailsVo getDischargeMedicationDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeMedication = factory.find("select md from MedicationDetails as md left join md.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeMedicationDetailsVoCollection medication = DischargeMedicationDetailsVoAssembler.createDischargeMedicationDetailsVoCollectionFromMedicationDetails(dischargeMedication);       

    return medication != null && medication.size() > 0 ? (medication.get(0) != null ? medication.get(0) : null) : null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(DischargeMedicationDetailsVo voMeds)
{
    clearInstanceControls();
    //WDEV-8183
    form.grdMedication().getRows().clear();
    //Should clear even if the new value is null

    form.grdJAC().getRows().clear();
    if (voMeds == null)
        return;

    form.cmbRequired().setValue(voMeds.getTTARequired());
    //-----------------------------------------------------
    if (form.getMode().equals(FormMode.EDIT))
        form.btnOrderTTO().setVisible(TTORequired.REQUIRED.equals(form.cmbRequired().getValue())?true:false);
    //--------------------------------------------------------
     if (voMeds.getTTAsIsNotNull() )
     {
            //  WDEV-9537
            TTAMedicationVoCollection ttas = voMeds.getTTAs();
            ttas.sort(new TTANameCaseInsensitiveComparator<TTAMedicationVo>() );

            for ( int i = 0 ; i < ttas.size() ; i++)
            {
                TTAMedicationVo voTTA = ttas.get(i);

                grdJACRow row = form.grdJAC().getRows().newRow();
                row.setColMedication(voTTA.getMedication());
                //------------------
                row.setTooltipForColMedication(voTTA.getMedication());
                //------------------
                row.setColDose(voTTA.getDoseAmount().toString() + " " + (voTTA.getDoseUnitIsNotNull() ? voTTA.getDoseUnit().toString() : ""));
                //------------
                row.setTooltipForColDose(voTTA.getDoseAmount().toString() + " " + (voTTA.getDoseUnitIsNotNull() ? voTTA.getDoseUnit().toString() : ""));
                //-------------
                row.setColRoute(voTTA.getRouteIsNotNull() ? voTTA.getRoute().toString() : null);
                row.setTooltipForColRoute(voTTA.getRouteIsNotNull() ? voTTA.getRoute().toString() : "");
                row.setColUFreq(voTTA.getFrequency());
                row.setTooltipForColUFreq(voTTA.getFrequency());
                row.setColDays(voTTA.getDaysSupply().toString());
                //------
                row.setTooltipForColDays(voTTA.getDaysSupply().toString());
                //----------
                row.setColGpCont(voTTA.getGpToContinueIsNotNull() ? voTTA.getGpToContinue().toString() : null);
                //---------------
                row.setTooltipForColGpCont(voTTA.getGpToContinueIsNotNull() ? voTTA.getGpToContinue().toString() : "");
                //---------
                row.setValue(voTTA);


                form.lblRefreshDateTime().setValue(voTTA.getSysInfoIsNotNull() ? voTTA.getSysInfo().getCreationDateTime().toString() : "");
            }
     }
    //form.grdJAC().sort(0);
    if (voMeds.getAdmissionMedicationChangesIsNotNull())
    {
        //  WDEV-9537
        AdmissionMedicationChangesVoCollection admissionMedicationChanges = voMeds.getAdmissionMedicationChanges();
        admissionMedicationChanges.sort(new TTANameCaseInsensitiveComparator<AdmissionMedicationChangesVo>());

        for ( int i = 0 ;i < admissionMedicationChanges.size() ; i++)
        {
            AdmissionMedicationChangesVo voChanges = admissionMedicationChanges.get(i);

            grdMedicationRow rowMeds = form.grdMedication().getRows().newRow();
            rowMeds.setcolAdm(voChanges.getMedication());
            rowMeds.setcolChange(voChanges.getMedicationChanges());
            rowMeds.setValue(voChanges);
        }
    //form.grdMedication().sort(0);
    }
    form.txtMedicationRecommendations().setValue(voMeds.getMedicationRecommendations());
}
项目:AvoinApotti    文件:EDischargePatientReadyToLeaveComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
{
    EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    return impl.getMedication(careContextRefvo);
}
项目:openMAXIMS    文件:Logic.java   
private void populateEDischSummaryGridFromRTLData(RTLSummaryVo readyToLeaveSummary, DischargeMedicationDetailsVo voMeds)
{

    DynamicGridRow medicationRow = form.dynGrdEdischSummary().getRows().newRow();
    medicationRow.setSelectable(Boolean.FALSE);
    medicationRow.setReadOnly(Boolean.TRUE);
    DynamicGridCell paramNameCell = medicationRow.getCells().newCell(getColumn(COL_SUMMARY_PARAM_NAME), DynamicCellType.HTMLVIEW);
    paramNameCell.setValue("Medication");


    DynamicGridRow signOffRow = form.dynGrdEdischSummary().getRows().newRow();
    signOffRow.setSelectable(Boolean.FALSE);
    signOffRow.setReadOnly(Boolean.TRUE);
    paramNameCell = signOffRow.getCells().newCell(getColumn(COL_SUMMARY_PARAM_NAME), DynamicCellType.HTMLVIEW);
    paramNameCell.setValue("Signed Off by Clinician");

    DynamicGridRow readyToLeaveRow = form.dynGrdEdischSummary().getRows().newRow();
    readyToLeaveRow.setSelectable(Boolean.FALSE);
    readyToLeaveRow.setReadOnly(Boolean.TRUE);
    paramNameCell = readyToLeaveRow.getCells().newCell(getColumn(COL_SUMMARY_PARAM_NAME), DynamicCellType.HTMLVIEW);
    paramNameCell.setValue("'Ready to Leave' Completed"); 

    String medicationDisplayInfo = getMedicationDisplayText(voMeds);
    DynamicGridCell paramValueCell = medicationRow.getCells().newCell(getColumn(COL_SUMMARY_PARAM_VALUE), DynamicCellType.HTMLVIEW);
    paramValueCell.setValue(medicationDisplayInfo != null ?  "&nbsp;" + medicationDisplayInfo : "");
    medicationRow.setBackColor(form.getLocalContext().getSummaryMedicationParamColour());

    if (readyToLeaveSummary != null)
    {   
        boolean wasSignedOff =  readyToLeaveSummary.getWasPreviewSignedOff() != null && readyToLeaveSummary.getWasPreviewSignedOff();
        paramValueCell = signOffRow.getCells().newCell(getColumn(COL_SUMMARY_PARAM_VALUE), DynamicCellType.HTMLVIEW);
        paramValueCell.setValue(wasSignedOff ? "&nbsp;Signed Off" : "");
        if (wasSignedOff)
            signOffRow.setBackColor(Color.LightGreen);

        boolean wasRTLComplete = readyToLeaveSummary.getWasRTLCompleted() != null && readyToLeaveSummary.getWasRTLCompleted();
        paramValueCell = readyToLeaveRow.getCells().newCell(getColumn(COL_SUMMARY_PARAM_VALUE), DynamicCellType.HTMLVIEW);
        paramValueCell.setValue(wasRTLComplete ? "&nbsp;Completed" : "");
        if (wasRTLComplete)
            readyToLeaveRow.setBackColor(Color.LightGreen); 
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DischargeMedicationDetailsVo voMeds)
{
    clearInstanceControls();
    //WDEV-8183
    form.grdMedication().getRows().clear();
    //Should clear even if the new value is null

    if (voMeds == null)
        return;

    form.cmbRequired().setValue(voMeds.getTTARequired());
    //-----------------------------------------------------
    if (form.getMode().equals(FormMode.EDIT))
        form.btnOrderTTO().setVisible(TTORequired.REQUIRED.equals(form.cmbRequired().getValue())?true:false);
    //--------------------------------------------------------
     if (voMeds.getTTAsIsNotNull())
     {
            //  WDEV-9537
            TTAMedicationVoCollection ttas = voMeds.getTTAs();
            //ttas.sort(new TTANameCaseInsensitiveComparator<TTAMedicationVo>() );
            populateTTAsFromData(ttas.sort()); //WDEV-19289 //WDEV-19789 

     }
    //form.grdJAC().sort(0);
    if (voMeds.getAdmissionMedicationChangesIsNotNull())
    {
        //  WDEV-9537
        AdmissionMedicationChangesVoCollection admissionMedicationChanges = voMeds.getAdmissionMedicationChanges();
        admissionMedicationChanges.sort(new TTANameCaseInsensitiveComparator<AdmissionMedicationChangesVo>());

        for ( int i = 0 ;i < admissionMedicationChanges.size() ; i++)
        {
            AdmissionMedicationChangesVo voChanges = admissionMedicationChanges.get(i);

            grdMedicationRow rowMeds = form.grdMedication().getRows().newRow();
            rowMeds.setcolAdm(voChanges.getMedication());
            rowMeds.setcolChange(voChanges.getMedicationChanges());
            rowMeds.setValue(voChanges);
        }
    //form.grdMedication().sort(0);
    }
    form.txtMedicationRecommendations().setValue(voMeds.getMedicationRecommendations());
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
{
    EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    return impl.getMedication(careContextRefvo);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DischargeMedicationDetailsVo voMeds)
{
    clearInstanceControls();
    //WDEV-8183
    form.grdMedication().getRows().clear();
    //Should clear even if the new value is null

    form.grdJAC().getRows().clear();
    if (voMeds == null)
        return;

    form.cmbRequired().setValue(voMeds.getTTARequired());
    //-----------------------------------------------------
    if (form.getMode().equals(FormMode.EDIT))
        form.btnOrderTTO().setVisible(TTORequired.REQUIRED.equals(form.cmbRequired().getValue())?true:false);
    //--------------------------------------------------------
     if (voMeds.getTTAsIsNotNull() )
     {
            //  WDEV-9537
            TTAMedicationVoCollection ttas = voMeds.getTTAs();
            ttas.sort(new TTANameCaseInsensitiveComparator<TTAMedicationVo>() );

            for ( int i = 0 ; i < ttas.size() ; i++)
            {
                TTAMedicationVo voTTA = ttas.get(i);

                grdJACRow row = form.grdJAC().getRows().newRow();
                row.setColMedication(voTTA.getMedication());
                //------------------
                row.setTooltipForColMedication(voTTA.getMedication());
                //------------------
                row.setColDose(voTTA.getDoseAmount().toString() + " " + (voTTA.getDoseUnitIsNotNull() ? voTTA.getDoseUnit().toString() : ""));
                //------------
                row.setTooltipForColDose(voTTA.getDoseAmount().toString() + " " + (voTTA.getDoseUnitIsNotNull() ? voTTA.getDoseUnit().toString() : ""));
                //-------------
                row.setColRoute(voTTA.getRouteIsNotNull() ? voTTA.getRoute().toString() : null);
                row.setTooltipForColRoute(voTTA.getRouteIsNotNull() ? voTTA.getRoute().toString() : "");
                row.setColUFreq(voTTA.getFrequency());
                row.setTooltipForColUFreq(voTTA.getFrequency());
                row.setColDays(voTTA.getDaysSupply().toString());
                //------
                row.setTooltipForColDays(voTTA.getDaysSupply().toString());
                //----------
                row.setColGpCont(voTTA.getGpToContinueIsNotNull() ? voTTA.getGpToContinue().toString() : null);
                //---------------
                row.setTooltipForColGpCont(voTTA.getGpToContinueIsNotNull() ? voTTA.getGpToContinue().toString() : "");
                //---------
                row.setValue(voTTA);


                form.lblRefreshDateTime().setValue(voTTA.getSysInfoIsNotNull() ? voTTA.getSysInfo().getCreationDateTime().toString() : "");
            }
     }
    //form.grdJAC().sort(0);
    if (voMeds.getAdmissionMedicationChangesIsNotNull())
    {
        //  WDEV-9537
        AdmissionMedicationChangesVoCollection admissionMedicationChanges = voMeds.getAdmissionMedicationChanges();
        admissionMedicationChanges.sort(new TTANameCaseInsensitiveComparator<AdmissionMedicationChangesVo>());

        for ( int i = 0 ;i < admissionMedicationChanges.size() ; i++)
        {
            AdmissionMedicationChangesVo voChanges = admissionMedicationChanges.get(i);

            grdMedicationRow rowMeds = form.grdMedication().getRows().newRow();
            rowMeds.setcolAdm(voChanges.getMedication());
            rowMeds.setcolChange(voChanges.getMedicationChanges());
            rowMeds.setValue(voChanges);
        }
    //form.grdMedication().sort(0);
    }
    form.txtMedicationRecommendations().setValue(voMeds.getMedicationRecommendations());
}
项目:openMAXIMS    文件:EDischargePatientReadyToLeaveComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
{
    EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    return impl.getMedication(careContextRefvo);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData(DischargeMedicationDetailsVo voMeds)
{
    clearInstanceControls();
    //WDEV-8183
    form.grdMedication().getRows().clear();
    //Should clear even if the new value is null

    form.grdJAC().getRows().clear();
    if (voMeds == null)
        return;

    form.cmbRequired().setValue(voMeds.getTTARequired());
    //-----------------------------------------------------
    if (form.getMode().equals(FormMode.EDIT))
        form.btnOrderTTO().setVisible(TTORequired.REQUIRED.equals(form.cmbRequired().getValue())?true:false);
    //--------------------------------------------------------
     if (voMeds.getTTAsIsNotNull() )
     {
            //  WDEV-9537
            TTAMedicationVoCollection ttas = voMeds.getTTAs();
            ttas.sort(new TTANameCaseInsensitiveComparator<TTAMedicationVo>() );

            for ( int i = 0 ; i < ttas.size() ; i++)
            {
                TTAMedicationVo voTTA = ttas.get(i);

                grdJACRow row = form.grdJAC().getRows().newRow();
                row.setColMedication(voTTA.getMedication());
                //------------------
                row.setTooltipForColMedication(voTTA.getMedication());
                //------------------
                row.setColDose(voTTA.getDoseAmount().toString() + " " + (voTTA.getDoseUnitIsNotNull() ? voTTA.getDoseUnit().toString() : ""));
                //------------
                row.setTooltipForColDose(voTTA.getDoseAmount().toString() + " " + (voTTA.getDoseUnitIsNotNull() ? voTTA.getDoseUnit().toString() : ""));
                //-------------
                row.setColRoute(voTTA.getRouteIsNotNull() ? voTTA.getRoute().toString() : null);
                row.setTooltipForColRoute(voTTA.getRouteIsNotNull() ? voTTA.getRoute().toString() : "");
                row.setColUFreq(voTTA.getFrequency());
                row.setTooltipForColUFreq(voTTA.getFrequency());
                row.setColDays(voTTA.getDaysSupply().toString());
                //------
                row.setTooltipForColDays(voTTA.getDaysSupply().toString());
                //----------
                row.setColGpCont(voTTA.getGpToContinueIsNotNull() ? voTTA.getGpToContinue().toString() : null);
                //---------------
                row.setTooltipForColGpCont(voTTA.getGpToContinueIsNotNull() ? voTTA.getGpToContinue().toString() : "");
                //---------
                row.setValue(voTTA);


                form.lblRefreshDateTime().setValue(voTTA.getSysInfoIsNotNull() ? voTTA.getSysInfo().getCreationDateTime().toString() : "");
            }
     }
    //form.grdJAC().sort(0);
    if (voMeds.getAdmissionMedicationChangesIsNotNull())
    {
        //  WDEV-9537
        AdmissionMedicationChangesVoCollection admissionMedicationChanges = voMeds.getAdmissionMedicationChanges();
        admissionMedicationChanges.sort(new TTANameCaseInsensitiveComparator<AdmissionMedicationChangesVo>());

        for ( int i = 0 ;i < admissionMedicationChanges.size() ; i++)
        {
            AdmissionMedicationChangesVo voChanges = admissionMedicationChanges.get(i);

            grdMedicationRow rowMeds = form.grdMedication().getRows().newRow();
            rowMeds.setcolAdm(voChanges.getMedication());
            rowMeds.setcolChange(voChanges.getMedicationChanges());
            rowMeds.setValue(voChanges);
        }
    //form.grdMedication().sort(0);
    }
    form.txtMedicationRecommendations().setValue(voMeds.getMedicationRecommendations());
}
项目:openmaxims-linux    文件:EDischargePatientReadyToLeaveComponentImpl.java   
public DischargeMedicationDetailsVo getMedication(CareContextRefVo careContextRefvo) 
{
    EDischargeMedicationComponent impl = (EDischargeMedicationComponent)getDomainImpl(EDischargeMedicationComponentImpl.class);
    return impl.getMedication(careContextRefvo);
}