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

项目:AvoinApotti    文件:ReferralServicesImpl.java   
public ims.core.vo.ServiceLiteVoCollection getServices()
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from Service as service where service.isRIE is null and service.isActive = :isActive");
    List list = factory.find(hql.toString(), new String[]{"isActive"}, new Object[]{true});
    ServiceLiteVoCollection serviceLiteVoColl = ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(list);

    if (serviceLiteVoColl.size() > 0)
    {
        return serviceLiteVoColl;
    }
    else
    {
        return null;
    }
}
项目:AvoinApotti    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:AvoinApotti    文件:PrintOrderImpl.java   
@SuppressWarnings("rawtypes")
public ServiceLiteVo getModality(OrderInvestigationRefVo orderInv)
{
    if(orderInv == null || orderInv.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("orderInv parameter is null in method getModality");

    DomainFactory factory = getDomainFactory();
    String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
    List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    //if current OrderInvestigation doesn't have a specimen we get the modality as follows:
    //OrderInvestigation.investigation.providerService.locationService.service
    hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
    list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    return null;
}
项目:AvoinApotti    文件:PhelbotomyDefaultCollectorImpl.java   
public ServiceLiteVo getModality(Integer orderInvId)
{
    if(orderInvId == null)
        throw new CodingRuntimeException("orderInv parameter is null in method getModality");

    DomainFactory factory = getDomainFactory();
    String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
    List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    //if current OrderInvestigation doesn't have a specimen we get the modality as follows:
    //OrderInvestigation.investigation.providerService.locationService.service
    hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
    list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    return null;
}
项目: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    文件:Patient_SummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:AvoinApotti    文件:PatientSummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:PrintMultipleOrdersImpl.java   
/**
* getModality
*/
public ims.core.vo.ServiceLiteVo getModality(Integer orderInvId)
{
    if(orderInvId == null)
        throw new CodingRuntimeException("orderInv parameter is null in method getModality");

    DomainFactory factory = getDomainFactory();
    String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
    List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    //if current OrderInvestigation doesn't have a specimen we get the modality as follows:
    //OrderInvestigation.investigation.providerService.locationService.service
    hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
    list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    return null;
}
项目:openMAXIMS    文件:InternalReferralModuleConfigurationImpl.java   
public ServiceLiteVoCollection listClinicalServices(String serviceName) throws DomainInterfaceException
{
    if (serviceName == null || serviceName.length() == 0)
        throw new DomainInterfaceException("Service name is mandatory for search.");

    StringBuilder query = new StringBuilder("SELECT srv FROM Service AS srv");
    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    query.append(" WHERE srv.upperName LIKE :SRV_NAME AND srv.serviceCategory.id = :CLINICAL AND srv.isActive = 1"); //WDEV-20219 UPPER(srv.serviceName)
    paramNames.add("SRV_NAME");
    paramValues.add(serviceName.toUpperCase() + '%');
    paramNames.add("CLINICAL");
    paramValues.add(ServiceCategory.CLINICAL.getID());

    query.append(" ORDER BY srv.upperName"); //WDEV-20219 UPPER(srv.serviceName)

    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(getDomainFactory().find(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:EDDecisionToAdmitDialogImpl.java   
@Override
public ServiceLiteVoCollection listActiveClinicalServices(String value) 
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> paramName = new ArrayList<String>();
    ArrayList<Object> paramValue = new ArrayList<Object>();

    StringBuilder hql = new StringBuilder("FROM Service service WHERE service.isActive = :isActive AND service.serviceCategory.id = :serviceCategoryID ");

    paramName.add("isActive");              paramValue.add(Boolean.TRUE);
    paramName.add("serviceCategoryID");     paramValue.add(ServiceCategory.CLINICAL.getID());

    if(value != null)
    {
        hql.append(" and service.upperName LIKE :SERVICE_NAME");
        paramName.add("SERVICE_NAME");
        paramValue.add("%" + value + "%");
    }

    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(factory.find(hql.toString(), paramName, paramValue));
}
项目:openMAXIMS    文件:FutureAppointmentWorklistImpl.java   
public ims.core.vo.ServiceLiteVoCollection getServices()
{
    DomainFactory factory = getDomainFactory();

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    String hql = "from Service service where service.isActive = :isActive and service.canBeScheduled = :canBeScheduled and service.serviceCategory.id != :serviceCategoryID " ;

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

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

    markers.add("serviceCategoryID");
    values.add(ServiceCategory.RADIOLOGY_MODALITY.getID());

    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(factory.find(hql, markers, values));
}
项目:openMAXIMS    文件:FutureAppointmentDetailsImpl.java   
public ServiceLiteVoCollection getServices()
{
    DomainFactory factory = getDomainFactory();

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    String hql = "from Service service where service.isActive = :isActive and service.canBeScheduled = :canBeScheduled and service.serviceCategory.id != :serviceCategoryID " ;

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

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

    markers.add("serviceCategoryID");
    values.add(ServiceCategory.RADIOLOGY_MODALITY.getID());

    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(factory.find(hql, markers, values));
}
项目:openmaxims-linux    文件:Patient_SummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:LinkedAppointmentDetailsComponentImpl.java   
public ims.core.vo.ServiceLiteVoCollection listService(String name)
{
    DomainFactory factory = getDomainFactory();

    StringBuilder hql = new StringBuilder("select s from Service s where s.isActive = 1 and s.canBeScheduled = 1 ");

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if (name != null)
    {
        hql.append(" and s.upperName like :ServiceName ");
        markers.add("ServiceName");
        values.add(name.toUpperCase() + "%");
    }

    hql.append( " order by s.upperName asc" );
    List services = factory.find(hql.toString(), markers, values);

    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services);
}
项目: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    文件:ReferralServicesImpl.java   
public ims.core.vo.ServiceLiteVoCollection getServices()
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from Service as service where service.isRIE is null and service.isActive = :isActive order by service.serviceName asc");  //wdev-20862
    List list = factory.find(hql.toString(), new String[]{"isActive"}, new Object[]{true});
    ServiceLiteVoCollection serviceLiteVoColl = ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(list);

    if (serviceLiteVoColl.size() > 0)
    {
        return serviceLiteVoColl;
    }
    else
    {
        return null;
    }
}
项目:openmaxims-linux    文件:PatientSummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:openMAXIMS    文件:PrintOrderImpl.java   
@SuppressWarnings("rawtypes")
public ServiceLiteVo getModality(OrderInvestigationRefVo orderInv)
{
    if(orderInv == null || orderInv.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("orderInv parameter is null in method getModality");

    DomainFactory factory = getDomainFactory();
    String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
    List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    //if current OrderInvestigation doesn't have a specimen we get the modality as follows:
    //OrderInvestigation.investigation.providerService.locationService.service
    hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
    list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    return null;
}
项目:openMAXIMS    文件:PhelbotomyDefaultCollectorImpl.java   
public ServiceLiteVo getModality(Integer orderInvId)
{
    if(orderInvId == null)
        throw new CodingRuntimeException("orderInv parameter is null in method getModality");

    DomainFactory factory = getDomainFactory();
    String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
    List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    //if current OrderInvestigation doesn't have a specimen we get the modality as follows:
    //OrderInvestigation.investigation.providerService.locationService.service
    hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
    list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    return null;
}
项目:openmaxims-linux    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:openMAXIMS    文件:CatsReferralRequestServiceDlgImpl.java   
public ServiceLiteVo getServiceForReferral(CatsReferralRefVo referral)
{
    if (referral == null || referral.getID_CatsReferral() == null)
        return null;

    StringBuilder query = new StringBuilder("SELECT service FROM CatsReferral AS referral ");
    query.append(" LEFT JOIN referral.referralDetails AS referralDetails ");
    query.append(" LEFT JOIN referralDetails.service AS service ");

    query.append(" WHERE ");

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

    query.append(" referral.id = :REFERRAL_ID ");

    paramNames.add("REFERRAL_ID");
    paramValues.add(referral.getID_CatsReferral());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:AddEmergencyTheatreImpl.java   
public ServiceLiteVo getReferralService(CatsReferralRefVo referral)
{
    if (referral == null || referral.getID_CatsReferral() == null)
        return null;

    DomainFactory factory = getDomainFactory();

    String hql = " select serv from CatsReferral as referral left join referral.referralDetails as refDetails left join refDetails.service as serv " +
                 " where referral.id = :referralID";

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

    markers.add("referralID");
    values.add(referral.getID_CatsReferral());

    List <?> list = factory.find(hql, markers, values);

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

    return ServiceLiteVoAssembler.create((Service)list.get(0));
}
项目: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    文件:Patient_SummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目: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    文件:ReferralServicesImpl.java   
public ims.core.vo.ServiceLiteVoCollection getServices()
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from Service as service where service.isRIE is null and service.isActive = :isActive");
    List list = factory.find(hql.toString(), new String[]{"isActive"}, new Object[]{true});
    ServiceLiteVoCollection serviceLiteVoColl = ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(list);

    if (serviceLiteVoColl.size() > 0)
    {
        return serviceLiteVoColl;
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:ServiceImpl.java   
public ServiceLiteVoCollection listActiveServiceLiteByNameAndCategories(String name, ServiceCategoryCollection categoryCollection)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer query = new StringBuffer("from Service s where s.upperName like :serviceName and s.isActive = :isActive");
    for (int i = 0; i < categoryCollection.size(); i++)
    {
        if (i == 0)
            query.append(" and s.serviceCategory.id in(");
        query.append(categoryCollection.get(i).getID());

        if (i < (categoryCollection.size() - 1))
            query.append(", ");
        else
            query.append(")");
    }
    List services = factory.find(query.toString(), new String[]{"serviceName", "isActive"}, new Object[]{"%" + name.toUpperCase() + "%", Boolean.TRUE});
    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(services).sort();
}
项目:openMAXIMS    文件:PrintOrderImpl.java   
@SuppressWarnings("rawtypes")
public ServiceLiteVo getModality(OrderInvestigationRefVo orderInv)
{
    if(orderInv == null || orderInv.getID_OrderInvestigation() == null)
        throw new CodingRuntimeException("orderInv parameter is null in method getModality");

    DomainFactory factory = getDomainFactory();
    String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
    List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    //if current OrderInvestigation doesn't have a specimen we get the modality as follows:
    //OrderInvestigation.investigation.providerService.locationService.service
    hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
    list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    return null;
}
项目:openMAXIMS    文件:PhelbotomyDefaultCollectorImpl.java   
public ServiceLiteVo getModality(Integer orderInvId)
{
    if(orderInvId == null)
        throw new CodingRuntimeException("orderInv parameter is null in method getModality");

    DomainFactory factory = getDomainFactory();
    String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
    List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    //if current OrderInvestigation doesn't have a specimen we get the modality as follows:
    //OrderInvestigation.investigation.providerService.locationService.service
    hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
    list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

    if(list.size() > 0)
        return ServiceLiteVoAssembler.create((Service) list.get(0));

    return null;
}
项目: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    文件: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    文件:Patient_SummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:openMAXIMS    文件:PatientSummaryImpl.java   
public ServiceRefVo getServiceForEpisodeOfCareSpecialty(EpisodeOfCareRefVo episodeOfCare)
{
    if (episodeOfCare == null || !episodeOfCare.getID_EpisodeOfCareIsNotNull())
        return null;

    StringBuilder query = new StringBuilder();

    query.append("select service from Service as service left join service.specialty as specialty where specialty in ");
    query.append(" (select spec from EpisodeOfCare as eoc left join eoc.specialty as spec where eoc.id = :EOC_ID)");
    query.append("  and service.isRIE is null and service.isActive = 1");

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

    paramNames.add("EOC_ID");
    paramValues.add(episodeOfCare.getID_EpisodeOfCare());

    return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
项目:AvoinApotti    文件:BedAdmissionComponentImpl.java   
public ServiceLiteVoCollection getServicesBySpecialty(Specialty specialty)
{
    if (specialty == null)
        return null;

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

    String query = "SELECT serv FROM Service AS serv LEFT JOIN serv.specialty AS serviceSpecialty WHERE serviceSpecialty.id = :SPECIALTY_ID AND serv.isActive = 1";
    paramNames.add("SPECIALTY_ID");
    paramValues.add(specialty.getID());

    return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(getDomainFactory().find(query, paramNames, paramValues));
}
项目:AvoinApotti    文件:ReportsToModalityConfigFormImpl.java   
@SuppressWarnings("rawtypes")
//  @Override
    public ServiceLiteVoCollection listModality()
    {
        String hql = "from Service as s1_1 order by s1_1.serviceName asc";
        DomainFactory factory = getDomainFactory();

        List list = factory.find(hql.toString());

        return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(list);
    }