Rory-Reid / Basemix

An application for UK rat breeders
https://basemix.app
MIT License
0 stars 0 forks source link

Transfer a rat from one system to another #29

Open Rory-Reid opened 1 year ago

Rory-Reid commented 1 year ago

When breeders pass rats onto other breeders as foundation or otherwise (buck loaning), they often share data in the form of a pedigree so that the receiving breeder can update their own records and work out things for themselves.

If two breeders are using basemix, it stands to reason that it might be nice to be able to transfer data from one system to another. Programmatically, this could be very simple and powerful as we could pack a lot of information all down the family tree - including health, genetics, and detail for all ancestors beyond just the names and varieties.

Thoughts

While I want many export functions, this sounds very specific purpose, and as such it might be nice to have a bespoke file for it. json may be an ideal transfer - it's not compressed but I don't think that matters, it won't be huge. Having the parse-ability may make this trivial to ingest and more technical users may find more utility in this.

In the below example, we have the subject rat as a top-level node, a structural representation of the family tree, and then a flattened array of ancestors.

We could nest the ancestors in the tree but due to line breeding that may be redundant, especially if we allow an unbounded amount of generations to be exported.

{
  "Description": "Rat transfer file",
  "Version": "1",
  "Rat": {
    "Name": "Otis",
    "Sex": "Buck",
    "DateOfBirth": "2022-02-24",
    "Tree": {
      "Sire": {
        "TreeTag": 1,
        "Sire": { },
        "Dam": { }
      },
      "Dam": {
        "TreeTag": 2,
        "Sire": { },
        "Dam": { }
      }
    },
    "Ancestors": [
    {
      "TreeTag": 1,
      "Name": "Horace"
    },
    {
      "TreeTag": 2,
      "Name": "Lillith"
    }
    ]
  }
}

If we have photos, need to consider how they are transferred, or if.