User Tools

Site Tools


Sidebar

Welcome to DIDO WIKI

dido:public:s_cli:05_contents:02_prt:supply:03_theory:02_issue:01_opc:start

3.2.1 Organic Producer COI (OPC)

User Scenario: Supply Chain

As part of the OP, Sal downloads the DIDO Platform selected by the OPC (we refer to this as DIDO Platform O). The OPC have defined several Data Object (DO) that they are going to have on their DIDO. When a DO is deployed to a DIDO, it is referred to as a Smart Contract.

1.1 DO: Track

Return to Top

Track represents the plot of ground where crops are grown. The definition of a track can be relatively static in nature (i.e., the track (field) was created 200 years ago, or the track was created last year to just grow strawberries.

DEFINE TYPE LatitudeType 
  ( VALUE     : FIXED,
    MIN       : FIXED := -90.0000,
    MAX       : FIXED := +90.0000,
    DEFAULT   : FIXED :=   0.00,
    units     : TEXT  := "degrees latitude",
    PRECISION : TEXT  := "6.4"
  ) AS
  FIXED
  ALLOWING NONULL
  WITH CONSTRAINTS
    ( VALUE     = DEFAULT,
      MIN       = MIN,
      MAX       = MAX,
      DEFAULT   = DEFAULT,
      UNITS     = units,
      PRECISION = PRECISION,
    );
DEFINE TYPE LongitudeType 
  ( VALUE     : FIXED,
    MIN       : FIXED := -180.0000,
    MAX       : FIXED := +180.0000,
    DEFAULT   : FIXED :=   0.00,
    units     : TEXT  := "degrees longitude",
    PRECISION : TEXT  := "7.4"
  ) AS
  FIXED
  ALLOWING NONULL
  WITH CONSTRAINTS
    ( VALUE     = DEFAULT,
      MIN       = MIN,
      MAX       = MAX,
      DEFAULT   = DEFAULT,
      UNITS     = units,
      PRECISION = PRECISION,
    );
DEFINE TYPE GeolocationType AS OBJECT
  { lat  LatitudeType,
    long LongitudeType,
    elevation SeaLevelType
  };
DEFINE TYPE AgTrackShapeType AS ENUM
  WITH CONSTRAINTS
    { { 0, "Rectangle"} DEFAULT,
      { 1, "Square"},
      { 2, "Circle"},
      { 3, "Polygon"}
    }
  VALUE = DEFAULT;
DEFINE TYPE AgTrackType AS OBJECT
  { swCorner Geolocation,
    shapeOfTrack ShapeType,
    listOfCoord Geolocation[]
  };

1.2 DO: Activity Calendar

Return to Top

Activity Calendar is a list of the farming activities performed on a track, the time the activities were conducted and the duration of the activity. This can be important when it comes to some agricultural activities. For example, a crop can not be harvest for a certain number of days after watering, using fertilizers or herbicides. You can not plant until you have plowed.

DEFINE TYPE AgActivityType AS ENUM
  WITH CONSTRAINTS
    { { 0, "Plowing"} DEFAULT,
      { 1, "Harrowing",
      { 2, "Planting"},
      { 3, "Fertilizing"},
      { 4, "Weeding"}
      { 5, "Watering"}
      { 6, "Mowing"}
      { 7, "Cultivating"}
    }
  VALUE = DEFAULT;
 
DEFINE TYPE TimestampType AS
  DATE
  WITH CONSTRAINTS
    ( DEFAULT = CURRENT_DATE,
      START   = CURRENT_DATE,
      END     = UNKNOWN
    );
DEFINE CONSTANT SECONDS_IN_MINUTE AS 60;
DEFINE CONSTANT MINUTES_IN_HOUR   AS 60;
DEFINE CONSTANT HOURS_IN_DAY      AS 24;
DEFINE CONSTANT DAYS_IN_WEEK      AS 30;
DEFINE CONSTANT DAYS_IN_MONTH     AS 30;
 
DEFINE TYPE ElapsedTimeType 
  ( VALUE     : FIXED,
    MIN       : FIXED := -0.0000,
    MAX       : FIXED := (SECONDS_IN_MINUTE * MINUTES_IN_HOUR * HOURS_IN_DAY * DAYS_IN_MONTH),
    DEFAULT   : FIXED :=   0.00,
    units     : TEXT  := "Seconds",
    PRECISION : TEXT  := "7"
  ) AS
  FIXED
  ALLOWING NONULL
  WITH CONSTRAINTS
    ( VALUE     = DEFAULT,
      MIN       = MIN,
      MAX       = MAX,
      DEFAULT   = DEFAULT,
      UNITS     = units,
      PRECISION = PRECISION,
    );
DEFINE AgActivityEvent AS OBJECT
  { Activity AgActivityType,
    StartTime TimestampType,
    Duration ElapsedTimeType
  };
DEFINE AgActivityCalendar AS OBJECT
  { AgActivityEvent[ TimestampType ] 
  };

1.3 DO: Substances, Methods and Ingredients

Return to Top

Substances, Methods and Ingredients within the U.S. Code, Title 7 U.S. Code § 6517 specifies a list of The National List of Allowed and Prohibited Substances1). Therefore, each track needs to maintain a history of the Substances, Methods and Ingredients used on that track.

DEFINE AgSubstanceEvent AS OBJECT
  { Substance TextValue,
    ApplicationTime TimestampType
  };
DEFINE AgSubstanceCalendar AS OBJECT
  { AgSubstanceEvent[ TimestampType ] 
  };<code>
    - Crop History IS important WHEN it comes TO the health OF the track TO sustain crops IN the future (i.e., crop rotation) AND also IN determining how suitable the track IS FOR organic production. IN ORDER FOR produce TO be called organic IF it’s certified TO have grown ON soil that had no prohibited substances applied FOR three years prior TO harvest. Prohibited substances include most synthetic fertilizers AND pesticides.((
Miles McEvoy,
13 May 2019,
U.S. Department OF Agriculture,
__Organic 101: What the USDA Organic Label Means__,
Accessed: 17 May 2021
[[https://www.usda.gov/media/blog/2012/03/22/organic-101-what-usda-organic-label-means#:~:text=Produce%20can%20be%20called%20organic,most%20synthetic%20fertilizers%20and%20pesticides.]]
)) <code sql>
DEFINE CropHistory AS OBJECT
  { agTrack AgTrackType,
    startingDate DateTimeValue,
    endingDate DateTimeValue,
    cropType
  };

1.4 DO: Owner or Operator

Return to Top

Owner or Operator Details

DEFINE TYPE FarmerEntityType AS ENUM
  WITH CONSTRAINTS
    { { 0, "Owner"} DEFAULT,
      { 1, "Operator"
    }
  VALUE = DEFAULT;
DEFINE TYPE SectorCodeType 
  ( VALUE     : FIXED,
    MIN       : FIXED := 1,
    MAX       : FIXED := 99,
    DEFAULT   : FIXED := 1,
    units     : TEXT  := "NAICS SectorCode",
    PRECISION : TEXT  := "2"
  ) AS
  FIXED
  ALLOWING NONULL
  WITH CONSTRAINTS
    ( VALUE     = DEFAULT,
      MIN       = MIN,
      MAX       = MAX,
      DEFAULT   = DEFAULT,
      UNITS     = units,
      PRECISION = PRECISION,
    );
DEFINE TYPE SubSectorCodeType 
  ( VALUE     : FIXED,
    MIN       : FIXED := 1,
    MAX       : FIXED := 999,
    DEFAULT   : FIXED := 1,
    units     : TEXT  := "NAICS SubSectorCode",
    PRECISION : TEXT  := "3"
  ) AS
  FIXED
  ALLOWING NONULL
  WITH CONSTRAINTS
    ( VALUE     = DEFAULT,
      MIN       = MIN,
      MAX       = MAX,
      DEFAULT   = DEFAULT,
      UNITS     = units,
      PRECISION = PRECISION,
    );
DEFINE TYPE IndustryCodeType 
  ( VALUE     : FIXED,
    MIN       : FIXED := 1,
    MAX       : FIXED := 9999,
    DEFAULT   : FIXED := 1,
    units     : TEXT  := "NAICS IndustryCode",
    PRECISION : TEXT  := "4"
  ) AS
  FIXED
  ALLOWING NONULL
  WITH CONSTRAINTS
    ( VALUE     = DEFAULT,
      MIN       = MIN,
      MAX       = MAX,
      DEFAULT   = DEFAULT,
      UNITS     = units,
      PRECISION = PRECISION,
    );
DEFINE TYPE NaicsCodeType 
  ( VALUE     : FIXED,
    MIN       : FIXED := 1,
    MAX       : FIXED := 999999,
    DEFAULT   : FIXED := 1,
    units     : TEXT  := "NAICS Code",
    PRECISION : TEXT  := "6"
  ) AS
  FIXED
  ALLOWING NONULL
  WITH CONSTRAINTS
    ( VALUE     = DEFAULT,
      MIN       = MIN,
      MAX       = MAX,
      DEFAULT   = DEFAULT,
      UNITS     = units,
      PRECISION = PRECISION,
    );
DEFINE CONSTANT AG_SECTOR_CODE          AS     11;
DEFINE CONSTANT FRUIT_FARMING_SUBSECTOR AS    113;
DEFINE CONSTANT FRUIT_FARMING_INDUSTRY  AS  11133;
DEFINE CONSTANT NAICS_INDUSTRY          AS 111333;
 
 
DEFINE NaicsCodeType AS OBJECT
  { sectorCode         SectorCodeType,
    subSectorCode      SubSectorCodeType,
    IndustryGroupCode  IndustryCodeType,
    naicsIndustry      NaicsCodeType
  };
DEFINE StrawberryFarmingNCAIS AS NaicsCodeType
  { sectorCode        = AG_SECTOR_CODE,
    subSectorCode     = FRUIT_FARMING_SUBSECTOR,
    industryGroupCode = FRUIT_FARMING_INDUSTRY
    naicsIndustry     = NAICS_INDUSTRY
  };
 
DEFINE FarmEntityDescription AS OBJECT
  { FarmerEntity FarmerEntityType,
    NaiscCode NaicsCodeType,
    ListOfTracks AgTrackType[PositiveWholeNumber]
  };
1)
U.S. Code, Title 7, Subtitle B, Chapter I,Subchapter M, Part 205, Subpart G 13 May 2021, Accessed: 17 May 2021, https://www.ecfr.gov/cgi-bin/text-idx?c=ecfr&SID=9874504b6f1025eb0e6b67cadf9d3b40&rgn=div6&view=text&node=7:3.1.1.9.32.7&idno=7#sg7.3.205.g.sg0
dido/public/s_cli/05_contents/02_prt/supply/03_theory/02_issue/01_opc/start.txt · Last modified: 2022/02/03 20:35 by 52.45.51.99
Translations of this page: