Java 类ims.clinical.vo.PatientTheatreBookingVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void listAppointmentsForPatientAndDate()
{
    Date dteAppt = null;
    if(form.getLocalContext().getDateApptIsNotNull())
        dteAppt = form.getLocalContext().getDateAppt();
    else
        dteAppt = form.dteAppt().getValue();
    PatientTheatreBookingVoCollection voColl = domain.listTheatreAppointmentsByPatientAndDate(form.getLocalContext().getselectedPatient(), dteAppt);
    populateApptsGrid(voColl);
}
项目:AvoinApotti    文件:Logic.java   
private void populateApptsGrid(PatientTheatreBookingVoCollection voColl)
{
    form.grdAppts().getRows().clear();
    if(voColl != null)
    {
        for(int i = 0 ; i < voColl.size() ; i++)
        {
            PatientTheatreBookingVo voBooking = voColl.get(i);
            grdApptsRow row = form.grdAppts().getRows().newRow();

            if (voBooking.getTheatreBookingIsNotNull()
                && voBooking.getTheatreBooking().getTCITimeIsNotNull())
                row.setAppointmentTime(voBooking.getTheatreBooking().getTCITime().toString());

            if(voBooking.getTheatreBookingIsNotNull() && voBooking.getTheatreBooking().getProcedureIsNotNull())
                row.setProcedure(voBooking.getTheatreBooking().getProcedure().getProcedureName());

            if(voBooking.getSessionIsNotNull() && voBooking.getSession().getTheatreTypeIsNotNull())
                row.setType(voBooking.getSession().getTheatreType().toString());

            if(voBooking.getApptStartTimeIsNotNull())
                row.setAppointmentTime(voBooking.getApptStartTime().toString());

            if(voBooking.getApptStatusIsNotNull())
            {
                row.setStatus(voBooking.getApptStatus().toString());
                row.setBooking(voBooking.getApptStatus().getImage());
            }

            if(voBooking.getOutcomeIsNotNull())
                row.setTooltip("Outcome : " + voBooking.getOutcome().getText());

            row.setValue(voBooking);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void listAppointmentsForPatientAndDate()
{
    Date dteAppt = null;
    if(form.getLocalContext().getDateApptIsNotNull())
        dteAppt = form.getLocalContext().getDateAppt();
    else
        dteAppt = form.dteAppt().getValue();
    PatientTheatreBookingVoCollection voColl = domain.listTheatreAppointmentsByPatientAndDate(form.getLocalContext().getselectedPatient(), dteAppt);
    populateApptsGrid(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private void populateApptsGrid(PatientTheatreBookingVoCollection voColl)
{
    form.grdAppts().getRows().clear();
    if(voColl != null)
    {
        for(int i = 0 ; i < voColl.size() ; i++)
        {
            PatientTheatreBookingVo voBooking = voColl.get(i);
            grdApptsRow row = form.grdAppts().getRows().newRow();

            if (voBooking.getTheatreBookingIsNotNull()
                && voBooking.getTheatreBooking().getTCITimeIsNotNull())
                row.setAppointmentTime(voBooking.getTheatreBooking().getTCITime().toString());

            if(voBooking.getTheatreBookingIsNotNull() && voBooking.getTheatreBooking().getProcedureIsNotNull())
                row.setProcedure(voBooking.getTheatreBooking().getProcedure().getProcedureName());

            if(voBooking.getSessionIsNotNull() && voBooking.getSession().getTheatreTypeIsNotNull())
                row.setType(voBooking.getSession().getTheatreType().toString());

            if(voBooking.getApptStartTimeIsNotNull())
                row.setAppointmentTime(voBooking.getApptStartTime().toString());

            if(voBooking.getApptStatusIsNotNull())
            {
                row.setStatus(voBooking.getApptStatus().toString());
                row.setBooking(voBooking.getApptStatus().getImage());
            }

            if(voBooking.getOutcomeIsNotNull())
                row.setTooltip("Outcome : " + voBooking.getOutcome().getText());

            row.setValue(voBooking);
        }
    }

}
项目:openmaxims-linux    文件:Logic.java   
private void listAppointmentsForPatientAndDate()
{
    Date dteAppt = null;
    if(form.getLocalContext().getDateApptIsNotNull())
        dteAppt = form.getLocalContext().getDateAppt();
    else
        dteAppt = form.dteAppt().getValue();
    PatientTheatreBookingVoCollection voColl = domain.listTheatreAppointmentsByPatientAndDate(form.getLocalContext().getselectedPatient(), dteAppt);
    populateApptsGrid(voColl);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateApptsGrid(PatientTheatreBookingVoCollection voColl)
{
    form.grdAppts().getRows().clear();
    if(voColl != null)
    {
        for(int i = 0 ; i < voColl.size() ; i++)
        {
            PatientTheatreBookingVo voBooking = voColl.get(i);
            grdApptsRow row = form.grdAppts().getRows().newRow();

            if (voBooking.getTheatreBookingIsNotNull()
                && voBooking.getTheatreBooking().getTCITimeIsNotNull())
                row.setAppointmentTime(voBooking.getTheatreBooking().getTCITime().toString());

            if(voBooking.getTheatreBookingIsNotNull() && voBooking.getTheatreBooking().getProcedureIsNotNull())
                row.setProcedure(voBooking.getTheatreBooking().getProcedure().getProcedureName());

            if(voBooking.getSessionIsNotNull() && voBooking.getSession().getTheatreTypeIsNotNull())
                row.setType(voBooking.getSession().getTheatreType().toString());

            if(voBooking.getApptStartTimeIsNotNull())
                row.setAppointmentTime(voBooking.getApptStartTime().toString());

            if(voBooking.getApptStatusIsNotNull())
            {
                row.setStatus(voBooking.getApptStatus().toString());
                row.setBooking(voBooking.getApptStatus().getImage());
            }

            if(voBooking.getOutcomeIsNotNull())
                row.setTooltip("Outcome : " + voBooking.getOutcome().getText());

            row.setValue(voBooking);
        }
    }

}
项目:AvoinApotti    文件:PatientTheatreAppointmentManagementImpl.java   
public PatientTheatreBookingVoCollection listTheatreAppointmentsByPatientAndDate(PatientRefVo patientID, Date apptDate)
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    String andStr = "";
    StringBuffer sb = new StringBuffer();

    String hql = "from Booking_Appointment as appt "; //WDEV-9091

    if (patientID != null)
    {
        sb.append(andStr + " appt.patient.id = :pat");
        markers.add("pat");
        values.add(patientID.getID_Patient());
        andStr = " and ";
    }

    if (apptDate != null)
    {
        sb.append(andStr + " appt.appointmentDate = :apptDate");
        markers.add("apptDate");
        values.add(apptDate.getDate());
        andStr = " and ";
    }
    sb.append(andStr + " appt.theatreBooking != null");
    andStr = " and ";
    sb.append(andStr + " appt.apptStatus = :apptBooked");
    markers.add("apptBooked");
    values.add(getDomLookup(Status_Reason.BOOKED));

    hql += " where ";
    hql += sb.toString();

    java.util.List<?> list = getDomainFactory().find(hql.toString(), markers, values);

    return PatientTheatreBookingVoAssembler.createPatientTheatreBookingVoCollectionFromBooking_Appointment(list); //WDEV-9091

    //WDEV - 9091
    /*
    Iterator it = list.iterator();
    PatientTheatreBookingVoCollection voColl = new PatientTheatreBookingVoCollection();
    while(it.hasNext())
    {

        Object[] lstItem = (Object[]) it.next();
        Booking_Appointment doOP = (Booking_Appointment)lstItem[0];
        Booking_AppointmentVo voOP = Booking_AppointmentVoAssembler.create(doOP);
        PatientTheatreBookingVo voTheatre = new PatientTheatreBookingVo(voOP.getID_Booking_Appointment(), voOP.getVersion_Booking_Appointment());

        voTheatre.setID_Booking_Appointment(doOP.getId());

        voTheatre.setAppointmentDate(voOP.getAppointmentDate());
        voTheatre.setApptStartTime(voOP.getApptStartTime());
        voTheatre.setApptStatus(voOP.getApptStatus());
        voTheatre.setApptStatusHistory(voOP.getApptStatusHistory());
        voTheatre.setArrivalTime(null);
        voTheatre.setSeenTime(null);
        voTheatre.setOutcome(voOP.getOutcome());
        voTheatre.setTheatreBooking(TheatreBookingLiteVoAssembler.create((TheatreBooking)lstItem[1]));
        voTheatre.setSession(voOP.getSession());
        voTheatre.setApptStatusReas(voOP.getApptStatusReas());
        voTheatre.setRequiresRebook(voOP.getRequiresRebook());
        voTheatre.setCurrentStatusRecord(voOP.getCurrentStatusRecord());

        voColl.add(voTheatre);
    }
    return voColl;
    */
    //WDEV-9091
}
项目:openMAXIMS    文件:PatientTheatreAppointmentManagementImpl.java   
public PatientTheatreBookingVoCollection listTheatreAppointmentsByPatientAndDate(PatientRefVo patientID, Date apptDate)
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    String andStr = "";
    StringBuffer sb = new StringBuffer();

    String hql = "from Booking_Appointment as appt "; //WDEV-9091

    if (patientID != null)
    {
        sb.append(andStr + " appt.patient.id = :pat");
        markers.add("pat");
        values.add(patientID.getID_Patient());
        andStr = " and ";
    }

    if (apptDate != null)
    {
        sb.append(andStr + " appt.appointmentDate = :apptDate");
        markers.add("apptDate");
        values.add(apptDate.getDate());
        andStr = " and ";
    }
    sb.append(andStr + " appt.theatreBooking != null");
    andStr = " and ";
    sb.append(andStr + " appt.apptStatus = :apptBooked");
    markers.add("apptBooked");
    values.add(getDomLookup(Status_Reason.BOOKED));

    hql += " where ";
    hql += sb.toString();

    java.util.List<?> list = getDomainFactory().find(hql.toString(), markers, values);

    return PatientTheatreBookingVoAssembler.createPatientTheatreBookingVoCollectionFromBooking_Appointment(list); //WDEV-9091

    //WDEV - 9091
    /*
    Iterator it = list.iterator();
    PatientTheatreBookingVoCollection voColl = new PatientTheatreBookingVoCollection();
    while(it.hasNext())
    {

        Object[] lstItem = (Object[]) it.next();
        Booking_Appointment doOP = (Booking_Appointment)lstItem[0];
        Booking_AppointmentVo voOP = Booking_AppointmentVoAssembler.create(doOP);
        PatientTheatreBookingVo voTheatre = new PatientTheatreBookingVo(voOP.getID_Booking_Appointment(), voOP.getVersion_Booking_Appointment());

        voTheatre.setID_Booking_Appointment(doOP.getId());

        voTheatre.setAppointmentDate(voOP.getAppointmentDate());
        voTheatre.setApptStartTime(voOP.getApptStartTime());
        voTheatre.setApptStatus(voOP.getApptStatus());
        voTheatre.setApptStatusHistory(voOP.getApptStatusHistory());
        voTheatre.setArrivalTime(null);
        voTheatre.setSeenTime(null);
        voTheatre.setOutcome(voOP.getOutcome());
        voTheatre.setTheatreBooking(TheatreBookingLiteVoAssembler.create((TheatreBooking)lstItem[1]));
        voTheatre.setSession(voOP.getSession());
        voTheatre.setApptStatusReas(voOP.getApptStatusReas());
        voTheatre.setRequiresRebook(voOP.getRequiresRebook());
        voTheatre.setCurrentStatusRecord(voOP.getCurrentStatusRecord());

        voColl.add(voTheatre);
    }
    return voColl;
    */
    //WDEV-9091
}
项目:openmaxims-linux    文件:PatientTheatreAppointmentManagementImpl.java   
public PatientTheatreBookingVoCollection listTheatreAppointmentsByPatientAndDate(PatientRefVo patientID, Date apptDate)
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();
    String andStr = "";
    StringBuffer sb = new StringBuffer();

    String hql = "from Booking_Appointment as appt "; //WDEV-9091

    if (patientID != null)
    {
        sb.append(andStr + " appt.patient.id = :pat");
        markers.add("pat");
        values.add(patientID.getID_Patient());
        andStr = " and ";
    }

    if (apptDate != null)
    {
        sb.append(andStr + " appt.appointmentDate = :apptDate");
        markers.add("apptDate");
        values.add(apptDate.getDate());
        andStr = " and ";
    }
    sb.append(andStr + " appt.theatreBooking != null");
    andStr = " and ";
    sb.append(andStr + " appt.apptStatus = :apptBooked");
    markers.add("apptBooked");
    values.add(getDomLookup(Status_Reason.BOOKED));

    hql += " where ";
    hql += sb.toString();

    java.util.List<?> list = getDomainFactory().find(hql.toString(), markers, values);

    return PatientTheatreBookingVoAssembler.createPatientTheatreBookingVoCollectionFromBooking_Appointment(list); //WDEV-9091

    //WDEV - 9091
    /*
    Iterator it = list.iterator();
    PatientTheatreBookingVoCollection voColl = new PatientTheatreBookingVoCollection();
    while(it.hasNext())
    {

        Object[] lstItem = (Object[]) it.next();
        Booking_Appointment doOP = (Booking_Appointment)lstItem[0];
        Booking_AppointmentVo voOP = Booking_AppointmentVoAssembler.create(doOP);
        PatientTheatreBookingVo voTheatre = new PatientTheatreBookingVo(voOP.getID_Booking_Appointment(), voOP.getVersion_Booking_Appointment());

        voTheatre.setID_Booking_Appointment(doOP.getId());

        voTheatre.setAppointmentDate(voOP.getAppointmentDate());
        voTheatre.setApptStartTime(voOP.getApptStartTime());
        voTheatre.setApptStatus(voOP.getApptStatus());
        voTheatre.setApptStatusHistory(voOP.getApptStatusHistory());
        voTheatre.setArrivalTime(null);
        voTheatre.setSeenTime(null);
        voTheatre.setOutcome(voOP.getOutcome());
        voTheatre.setTheatreBooking(TheatreBookingLiteVoAssembler.create((TheatreBooking)lstItem[1]));
        voTheatre.setSession(voOP.getSession());
        voTheatre.setApptStatusReas(voOP.getApptStatusReas());
        voTheatre.setRequiresRebook(voOP.getRequiresRebook());
        voTheatre.setCurrentStatusRecord(voOP.getCurrentStatusRecord());

        voColl.add(voTheatre);
    }
    return voColl;
    */
    //WDEV-9091
}