Creating a Subcontract Batch Job

Overview
Often a laboratory subcontracts samples for particular tests to subcontract laboratories. Where a sample scheme is assigned to a subcontract laboratory, the sample schemes are located and selected for inclusion in a subcontract batch job.
Where the originating laboratory and subcontract laboratory are on the same server or database, then, typically, custom scripts are implemented to transfer the laboratory batch job as a registered job in the subcontract laboratory, and then, after analysis, transfer the results back.
Where the originating laboratory and subcontract laboratory are not on the same server, then, typically, custom scripts are implemented to zip the laboratory batch job and electronically transfer it to the subcontract laboratory, and then, after analysis, receive the results back electronically, and import them to the originating laboratory, for example, by placing the result files into a specific folder and using the Task Scheduler application to load them.
Process
Subcontract batch job creation sessions are managed using the Batch application.
The subcontract sample search provided in the Batch application is essentially a sample-scheme-centric search, that is, samples are returned based on instruments and schemes, sample dates, sample type, the analyte status and laboratory batch status of CUID scheme analytes, and sample scheme referral status.
Before this search, samples are set to a batching waiting or batching ready state, typically based upon their preparation for subcontracting state using the Setting Waiting Times on Analysis process.
Note: Ensure that analytes are registered for the job scheme. If no job scheme analytes exist, then the sample schemes will not be located for batching.
Once samples are located using various criteria, some or all of the samples are selected for inclusion in a new subcontract batch job.
Select located samples for a subcontract batch job
Create a subcontract batch job
The subcontract batch job contains job schemes as per the batched schemes, CUIDs as per the batched samples, and CUID schemes as per the intersection of batched schemes and samples, however, it shares the original jobs' CUID scheme analytes. That is, for each CUID scheme analyte placed into a batch job, a new batch CUID and a new batch CUID scheme is created. The CUID scheme analyte is common to both the batch job and the original job, which is why, when results are uploaded from the subcontracted executing laboratory back to this subcontract batch job, result transfer is not required.
The laboratory assigned to the subcontract batch job is set based upon scheme and laboratory configuration.
There are no records or links kept in the original job (apart from an audit history) to show to which batch jobs are created for its samples. The link between an original sample and a batch sample is the CUID scheme analyte's Lab Batch Job and Lab Batch Cuid, as each CUID scheme analyte in an original job could potentially be in a different laboratory batch job. The presence of a laboratory batch job and CUID in these fields indicate that the CUID scheme analyte is batched already.
Where configured, job paperwork can be generated for the subcontract batch job.