Adding a Group of Samples using a Template Sample to a Job

Overview

Template samples can be used to create registered samples, allowing the analytical profile on the template sample to be applied to the registered sample. Also, any other registered sample can be used to create registered samples.

For example, if a client sends additional samples that require often-used tests, then a template sample containing those tests is used to quickly register the samples for those tests. Or, if a client sends additional samples that require the same tests as another sample in the job, then that sample in the job is used as a template to quickly register the new samples.

Process

Once template jobs are created, they can be used to create production jobs. Refer to Registering Jobs from Template Jobs.

However, template samples within template jobs, and, in fact, any sample in any job, can be used to create sample in an existing production job.

Creating a Sample using a Template or Other Sample

The CCREGN—Job application can create samples from template or other registered samples.

Samples can be maintained either within the context of a job using the CCREGN—Job application or without job context using the CCSAMP—Sample application.

From the Samples tab of a job, instead of selecting Create Sample to present an interim sample, use the Create Sample From Template flow which presents the Create Sample from Template dialog box. This dialog box allows for the selection of a sample from which defaults are taken for the interim sample. This dialog box is typically personalised to allow searching of template samples based on custom attributes, scheme description, analyte description, and client address, state and country.

The drop-down selection list in Copy from Sample presents samples based on details selected or entered in the fields in the top portion of the dialog box, to apply further filters to the drop-down selection list, as follows:

  • A sample scheme exists for the sample where the scheme's CODE matches any entered Scheme Code, or the scheme's NAME matches any entered Scheme Name
  • A sample scheme analyte exists for the sample where the analyte's CODE matches any entered Analyte Code, or the analyte's NAME matches any entered Analyte Name
  • The sample's NAME matches any entered Sample Name
  • The sample's DESCRIPTION matches any entered Sample Description
  • The sample's CLIENT_SAMPLE_NAME matches any entered Client Sample Name
  • The name of the sample's client, that is, the NAME of the client associated with the sample's CLIENT_ID, matches any entered Client Name
  • The name of the sample's contact, that is, the NAME of the contact associated with the sample's CONTACT_ID, matches any entered Contact Name
  • The name of the sample's project, that is, the NAME of the project associated with the sample's PROJECT_ID, matches any entered Project Name
  • From is set to Templates only and the sample is a template sample, that is, the sample's IS_TEMPLATE = 'Y'

  • From is set to Other and the the job is not a laboratory batch job or template job, that is, the job's JOB_TYPE is not '4' or '5'

  • The sample exists in the current organisation and laboratory, that is, the sample's ORGANISATION_ID and LABORATORY_ID match that of the current log in session
  • The sample is active, that is, the sample's SAMPLE_STATUS <> '0'

    Note: If a template sample is inactive but the template job is used in a job Save As action to create a new job, then the inactivity has no impact, such that, the new job will contain a sample made from that inactive template sample.

  • The sample is not archived, that is, the sample's IS_ARCHIVED = 'N'
  • The sample is not cancelled, that is, the sample's WORKFLOW_STATUS <> '5'
  • The sample does not link to a client or client group, that is, the sample's CLIENT_ID and CLIENT_GROUP_ID are empty
  • The sample links to a client, and the client is the same as the registered job's client, that is, the sample's CLIENT_ID is the same as the job's CLIENT_ID
  • The sample links to a client group, and the client group contains the registered job's client, that is, the sample's CLIENT_GROUP_ID is a group that contains the job's CLIENT_ID

You can also hyperlink from Copy from Sample to open the CCSAMP—Sample Search application, to locate and return a sample for the copy.

After a Copy from Sample is selected and OK is clicked, then the details from the selected sample are used to default properties for the new sample group.

Note: Even though a sample is used to set defaults for the interim sample, Some properties for a new sample group always default from the job, including:

  • Client Code
  • Contact Code
  • Project Code
  • Cost Centre Code
  • Client Submission Number
  • Contact Submission Number
  • Contract
  • Received Date
  • Priority

After selecting a template or other sample, an interim sample displays. the interim sample represents a sample group to be created for the job. The following details are taken from the template or other sample to set defaults for the interim sample:

  • The interim sample's details, biofields, specifications, notes and tests default from the selected template or other sample.

  • The interim sample's Client Sample Name, header details, sample biofields, specifications and notes are inherited from the source sample.

  • Tests are included only where Use Tests from Templates is selected.

  • Fields copied from a source sample to destination production sample
  • Copying the sample portions:

    • Portion Code, Portion Type, Active status, Location Code within its Location Hierarchy, Single Capacity Container Type Code, Sample Handling Code, Multiple Capacity Container Type Code, (multiple capacity) Container Name and Notes are copied from the source sample portion to the destination sample portion.

    • Checked in On, Checked in By, Started Date and Started By defaults to current system date-time and user, respectively.

    • If the sample handling's Duration is defined, then Due Date defaults to the current system date-time + sample handling's Duration, otherwise Due Date defaults to empty.

    Notes:

    If all portions are deleted from a sample and that sample was created from another sample, then portions are recopied from the source sample to the destination sample again, instead of having the portions created from scratch using the sample's Number of Containers as the minimum portion count.

    Sample portion schemes, as shown in the Scheme Codes column of the grid displayed on the Portion tab of the CCSAMP—Update Sample screen, are not included in the copy (and will be addressed in the next release).

  • Copying composite links:

    • Where the source sample is flagged as a composite sample and has one or more linked samples, then each destination sample is flagged as a composite sample do not have any linked samples listed.

  • Copying priority, received, required, possible and agreed dates:

    • When an interim sample is created from a template sample, then the interim sample's Priority, Required On, Possible On and Agreed On are inherited from the job, and Received On is inherited from the job only where the template sample's Is Auto Received is selected and left empty otherwise.

  • The event is audited. Refer to Reviewing Operational Data Audits.

Add a group of samples to a job using a template sample

Updates are then made to the interim sample. This process follows that in Adding a Group of Samples to a Job except for several additional conditions:

Upon Creating Sample Tests

Upon creating tests on samples:

  • Composite job scheme and job scheme analyte records are created, as required, and the job scheme's Number of Samples and Number of Unknowns is updated.

    Where isIncludeInJobQc is included in the comma-separated string of job scheme attributes in the TEMPLATE_OVERRIDE_JOB_SCHEME_LIST application preference and a job is pre-registered without samples and tests by Registering Jobs from Template Jobs as part of a pre-ordering process, when the samples finally arrive at the laboratory and the samples and tests are added to the job by Adding a Group of Samples using a Template Sample to a Job, if a job scheme is caused to be created, then the job scheme's Is Include In Job QC flag is set from the template job scheme associated with the scheme in the template sample, instead of being set from the inverse of the Batch Across Jobs flag on the master scheme version.

    Note: An application preference is used to allow this functionality to expand for other job scheme properties that are inherited from a master scheme or scheme version, but for now, is limited to isIncludeInJobQc.

  • The event is audited. Refer to Reviewing Operational Data Audits.

Restrictions on using Job and Sample Templates

Where lines of business are implemented in CCLAS 6, then only schemes, scheme versions, analytes, QC analytes and products linked to the same line of business are available for inclusion in the template sample.

Where a scheme is added to a template sample, then only analytes, QC analytes and specifications linked to the same scheme version are available for inclusion in the template sample.

Each of the following attributes must be active for the current laboratory for the template sample to be applied effectively:

  • Schemes
  • Specifications
  • Products
  • Clients
  • Biofields.