@Test public void testByStartDateTime() throws Exception { queryService.findScheduledProcedureSteps( null, spsStartDateTime("20111025", "1400-1500"), queryParam); assertArrayEquals(new String[] { "9934.1" }, spsids(queryService)); }
public void findScheduledProcedureSteps(IDWithIssuer[] pids, Attributes keys, QueryParam queryParam) { if (results != null) results.close(); BooleanBuilder builder = new BooleanBuilder(); Builder.addPatientLevelPredicates(builder, pids, keys, queryParam); Builder.addServiceRequestPredicates(builder, keys, queryParam); Builder.addRequestedProcedurePredicates(builder, keys, queryParam); Attributes spsItem = keys.getNestedDataset(Tag.ScheduledProcedureStepSequence); Builder.addScheduledProcedureStepPredicates(builder, spsItem, queryParam); results = new HibernateQuery(session) .from(QScheduledProcedureStep.scheduledProcedureStep) .innerJoin(QScheduledProcedureStep.scheduledProcedureStep.requestedProcedure, QRequestedProcedure.requestedProcedure) .innerJoin(QRequestedProcedure.requestedProcedure.serviceRequest, QServiceRequest.serviceRequest) .innerJoin(QServiceRequest.serviceRequest.visit, QVisit.visit) .innerJoin(QVisit.visit.patient, QPatient.patient) .where(builder) .scroll(ScrollMode.FORWARD_ONLY, QScheduledProcedureStep.scheduledProcedureStep.encodedAttributes, QRequestedProcedure.requestedProcedure.encodedAttributes, QServiceRequest.serviceRequest.encodedAttributes, QVisit.visit.encodedAttributes, QPatient.patient.encodedAttributes); hasNext = results.next(); }
MWLQueryService { public void findScheduledProcedureSteps(IDWithIssuer[] pids, Attributes keys, QueryParam queryParam) { if (results != null) results.close(); BooleanBuilder builder = new BooleanBuilder(); Builder.addPatientLevelPredicates(builder, pids, keys, queryParam); Builder.addServiceRequestPredicates(builder, keys, queryParam); Builder.addRequestedProcedurePredicates(builder, keys, queryParam); Attributes spsItem = keys.getNestedDataset(Tag.ScheduledProcedureStepSequence); Builder.addScheduledProcedureStepPredicates(builder, spsItem, queryParam); results = new HibernateQuery(session) .from(QScheduledProcedureStep.scheduledProcedureStep) .innerJoin(QScheduledProcedureStep.scheduledProcedureStep.requestedProcedure, QRequestedProcedure.requestedProcedure) .innerJoin(QRequestedProcedure.requestedProcedure.serviceRequest, QServiceRequest.serviceRequest) .innerJoin(QServiceRequest.serviceRequest.visit, QVisit.visit) .innerJoin(QVisit.visit.patient, QPatient.patient) .where(builder) .scroll(ScrollMode.FORWARD_ONLY, QScheduledProcedureStep.scheduledProcedureStep.encodedAttributes, QRequestedProcedure.requestedProcedure.encodedAttributes, QServiceRequest.serviceRequest.encodedAttributes, QVisit.visit.encodedAttributes, QPatient.patient.encodedAttributes); hasNext = results.next(); } }
MWLQueryService { public void findScheduledProcedureSteps(IDWithIssuer[] pids, Attributes keys, QueryParam queryParam) { if (results != null) results.close(); BooleanBuilder builder = new BooleanBuilder(); Builder.addPatientLevelPredicates(builder, pids, keys, queryParam); Builder.addServiceRequestPredicates(builder, keys, queryParam); Builder.addRequestedProcedurePredicates(builder, keys, queryParam); Attributes spsItem = keys.getNestedDataset(Tag.ScheduledProcedureStepSequence); Builder.addScheduledProcedureStepPredicates(builder, spsItem, queryParam); results = new HibernateQuery(session) .from(QScheduledProcedureStep.scheduledProcedureStep) .innerJoin(QScheduledProcedureStep.scheduledProcedureStep.requestedProcedure, QRequestedProcedure.requestedProcedure) .innerJoin(QRequestedProcedure.requestedProcedure.serviceRequest, QServiceRequest.serviceRequest) .innerJoin(QServiceRequest.serviceRequest.visit, QVisit.visit) .innerJoin(QVisit.visit.patient, QPatient.patient) .where(builder) .scroll(ScrollMode.FORWARD_ONLY, QScheduledProcedureStep.scheduledProcedureStep.encodedAttributes, QRequestedProcedure.requestedProcedure.encodedAttributes, QServiceRequest.serviceRequest.encodedAttributes, QVisit.visit.encodedAttributes, QPatient.patient.encodedAttributes); hasNext = results.next(); }  }
MWLQueryService { public void findScheduledProcedureSteps(IDWithIssuer[] pids, Attributes keys, QueryParam queryParam) { if (results != null) results.close(); BooleanBuilder builder = new BooleanBuilder(); Builder.addPatientLevelPredicates(builder, pids, keys, queryParam); Builder.addServiceRequestPredicates(builder, keys, queryParam); Builder.addRequestedProcedurePredicates(builder, keys, queryParam); Attributes spsItem = keys.getNestedDataset(Tag.ScheduledProcedureStepSequence); Builder.addScheduledProcedureStepPredicates(builder, spsItem, queryParam); results = new HibernateQuery(session) .from(QScheduledProcedureStep.scheduledProcedureStep) .innerJoin(QScheduledProcedureStep.scheduledProcedureStep.requestedProcedure, QRequestedProcedure.requestedProcedure) .innerJoin(QRequestedProcedure.requestedProcedure.serviceRequest, QServiceRequest.serviceRequest) .innerJoin(QServiceRequest.serviceRequest.visit, QVisit.visit) .innerJoin(QVisit.visit.patient, QPatient.patient) .where(builder) .scroll(ScrollMode.FORWARD_ONLY, QScheduledProcedureStep.scheduledProcedureStep.encodedAttributes, QRequestedProcedure.requestedProcedure.encodedAttributes, QServiceRequest.serviceRequest.encodedAttributes, QVisit.visit.encodedAttributes, QPatient.patient.encodedAttributes); hasNext = results.next(); }  void findScheduledProcedureSteps(IDWithIssuer[] pids, Attributes keys,
            QueryParam queryParam); boolean optionalKeyNotSupported(); boolean hasMoreMatches(); Attributes nextMatch(); @Remove void close(); }
MWLQueryService { public void findScheduledProcedureSteps(IDWithIssuer[] pids, Attributes keys, QueryParam queryParam) { if (results != null) results.close(); BooleanBuilder builder = new BooleanBuilder(); Builder.addPatientLevelPredicates(builder, pids, keys, queryParam); Builder.addServiceRequestPredicates(builder, keys, queryParam); Builder.addRequestedProcedurePredicates(builder, keys, queryParam); Attributes spsItem = keys.getNestedDataset(Tag.ScheduledProcedureStepSequence); Builder.addScheduledProcedureStepPredicates(builder, spsItem, queryParam); results = new HibernateQuery(session) .from(QScheduledProcedureStep.scheduledProcedureStep) .innerJoin(QScheduledProcedureStep.scheduledProcedureStep.requestedProcedure, QRequestedProcedure.requestedProcedure) .innerJoin(QRequestedProcedure.requestedProcedure.serviceRequest, QServiceRequest.serviceRequest) .innerJoin(QServiceRequest.serviceRequest.visit, QVisit.visit) .innerJoin(QVisit.visit.patient, QPatient.patient) .where(builder) .scroll(ScrollMode.FORWARD_ONLY, QScheduledProcedureStep.scheduledProcedureStep.encodedAttributes, QRequestedProcedure.requestedProcedure.encodedAttributes, QServiceRequest.serviceRequest.encodedAttributes, QVisit.visit.encodedAttributes, QPatient.patient.encodedAttributes); hasNext = results.next(); }  void findScheduledProcedureSteps(IDWithIssuer[] pids, Attributes keys,
            QueryParam queryParam); boolean optionalKeyNotSupported(); boolean hasMoreMatches(); Attributes nextMatch(); @Remove void close();  }