Uploaded image for project: 'LIMS'
  1. LIMS
  2. LIMS-280

System/sample Prefixes consecutive number starting from a specific value

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When migrating to Bika-Lims from other system (e.g. a paper based system) someone might need to start samples prefixes numbers (consecutive number) from a specific value different from zero to keep consistency with his previous system.

        Activity

        Hide
        jayadeepk Jayadeep Karnati added a comment -

        I came up with two approaches to the solution:
        First one is giving the specific value to first ever sample created. The next sample will be getting plus one and so on. This solution is pretty straightforward. Pros: Less mess. Cons: Not useful for existing Bika users. Also not sure how I can test it unless I empty the database.
        Second one is giving the specific value if specific value > largest sample id so far. This will be useful for existing Bika users but am not sure if it is stable. I'm inclined towards this approach though.
        Any suggestions?

        Show
        jayadeepk Jayadeep Karnati added a comment - I came up with two approaches to the solution: First one is giving the specific value to first ever sample created. The next sample will be getting plus one and so on. This solution is pretty straightforward. Pros: Less mess. Cons: Not useful for existing Bika users. Also not sure how I can test it unless I empty the database. Second one is giving the specific value if specific value > largest sample id so far. This will be useful for existing Bika users but am not sure if it is stable. I'm inclined towards this approach though. Any suggestions?
        Hide
        lemoene lemoene added a comment - - edited

        I am not sure i get your option 2 Jayadeep but also favours your option 1 as i see the use case like this, using Sample IDs only but it obviously applies to all other objects:

        Say a new user adopts Bika and has been numbering Samples sequentially up to 1001, then they'd want Bika to start at 1002. This 1002 needs to be set somewhere, and as Campbell suggested, probably best in the prefixes widget, in bika setup

        Show
        lemoene lemoene added a comment - - edited I am not sure i get your option 2 Jayadeep but also favours your option 1 as i see the use case like this, using Sample IDs only but it obviously applies to all other objects: Say a new user adopts Bika and has been numbering Samples sequentially up to 1001, then they'd want Bika to start at 1002. This 1002 needs to be set somewhere, and as Campbell suggested, probably best in the prefixes widget, in bika setup
        Hide
        jayadeepk Jayadeep Karnati added a comment -

        I'm going with the first approach. Rockfruit says there might be some problem with gaps between sample ids as in second approach.
        And for the user interface, I'm using prefixes widget.

        Show
        jayadeepk Jayadeep Karnati added a comment - I'm going with the first approach. Rockfruit says there might be some problem with gaps between sample ids as in second approach. And for the user interface, I'm using prefixes widget.
        Hide
        rockfruit Campbell added a comment -

        I think a gap in IDs is fine. if a lab starts at 1, 2, 3, does some tests, and then bumps the number to 1000 to continue with real data, they can expect the gap in numbering; I think keep it simple, and have the least possible restrictions!

        Show
        rockfruit Campbell added a comment - I think a gap in IDs is fine. if a lab starts at 1, 2, 3, does some tests, and then bumps the number to 1000 to continue with real data, they can expect the gap in numbering; I think keep it simple, and have the least possible restrictions!
        Hide
        jayadeepk Jayadeep Karnati added a comment -

        Campbell, excuse me but I'm not completely clear of what you were saying. Were you referring to least possible restrictions on user or software?
        Which approach would you prefer?

        Show
        jayadeepk Jayadeep Karnati added a comment - Campbell , excuse me but I'm not completely clear of what you were saying. Were you referring to least possible restrictions on user or software? Which approach would you prefer?
        Hide
        rockfruit Campbell added a comment -

        Both! Don't worry about making rules, rather start hacking at the idserver.py file and the bikasetup/Prefixes field. We know the outcome we are looking for, so creating that possibility is all we need; no thought to corner-cases or gaps is required; I think that isn't important.

        Show
        rockfruit Campbell added a comment - Both! Don't worry about making rules, rather start hacking at the idserver.py file and the bikasetup/Prefixes field. We know the outcome we are looking for, so creating that possibility is all we need; no thought to corner-cases or gaps is required; I think that isn't important.
        Hide
        jayadeepk Jayadeep Karnati added a comment -

        Yeah, I remember. "Move fast and break things" right

        Show
        jayadeepk Jayadeep Karnati added a comment - Yeah, I remember. "Move fast and break things" right
        Hide
        jayadeepk Jayadeep Karnati added a comment -

        Screenshot after importing an AR on configuring sequence_start to 200, to observe the sequential sample IDs.

        Show
        jayadeepk Jayadeep Karnati added a comment - Screenshot after importing an AR on configuring sequence_start to 200, to observe the sequential sample IDs.

          People

          • Assignee:
            jayadeepk Jayadeep Karnati
            Reporter:
            leonardorojass Leo
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile