Population of the CCSampleScheme DTO

The CCSampleScheme DTO is referenced when Creating Report Requests from Job Report Stakeholders, to place content into the output document as per the report template.

When an org-scope scheme is registered on an org-scope sample, then for the org-scope sample scheme:

  • The master scheme is the org-scope scheme.
  • The scoped scheme is the org-scope scheme.

When an org-scope scheme is registered on a lab-scope sample, then for the lab-scope sample scheme:

  • The master scheme is the org-scope scheme.
  • The scoped scheme is the enabled-scope scheme.

When a lab-scope scheme is registered on a lab-scope sample, then for the lab-scope sample scheme:

  • The master scheme is the lab-scope scheme.
  • The scoped scheme is the lab-scope scheme.

For enabled-scope schemes, defaults originating from the master org-scope scheme or scheme version are indicated.

Property Default

Org-scope sample with
org-scope scheme

Lab-scope sample with
enabled-scope scheme

Lab-scope sample with
lab-scope scheme

For identification:

 

 

 

 

  • sampleSchemeId

Current entity's ID

 

 

 

  • isOrganisationScope

Indicates whether the entity has organisation scope

True

False

False

  • organisationCode

sample.organisationCode

Current organisation

Current organisation

Current organisation

  • laboratoryCode

sample.laboratoryCode

 

Current laboratory

Current laboratory

  • jobId
  • jobCode

sample.jobId and jobCode

 

 

 

  • sampleId
  • sampleCode

sample.id and sampleCode

 

 

 

  • clientSampleName

sample.clientSampleName

 

 

 

  • clientCode

sample.clientCode

 

 

 

  • isClientOrganisationScope

Where the client is org-scope then true, where lab-scope then false

 

 

 

  • sourceSampleTemplateId
  • templateSampleCode

If registration of template sample added the sample scheme, then set to the template sample.id and code

 

 

 

  • samplePortionId

 

 

 

 

  • jobSchemeId

jobScheme.id

 

 

 

  • schemeLaboratoryId
  • schemeLaboratoryCode

Master scheme.laboratoryId and laboratoryCode

Empty

Empty

Current laboratory's code and id

  • schemeId
  • schemeCode

Master scheme.id and code

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeIsOrganisationScope

Indicates whether the master scheme has organisation scope

True

True

False

  • schemeLineOfBusinessId
  • schemeLineOfBusinessCode

Master scheme.lineOfBusinessId and linked lineOfBusiness.code

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeOrganisationId

Master scheme.organisationId

Current organisation's id

Current organisation's id

Current organisation's id

  • schemeType

Master scheme.schemeType

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeName

Master scheme.name

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeDescription

Master scheme.description

Displays lab-scope

Displays org-scope

Displays lab-scope

  • schemeCategoryId
  • schemeCategoryCode

Not populated

 

 

 

  • schemeClientId
  • schemeClientCode

Not populated

 

 

 

  • schemeClientGroupId
  • schemeClientGroupCode

Not populated

 

 

 

  • schemeSectionId
  • schemeSectionCode

Master scheme.sectionId and linked section.code

Displays org-scope

Displays Org-scope scheme's section code and id

Displays lab-scope

  • schemeContainerTypeId
  • schemeContainerTypeCode

Not populated

 

 

 

  • schemePretreatmentCategoryId
  • schemePretreatementCategoryCode

Not populated

 

 

 

  • schemeDataGridHeaderName

Master scheme.dataGridColumnHeader

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeInstrumentGroupId
  • schemeInstrumentGroupCode

Master scheme.instrumentGroupId and linked instrumentGroup.code

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeScriptId
  • schemeScriptCode

Master scheme.scriptId and linked script.code

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeLimitSpecificationId
  • schemeLimitSpecificationCode

Not populated

 

 

 

  • schemeAutoRelease

Master scheme.autoRelease

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeAutoValidate

Master scheme.autoValidate

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeVersionId
  • schemeVersion

Master schemeVersion.id and versionNumber

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeVersionStatus

Master schemeVersion.status

Displays org-scope

Displays org-scope

Displays lab-scope

  • schemeVersionAnalyteCode—Obsolete field; master scheme is never the enabled-scope scheme

 

Empty

Empty

Empty

  • schemeVersionAnalyteName—Obsolete field; master scheme is never the enabled-scope scheme

 

Empty

Empty

Empty

  • isLabEnabled

Indicates whether the scoped scheme is lab-enabled

False

True

False

  • numberOfAnalytes

Number of sample scheme analytes registered for the sample scheme

 

 

 

  • registrationSequence

Numerical sequence of scheme within the sample

 

 

 

  • profileSequence

Numerical sequence of sample within the job scheme

 

 

 

  • rackNumber

Determined using the default rack size of 50 and sample.isStartFromNewRack, unless an append/overwrite QC process is applied, in which case, rack number is determined using the sample.isStartFromNewRack and the scoped schemeVersion.qcMaskId> qcMask.containerTypeId > containerType.defaultNumberOfContainers

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • creationDate
  • creationTime
  • creationUser

 

 

 

 

  • lastModDate
  • lastModTime
  • lastModUser

 

 

 

 

For registration flow:

 

 

 

 

  • isAnalytesRemaining—Used for performance, in that, when set to true, then the master scheme is not visible for registration on the sample

True when all analytes from the master scheme are added to the sample scheme

 

 

 

  • isAddAllAnalytes

False

 

 

 

  • isAddToAll

False

 

 

 

  • appliesToAllSamples

False

 

 

 

  • includeInAutoReg

True

 

 

 

  • includeInManualReg

True

 

 

 

  • noOfReplicates

0

 

 

 

  • replicateQcTypeId
  • replicateQcTypeCode

 

 

 

 

  • defaultWorkflowStatus

 

 

 

 

  • status

 

 

 

 

For management:

 

 

 

 

  • registeredDate

Current system date and time

 

 

 

  • registrationUserId
  • registrationUserCode

Current user

 

 

 

  • priority

Scoped schemeVersion.priority

Uses org-scope

Uses enabled-scope scheme

Uses lab-scope

  • requiredDate

sample.requiredDate + sampleScheme.priority + Holidays + Working Days of Week if sample.requiredDate and sampleScheme.priority are defined, else set to sample.requiredDate if sample.requiredDate is defined, else empty

 

 

 

  • possibleDate

sampleScheme.registeredDate + sampleScheme.priority

 

 

 

  • activatedUserId
  • activatedUserCode

 

 

 

 

  • lastActivatedDate

 

 

 

 

  • workflowStatus

Not Started

 

 

 

For pre-analysis:

 

 

 

 

  • qcMaskId
  • qcMaskCode

Scoped schemeVersion.qcMaskId and linked qcMask.Code

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • isIncludedInJobQc

True

 

 

 

  • precursorSchemeCode—Where the a scheme is registered on a sample and a precursor scheme is added via precursor auto-registration.

Precursor scheme registration using scoped scheme's precursor relationships

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • precursorSchemeLabCode

 

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • precursorSchemeVersion

 

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • readyDate

 

 

 

 

  • holdingTime

Scoped schemeVersion.holdingTime

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • warningDate

Earliest of all sampleSchemeAnalyte.warningDate

 

 

 

  • expiryDate

Earliest of all sampleSchemeAnalyte.expiryDate

 

 

 

  • schemeDuration

Scoped schemeVersion.schemeDuration

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • subcontractLaboratoryCode

Scoped schemeVersion.defaultSubContractLabCode

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • subcontractLaboratoryOrgCode

Scoped schemeVersion.defaultSubContractLabOrgCode

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • currentBatchId
  • currentBatchCode

 

 

 

 

  • Linked scheme relationships (where the two schemes are registered on the job)

Linked scheme relationships using master scheme's scheme links

Uses org-scope

Uses org-scope

Uses lab-scope

  • paperworks

True

 

 

 

  • labels

True

 

 

 

For analysis:

 

 

 

 

  • limitSpecId
  • limitSpecCode

Scoped scheme.limitSpecId and linked specification.code

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • instrumentCode

First active instrument in the instrument group denoted by the scoped scheme.instrumentGroupCode, if the instrument group is active.

NB, org-scope template sample schemes cannot be assigned an instrument because instruments can only have lab-scope.

Uses enabled-scope

Uses lab-scope

  • instrumentLabCode

Instruments can only be lab-scope

 

Current laboratory

Current laboratory

  • compositeQcStatus

Not Tested

 

 

 

  • compositeSpecStatus

Not Tested

 

 

 

  • startedDate

 

 

 

 

  • analysedDate

 

 

 

 

  • analysisTextId
  • analysisText

 

 

 

 

  • releasedDate

 

 

 

 

  • releasedByUserId
  • releasedByUserCode

 

 

 

 

  • completedByUserId
  • completedByUserCode

 

 

 

 

  • completedDate

 

 

 

 

For validation:

 

 

 

 

  • validatedDate

 

 

 

 

  • validationUserId
  • validationUserCode

 

 

 

 

For reporting:

 

 

 

 

  • isReportable

Scoped scheme.isReportable

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • reportSequence

Scoped scheme.reportSequence

Uses org-scope

Uses enabled-scope

This differs to the SSA that uses this field from org-scope

Uses lab-scope

  • reportHeaderTextId
  • reportHeaderText

 

 

 

 

  • reportFooterTextId
  • reportFooterText

 

 

 

 

  • resultHeaderTextId
  • resultHeaderText

 

 

 

 

  • reportTextId
  • reportText

 

 

 

 

  • firstReportedDate

 

 

 

 

  • lastReportedDate

 

 

 

 

For invoicing:

 

 

 

 

  • isInvoiceable—Obsolete field. A jobInvoiceSample.isInvoiceable defaults to the sample.isInvoiceable, and the jobInvoiceScheme Analyte.isInvoiceable defaults to the schemeVersionAnalyte.isInvoiceable. These two flags determine the invoiceability of the sample scheme analyte in the job invoice.

Scoped scheme.isInvoiceable

Uses org-scope

Uses enabled-scope

This differs to the SSA that uses this field from org-scope

Uses lab-scope

  • priceType—Obsolete field. The scheme price code on the job scheme is used by the pricing engine.

 

 

 

 

  • priceCodeId
  • priceItem—Obsolete fields. The price code on the job scheme is used by the pricing engine.

 

 

 

 

  • packagePriceCodeLabCode

Where the package price code is org-scope then left empty, where lab-scope then set to the current laboratory

 

 

 

  • packagePriceCode

If registration of template sample added the sample scheme, then set to the template sample.templatePriceCode

 

 

 

  • quoteCode—Obsolete field.

 

 

 

 

  • numberOfHours

 

 

 

 

  • internalCost

Scoped schemeVersion.internalCost

Uses org-scope

Uses enabled-scope

Uses lab-scope

  • lastInvoicedDate