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

项目:openMAXIMS    文件:Logic.java   
private void open(Boolean search) 
{       
    form.ctnDetails().setCollapsed(true);
    MedicationOverViewVo voOverView = new MedicationOverViewVo();

    PatientRefVo voPat = new PatientRefVo();
    voPat.setID_Patient(form.getGlobalContext().Core.getPatientShort().getID_Patient());
    MedicationOverViewFilterVo voFilter = getSearchCriteria();

    clearAll();

    MedicationOverViewLiteVoCollection voColl = null;

    if (search)
    {
            voColl = domain.listMedicationOverviews(voFilter);

            if (voColl == null)
            {
                engine.showMessage("There is no current Medication Overview for this patient.");
                displayOrHideEnableDisableScreenSpecificControls();
                return;
            }

            for (int i = 0 ; i < voColl.size() ; i++)
            {
                MedicationOverViewLiteVo voOverLite = voColl.get(i);
                StringBuffer sb = new StringBuffer();
                sb.append(voOverLite.getTypeIsNotNull() ? voOverLite.getType().toString()+ ", " : "");
                sb.append(voOverLite.getAuthoringInformationIsNotNull() ? voOverLite.getAuthoringInformation().toString(" - ") + ", " : "");

                form.recbrOverviews().newRow(voOverLite, sb.toString());
            }

            if (voColl.size() > 0)
            {
                form.recbrOverviews().setValue(voColl.get(0));
            }
    }

    if (form.recbrOverviews().getValue() != null)
    {
        voOverView = domain.getMedicationOverView(form.recbrOverviews().getValue());
        openOverview(voOverView);
    }

    form.setMode(FormMode.VIEW);
    displayOrHideEnableDisableScreenSpecificControls();
    form.getLocalContext().setSelectedInstance(null);

}