Java 类ims.ocrr.vo.OrderInvestigationBookingVo 实例源码

项目:AvoinApotti    文件:Logic.java   
public int compare(OrderInvestigationBookingVo order1, OrderInvestigationBookingVo order2) 
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(order1 != null)
        date1 = order1.getDisplayDateTime();

    if(order2 != null)
        date2 = order2.getDisplayDateTime();

    if(date1 == null)
        return -1*direction;

    if(date2 == null)
        return direction;

    return date1.compareTo(date2)*direction;
}
项目:openMAXIMS    文件:Logic.java   
protected void onTreInvApptsTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    form.getContextMenus().RefMan.getBookAppointmentREBOOK_APPTItem().setVisible(false);
    if (form.getMode().equals(FormMode.VIEW))
    {
        if (node != null)
        {
            removeAllRadiologyServices();
            if (node.getValue() instanceof BookingAppointmentLiteVo && node.getParent().equals(form.treInvAppts().getNodeByValue(REBOOK_APPT_NODE)))
                form.getContextMenus().RefMan.getBookAppointmentREBOOK_APPTItem().setVisible(true);
            if (node.getValue() instanceof OrderInvestigationBookingVo)
            {
                ServiceLiteVo voService = getService(((OrderInvestigationBookingVo) node.getValue()));
                if (!form.cmbService().getValues().contains(voService))
                    form.cmbService().newRow(voService, voService.getServiceName());

                form.cmbService().setValue(voService);
                form.getLocalContext().setisLinkingOrderInv(true);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(OrderInvestigationBookingVo order1, OrderInvestigationBookingVo order2) 
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(order1 != null)
        date1 = order1.getDisplayDateTime();

    if(order2 != null)
        date2 = order2.getDisplayDateTime();

    if(date1 == null)
        return -1*direction;

    if(date2 == null)
        return direction;

    return date1.compareTo(date2)*direction;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(OrderInvestigationBookingVo order1, OrderInvestigationBookingVo order2) 
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(order1 != null)
        date1 = order1.getDisplayDateTime();

    if(order2 != null)
        date2 = order2.getDisplayDateTime();

    if(date1 == null)
        return -1*direction;

    if(date2 == null)
        return direction;

    return date1.compareTo(date2)*direction;
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(OrderInvestigationBookingVo order1, OrderInvestigationBookingVo order2) 
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(order1 != null)
        date1 = order1.getDisplayDateTime();

    if(order2 != null)
        date2 = order2.getDisplayDateTime();

    if(date1 == null)
        return -1*direction;

    if(date2 == null)
        return direction;

    return date1.compareTo(date2)*direction;
}
项目:AvoinApotti    文件:Logic.java   
protected void onTreInvApptsTreeViewSelectionChanged(TreeNode node)
        throws PresentationLogicException {
    form.getContextMenus().RefMan.getBookAppointmentREBOOK_APPTItem()
            .setVisible(false);
    if (form.getMode().equals(FormMode.VIEW)) {
        if (node != null) {
            removeAllRadiologyServices();
            if (node.getValue() instanceof BookingAppointmentLiteVo
                    && node.getParent().equals(
                            form.treInvAppts().getNodeByValue(
                                    REBOOK_APPT_NODE)))
                form.getContextMenus().RefMan
                        .getBookAppointmentREBOOK_APPTItem().setVisible(
                                true);
            if (node.getValue() instanceof OrderInvestigationBookingVo) {
                ServiceLiteVo voService = getService(((OrderInvestigationBookingVo) node
                        .getValue()));
                if (!form.cmbService().getValues().contains(voService))
                    form.cmbService().newRow(voService,
                            voService.getServiceName());

                form.cmbService().setValue(voService);
                form.getLocalContext().setisLinkingOrderInv(true);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private ServiceLiteVo getService(OrderInvestigationBookingVo voOrderInv) {
    if (voOrderInv == null)
        return null;

    if (voOrderInv.getInvestigationIsNotNull()
            && voOrderInv.getInvestigation().getProviderServiceIsNotNull()
            && voOrderInv.getInvestigation().getProviderService()
                    .getLocationServiceIsNotNull()
            && voOrderInv.getInvestigation().getProviderService()
                    .getLocationService().getServiceIsNotNull())
        return voOrderInv.getInvestigation().getProviderService()
                .getLocationService().getService();

    return null;
}
项目:AvoinApotti    文件:BookAppointmentImpl.java   
private OrderInvApptVo getOrCreateOrderInvApptVo(Booking_AppointmentVo voAppt, OrderInvestigationBookingVo orderInvestigationBookingVo)
{
    List ordInvAppts = getDomainFactory().find("from OrderInvAppt invAppt where invAppt.appointment.id = :idAppt and invAppt.orderInvestigation.id = :idOrderInv", new String[]{"idAppt", "idOrderInv"}, new Object[]{voAppt.getID_Booking_Appointment(), orderInvestigationBookingVo.getID_OrderInvestigation()});
    if (ordInvAppts != null && ordInvAppts.size() == 1)
    {
        OrderInvAppt doOrdInvAppt = (OrderInvAppt) ordInvAppts.get(0);
        return OrderInvApptVoAssembler.create(doOrdInvAppt);
    }

    return new OrderInvApptVo();
}
项目:openMAXIMS    文件:Logic.java   
private ServiceLiteVo getService(OrderInvestigationBookingVo voOrderInv)
{
    if (voOrderInv == null)
        return null;

    if (voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull())
        return voOrderInv.getInvestigation().getProviderService().getLocationService().getService();

    return null;
}
项目:openMAXIMS    文件:BookAppointmentImpl.java   
private OrderInvApptVo getOrCreateOrderInvApptVo(Booking_AppointmentVo voAppt, OrderInvestigationBookingVo orderInvestigationBookingVo)
{
    List ordInvAppts = getDomainFactory().find("from OrderInvAppt invAppt where invAppt.appointment.id = :idAppt and invAppt.orderInvestigation.id = :idOrderInv", new String[]{"idAppt", "idOrderInv"}, new Object[]{voAppt.getID_Booking_Appointment(), orderInvestigationBookingVo.getID_OrderInvestigation()});
    if (ordInvAppts != null && ordInvAppts.size() == 1)
    {
        OrderInvAppt doOrdInvAppt = (OrderInvAppt) ordInvAppts.get(0);
        return OrderInvApptVoAssembler.create(doOrdInvAppt);
    }

    return new OrderInvApptVo();
}
项目:openMAXIMS    文件:Logic.java   
protected void onTreInvApptsTreeViewSelectionChanged(TreeNode node)
        throws PresentationLogicException {
    form.getContextMenus().RefMan.getBookAppointmentREBOOK_APPTItem()
            .setVisible(false);
    if (form.getMode().equals(FormMode.VIEW)) {
        if (node != null) {
            removeAllRadiologyServices();
            if (node.getValue() instanceof BookingAppointmentLiteVo
                    && node.getParent().equals(
                            form.treInvAppts().getNodeByValue(
                                    REBOOK_APPT_NODE)))
                form.getContextMenus().RefMan
                        .getBookAppointmentREBOOK_APPTItem().setVisible(
                                true);
            if (node.getValue() instanceof OrderInvestigationBookingVo) {
                ServiceLiteVo voService = getService(((OrderInvestigationBookingVo) node
                        .getValue()));
                if (!form.cmbService().getValues().contains(voService))
                    form.cmbService().newRow(voService,
                            voService.getServiceName());

                form.cmbService().setValue(voService);
                form.getLocalContext().setisLinkingOrderInv(true);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private ServiceLiteVo getService(OrderInvestigationBookingVo voOrderInv) {
    if (voOrderInv == null)
        return null;

    if (voOrderInv.getInvestigationIsNotNull()
            && voOrderInv.getInvestigation().getProviderServiceIsNotNull()
            && voOrderInv.getInvestigation().getProviderService()
                    .getLocationServiceIsNotNull()
            && voOrderInv.getInvestigation().getProviderService()
                    .getLocationService().getServiceIsNotNull())
        return voOrderInv.getInvestigation().getProviderService()
                .getLocationService().getService();

    return null;
}
项目:openMAXIMS    文件:BookAppointmentImpl.java   
private OrderInvApptVo getOrCreateOrderInvApptVo(Booking_AppointmentVo voAppt, OrderInvestigationBookingVo orderInvestigationBookingVo)
{
    List ordInvAppts = getDomainFactory().find("from OrderInvAppt invAppt where invAppt.appointment.id = :idAppt and invAppt.orderInvestigation.id = :idOrderInv", new String[]{"idAppt", "idOrderInv"}, new Object[]{voAppt.getID_Booking_Appointment(), orderInvestigationBookingVo.getID_OrderInvestigation()});
    if (ordInvAppts != null && ordInvAppts.size() == 1)
    {
        OrderInvAppt doOrdInvAppt = (OrderInvAppt) ordInvAppts.get(0);
        return OrderInvApptVoAssembler.create(doOrdInvAppt);
    }

    return new OrderInvApptVo();
}
项目:AvoinApotti    文件:Logic.java   
private boolean isSafetyQuestionnaireCompleted(Sch_BookingVo voBooking) {
    // Check booking parameter
    if (voBooking == null || voBooking.getAppointments() == null
            || voBooking.getAppointments().size() == 0)
        throw new CodingRuntimeException(
                "Can not check safety questionnaire for null record.");

    // Check if booking has OrderInvestigation associated
    if (voBooking.getAppointments().get(0).getOrderInvestigationIsNotNull()) {
        OrderInvestigationBookingVo investigation = voBooking
                .getAppointments().get(0).getOrderInvestigation();

        // If the investigation hasn't a provider system then terminate
        // function and allow to proceed with booking
        if (investigation == null
                || investigation.getInvestigation() == null
                || investigation.getInvestigation().getProviderService() == null
                || investigation.getInvestigation().getProviderService()
                        .getProviderSystem() == null)
            return true;

        ProviderSystemLiteVo providerSystem = investigation
                .getInvestigation().getProviderService()
                .getProviderSystem();

        // If the investigation provider system has 'Send Questionnaire'
        // marked as true - then check if the CATS Referral has Safety
        // Questionnaire completed
        if (Boolean.TRUE.equals(providerSystem.getSendQuestionnaire())) {
            LocationServiceLiteVo locationService = investigation
                    .getInvestigation().getProviderService()
                    .getLocationService();

            // Check if a service can be reached
            // WDEV-14580 - Services no longer require to have a speciality
            if (locationService == null
                    || locationService.getService() == null)
                return false;

            // Check if the referral has no documents
            if (Boolean.TRUE.equals(domain.hasSafetyQuestionnarie(
                    form.getGlobalContext().RefMan.getCatsReferral(),
                    locationService.getService())))
                return true;

            // If the safety questionnaire is required but not found - stop
            // the booking process
            return false;
        }
    }

    // Allow booking - can reach this case when safety questionnaire is not
    // required
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isSafetyQuestionnaireCompleted(Sch_BookingVo voBooking)
{
    // Check booking parameter
    if (voBooking == null || voBooking.getAppointments() == null || voBooking.getAppointments().size() == 0)
        throw new CodingRuntimeException("Can not check safety questionnaire for null record.");

    // Check if booking has OrderInvestigation associated
    if (voBooking.getAppointments().get(0).getOrderInvestigationIsNotNull())
    {
        OrderInvestigationBookingVo investigation = voBooking.getAppointments().get(0).getOrderInvestigation();

        // If the investigation hasn't a provider system then terminate
        // function and allow to proceed with booking
        if (investigation == null || investigation.getInvestigation() == null || investigation.getInvestigation().getProviderService() == null || investigation.getInvestigation().getProviderService().getProviderSystem() == null)
            return true;

        ProviderSystemLiteVo providerSystem = investigation.getInvestigation().getProviderService().getProviderSystem();

        // If the investigation provider system has 'Send Questionnaire'
        // marked as true - then check if the CATS Referral has Safety
        // Questionnaire completed
        if (Boolean.TRUE.equals(providerSystem.getSendQuestionnaire()))
        {
            LocationServiceLiteVo locationService = investigation.getInvestigation().getProviderService().getLocationService();

            // Check if a service can be reached
            // WDEV-14580 - Services no longer require to have a speciality
            if (locationService == null || locationService.getService() == null)
                return false;

            // Check if the referral has no documents
            if (Boolean.TRUE.equals(domain.hasSafetyQuestionnarie(form.getGlobalContext().RefMan.getCatsReferral(), locationService.getService())))
                return true;

            // If the safety questionnaire is required but not found - stop
            // the booking process
            return false;
        }
    }

    // Allow booking - can reach this case when safety questionnaire is not
    // required
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isSafetyQuestionnaireCompleted(Sch_BookingVo voBooking) {
    // Check booking parameter
    if (voBooking == null || voBooking.getAppointments() == null
            || voBooking.getAppointments().size() == 0)
        throw new CodingRuntimeException(
                "Can not check safety questionnaire for null record.");

    // Check if booking has OrderInvestigation associated
    if (voBooking.getAppointments().get(0).getOrderInvestigationIsNotNull()) {
        OrderInvestigationBookingVo investigation = voBooking
                .getAppointments().get(0).getOrderInvestigation();

        // If the investigation hasn't a provider system then terminate
        // function and allow to proceed with booking
        if (investigation == null
                || investigation.getInvestigation() == null
                || investigation.getInvestigation().getProviderService() == null
                || investigation.getInvestigation().getProviderService()
                        .getProviderSystem() == null)
            return true;

        ProviderSystemLiteVo providerSystem = investigation
                .getInvestigation().getProviderService()
                .getProviderSystem();

        // If the investigation provider system has 'Send Questionnaire'
        // marked as true - then check if the CATS Referral has Safety
        // Questionnaire completed
        if (Boolean.TRUE.equals(providerSystem.getSendQuestionnaire())) {
            LocationServiceLiteVo locationService = investigation
                    .getInvestigation().getProviderService()
                    .getLocationService();

            // Check if a service can be reached
            // WDEV-14580 - Services no longer require to have a speciality
            if (locationService == null
                    || locationService.getService() == null)
                return false;

            // Check if the referral has no documents
            if (Boolean.TRUE.equals(domain.hasSafetyQuestionnarie(
                    form.getGlobalContext().RefMan.getCatsReferral(),
                    locationService.getService())))
                return true;

            // If the safety questionnaire is required but not found - stop
            // the booking process
            return false;
        }
    }

    // Allow booking - can reach this case when safety questionnaire is not
    // required
    return true;
}