API Docs for: 1.0.0
Show:

eLabSDK.Inventory.Sample Class

Extends ELabSDK
Module: eLabSDK

Print labels

Constructor

eLabSDK.Inventory.Sample

(
  • object
)

Parameters:

  • object Object

Example:

  • var sample = eLabSDK.Inventory.Sample.create({
              name: 'My Sample',
              sampleTypeID: 1,
              fnWhenReady: function(config, sample){alert('sample created with name ' + sample.getName())}
    });
    

Methods

eLabSDK.Inventory.Sample.create (STATIC) - creates a new sample and triggers the load function

(
  • config
  • fnWhenReady
)

Parameters:

  • config Object
    • name Name
    • sampleTypeID Int
    • storagelayerID Int
    • location String
    • quantity Int
    • quantity_amount Int
    • quantity_unit String
    • expiration String
    • altBarcodeID Int
    • note String
    • meta[{ Object

      value: "value", key: "test", type:'text'}]

  • fnWhenReady Function

    called when the Sample has actually been created. Place your code logic within this callback. First parameter is the original config object, second is the actual sample

Returns:

New instance of eLabSDK.Inventory.Sample

getBarcode - returns the barcode value of the current sample

()

getDescription - returns the description value of the current sample

()

getMeta - returns the meta value of the current sample

()

getName - returns the name value of the current sample

()

getNotes - returns the notes value of the current sample

()

getPropertyByName - returns the value of the passed in propertyname

(
  • propertyname
)

Parameters:

  • propertyname String

getPropertyBySampleMetaID - returns the property object[] (key/value) by sampleMetaID

(
  • sampleTypeMetaID
)

Parameters:

  • sampleTypeMetaID Int

getPropertyBySampleTypeMetaID - returns the property object[] (key/value) by sampleTypeMetaID

(
  • sampleTypeMetaID
)

Parameters:

  • sampleTypeMetaID Int

initialize - innitialises the Sample class and loads a sample if during the init config data was passed through

(
  • sampleIDs
  • fnWhenReady
)

Parameters:

  • sampleIDs String
  • fnWhenReady Function

remove - removes the current sample

(
  • fnWhenReady
)

Parameters:

  • fnWhenReady Function

save - saves the sample

(
  • fnWhenReady
)

Parameters:

  • fnWhenReady Function

setDescription - sets the description string for the current sample

(
  • description
)

Parameters:

  • description String

setMeta - sets the meta key/value for the current sample

(
  • sampleMetaData
)

Parameters:

  • sampleMetaData Objectkey,value

setName - sets the name string for the current sample

(
  • name
)

Parameters:

  • name String

setNotes - sets the note string for the current sample

(
  • note
)

Parameters:

  • note String