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

项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbConsultantTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    clearConsultantCombo();
    if (value != null)
    {
        MedicLiteVoCollection voMedicColl = domain.listActiveMedics(value);
        if (voMedicColl != null)
        {
            for (int i = 0; i < voMedicColl.size(); i++)
            {
                MedicLiteVo med = voMedicColl.get(i);
                form.qmbConsultant().newRow(med, med.toString());
            }
        }
        if (voMedicColl != null && voMedicColl.size() == 1)
            form.qmbConsultant().setValue(voMedicColl.get(0));
        else if (voMedicColl != null && voMedicColl.size() > 1)
            form.qmbConsultant().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbSignedByTextSubmited(String value) throws PresentationLogicException
{
    form.qmbSignedBy().clear();

    MedicLiteVoCollection voCollMedics = domain.listSignatories(value);
    for (int i = 0; i < voCollMedics.size(); i++)
    {
        MedicLiteVo hcp = voCollMedics.get(i);
        form.qmbSignedBy().newRow(hcp, hcp.getMos().getName().toShortForm());
    }
    if (voCollMedics.size() == 1)
    {
        form.qmbSignedBy().setValue(voCollMedics.get(0));
    }
    else if (voCollMedics.size() > 1)
    {
        form.qmbSignedBy().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private MedicLiteVoCollection listConsultantsByName(String consultantName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (consultantName == null || consultantName.trim().length() < 3)
        throw new CodingRuntimeException("Consultant name search must be at least 3 characters long");


    // Build filtering VO
    MedicLiteVo filterVo = new MedicLiteVo();
    filterVo.setMos(new MemberOfStaffLiteVo());
    filterVo.getMos().setName(new PersonName());
    filterVo.getMos().getName().setSurname(consultantName);
    filterVo.getMos().getName().setForename(consultantName);

    // Retrieve the consultants (list from domain)
    try
    {
        return domain.listConsultants(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbConsultantTextSubmited(String value) throws PresentationLogicException
{
    clearConsultantCombo();
    if (value != null)
    {
        MedicLiteVoCollection voMedicColl = domain.listActiveMedics(value);
        if (voMedicColl != null)
        {
            for (int i = 0; i < voMedicColl.size(); i++)
            {
                MedicLiteVo med = voMedicColl.get(i);
                form.qmbConsultant().newRow(med, med.toString());
            }
        }
        if (voMedicColl != null && voMedicColl.size() == 1)
            form.qmbConsultant().setValue(voMedicColl.get(0));
        else if (voMedicColl != null && voMedicColl.size() > 1)
            form.qmbConsultant().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateComboConsultants(UserAccessVo voUserAccess)
{
    ConsultantAccessVoCollection collConsultantAccessVo = voUserAccess.getConsultantAccess();
    MedicLiteVo med = null;

    if (collConsultantAccessVo != null)
    {
        for (int i = 0; i < collConsultantAccessVo.size(); i++)
        {
            med = collConsultantAccessVo.get(i).getConsultant();
            form.cmbConsultant().newRow(med, med.toString());
        }
    }
    if (collConsultantAccessVo != null && collConsultantAccessVo.size() == 1)
        form.cmbConsultant().setValue(collConsultantAccessVo.get(0).getConsultant());
    else if (collConsultantAccessVo != null && collConsultantAccessVo.size() > 1)
        form.cmbConsultant().showOpened();

    Integer id = engine.getLoggedInUser().getHcpId();
    if (med != null && id != null && id.equals(med.getID_Hcp()))
        form.cmbConsultant().setValue(med);

}
项目:AvoinApotti    文件:Logic.java   
private void populateRowConsultant(DynamicGridRow parentRow, MedicLiteVo medicLiteVo) 
{
    DynamicGridRow childRow = parentRow.getRows().newRow();
    DynamicGridColumn column = null;
    DynamicGridCell cell = null;

    childRow.setValue(medicLiteVo);

    column = form.dyngrdLetter().getColumns().getByIdentifier(COL_IMAGE);
    cell = childRow.getCells().newCell(column, DynamicCellType.IMAGE);
    cell.setValue(form.getImages().Core.User);

    column = form.dyngrdLetter().getColumns().getByIdentifier(COL_HEADING);
    cell = childRow.getCells().newCell(column, DynamicCellType.STRING);
    cell.setReadOnly(true);
    cell.setValue(medicLiteVo.getName().toString());
}
项目:AvoinApotti    文件:Logic.java   
private MedicLiteVoCollection listConsultantsByName(String medicName) throws CodingRuntimeException
{
    // Leave throws so that consultants are not cleared when an invalid search is made
    if (medicName == null || medicName.trim().length() < 3)
        throw new CodingRuntimeException("Consultant name search must be at least 3 characters long");


    // Build filtering VO
    MedicLiteVo filterVo = new MedicLiteVo();
    filterVo.setMos(new MemberOfStaffLiteVo());
    filterVo.getMos().setName(new PersonName());
    filterVo.getName().setSurname(medicName);
    filterVo.getName().setForename(medicName);

    // Retrieve the medics (list from domain)
    try
    {
        return domain.listConsultants(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void overlayConsultantAccess(ConsultantAccessVoCollection voCollConsultantAccess) 
{
    for (int i = 0; voCollConsultantAccess != null && i < voCollConsultantAccess.size();i++) 
    {
        for (int j = 0; j < form.grdConsultant().getRows().size(); j++) 
        {
            if (form.grdConsultant().getRows().get(j).getValue() instanceof MedicLiteVo)
            {
                MedicLiteVo voMedicLite = (MedicLiteVo) form.grdConsultant().getRows().get(j).getValue();
                if (voCollConsultantAccess.get(i).getConsultant().getID_Hcp().equals(voMedicLite.getID_Hcp()))
                {                   
                    form.grdConsultant().getRows().get(j).setValue(voCollConsultantAccess.get(i));                                              
                    form.grdConsultant().getRows().get(j).setcolAccess(voCollConsultantAccess.get(i).getAccessRight());
                    break;                                              
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbConsTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    form.qmbCons().clear();

    if (value != null)
    {
        MedicLiteVo med = null;
        MedicLiteVoCollection voMedicColl = domain.listConsultants(value);
        if (voMedicColl != null)
        {
            for (int i = 0; i < voMedicColl.size(); i++)
            {
                med = voMedicColl.get(i);
                form.qmbCons().newRow(med, med.toString());         
            }
        }
        if (voMedicColl != null &&
                voMedicColl.size() == 1)
                        form.qmbCons().setValue(voMedicColl.get(0));
        else if (voMedicColl != null &&
                    voMedicColl.size() > 1)
                        form.qmbCons().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onQmbConsultantTextSubmited(String value) throws PresentationLogicException
{
    clearConsultantCombo();
    if (value != null)
    {
        MedicLiteVoCollection voMedicColl = domain.listActiveMedics(value);
        if (voMedicColl != null)
        {
            for (int i = 0; i < voMedicColl.size(); i++)
            {
                MedicLiteVo med = voMedicColl.get(i);
                form.qmbConsultant().newRow(med, med.toString());
            }
        }
        if (voMedicColl != null && voMedicColl.size() == 1)
            form.qmbConsultant().setValue(voMedicColl.get(0));
        else if (voMedicColl != null && voMedicColl.size() > 1)
            form.qmbConsultant().showOpened();
    }
}
项目:AvoinApotti    文件:HcpAdminImpl.java   
public MedicLiteVo getMedicLiteByExternalCode(TaxonomyType taxType, String codeVal)
{
    if (taxType == null || codeVal == null) 
        throw new DomainRuntimeException("External Code and type not supplied for Medic");

    List hcpList = getDomHcpByExternalCode(taxType, codeVal);
    if (hcpList != null && hcpList.size() > 0)
    {
        Hcp hcp = (Hcp)hcpList.get(0);
        if (hcp instanceof Medic)
        {
            return MedicLiteVoAssembler.create((Medic)hcp);
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onQmbConsultantSearchTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbConsultantSearch().clear();

    MedicLiteVoCollection coll = domain.listMedics(value);

    for (int i = 0; i < coll.size(); i++)
    {
        MedicLiteVo med = coll.get(i);

        form.qmbConsultantSearch().newRow(med, med.getMos().getName().toString());
    }
    if (coll.size() == 1)
    {
        form.qmbConsultantSearch().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbConsultantSearch().showOpened();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void initialise() 
{
    // WDEV-12293 - Get service for CatsReferral (but we need to pass the CareContext id as the CatsReferral is not available in context)
    // and default the speciality combo box to it
    Specialty specialty = domain.getReferralSpecialty(form.getGlobalContext().RefMan.getCatsReferral());
    form.cmbSpecialty().setValue(specialty);

    form.dtimAdm().setValue(new DateTime());
    form.getLocalContext().setPasEventLocation(null);

    populateHospitalCombo();
    populateWardCombo();

    HcpLiteVo hcpLiteVo = (HcpLiteVo) domain.getHcpLiteUser();
    if (hcpLiteVo != null
        && hcpLiteVo.getHcpTypeIsNotNull() 
        && hcpLiteVo.getHcpType().equals(HcpDisType.MEDICAL))
    {
        MedicLiteVo vo = new MedicLiteVo(hcpLiteVo.getID_Hcp(), hcpLiteVo.getVersion_Hcp());
        form.qmbConsultant().newRow( vo, hcpLiteVo.getName().toString());
        form.qmbConsultant().setValue(vo);
    }
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:PlannedPerformedProcedureDialogImpl.java   
public MedicLiteVo getMedicLiteVo(HcpRefVo hcp)
{
    if( hcp == null )
        return null;

    DomainFactory factory = getDomainFactory();
    List medics = factory.find("select m1_1 from Medic as m1_1 left join m1_1.mos as m2_1 left join m2_1.hcp as h1_1 where  (h1_1.id = :hcpId)", new String[] {"hcpId"}, new Object[] {hcp.getID_Hcp()});


    if( medics != null && medics.size() > 0)
    {
        MedicLiteVoCollection tempColl = MedicLiteVoAssembler.createMedicLiteVoCollectionFromMedic(medics);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openmaxims-linux    文件:PlannedPerformedProcedureDialogImpl.java   
public MedicLiteVo getMedicLiteVo(HcpRefVo hcp)
{
    if( hcp == null )
        return null;

    DomainFactory factory = getDomainFactory();
    List medics = factory.find("select m1_1 from Medic as m1_1 left join m1_1.mos as m2_1 left join m2_1.hcp as h1_1 where  (h1_1.id = :hcpId)", new String[] {"hcpId"}, new Object[] {hcp.getID_Hcp()});


    if( medics != null && medics.size() > 0)
    {
        MedicLiteVoCollection tempColl = MedicLiteVoAssembler.createMedicLiteVoCollectionFromMedic(medics);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private MedicLiteVoCollection listConsultantsByName(String consultantName) throws CodingRuntimeException
{
    // Leave throws so that clinics are not cleared when an invalid search is made
    if (consultantName == null || consultantName.trim().length() < 3)
        throw new CodingRuntimeException("Consultant name search must be at least 3 characters long");


    // Build filtering VO
    MedicLiteVo filterVo = new MedicLiteVo();
    filterVo.setMos(new MemberOfStaffLiteVo());
    filterVo.getMos().setName(new PersonName());
    filterVo.getMos().getName().setSurname(consultantName);
    filterVo.getMos().getName().setForename(consultantName);

    // Retrieve the consultants (list from domain)
    try
    {
        return domain.listConsultants(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbConsultantTextSubmited(String value) throws PresentationLogicException
{
    clearConsultantCombo();
    if (value != null)
    {
        MedicLiteVoCollection voMedicColl = domain.listActiveMedics(value);
        if (voMedicColl != null)
        {
            for (int i = 0; i < voMedicColl.size(); i++)
            {
                MedicLiteVo med = voMedicColl.get(i);
                form.qmbConsultant().newRow(med, med.toString());
            }
        }
        if (voMedicColl != null && voMedicColl.size() == 1)
            form.qmbConsultant().setValue(voMedicColl.get(0));
        else if (voMedicColl != null && voMedicColl.size() > 1)
            form.qmbConsultant().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateComboConsultants(UserAccessVo voUserAccess)
{
    ConsultantAccessVoCollection collConsultantAccessVo = voUserAccess.getConsultantAccess();
    MedicLiteVo med = null;

    if (collConsultantAccessVo != null)
    {
        for (int i = 0; i < collConsultantAccessVo.size(); i++)
        {
            med = collConsultantAccessVo.get(i).getConsultant();
            form.cmbConsultant().newRow(med, med.toString());
        }
    }
    if (collConsultantAccessVo != null && collConsultantAccessVo.size() == 1)
        form.cmbConsultant().setValue(collConsultantAccessVo.get(0).getConsultant());
    else if (collConsultantAccessVo != null && collConsultantAccessVo.size() > 1)
        form.cmbConsultant().showOpened();

    Integer id = engine.getLoggedInUser().getHcpId();
    if (med != null && id != null && id.equals(med.getID_Hcp()))
        form.cmbConsultant().setValue(med);

}
项目:openMAXIMS    文件:Logic.java   
private void populateRowConsultant(DynamicGridRow parentRow, MedicLiteVo medicLiteVo) 
{
    DynamicGridRow childRow = parentRow.getRows().newRow();
    DynamicGridColumn column = null;
    DynamicGridCell cell = null;

    childRow.setValue(medicLiteVo);

    column = form.dyngrdLetter().getColumns().getByIdentifier(COL_IMAGE);
    cell = childRow.getCells().newCell(column, DynamicCellType.IMAGE);
    cell.setValue(form.getImages().Core.User);

    column = form.dyngrdLetter().getColumns().getByIdentifier(COL_HEADING);
    cell = childRow.getCells().newCell(column, DynamicCellType.STRING);
    cell.setReadOnly(true);
    cell.setValue(medicLiteVo.getName().toString());
}
项目:openmaxims-linux    文件:Logic.java   
private MedicLiteVoCollection listConsultantsByName(String medicName) throws CodingRuntimeException
{
    // Leave throws so that consultants are not cleared when an invalid search is made
    if (medicName == null || medicName.trim().length() < 3)
        throw new CodingRuntimeException("Consultant name search must be at least 3 characters long");


    // Build filtering VO
    MedicLiteVo filterVo = new MedicLiteVo();
    filterVo.setMos(new MemberOfStaffLiteVo());
    filterVo.getMos().setName(new PersonName());
    filterVo.getName().setSurname(medicName);
    filterVo.getName().setForename(medicName);

    // Retrieve the medics (list from domain)
    try
    {
        return domain.listConsultants(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:openMAXIMS    文件:Logic.java   
private MedicLiteVoCollection listConsultantsByName(String medicName) throws CodingRuntimeException
{
    // Leave throws so that consultants are not cleared when an invalid search is made
    if (medicName == null || medicName.trim().length() < 3)
        throw new CodingRuntimeException("Consultant name search must be at least 3 characters long");


    // Build filtering VO
    MedicLiteVo filterVo = new MedicLiteVo();
    filterVo.setMos(new MemberOfStaffLiteVo());
    filterVo.getMos().setName(new PersonName());
    filterVo.getName().setSurname(medicName);
    filterVo.getName().setForename(medicName);

    // Retrieve the medics (list from domain)
    try
    {
        return domain.listConsultants(filterVo);
    }
    catch (DomainInterfaceException exception)
    {
        throw new CodingRuntimeException(exception.getMessage());
    }
}
项目:openmaxims-linux    文件:HcpAdminImpl.java   
public MedicLiteVo getMedicLiteByExternalCode(TaxonomyType taxType, String codeVal)
{
    if (taxType == null || codeVal == null) 
        throw new DomainRuntimeException("External Code and type not supplied for Medic");

    List hcpList = getDomHcpByExternalCode(taxType, codeVal);
    if (hcpList != null && hcpList.size() > 0)
    {
        Hcp hcp = (Hcp)hcpList.get(0);
        if (hcp instanceof Medic)
        {
            return MedicLiteVoAssembler.create((Medic)hcp);
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Function to populate consultants
 * @param consultants - values to be populated
 */
private void populateConsultants(MedicLiteVoCollection consultants)
{
    form.qmbConsultant().clear();

    if (consultants == null)
        return;

    for (MedicLiteVo consultant : consultants)
    {
        form.qmbConsultant().newRow(consultant, consultant.getIMosName());
    }

    if (consultants.size() == 1)
        form.qmbConsultant().setValue(consultants.get(0));
    else
        form.qmbConsultant().showOpened();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Function to populate referring consultants
 * @param referringConsultants - values to be populated
 */
private void populateReferringConsultants(MedicLiteVoCollection referringConsultants)
{
    // Clear the referring consultants
    form.qmbReferringConsultant().clear();

    if (referringConsultants == null)
        return;

    for (MedicLiteVo consultant : referringConsultants)
    {
        form.qmbReferringConsultant().newRow(consultant, consultant.getIMosName());
    }

    if (referringConsultants.size() == 1)
        form.qmbConsultant().setValue(referringConsultants.get(0));
    else
        form.qmbConsultant().showOpened();
}
项目:openmaxims-linux    文件:Logic.java   
private void populateComboConsultants(UserAccessVo voUserAccess)
{
    ConsultantAccessVoCollection collConsultantAccessVo = voUserAccess.getConsultantAccess();
    MedicLiteVo med = null;

    if (collConsultantAccessVo != null)
    {
        for (int i = 0; i < collConsultantAccessVo.size(); i++)
        {
            med = collConsultantAccessVo.get(i).getConsultant();
            form.cmbConsultant().newRow(med, med.toString());
        }
    }
    if (collConsultantAccessVo != null && collConsultantAccessVo.size() == 1)
        form.cmbConsultant().setValue(collConsultantAccessVo.get(0).getConsultant());
    else if (collConsultantAccessVo != null && collConsultantAccessVo.size() > 1)
        form.cmbConsultant().showOpened();

    Integer id = engine.getLoggedInUser().getHcpId();
    if (med != null && id != null && id.equals(med.getID_Hcp()))
        form.cmbConsultant().setValue(med);

}
项目:openMAXIMS    文件:AdmitToWardImpl.java   
public MedicLiteVo getMedic(MemberOfStaffRefVo memberOfStaff)
{
    if (memberOfStaff == null || memberOfStaff.getID_MemberOfStaff() == null)
        return null;

    StringBuilder query = new StringBuilder("SELECT medic FROM Medic AS medic ");
    query.append(" LEFT JOIN medic.mos AS mos ");
    query.append(" WHERE ");
    query.append(" mos.id = :MOS_ID ");

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("MOS_ID");       paramValues.add(memberOfStaff.getID_MemberOfStaff());


    return MedicLiteVoAssembler.create((Medic) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:HcpAdminImpl.java   
public MedicLiteVo getMedicLiteByExternalCode(TaxonomyType taxType, String codeVal)
{
    if (taxType == null || codeVal == null) 
        throw new DomainRuntimeException("External Code and type not supplied for Medic");

    List hcpList = getDomHcpByExternalCode(taxType, codeVal);
    if (hcpList != null && hcpList.size() > 0)
    {
        Hcp hcp = (Hcp)hcpList.get(0);
        if (hcp instanceof Medic)
        {
            return MedicLiteVoAssembler.create((Medic)hcp);
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbConsultantSearchTextSubmited(String value) throws PresentationLogicException 
{
    form.qmbConsultantSearch().clear();

    MedicLiteVoCollection coll = domain.listMedics(value);

    for (int i = 0; i < coll.size(); i++)
    {
        MedicLiteVo med = coll.get(i);

        form.qmbConsultantSearch().newRow(med, med.getMos().getName().toString());
    }
    if (coll.size() == 1)
    {
        form.qmbConsultantSearch().setValue(coll.get(0));
    }
    else if (coll.size() > 1)
    {
        form.qmbConsultantSearch().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:PlannedPerformedProcedureDialogImpl.java   
public MedicLiteVo getMedicLiteVo(HcpRefVo hcp)
{
    if( hcp == null )
        return null;

    DomainFactory factory = getDomainFactory();
    List medics = factory.find("select m1_1 from Medic as m1_1 left join m1_1.mos as m2_1 left join m2_1.hcp as h1_1 where  (h1_1.id = :hcpId)", new String[] {"hcpId"}, new Object[] {hcp.getID_Hcp()});


    if( medics != null && medics.size() > 0)
    {
        MedicLiteVoCollection tempColl = MedicLiteVoAssembler.createMedicLiteVoCollectionFromMedic(medics);
        if( tempColl != null && tempColl.size() > 0)
            return tempColl.get(0);
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onQmbConsultantTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
    clearConsultantCombo();
    if (value != null)
    {
        MedicLiteVoCollection voMedicColl = domain.listActiveMedics(value);
        if (voMedicColl != null)
        {
            for (int i = 0; i < voMedicColl.size(); i++)
            {
                MedicLiteVo med = voMedicColl.get(i);
                form.qmbConsultant().newRow(med, med.toString());
            }
        }
        if (voMedicColl != null && voMedicColl.size() == 1)
            form.qmbConsultant().setValue(voMedicColl.get(0));
        else if (voMedicColl != null && voMedicColl.size() > 1)
            form.qmbConsultant().showOpened();
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onQmbSignedByTextSubmited(String value) throws PresentationLogicException
{
    form.qmbSignedBy().clear();

    MedicLiteVoCollection voCollMedics = domain.listSignatories(value);
    for (int i = 0; i < voCollMedics.size(); i++)
    {
        MedicLiteVo hcp = voCollMedics.get(i);
        form.qmbSignedBy().newRow(hcp, hcp.getMos().getName().toShortForm());
    }
    if (voCollMedics.size() == 1)
    {
        form.qmbSignedBy().setValue(voCollMedics.get(0));
    }
    else if (voCollMedics.size() > 1)
    {
        form.qmbSignedBy().showOpened();
    }
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PersonName pdate1 = null;
    PersonName pdate2 = null;
    if(ob1 instanceof MedicLiteVo )
    {
        MedicLiteVo ps1 = (MedicLiteVo)ob1;
        pdate1 = ps1.getMosIsNotNull() && ps1.getMos().getNameIsNotNull() ? ps1.getMos().getName():null;
    }
    if(ob2 instanceof MedicLiteVo)
    {
        MedicLiteVo ps2 = (MedicLiteVo)ob2;
        pdate2 = ps2.getMosIsNotNull() && ps2.getMos().getNameIsNotNull() ? ps2.getMos().getName():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onQmbConsultantTextSubmited(String value) throws PresentationLogicException
{
    clearConsultantCombo();
    if (value != null)
    {
        MedicLiteVoCollection voMedicColl = domain.listActiveMedics(value);
        if (voMedicColl != null)
        {
            for (int i = 0; i < voMedicColl.size(); i++)
            {
                MedicLiteVo med = voMedicColl.get(i);
                form.qmbConsultant().newRow(med, med.toString());
            }
        }
        if (voMedicColl != null && voMedicColl.size() == 1)
            form.qmbConsultant().setValue(voMedicColl.get(0));
        else if (voMedicColl != null && voMedicColl.size() > 1)
            form.qmbConsultant().showOpened();
    }
}