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

项目:AvoinApotti    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private String getTelephone(GpLiteVo gp)
{
    if (gp == null)
        return null;
    if (!gp.getCommChannelsIsNotNull())
        return null;
    for (int i = 0 ; i < gp.getCommChannels().size() ; i++)
    {
        CommChannelVo commChannelVo = gp.getCommChannels().get(i);
        if (ChannelType.GEN_PHONE.equals(commChannelVo.getChannelType()) || 
                ChannelType.HOME_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.WORK_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.MOBILE.equals(commChannelVo.getChannelType()))
                return commChannelVo.getCommValue();
    }   
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String getGpMailAddress(GpLiteVo patientGp)
{
    if (patientGp == null)
        return null;

    String mail = null;

    if (patientGp.getCommChannelsIsNotNull())
    {
        for (int i = 0; i < patientGp.getCommChannels().size(); i++)
        {
            if (patientGp.getCommChannels().get(i) == null)
                continue;

            if (ChannelType.EMAIL.equals(patientGp.getCommChannels().get(i).getChannelType()) && patientGp.getCommChannels().get(i).getCommValue() != null)
            {
                mail = patientGp.getCommChannels().get(i).getCommValue();
            }
        }
    }

    return mail;
}
项目:AvoinApotti    文件:Logic.java   
private void setValueInGrid(GpLiteVo value)
{
    if (value != null)
    {
        if (form.grdGps().getValues().indexOf(value) < 0)
        {
            populateGpRow(value, form.grdGps().getRows().newRow());
        }
        else
        {
            grdGpsRow row = form.grdGps().getRowByValue(value);
            if(row != null)
                populateGpRow(value, row);  
        }
    }
    form.grdGps().setValue(value);
    enableContextMenu();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private String getTelephone(GpLiteVo gp)
{
    if (gp == null)
        return null;
    if (!gp.getCommChannelsIsNotNull())
        return null;
    for (int i = 0 ; i < gp.getCommChannels().size() ; i++)
    {
        CommChannelVo commChannelVo = gp.getCommChannels().get(i);
        if (ChannelType.GEN_PHONE.equals(commChannelVo.getChannelType()) || 
                ChannelType.HOME_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.WORK_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.MOBILE.equals(commChannelVo.getChannelType()))
                return commChannelVo.getCommValue();
    }   
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private String getGpMailAddress(GpLiteVo patientGp)
{
    if (patientGp == null)
        return null;

    String mail = null;

    if (patientGp.getCommChannelsIsNotNull())
    {
        for (int i = 0; i < patientGp.getCommChannels().size(); i++)
        {
            if (patientGp.getCommChannels().get(i) == null)
                continue;

            if (ChannelType.EMAIL.equals(patientGp.getCommChannels().get(i).getChannelType()) && patientGp.getCommChannels().get(i).getCommValue() != null)
            {
                mail = patientGp.getCommChannels().get(i).getCommValue();
            }
        }
    }

    return mail;
}
项目:openMAXIMS    文件:Logic.java   
private void addGpRow(GpLiteVo gp, DynamicGridRow row) 
{
    if(gp == null)
        return;

    if(gp instanceof GPLiteWithPracticesVo)
    {

        GPLiteWithPracticesVo voGpWithPractice = (GPLiteWithPracticesVo)gp;

        DynamicGridRow gpRow = form.dynGrdGps().getRows().newRow();
        gpRow.setSelectable(Boolean.TRUE);
        gpRow.setReadOnly(Boolean.TRUE);

        DynamicGridCell gpNmeCell = gpRow.getCells().newCell(getColumn(COL_GP_NAME), DynamicCellType.HTMLVIEW);
        gpNmeCell.setValue(voGpWithPractice.getName().toString() + (voGpWithPractice.getNationalCode() != null ? "<br/>" + voGpWithPractice.getNationalCode(): "")); //WDEV-18739
        gpNmeCell.setTooltip("GP Name: " + voGpWithPractice.getName().toString() + "<br/>"+ (voGpWithPractice.getNationalCode() != null ? "National GP Code: " +  voGpWithPractice.getNationalCode(): ""));

        gpRow.setValue(gp);
        gpRow.setIdentifier((GpRefVo)gp);
        populatePracticesInGrid (voGpWithPractice,gpRow);

    }
}
项目:openMAXIMS    文件:Logic.java   
private ValueObject getSelectedValue()
{
    if (form.grdGps().getValue() != null)
        return (GpLiteVo) form.grdGps().getSelectedRow().getValue();

    if (form.dynGrdGps().getValue() != null && form.dynGrdGps().isVisible())
    {
        if (form.dynGrdGps().getValue() instanceof GpLiteVo)
            return (GpLiteVo) form.dynGrdGps().getValue();
        if (form.dynGrdGps().getValue() instanceof GpLiteToPracticeLiteVo)
            return (GpLiteToPracticeLiteVo) form.dynGrdGps().getValue();

        if (form.dynGrdGps().getValue() instanceof LocSiteShortVo)
            return ((LocSiteShortVo) form.dynGrdGps().getValue());
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void setValueInGrid(GpLiteVo value)
{
    if (value != null)
    {
        if (form.grdGps().getValues().indexOf(value) < 0)
        {
            populateGpRow(value, form.grdGps().getRows().newRow());
        }
        else
        {
            grdGpsRow row = form.grdGps().getRowByValue(value);
            if(row != null)
                populateGpRow(value, row);  
        }
    }
    form.grdGps().setValue(value);
    enableContextMenu();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private String getTelephone(GpLiteVo gp)
{
    if (gp == null)
        return null;
    if (!gp.getCommChannelsIsNotNull())
        return null;
    for (int i = 0 ; i < gp.getCommChannels().size() ; i++)
    {
        CommChannelVo commChannelVo = gp.getCommChannels().get(i);
        if (ChannelType.GEN_PHONE.equals(commChannelVo.getChannelType()) || 
                ChannelType.HOME_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.WORK_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.MOBILE.equals(commChannelVo.getChannelType()))
                return commChannelVo.getCommValue();
    }   
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private String getGpMailAddress(GpLiteVo patientGp)
{
    if (patientGp == null)
        return null;

    String mail = null;

    if (patientGp.getCommChannelsIsNotNull())
    {
        for (int i = 0; i < patientGp.getCommChannels().size(); i++)
        {
            if (patientGp.getCommChannels().get(i) == null)
                continue;

            if (ChannelType.EMAIL.equals(patientGp.getCommChannels().get(i).getChannelType()) && patientGp.getCommChannels().get(i).getCommValue() != null)
            {
                mail = patientGp.getCommChannels().get(i).getCommValue();
            }
        }
    }

    return mail;
}
项目:openMAXIMS    文件:Logic.java   
private void setValueInGrid(GpLiteVo value)
{
    if (value != null)
    {
        if (form.grdGps().getValues().indexOf(value) < 0)
        {
            populateGpRow(value, form.grdGps().getRows().newRow());
        }
        else
        {
            grdGpsRow row = form.grdGps().getRowByValue(value);
            if(row != null)
                populateGpRow(value, row);  
        }
    }
    form.grdGps().setValue(value);
    enableContextMenu();
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * @param voGP
 */
private void populateGPDetails(GpLiteVo voGP, LocSiteShortVo voPractice)
{
    if (voGP != null)
    {
        form.ctnPatientDetails().txtSurname().setValue(voGP.getNameIsNotNull() ? voGP.getName().toString() : null);
        if (voPractice != null)
        {
            if (voPractice.getAddressIsNotNull())
            {
                if (voPractice.getAddress().getLine1IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine1());
                if (voPractice.getAddress().getLine2IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine2());
                if (voPractice.getAddress().getLine3IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine3());
                if (voPractice.getAddress().getLine4IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine4());
                if (voPractice.getAddress().getLine5IsNotNull())
                    form.ctnPatientDetails().txtRefDocAddress1().setValue(voPractice.getAddress().getLine5());
            }
            form.getLocalContext().setReferrerGP(voGP);
            form.getLocalContext().setReferrerPractice(voPractice);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private String getTelephone(GpLiteVo gp)
{
    if (gp == null)
        return null;
    if (!gp.getCommChannelsIsNotNull())
        return null;
    for (int i = 0 ; i < gp.getCommChannels().size() ; i++)
    {
        CommChannelVo commChannelVo = gp.getCommChannels().get(i);
        if (ChannelType.GEN_PHONE.equals(commChannelVo.getChannelType()) || 
                ChannelType.HOME_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.WORK_PHONE.equals(commChannelVo.getChannelType()) ||
                ChannelType.MOBILE.equals(commChannelVo.getChannelType()))
                return commChannelVo.getCommValue();
    }   
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private String getGpMailAddress(GpLiteVo patientGp)
{
    if (patientGp == null)
        return null;

    String mail = null;

    if (patientGp.getCommChannelsIsNotNull())
    {
        for (int i = 0; i < patientGp.getCommChannels().size(); i++)
        {
            if (patientGp.getCommChannels().get(i) == null)
                continue;

            if (ChannelType.EMAIL.equals(patientGp.getCommChannels().get(i).getChannelType()) && patientGp.getCommChannels().get(i).getCommValue() != null)
            {
                mail = patientGp.getCommChannels().get(i).getCommValue();
            }
        }
    }

    return mail;
}
项目:openmaxims-linux    文件:Logic.java   
private void setValueInGrid(GpLiteVo value)
{
    if (value != null)
    {
        if (form.grdGps().getValues().indexOf(value) < 0)
        {
            populateGpRow(value, form.grdGps().getRows().newRow());
        }
        else
        {
            grdGpsRow row = form.grdGps().getRowByValue(value);
            if(row != null)
                populateGpRow(value, row);  
        }
    }
    form.grdGps().setValue(value);
    enableContextMenu();
}
项目:AvoinApotti    文件:DocumentWorklistImpl.java   
public GpLiteVo getPatientGp(PatientRefVo patient)
{
    if(patient == null || !patient.getID_PatientIsNotNull())
        throw new CodingRuntimeException("Can not get Patient Gp on null Patient.");

    DomainFactory factory = getDomainFactory();

    List<?> gpList = factory.find("select gp from Patient as p left join p.gp as gp where (p.id = :patientid and gp.isRIE is null)", new String[] {"patientid"}, new Object[] {patient.getID_Patient()});

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

    return GpLiteVoAssembler.create((Gp) gpList.get(0));
}
项目:AvoinApotti    文件:PatientDocumentsImpl.java   
public GpLiteVo getPatientGp(PatientRefVo patient) 
{
    if(patient == null || !patient.getID_PatientIsNotNull())
        throw new CodingRuntimeException("Can not get Patient Gp on null Patient.");

    DomainFactory factory = getDomainFactory();

    List<?> gpList = factory.find("select gp from Patient as p left join p.gp as gp where p.id = :patientid", new String[] {"patientid"}, new Object[] {patient.getID_Patient()});

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

    return GpLiteVoAssembler.create((Gp) gpList.get(0));
}
项目:AvoinApotti    文件:Logic.java   
public GP getFullGpVo()
{
    GpLiteVo voGpLite = getSelectedValue();
    if(voGpLite != null)
        return domain.getGpFull(voGpLite);

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateGpRow(GpLiteVo voLiteVo, GenForm.grdGpsRow row)
{
    if(voLiteVo == null)
        return;
    row.setGpName(voLiteVo.getNameIsNotNull()?voLiteVo.getName().toString():"");

    String strDisplay = "";
    if(voLiteVo instanceof GPLiteWithPracticesVo)
    {
        GPLiteWithPracticesVo voGpWithPractice = (GPLiteWithPracticesVo)voLiteVo;
        if(voGpWithPractice.getPracticesIsNotNull() && voGpWithPractice.getPractices().size() > 0)
        {
            int count = 0;
            for(GpLiteToPracticeLiteVo voGpToPractice : voGpWithPractice.getPractices())
            {
                if(voGpToPractice.getPracticeIsNotNull())
                {
                    count++;
                    strDisplay += voGpToPractice.getPractice().getName();
                    strDisplay += count < (voGpWithPractice.getPractices().size()) ? "," : "";
                }
            }
        }
    }


    row.setColPractice(strDisplay);
    row.setTooltipForColPractice(strDisplay);

    row.setNatCode(voLiteVo.getNationalCode());
    row.setValue(voLiteVo);
}
项目:AvoinApotti    文件:Logic.java   
private void addClinician(ValueObject clinician)
{
    if (clinician instanceof HcpLiteVo)
        addHcp((HcpLiteVo) clinician);
    else if (clinician instanceof GpLiteVo)
        addGp((GpLiteVo) clinician);
}
项目:AvoinApotti    文件:MyOrderImpl.java   
public GpLiteVo getReferrerGP(CatsReferralRefVo catsRef)
{
    if (catsRef == null || catsRef.getID_CatsReferral() == null)
        throw new CodingRuntimeException("catsRef is null or id not provided in method getReferrerGP");

    String hql = "select refDetail.gPName from CatsReferral as cats left join cats.referralDetails as refDetail where cats.id = '" + catsRef.getID_CatsReferral() + "'";

    List gps = getDomainFactory().find(hql);
    if(gps.size() > 0)
    {
        return GpLiteVoAssembler.create((Gp)gps.get(0));    
    }

    return null;    
}
项目:AvoinApotti    文件:Logic.java   
private boolean isGpAlreadyAdded(GpLiteVo voGp) {
    for (int i = 0; i < form.grdReciepient().getRows().size(); i++)
    {
        if(form.grdReciepient().getRows().get(i).getValue() != null)
        {
            if(form.grdReciepient().getRows().get(i).getValue().getNameIsNotNull() && form.grdReciepient().getRows().get(i).getValue().getID_Gp().equals(voGp.getID_Gp()))
            {
                return true;
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:DocumentWorklistImpl.java   
public GpLiteVo getPatientGp(PatientRefVo patient)
{
    if(patient == null || !patient.getID_PatientIsNotNull())
        throw new CodingRuntimeException("Can not get Patient Gp on null Patient.");

    DomainFactory factory = getDomainFactory();

    List<?> gpList = factory.find("select gp from Patient as p left join p.gp as gp where (p.id = :patientid and gp.isRIE is null)", new String[] {"patientid"}, new Object[] {patient.getID_Patient()});

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

    return GpLiteVoAssembler.create((Gp) gpList.get(0));
}
项目:openMAXIMS    文件:PatientDocumentsImpl.java   
public GpLiteVo getPatientGp(PatientRefVo patient) 
{
    if(patient == null || !patient.getID_PatientIsNotNull())
        throw new CodingRuntimeException("Can not get Patient Gp on null Patient.");

    DomainFactory factory = getDomainFactory();

    List<?> gpList = factory.find("select gp from Patient as p left join p.gp as gp where p.id = :patientid", new String[] {"patientid"}, new Object[] {patient.getID_Patient()});

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

    return GpLiteVoAssembler.create((Gp) gpList.get(0));
}
项目:openMAXIMS    文件:Logic.java   
protected void onDynGrdGpsRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
    enableContextMenu();
    if (row.getValue() instanceof GpLiteVo) 
        setSelectedRecordType(GPSelectedRecordType.GP);
    else if (row.getValue() instanceof GpLiteToPracticeLiteVo) 
        setSelectedRecordType(GPSelectedRecordType.PRACTICE);
    else if (row.getValue() instanceof LocShortVo) 
        setSelectedRecordType(GPSelectedRecordType.SURGERY);
    else
        setSelectedRecordType(GPSelectedRecordType.NONE); 
    setActionAndFireEvent(GPAction.SELECT);
}
项目:openMAXIMS    文件:Logic.java   
private void populateGpRow(GpLiteVo voLiteVo, GenForm.grdGpsRow row)
{
    if(voLiteVo == null)
        return;
    row.setGpName(voLiteVo.getNameIsNotNull()?voLiteVo.getName().toString():"");

    String strDisplay = "";
    if(voLiteVo instanceof GPLiteWithPracticesVo)
    {
        GPLiteWithPracticesVo voGpWithPractice = (GPLiteWithPracticesVo)voLiteVo;
        if(voGpWithPractice.getPracticesIsNotNull() && voGpWithPractice.getPractices().size() > 0)
        {
            int count = 0;
            for(GpLiteToPracticeLiteVo voGpToPractice : voGpWithPractice.getPractices())
            {
                if(voGpToPractice.getPracticeIsNotNull())
                {
                    count++;
                    strDisplay += voGpToPractice.getPractice().getName();
                    strDisplay += count < (voGpWithPractice.getPractices().size()) ? "," : "";
                }
            }
        }
    }


    row.setColPractice(strDisplay);
    row.setTooltipForColPractice(strDisplay);

    row.setNatCode(voLiteVo.getNationalCode());
    row.setValue(voLiteVo);
}
项目:openMAXIMS    文件:Logic.java   
private DynamicGridRow getRowforGridValue(GpLiteVo value)
{
    for (int i=0;i<form.dynGrdGps().getRows().size();i++)
    {
        if (form.dynGrdGps().getRows().get(i).getValue() instanceof GpLiteVo && form.dynGrdGps().getRows().get(i).getValue().equals(value))
            return form.dynGrdGps().getRows().get(i);

    }
    return null;    
}
项目:openMAXIMS    文件:Logic.java   
private void addClinician(ValueObject clinician)
{
    if (clinician instanceof HcpLiteVo)
        addHcp((HcpLiteVo) clinician);
    else if (clinician instanceof GpLiteVo)
        addGp((GpLiteVo) clinician);
}
项目:openMAXIMS    文件:MyOrderImpl.java   
public GpLiteVo getReferrerGP(CatsReferralRefVo catsRef)
{
    if (catsRef == null || catsRef.getID_CatsReferral() == null)
        throw new CodingRuntimeException("catsRef is null or id not provided in method getReferrerGP");

    String hql = "select refDetail.gPName from CatsReferral as cats left join cats.referralDetails as refDetail where cats.id = '" + catsRef.getID_CatsReferral() + "'";

    List gps = getDomainFactory().find(hql);
    if(gps.size() > 0)
    {
        return GpLiteVoAssembler.create((Gp)gps.get(0));    
    }

    return null;    
}
项目:openMAXIMS    文件:Logic.java   
private boolean isGpAlreadyAdded(GpLiteVo voGp) {
    for (int i = 0; i < form.grdReciepient().getRows().size(); i++)
    {
        if(form.grdReciepient().getRows().get(i).getValue() != null)
        {
            if(form.grdReciepient().getRows().get(i).getValue().getNameIsNotNull() && form.grdReciepient().getRows().get(i).getValue().getID_Gp().equals(voGp.getID_Gp()))
            {
                return true;
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:DocumentWorklistImpl.java   
public GpLiteVo getPatientGp(PatientRefVo patient)
{
    if(patient == null || !patient.getID_PatientIsNotNull())
        throw new CodingRuntimeException("Can not get Patient Gp on null Patient.");

    DomainFactory factory = getDomainFactory();

    List<?> gpList = factory.find("select gp from Patient as p left join p.gp as gp where (p.id = :patientid and gp.isRIE is null)", new String[] {"patientid"}, new Object[] {patient.getID_Patient()});

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

    return GpLiteVoAssembler.create((Gp) gpList.get(0));
}
项目:openMAXIMS    文件:PatientDocumentsImpl.java   
public GpLiteVo getPatientGp(PatientRefVo patient) 
{
    if(patient == null || !patient.getID_PatientIsNotNull())
        throw new CodingRuntimeException("Can not get Patient Gp on null Patient.");

    DomainFactory factory = getDomainFactory();

    List<?> gpList = factory.find("select gp from Patient as p left join p.gp as gp where p.id = :patientid", new String[] {"patientid"}, new Object[] {patient.getID_Patient()});

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

    return GpLiteVoAssembler.create((Gp) gpList.get(0));
}
项目:openMAXIMS    文件:Logic.java   
public GP getFullGpVo()
{
    GpLiteVo voGpLite = getSelectedValue();
    if(voGpLite != null)
        return domain.getGpFull(voGpLite);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateGpRow(GpLiteVo voLiteVo, GenForm.grdGpsRow row)
{
    if(voLiteVo == null)
        return;
    row.setGpName(voLiteVo.getNameIsNotNull()?voLiteVo.getName().toString():"");

    String strDisplay = "";
    if(voLiteVo instanceof GPLiteWithPracticesVo)
    {
        GPLiteWithPracticesVo voGpWithPractice = (GPLiteWithPracticesVo)voLiteVo;
        if(voGpWithPractice.getPracticesIsNotNull() && voGpWithPractice.getPractices().size() > 0)
        {
            int count = 0;
            for(GpLiteToPracticeLiteVo voGpToPractice : voGpWithPractice.getPractices())
            {
                if(voGpToPractice.getPracticeIsNotNull())
                {
                    count++;
                    strDisplay += voGpToPractice.getPractice().getName();
                    strDisplay += count < (voGpWithPractice.getPractices().size()) ? "," : "";
                }
            }
        }
    }


    row.setColPractice(strDisplay);
    row.setTooltipForColPractice(strDisplay);

    row.setNatCode(voLiteVo.getNationalCode());
    row.setValue(voLiteVo);
}
项目:openMAXIMS    文件:Logic.java   
private void addClinician(ValueObject clinician)
{
    if (clinician instanceof HcpLiteVo)
        addHcp((HcpLiteVo) clinician);
    else if (clinician instanceof GpLiteVo)
        addGp((GpLiteVo) clinician);
}
项目:openMAXIMS    文件:MyOrderImpl.java   
public GpLiteVo getReferrerGP(CatsReferralRefVo catsRef)
{
    if (catsRef == null || catsRef.getID_CatsReferral() == null)
        throw new CodingRuntimeException("catsRef is null or id not provided in method getReferrerGP");

    String hql = "select refDetail.gPName from CatsReferral as cats left join cats.referralDetails as refDetail where cats.id = '" + catsRef.getID_CatsReferral() + "'";

    List gps = getDomainFactory().find(hql);
    if(gps.size() > 0)
    {
        return GpLiteVoAssembler.create((Gp)gps.get(0));    
    }

    return null;    
}
项目:openMAXIMS    文件:Logic.java   
private boolean isGpAlreadyAdded(GpLiteVo voGp) {
    for (int i = 0; i < form.grdReciepient().getRows().size(); i++)
    {
        if(form.grdReciepient().getRows().get(i).getValue() != null)
        {
            if(form.grdReciepient().getRows().get(i).getValue().getNameIsNotNull() && form.grdReciepient().getRows().get(i).getValue().getID_Gp().equals(voGp.getID_Gp()))
            {
                return true;
            }
        }
    }
    return false;
}