Worklist management
Worklist management service is used to present information about scheduled imaging procedure to an operator, or about studies waiting to be reported to a radiologist.
The DICOM protocol for worklist management is very similar to Query/Retrieve, but without the retrieve phase, so the implementations of Worklist management SCU and SCP are quite similar too.
The SCP:
void startWorklistManagementSCP() { BasicWorklistManagementSCP scp = new BasicWorklistManagementSCP(new WorklistListener()); scp.start(); } class WorklistListener implements BasicWorklistManagementSCPListener { public void queryReceived(BasicWorklistManagementSCP.Operation.Operation op) { Identifier query = op.identifier; /* Search our local database for items matching the data elements sent by the SCU un query and build response identifiers, such as: */ Identifier response = new Identifier(Identifier.MODEL_WL_MODALITY); response.set(Tag.PatientName, "Some Patient"); op.sendQueryResponsePending(response); /* Then, when the matching is complete: */ op.sendQueryResponseFinal(); } public boolean supportsSyntax(String syn) { return UID.ModalityWorklistInformationModelFIND.equals(syn); } }
The SCU, connecting to an application named WORKLIST at IP address server.hospital.com:
PeerAE peer = new PeerAE(InetAddress.getByName("server.hospital.com"), "WORKLIST"); BasicWorklistManagementSCU scu = new BasicWorklistManagementSCU(peer); Identifier query = new Identifier(Identifier.MODEL_WL_MODALITY); /* Example of query for a specific day and specific modality */ DataSet procedure_step= new DataSet(); procedure_step.set(Tag.ScheduledProcedureStepStartDate, LocalDate.now()); procedure_step.set(Tag.Modality, "MR"); query.set(Tag.ScheduledProcedureStepSequence, procedure_step); /* The information que are requesting */ query.request(Tag.PatientName); /* Send the query and display the results */ for (Identifier id: scu.find(query)) { System.out.println(id.getString(Tag.PatientName)); } scu.close();