Java 类ims.core.vo.domain.ProcedureLiteVoAssembler 实例源码

项目:AvoinApotti    文件:ProceduresPerformedByHCPImpl.java   
public ProcedureLiteVoCollection getAvailableProcedures(String procedures, String filter) 
{
    DomainFactory factory=getDomainFactory();

    String query = "from Procedure as p where p.isActive = 1 ";

    if(filter != null && filter.length() > 0)
    {
        query += " and p.procedureName like :Proc";
    }
    if(procedures != null && procedures.length() > 0)
    {
        query += " and p.id not in (" + procedures + ") ";
    }

    List<?> procs=factory.find(query, new String[]{"Proc"}, new Object[]{filter + "%"});

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}
项目:AvoinApotti    文件:ICPConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from Procedure as proc");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where UPPER(proc.procedureName) like :NAME");

        paramNames.add("NAME");
        paramValues.add("%" + name.toUpperCase() + "%");
    }

    // Set order mode
    hqlQuery.append(" order by UPPER(proc.procedureName) asc");

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:AvoinApotti    文件:ReferralAppointmentDetailsComponentImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:AvoinApotti    文件:ElectiveListManagementImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
    if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:AvoinApotti    文件:TheatreListImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment) getDomainFactory().getDomainObject(appt);
    if (doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:AvoinApotti    文件:OperationDetailsConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(HcpLiteVo hcp,String text) 
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new CodingRuntimeException("Provided hcp is null or doesn't have an id");

    String hql = "select distinct proc from ConsultantProcedureCategory as cpc left join cpc.categoryProcedures " +
            "as cp left join cp.procedures as proc where (proc.isActive = 1 and proc.id is not null  and cpc.performingHCP.id = :Hcp_Id ";
    ArrayList<String> pN =new ArrayList<String>();
    ArrayList<Object> pV = new ArrayList<Object>();
    pN.add("Hcp_Id");
    pV.add(hcp.getID_Hcp());
    if (text != null)
    {
        hql+=" and UPPER(proc.procedureName) like :name";
        pN.add("name");
        pV.add("%"+text.toUpperCase()+"%");
    }
    hql+=")";
    List<?> procedures=getDomainFactory().find(hql,pN,pV);

    if (procedures != null && procedures.size()>0)
        return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procedures);
    return null;
}
项目:openMAXIMS    文件:ProceduresPerformedByHCPImpl.java   
public ProcedureLiteVoCollection getAvailableProcedures(String procedures, String filter) 
{
    DomainFactory factory=getDomainFactory();

    String query = "from Procedure as p where p.isActive = 1 ";

    if(filter != null && filter.length() > 0)
    {
        query += " and p.procedureName like :Proc";
    }
    if(procedures != null && procedures.length() > 0)
    {
        query += " and p.id not in (" + procedures + ") ";
    }

    List<?> procs=factory.find(query, new String[]{"Proc"}, new Object[]{filter + "%"});

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}
项目:openMAXIMS    文件:ICPConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from Procedure as proc");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where UPPER(proc.procedureName) like :NAME");

        paramNames.add("NAME");
        paramValues.add("%" + name.toUpperCase() + "%");
    }

    // Set order mode
    hqlQuery.append(" order by UPPER(proc.procedureName) asc");

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:TheatreSessionManagementImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:ProfilesImpl.java   
@Override
public ProcedureLiteVoCollection listProcedureByHcpAndName(HcpRefVoCollection hcp, String name) 
{
    DomainFactory factory = getDomainFactory();
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    String hql = "select distinct procedure from ProceduresPerformedByHCP as hcpProcedures left join hcpProcedures.performingHCP as perfHCP left join hcpProcedures.procedures as procedure " +
            " where perfHCP.id in ( " + getHcpIds(hcp) + " ) and upper(procedure.procedureName) like :procName and procedure.isActive = :procedureActive order by procedure.procedureName asc";

    markers.add("procName");
    values.add("%" + name.toUpperCase() + "%");

    markers.add("procedureActive");
    values.add(Boolean.TRUE);

    ProcedureLiteVoCollection procedures = ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(factory.find(hql, markers, values));
    return procedures;
}
项目:openMAXIMS    文件:AddEmergencyTheatreImpl.java   
private ProcedureLiteVoCollection listHotlistProcedures(String name, Specialty specialty) throws DomainInterfaceException
{

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("select proc from ProcedureHotlist as procHotList left join procHotList.hotlistItem as procHotListItem left join procHotListItem.procedure as proc left join proc.keywords as kw " +
                       "where (proc.outpatientOnlyProcedure = 0 or proc.outpatientOnlyProcedure is null ) and (proc.medicalWL = 0 or proc.medicalWL is null )"); 

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

    hql.append(" and proc.isActive = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);   

    if (specialty !=null)
    {
        hql.append(" and procHotList.specialty = :spec");
        names.add("spec");
        values.add(getDomLookup(specialty));            
    }

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(Keywords.searchByKeywords(factory, name, hql.toString(), names, values)).sort();
}
项目:openMAXIMS    文件:ReferralAppointmentDetailsComponentImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:ElectiveListManagementImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
    if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:TheatreListImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment) getDomainFactory().getDomainObject(appt);
    if (doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:ClinicalCodingImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcLiteVo(String filter, Boolean outpatonly) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from Procedure proc join proc.keywords as kw "); 
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

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

    //wdev-19500
    if( outpatonly != null && Boolean.TRUE.equals(outpatonly))
    {
        hql.append(" and proc.outpatientOnlyProcedure = 1");

    }
    //----------

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(Keywords.searchByKeywords(factory, filter, hql.toString(), names, values));        
}
项目:openMAXIMS    文件:OperationDetailsConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(HcpLiteVo hcp,String text) 
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new CodingRuntimeException("Provided hcp is null or doesn't have an id");

    String hql = "select distinct proc from ConsultantProcedureCategory as cpc left join cpc.categoryProcedures " +
            "as cp left join cp.procedures as proc where (proc.isActive = 1 and proc.id is not null  and cpc.performingHCP.id = :Hcp_Id ";
    ArrayList<String> pN =new ArrayList<String>();
    ArrayList<Object> pV = new ArrayList<Object>();
    pN.add("Hcp_Id");
    pV.add(hcp.getID_Hcp());
    if (text != null)
    {
        hql+=" and UPPER(proc.procedureName) like :name";
        pN.add("name");
        pV.add("%"+text.toUpperCase()+"%");
    }
    hql+=")";
    List<?> procedures=getDomainFactory().find(hql,pN,pV);

    if (procedures != null && procedures.size()>0)
        return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procedures);
    return null;
}
项目:openMAXIMS    文件:AcuteTheatreListImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:ProceduresPerformedByHCPImpl.java   
public ProcedureLiteVoCollection getAvailableProcedures(String procedures, String filter) 
{
    DomainFactory factory=getDomainFactory();

    String query = "from Procedure as p where p.isActive = 1 ";

    if(filter != null && filter.length() > 0)
    {
        query += " and p.procedureName like :Proc";
    }
    if(procedures != null && procedures.length() > 0)
    {
        query += " and p.id not in (" + procedures + ") ";
    }

    List<?> procs=factory.find(query, new String[]{"Proc"}, new Object[]{filter + "%"});

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}
项目:openMAXIMS    文件:ICPConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from Procedure as proc");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where UPPER(proc.procedureName) like :NAME");

        paramNames.add("NAME");
        paramValues.add("%" + name.toUpperCase() + "%");
    }

    // Set order mode
    hqlQuery.append(" order by UPPER(proc.procedureName) asc");

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:ReferralAppointmentDetailsComponentImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:ElectiveListManagementImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
    if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
    if(doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:TheatreListImpl.java   
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
    if (appt == null || appt.getID_Booking_Appointment() == null)
        throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

    TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

    Booking_Appointment doAppt = (Booking_Appointment) getDomainFactory().getDomainObject(appt);
    if (doAppt != null)
    {
        ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
        ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
        HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

        voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
        voPsc.setService(voService);
        voPsc.setProcedure(voProc);
        voPsc.setConsultant(voMos);
    }

    return voPsc;
}
项目:openMAXIMS    文件:OperationDetailsConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(HcpLiteVo hcp,String text) 
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new CodingRuntimeException("Provided hcp is null or doesn't have an id");

    String hql = "select distinct proc from ConsultantProcedureCategory as cpc left join cpc.categoryProcedures " +
            "as cp left join cp.procedures as proc where (proc.isActive = 1 and proc.id is not null  and cpc.performingHCP.id = :Hcp_Id ";
    ArrayList<String> pN =new ArrayList<String>();
    ArrayList<Object> pV = new ArrayList<Object>();
    pN.add("Hcp_Id");
    pV.add(hcp.getID_Hcp());
    if (text != null)
    {
        hql+=" and UPPER(proc.procedureName) like :name";
        pN.add("name");
        pV.add("%"+text.toUpperCase()+"%");
    }
    hql+=")";
    List<?> procedures=getDomainFactory().find(hql,pN,pV);

    if (procedures != null && procedures.size()>0)
        return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procedures);
    return null;
}
项目:openmaxims-linux    文件:ProceduresPerformedByHCPImpl.java   
public ProcedureLiteVoCollection getAvailableProcedures(String procedures, String filter) 
{
    DomainFactory factory=getDomainFactory();

    String query = "from Procedure as p where p.isActive = 1 ";

    if(filter != null && filter.length() > 0)
    {
        query += " and p.procedureName like :Proc";
    }
    if(procedures != null && procedures.length() > 0)
    {
        query += " and p.id not in (" + procedures + ") ";
    }

    List<?> procs=factory.find(query, new String[]{"Proc"}, new Object[]{filter + "%"});

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}
项目:openmaxims-linux    文件:ICPConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(String name)
{
    // Use StringBuilder to build the HQL query (more memory efficient)
    StringBuilder hqlQuery = new StringBuilder();
    hqlQuery.append("from Procedure as proc");

    // Declare the ArrayList for parameters names and parameters values
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    // Create parameters string
    if (name != null && name.length() > 0)
    {
        hqlQuery.append(" where UPPER(proc.procedureName) like :NAME");

        paramNames.add("NAME");
        paramValues.add("%" + name.toUpperCase() + "%");
    }

    // Set order mode
    hqlQuery.append(" order by UPPER(proc.procedureName) asc");

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues));
}
项目:openmaxims-linux    文件:OperationDetailsConfigImpl.java   
public ProcedureLiteVoCollection listProcedures(HcpLiteVo hcp,String text) 
{
    if (hcp == null || !hcp.getID_HcpIsNotNull())
        throw new CodingRuntimeException("Provided hcp is null or doesn't have an id");

    String hql = "select distinct proc from ConsultantProcedureCategory as cpc left join cpc.categoryProcedures " +
            "as cp left join cp.procedures as proc where (proc.isActive = 1 and proc.id is not null  and cpc.performingHCP.id = :Hcp_Id ";
    ArrayList<String> pN =new ArrayList<String>();
    ArrayList<Object> pV = new ArrayList<Object>();
    pN.add("Hcp_Id");
    pV.add(hcp.getID_Hcp());
    if (text != null)
    {
        hql+=" and UPPER(proc.procedureName) like :name";
        pN.add("name");
        pV.add("%"+text.toUpperCase()+"%");
    }
    hql+=")";
    List<?> procedures=getDomainFactory().find(hql,pN,pV);

    if (procedures != null && procedures.size()>0)
        return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procedures);
    return null;
}
项目:AvoinApotti    文件:ProceduresPerformedByHCPImpl.java   
public ProcedureLiteVoCollection listProcedures(String filter) 
{
    DomainFactory factory = getDomainFactory();
    IMSCriteria imsc=new IMSCriteria(Procedure.class,factory);
    imsc.like("this.procedureName", filter + "%");
    List procedures=imsc.find();
    if (procedures.size()>0)
        return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procedures);
    return null;
}
项目:AvoinApotti    文件:MoveAppointmentDialogImpl.java   
/**
 * method searches all available similar sessions that can be booked into when moving the appointment
 */
public SessionSearchCriteriaVo getSessionSearchCriteriaByAppointment(Booking_AppointmentRefVo appointment)
{
    if (appointment == null)
        throw new CodingRuntimeException("appointment cannot be null in method getSessionSearchCriteriaByAppointment");

    SessionSearchCriteriaVo voSearchCriteria = new SessionSearchCriteriaVo();
    String hql = "select sess.service, sess.schLocation, sess.sessionDate, sess.theatreType, theatreBook from Booking_Appointment as appt left join appt.session as sess left join appt.theatreBooking as theatreBook where  appt.id = " + appointment.getID_Booking_Appointment();
    List item = getDomainFactory().find(hql);
    if(item != null && item.size() > 0)
    {
        Object[] arrObj = (Object[]) item.get(0);
        if(arrObj.length == 5)
        {
            if(arrObj[0] != null && arrObj[0] instanceof Service)
                voSearchCriteria.setSessionService(ServiceLiteVoAssembler.create((Service)arrObj[0]));
            if(arrObj[1] != null && arrObj[1] instanceof Location)
                voSearchCriteria.setSessionLocation(LocationLiteVoAssembler.create((Location)arrObj[1]));
            if(arrObj[2] != null && arrObj[2] instanceof java.util.Date)
                voSearchCriteria.setSessionDate(new Date((java.util.Date)arrObj[2]));
            if(arrObj[3] != null && arrObj[3] instanceof LookupInstance)
                voSearchCriteria.setSessionTheatreType(getTheatreTypeVoLookup((LookupInstance) arrObj[3]));
            if(arrObj[4] != null && arrObj[4] instanceof TheatreBooking);
            {
                TheatreBooking doBooking = (TheatreBooking) arrObj[4];
                if(doBooking.getProcedure() != null)
                    voSearchCriteria.setSessionProcedure(ProcedureLiteVoAssembler.create(doBooking.getProcedure()));
                if(doBooking.getConsultant() != null)
                    voSearchCriteria.setSessionConsultant(HcpLiteVoAssembler.create(doBooking.getConsultant()));
                if(doBooking.getAnaestheticType() != null)
                    voSearchCriteria.setSessionAnaestheticType(getAnaesTypeVoLookup(doBooking.getAnaestheticType()));
            }               
        }
    }

    return voSearchCriteria;
}
项目:AvoinApotti    文件:ProfilesImpl.java   
public ProcedureLiteVoCollection listProcedureByHcpAndName(HcpRefVoCollection collHcp, String name) 
{
    DomainFactory factory=getDomainFactory();
    IMSCriteria imsc=new IMSCriteria(ProceduresPerformedByHCP.class,factory);
    ProcedureLiteVo aux=new ProcedureLiteVo();
    if (collHcp!=null)
        imsc.in("performingHCP.id", getIdArray(collHcp));

    if(name != null)
    {
        imsc.join("this.procedures", "proc");
        imsc.like("proc.procedureName", name + "%");            
    }

    List proceduresPerformedByHCP = imsc.find();
    ProcedureLiteVoCollection voCollProcedureLite =new ProcedureLiteVoCollection();
    Iterator it = proceduresPerformedByHCP.iterator();
    while(it.hasNext())
    {
        ProceduresPerformedByHCP doProcHcp = (ProceduresPerformedByHCP) it.next();

        ProcedureLiteVoCollection voCollProc = ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(doProcHcp.getProcedures());
        for(ProcedureLiteVo voProc : voCollProc)
            voCollProcedureLite.add(voProc);
    }

    return voCollProcedureLite;
}
项目:AvoinApotti    文件:ProcedureSpecialtyHotlistImpl.java   
@SuppressWarnings("unchecked")
public ims.core.vo.ProcedureLiteVoCollection listProcedures(ims.core.vo.lookups.Specialty speciality, String nameFilter) throws ims.domain.exceptions.DomainInterfaceException
{
    if (speciality == null && nameFilter == null)
        throw new DomainInterfaceException("At least one search value must be not null");
    StringBuilder query = new StringBuilder();
    query.append("select p3_1 from ProcedureHotlist as p1_1 left join p1_1.hotlistItem as p2_1 " +
            "left join p2_1.procedure as p3_1 where (p3_1.isActive = 1 and ");
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    if (speciality!=null)
    {
        query.append("p1_1.specialty.id = :specialityId");
        paramNames.add("specialityId");
        paramValues.add(speciality.getID());
    }
    if (speciality!=null && nameFilter != null)
    {
        query.append(" and ");
    }
    if (nameFilter != null)
    {
        query.append("UPPER(p3_1.procedureName) like :nameFilter");//WDEV-14088
        paramNames.add("nameFilter");
        paramValues.add("%"+nameFilter.toUpperCase()+"%"); //WDEV-14088
    }
    query.append(") order by p3_1.procedureName asc ");
    List domObj = getDomainFactory().find(query.toString(),paramNames,paramValues);
    if (domObj == null || domObj.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(domObj);
}
项目:AvoinApotti    文件:NewElectiveListTCIErodDialogImpl.java   
public ProcedureLiteVo getProcedureFromSuitableForSurgery(CareContextRefVo careContextRef)
{
    if (careContextRef==null || careContextRef.getID_CareContext()==null)
    {
        throw new CodingRuntimeException("Cannot get SFSProcedure on null CareContextRefVo ");
    }

    List list = getDomainFactory().find("select procedure from SuitableForSurgeryAssessment as sfs left join sfs.procedure as patProcedure left join patProcedure.procedure as procedure where sfs.careContext.id = :CareContext and sfs.procedure is not null and (sfs.isRIE is null or sfs.isRIE = 0)", 
            new String[] {"CareContext"}, new Object[] {careContextRef.getID_CareContext()});

    if (list!=null && list.size()>0)
        return ProcedureLiteVoAssembler.create((Procedure) list.get(0));

    return null;
}
项目:AvoinApotti    文件:SelectProcedureImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcedures()
{
    DomainFactory factory = getDomainFactory();
    IMSCriteria imsc=new IMSCriteria(Procedure.class,factory);
    imsc.equal("isActive", true);
    List procedures=imsc.find();
    if (procedures!=null)
        return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procedures);
    return null;

}
项目:AvoinApotti    文件:ProcedureActivityMappingImpl.java   
public ProcedureLiteVo getProcedure(ProcedureRefVo procedureId) 
{
    DomainFactory factory = getDomainFactory();
    IMSCriteria imsc=new IMSCriteria(Procedure.class,factory);
    imsc.equal("id", procedureId.getID_Procedure());
    List procedure = imsc.find();
    if (procedure!=null)
        return ProcedureLiteVoAssembler.create((Procedure) procedure.get(0));
    return null;
}
项目:AvoinApotti    文件:SurgicalOpNotesListImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcedures(String filterName)
{
    String hql = "from Procedure as p1_1 where " +
            "(UPPER(p1_1.procedureName) like :nameFilter and p1_1.isActive = 1)" +
            " order by p1_1.procedureName asc"; 
    List<?> result = getDomainFactory().find(hql,"nameFilter","%"+filterName.toUpperCase()+"%");        //wdev-16291
    if (result == null || result.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(result);
}
项目:AvoinApotti    文件:ClinicalCodingImpl.java   
/**
* listHotlistProcedureShort
 * @throws DomainInterfaceException 
*/
public ims.core.vo.ProcedureLiteVoCollection listHotlistProcedureShort(String procedureName, ims.core.vo.lookups.Specialty lkpSpecialty) throws DomainInterfaceException
{
    if(procedureName == null)
        throw new DomainRuntimeException("Invalid Search criteria. Clinical Problem name filter must be supplied.");

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

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("select distinct procHotListItem from ProcedureHotlist as procHotList left join procHotList.hotlistItem as procHotListItem left join procHotListItem.procedure as proc left join proc.keywords as kw "); 

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

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

    if (lkpSpecialty !=null)
    {
        hql.append(" and procHotList.specialty = :spec");
        names.add("spec");
        values.add(getDomLookup(lkpSpecialty));         
    }

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

    List ret = new ArrayList();     
    for (int i = 0; i < hits.size(); i++)
    {
        ret.add(((ProcedureHotlistItem)hits.get(i)).getProcedure());
    }

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(ret);
}
项目:AvoinApotti    文件:ClinicalCodingImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcLiteVo(String filter) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from Procedure proc join proc.keywords as kw "); 
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    hql.append(" where proc.isActive = :isActive");
    names.add("isActive");
    values.add(Boolean.TRUE);   
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(Keywords.searchByKeywords(factory, filter, hql.toString(), names, values));        
}
项目:AvoinApotti    文件:PlannedPerformedProcedureDialogImpl.java   
public ProcedureLiteVoCollection getProcedures(Specialty specialtyId) 
{


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

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("select distinct procHotListItem from ProcedureHotlist as procHotList left join procHotList.hotlistItem as procHotListItem left join procHotListItem.procedure as proc left join proc.keywords as kw "); 

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

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

    if (specialtyId !=null)
    {
        hql.append(" and procHotList.specialty = :spec");
        names.add("spec");
        values.add(getDomLookup(specialtyId));          
    }

    List hits = factory.find(hql.toString(), names, values);        

    List ret = new ArrayList();     
    for (int i = 0; i < hits.size(); i++)
    {
        ret.add(((ProcedureHotlistItem)hits.get(i)).getProcedure());
    }

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(ret);
}
项目:AvoinApotti    文件:PlannedProcedureImpl.java   
public ProcedureLiteVoCollection listHotlistProcedureShort(String procedureName, Specialty specialty) throws DomainInterfaceException 
{
    if(procedureName == null)
        throw new DomainRuntimeException("Invalid Search criteria. Clinical Problem name filter must be supplied.");

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

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer("  select distinct item from ProcedureHotlistItem item join item.procedure as proc join proc.keywords as kw "); 
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

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

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

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

    List ret = new ArrayList();     
    for (int i = 0; i < hits.size(); i++)
    {
        ret.add(((ProcedureHotlistItem)hits.get(i)).getProcedure());
    }

    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(ret);
}
项目:AvoinApotti    文件:OperationDetailsConfigImpl.java   
public ProcedureLiteVoCollection listAllProcedures(String text)
{
    String hql = "from Procedure as proc where (upper(proc.procedureName) like :name and proc.isActive = 1) order by upper(proc.procedureName) asc";
    List<?> find = getDomainFactory().find(hql,"name",text==null?"%":"%"+text.toUpperCase()+"%");
    if (find == null || find.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(find);
}
项目:AvoinApotti    文件:ConsultantProcedureHotlistDialogImpl.java   
public ims.core.vo.ProcedureLiteVoCollection listProcedures(ProcedureCategory category, String procNameFilter, ims.core.vo.HcpLiteVo currUser)
{

    StringBuilder query = new StringBuilder(
            "select p1_1 from ConsultantProcedureCategory as c1_1 left join " +
            "c1_1.categoryProcedures as c2_1 left join c2_1.procedures as p1_1 " +
            "where (p1_1.isActive = 1 and c1_1.performingHCP.id = :Hcp_id");


    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();
    paramNames.add("Hcp_id");
    paramValues.add(currUser.getID_Hcp());

    if (category != null)
    {
        query.append(" and c2_1.category.id = :Category_id");
        paramNames.add("Category_id");
        paramValues.add(category.getID());

    }
    if (procNameFilter != null)
    {
        query.append(" and upper(p1_1.procedureName) like :nameFilter");   //wdev-13658
        paramNames.add("nameFilter");
        paramValues.add("%"+procNameFilter.toUpperCase()+"%");             //wdev-13658

    }
    query.append(" ) order by p1_1.procedureName asc ");


    List<?> procs = getDomainFactory().find(query.toString(),paramNames,paramValues);

    if (procs == null || procs.size() == 0)
        return null;
    return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(procs);
}