Creating Report Requests from Job Report Stakeholders
Job Stakeholder Scope
Job stakeholders are scoped by their parent job. A job can contain multiple job stakeholders. Each job stakeholder can contain separate tests to report different components of the job.
Job stakeholders are scoped by type:
- Report—The report is a certificate report.
- Other—The report is a non-certificate report.
Properties of a Job Stakeholder
A job stakeholder can have:
- A name, description and category code—To indicate the type of report or report recipient.
- A client and contact, or user—The recipient of the report.
- A report template—Used to generate the report document.
- A filename or file name syntax—An explicit filename, or syntax to generate the filename, for the generated report. A default suffix is only applied to those reports where no extension is specified by the report request.
- A language—The language in which data is extracted for the report.
Use of Job Stakeholders
A job stakeholder is a client or user who is interested in the job's analytical results. A job stakeholder can be the submitting client, or another client with a vested interest in the job, or a user in the laboratory.
A report request of type certificate can be created for each job stakeholder. Each job stakeholder is associated with a client-project-contact where the project and contact are optional, or with a laboratory user.
When a report request for a certificate report is created for a job, the job stakeholder's client becomes the report request's client, and the rest of the details in the job stakeholder is used to create a report entity within the report request. Also, all reportable samples, for all reportable schemes and analytes, are added to the report request. Certificate reports are then generated from the report request.
Process
When Maintaining Report Requests, after a search for jobs and their associated report requests, any job, where the job's Report Request Code is empty, can have report requests created for the job's stakeholders.
Creating the Report Requests and Report Request Reports
The job's stakeholders, where the Reportable is selected, are considered only.
Where no reportable stakeholders exist for the job, or where each of the reportable stakeholders have a Scope Type of Other, then a report request is created and Client Code and Contact Code are inherited from the job. No report request report is within the report request.
Note: Job's stakeholder with a Scope Type of Other are only used as search criteria when searching for jobs.)
For each distinct Category Code across these stakeholders, where the Scope Type is Report, then a report request is created:
- If the stakeholder links to a client, then Client Code and Contact Code are inherited from the job stakeholder. (Stakeholders with the same Category Code have, by nature, a common Client Code and Contact Code.)
- If the stakeholder links to a user, then Client Code and Contact Code are inherited from the job.
- Report Request Code is generated from syntax. Configure a Syntax to Generate Report Request Codes
- Name is generated from syntax. Configure a Syntax to Generate Report Request Names
- Workflow Status is set to Registered.
- Is Template is set to false.
- Report Type is set to Certificate.
- As many report request report are created within the report request, as required. That is, where the stakeholder's Category Code is defined, then a report request report is created within the report request for each of those stakeholders. This allows for the grouping of stakeholders with a common category code into the same report request.
- Reportable is set to true.
- Report Template Code is set to the job stakeholder's Report Template Code.
Note: Where a report request report's Report Template Code is empty, then reports cannot be generated for it.
- Report Name and Report Description are inherited from the stakeholder's Name and Description, respectively.
- Output Format, File Syntax Code and Language are inherited from the report template.
- Email is set to true. Generated reports are emailed to the client contact's email address.
- Where the report template's Device Code is defined, then the report request report's Printer is set to the report template's Device Code.
- Where the report template's Device Code is empty, but the CERTIFICATE_DEFAULT_DEVICE application preference setting contains a device code, then the report request report's Printer is set to the device denoted in the setting.
- Where both the report template's Device Code, the preference is not found, or the preference's setting is empty, then the report request report's Printer is left empty.
- Print Copies is set to 1 if a Printer is defined, otherwise it is set to 0.
- Copy to Folder is set to true. This is normally managed by report scripts.
When a report request report is updated manually and the report template is not changed, then clearing of the report report request's Printer leaves it empty upon submit.
Example 1:
Given a job has the following job stakeholders where the Scope Type is Report:
|
Client |
Contact |
Report Template |
Active |
Category Code |
|---|---|---|---|---|
|
CLIENTA |
CONTACTA |
REPORT |
Y |
GROUP1 |
|
CLIENTA |
CONTACTB |
REPORT |
Y |
<empty> |
|
CLIENTA |
CONTACTB |
REPORT |
Y |
<empty> |
|
CLIENTA |
CONTACTA |
XLS_FILE |
Y |
GROUP1 |
|
CLIENTB |
CONTACTB |
REPORT |
Y |
GROUP2 |
|
CLIENTB |
CONTACTB |
REPORT |
Y |
GROUP2 |
|
CLIENTC |
CONTACTC |
XLS_FILE |
Y |
<empty> |
Then the following report requests are created from these job stakeholders:
- Contains the report request reports from rows 1 and 4 for client CLIENTA and contact CONTACTA.
- Contains the report request report from row 2 for client CLIENTA and contact CONTACTB.
- Contains the report request report from row 3 for client CLIENTA and contact CONTACTB.
- Contains the report request reports from row 5 and 6 for client CLIENTB and contact CONTACTB.
- Contains the report request report from row 7 for client CLIENTC and contact CONTACTC.
Example 2:
Given a job has the following job stakeholders where the Scope Type is Report:
|
Client |
Contact |
Report Template |
Active |
Category Code |
|---|---|---|---|---|
|
CLIENTA |
CONTACTA |
REPORT |
Y |
GROUP1 |
|
CLIENTA |
CONTACTB |
REPORT |
Y |
<empty> |
|
CLIENTA |
CONTACTC |
XLS_FILE |
N |
<empty> |
Then the following report requests are created from these job stakeholders:
- Contains the report request reports from row 1 for client CLIENTA and contact CONTACTA.
- Contains the report request report from row 2 for client CLIENTA and contact CONTACTB.
No report request is created for row 3 as the job stakeholder is inactive.
Example 3:
Given a job has the following job stakeholders where the Scope Type is Report:
|
Client |
Contact |
Report Template |
Active |
Category Code |
|---|---|---|---|---|
|
CLIENTA |
CONTACTA |
REPORT |
Y |
GROUP1 |
|
CLIENTA |
CONTACTA |
REPORT |
Y |
<empty> |
|
CLIENTA |
CONTACTA |
XLS_FILE |
N |
GROUP1 |
Then the following report requests are created from these job stakeholders:
- Contains the report request reports from row 1 for client CLIENTA and contact CONTACTA.
- Contains the report request report from row 2 for client CLIENTA and contact CONTACTA.
No report request is created for row 3 as the job stakeholder is inactive, even though it has the same Category Code of GROUP1.
Creating the Report Request Samples and Tests
As jobs and samples are added or removed from a report request, the following entities are maintained:
- Report request samples
- Report request schemes
- Report request scheme analytes
- Report request sample schemes
- Report request sample scheme analytes.
Refer to Setting Report Names and Descriptions for Tests in the Reportable Result Set.
When a job is added to a report request:
- All unknown samples are added to the report request, such that, the report request sample's Reportable check box default from the sample.
- All QC samples where the sample's Reportable is selected are added to the report request, such that, the report request sample's Reportable flag defaults from the sample.
- Maintaining Reporting Details for a Laboratory
- Configuring Preferences for Reporting
- Maintaining Jobs
- Maintaining Job Stakeholders
- Configuring Job Report Templates
- Maintaining Report Requests
- Maintaining Jobs for a Report Request
- Reportability of Jobs, Samples and Tests
- Sequencing Jobs, Samples and Tests in the Reportable Result Set
- Maintaining Job Paperwork and Labels
- Generating an Internal Report of Results
- Exporting Grid Content to a Spreadsheet
- Generating Grid Reports
- Generating Job Status Reports
- Population of the CCReportRequestScheme DTO
- Population of the CCReportRequestSampleScheme DTO
- Population of the CCReportRequestSample DTO
- Population of the CCReportRequestSampleScheme DTO
- Population of the CCReportRequestSampleSchemeAnalyte DTO
