static public long SpecimenIDFromBarcode(string barcode) { string ToDecode = barcode.Trim().ToUpper().Substring(1); // always uppercase, first character is material-type return(Base36.Decode(ToDecode)); }
static public string BarcodeFromSpecimenID(long specimen_id) { return("1" + Base36.Encode(specimen_id)); //note: material=-type prefix for specimens is 1 }