<?xml version="1.0" encoding="UTF-8"?>
<inport-metadata xmlns:xs="http://www.w3.org/2001/XMLSchema"
                 version="1.11"
                 source="https://www.fisheries.noaa.gov">
   <item-identification>
      <catalog-item-id>65076</catalog-item-id>
      <title>view_purchases</title>
      <catalog-item-type>Entity</catalog-item-type>
      <metadata-workflow-state ccs-id="9">Published / External</metadata-workflow-state>
      <parent-catalog-item-id>5610</parent-catalog-item-id>
      <parent-title>Hawaii DAR Commercial Purchases</parent-title>
      <parent-catalog-item-type>Data Set</parent-catalog-item-type>
      <status>Completed</status>
      <abstract>Main view for purchase report data. Joins main purchase report tables and useful look-up tables. Replaces annual tables generated by DRS.</abstract>
   </item-identification>
   <entity-information>
      <entity-type>Data View</entity-type>
      <active-version>Yes</active-version>
      <schema>hawaii_dar_frds</schema>
      <description>Main view for purchase report data. Joins main purchase report tables and useful look-up tables. Replaces annual tables generated by DRS.</description>
   </entity-information>
   <data-attributes>
      <data-attribute cc-id="1273892">
         <seq-order>1</seq-order>
         <name>purchase_report_id</name>
         <data-storage-type>bigint</data-storage-type>
         <required>Yes</required>
         <primary-key>No</primary-key>
         <precision>19</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Identifies a unique purchase report.</description>
         <default-value>0</default-value>
      </data-attribute>
      <data-attribute cc-id="1273893">
         <seq-order>2</seq-order>
         <name>data_source_code</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>4</max-length>
         <required>Yes</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Code that is abbreviation of data source. Example: Dealer Report System, code = DRS; Online Dealer Reports, code = ODR.</description>
      </data-attribute>
      <data-attribute cc-id="1273894">
         <seq-order>3</seq-order>
         <name>report_type_code</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>4</max-length>
         <required>Yes</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Code assigned to report type. Example: Tuna Handline Trip Report, code = TUNA; Cash Sales Report, code = CS, Purchase Report, code = P.</description>
      </data-attribute>
      <data-attribute cc-id="1273895">
         <seq-order>4</seq-order>
         <name>dealer_licensee_id</name>
         <data-storage-type>bigint</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>19</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Identifies dealer who purchased catch for dealer reports, or the fisher who sold catch for Cash Sales Reports. For Cash Sales Reports, the fisher is also the dealer, therefore dealer_licensee_id = view_purchases.fisher_licensee_id.</description>
         <default-value>0</default-value>
      </data-attribute>
      <data-attribute cc-id="1273896">
         <seq-order>5</seq-order>
         <name>dealer_license_number</name>
         <data-storage-type>int</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>10</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Commercial marine dealer license number assigned to dealer by HDAR.</description>
      </data-attribute>
      <data-attribute cc-id="1273897">
         <seq-order>6</seq-order>
         <name>dealer_name</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>192</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Full name of individual holding dealer license.</description>
      </data-attribute>
      <data-attribute cc-id="1273898">
         <seq-order>7</seq-order>
         <name>dealer_business_name</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>64</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Name of business holding the license.</description>
      </data-attribute>
      <data-attribute cc-id="1273899">
         <seq-order>8</seq-order>
         <name>fisher_licensee_id</name>
         <data-storage-type>bigint</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>19</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Identifies fisher who sold the catch listed on the purchase report.</description>
         <default-value>0</default-value>
      </data-attribute>
      <data-attribute cc-id="1273900">
         <seq-order>9</seq-order>
         <name>fisher_license_number</name>
         <data-storage-type>int</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>10</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Commercial marine fishing license number assigned to fisher by HDAR.</description>
      </data-attribute>
      <data-attribute cc-id="1273901">
         <seq-order>10</seq-order>
         <name>fisher_name</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>192</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Full name of individual holding fishing license.</description>
      </data-attribute>
      <data-attribute cc-id="1273902">
         <seq-order>11</seq-order>
         <name>report_date</name>
         <data-storage-type>date</data-storage-type>
         <required>Yes</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Date of purchase.</description>
      </data-attribute>
      <data-attribute cc-id="1273903">
         <seq-order>12</seq-order>
         <name>received_date</name>
         <data-storage-type>date</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Date dealer submitted report online, or date staff received the paper report from the dealer.</description>
      </data-attribute>
      <data-attribute cc-id="1273904">
         <seq-order>13</seq-order>
         <name>vessel_id</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>255</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Hawaii State (HA) or U.S. Coast Guard (UCSG) vessel registration/documentation number. Field will not be reported if a vessel was not used when fishing.

Note: HA vessel registration number suffix indicates vessel use. Recreational use is denoted by letters 'A' through 'F'. Commercial fishing is denoted by 'CF'. Commercial passenger is denoted by 'CP'.</description>
      </data-attribute>
      <data-attribute cc-id="1273905">
         <seq-order>14</seq-order>
         <name>vessel_name</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>255</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Name of fishing vessel that dealer purchased from. Vessel name is registered with State Division of Boating &amp; Ocean Recreation. Field will not be reported if a vessel was not used when fishing. Was manually entered in DRS. ODR automatically fills this in based on vessel_id.</description>
      </data-attribute>
      <data-attribute cc-id="1273906">
         <seq-order>15</seq-order>
         <name>purchase_type_code</name>
         <data-storage-type>int</data-storage-type>
         <required>Yes</required>
         <primary-key>No</primary-key>
         <precision>10</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Code assigned to a purchase type.</description>
         <default-value>1</default-value>
      </data-attribute>
      <data-attribute cc-id="1273907">
         <seq-order>16</seq-order>
         <name>purchase_type_name</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>25</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Name of purchase type. Example: Initial Sale, Resale, etc.</description>
      </data-attribute>
      <data-attribute cc-id="1273908">
         <seq-order>17</seq-order>
         <name>purchase_report_comments</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>1024</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Comments submitted online through ODR regarding purchase. Different from view_purchases.purchase_comments, which are comments regarding purchases at the individual species level before ODR existed.</description>
      </data-attribute>
      <data-attribute cc-id="1273909">
         <seq-order>18</seq-order>
         <name>validation_status</name>
         <data-storage-type>enum</data-storage-type>
         <max-length>21</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Validation status when adding report to ODR. Values include: Approved, Pending, Approved - No Response. Originally, meant to be used for tracking communication with dealers who appeared on Error Reports. A value of Approved would clear the dealer from the error report. However, due to a design flaw, the validation status is not currently being used in ODR.</description>
      </data-attribute>
      <data-attribute cc-id="1273910">
         <seq-order>19</seq-order>
         <name>trip_number</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>32</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Number generated by UFA and FIF dealers who buy from fishers on purchase reports. Different from view_catch.logbook_number, which is number printed on NWHI Bottomfish Trip Daily Log sheet.</description>
      </data-attribute>
      <data-attribute cc-id="1273911">
         <seq-order>20</seq-order>
         <name>trip_type_code</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>1</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Code for fishing trip type. Example: Handline, code = H; Longline, code = L, etc.</description>
      </data-attribute>
      <data-attribute cc-id="1273912">
         <seq-order>21</seq-order>
         <name>trip_type</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>50</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Name of fishing trip type. Example: Bottomfish, Handline, Longline, etc.</description>
      </data-attribute>
      <data-attribute cc-id="1273913">
         <seq-order>22</seq-order>
         <name>purchase_id</name>
         <data-storage-type>bigint</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>19</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Identifies a unique purchase record.</description>
         <default-value>0</default-value>
      </data-attribute>
      <data-attribute cc-id="1273914">
         <seq-order>23</seq-order>
         <name>species_id</name>
         <data-storage-type>int</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>10</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Code representing species that was purchased.</description>
         <default-value>0</default-value>
      </data-attribute>
      <data-attribute cc-id="1273915">
         <seq-order>24</seq-order>
         <name>food_species_code</name>
         <data-storage-type>int</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>10</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Codes associated with species collected for food from all HDAR forms except Aquarium forms. Different from view_purchases.aquarium_species_code, which are codes associated with species collected for aquarium. Note: food_species_code and view_purchases.aquarium_species_code have overlapping species but species codes are unique to each column, meaning the same fish can have a different code in each column. Example: Achilles Tang, food_species_code = 85 and view_purchases.aquarium_species_code = 103.</description>
      </data-attribute>
      <data-attribute cc-id="1273916">
         <seq-order>25</seq-order>
         <name>aquarium_species_code</name>
         <data-storage-type>int</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>10</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>Codes associated with species collected for aquariums. Codes are from HDAR Aquarium Fish Trip Report. Different from view_purchases.food_species_code, which are codes associated with species collected for food. Note: view_purchases.food_species_code and aquarium_species_code have overlapping species but species codes are unique to each column, meaning the same fish can have a different code in each column. Example: Achilles Tang, view_purchases.food_species_code = 85 and aquarium_species_code = 103.</description>
      </data-attribute>
      <data-attribute cc-id="1273917">
         <seq-order>26</seq-order>
         <name>food_name</name>
         <data-storage-type>text</data-storage-type>
         <max-length>65535</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Comma delimited list of names associated with a given species_id sold for food. Example: species_id = 2, food_name = Skipjack.</description>
      </data-attribute>
      <data-attribute cc-id="1273918">
         <seq-order>27</seq-order>
         <name>aquarium_name</name>
         <data-storage-type>text</data-storage-type>
         <max-length>65535</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Comma delimited list of names associated with a given species_id that are sold for aquariums. Example: species_id = 83, aquarium_name = Achilles Tang.</description>
      </data-attribute>
      <data-attribute cc-id="1273919">
         <seq-order>28</seq-order>
         <name>local_name</name>
         <data-storage-type>text</data-storage-type>
         <max-length>65535</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Comma delimited list of local names associated with a given species_id. Example: species_id = 2, local_name = Aku, Otado, Otaru.</description>
      </data-attribute>
      <data-attribute cc-id="1273920">
         <seq-order>29</seq-order>
         <name>display_name</name>
         <data-storage-type>mediumtext</data-storage-type>
         <max-length>16777215</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Primary name displayed by applications and reports. Name come from species_common_name.name where species_common_name_type_code = 5 (Display Name). If no records where species_common_name_type_code = 5, species.scientific_name is used.</description>
      </data-attribute>
      <data-attribute cc-id="1273921">
         <seq-order>30</seq-order>
         <name>rank</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>20</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Name of taxonomic ranking. Example: Kingdom, Subkingdom, Phylum, Subphylum, Class, etc.</description>
      </data-attribute>
      <data-attribute cc-id="1273922">
         <seq-order>31</seq-order>
         <name>scientific_name</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>125</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Normally the binomial name, which consists of a generic name (the genus name) and the specific name (the species name). If species cannot be identified to the species level, it will be identified to the highest known taxonomic ranking, such as its phylum, class, infraclass, order, suborder, family, or subfamily. A genus name followed by 'spp.' refers to multiple species within that genus. A genus name followed by 'sp.' refers to one species. The scientific name for species identified at the rank of family or higher will be the name followed by the rank in parentheses. Example: Thunnus thynnus, Nerita spp., Scombridae (family), Anthozoa (class), etc. Different from common name.</description>
      </data-attribute>
      <data-attribute cc-id="1273923">
         <seq-order>32</seq-order>
         <name>species_category</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>40</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Name of the category marine species falls under. Example: Shells, Seaweed, Freshwater fish, Bait Only, etc.</description>
      </data-attribute>
      <data-attribute cc-id="1273924">
         <seq-order>33</seq-order>
         <name>species_condition_code</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>5</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Condition of the species when purchased. Used to estimate the number of pounds sold (whole weight). Required field for Cash Sales from OFR. Not required for ODR. List merges conditions from both OFR and ODR.</description>
      </data-attribute>
      <data-attribute cc-id="1273925">
         <seq-order>34</seq-order>
         <name>species_condition</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>100</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Description of marine life condition when purchased. Example: Belly Only, Damage, Whole, etc.</description>
      </data-attribute>
      <data-attribute cc-id="1273926">
         <seq-order>35</seq-order>
         <name>pounds_bought</name>
         <data-storage-type>decimal</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>17</precision>
         <scale>2</scale>
         <status>Active</status>
         <description>Weight (pounds) of each species purchased. Required unless species is exempt from reporting weight.</description>
      </data-attribute>
      <data-attribute cc-id="1273927">
         <seq-order>36</seq-order>
         <name>pieces_bought</name>
         <data-storage-type>decimal</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>17</precision>
         <scale>2</scale>
         <status>Active</status>
         <description>Number of pieces purchased. If purchased in quantities such as akule, number of fish may have been estimated. Required unless species is exempt from reporting pieces.</description>
      </data-attribute>
      <data-attribute cc-id="1273928">
         <seq-order>37</seq-order>
         <name>total_value</name>
         <data-storage-type>decimal</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>17</precision>
         <scale>2</scale>
         <status>Active</status>
         <description>Amount paid for marine life (US dollars).</description>
      </data-attribute>
      <data-attribute cc-id="1273929">
         <seq-order>38</seq-order>
         <name>exported</name>
         <data-storage-type>tinyint</data-storage-type>
         <required>No</required>
         <primary-key>No</primary-key>
         <precision>3</precision>
         <scale>0</scale>
         <status>Active</status>
         <description>If sold outside the state of Hawaii, value = 1; if not, value = 0. Only applicable to Aquarium Cash Sale Reports.</description>
         <default-value>0</default-value>
      </data-attribute>
      <data-attribute cc-id="1273930">
         <seq-order>39</seq-order>
         <name>purchase_comments</name>
         <data-storage-type>varchar</data-storage-type>
         <max-length>1024</max-length>
         <required>No</required>
         <primary-key>No</primary-key>
         <status>Active</status>
         <description>Comments regarding the individual purchase before ODR existed. Different from view_purchases.purchase_report_comments, which are comments regarding the purchase from ODR.</description>
      </data-attribute>
   </data-attributes>
   <catalog-details>
      <guid>gov.noaa.nmfs.inport:65076</guid>
      <metadata-record-created-by pers-id="21136">Bradley Gough</metadata-record-created-by>
      <metadata-record-created>2021-07-27T02:22:46</metadata-record-created>
      <metadata-record-last-modified-by pers-id="21136">Bradley Gough</metadata-record-last-modified-by>
      <metadata-record-last-modified>2023-09-23T00:43:01</metadata-record-last-modified>
      <record-published>2023-09-23</record-published>
      <owner-organization>Pacific Islands Fisheries Science Center</owner-organization>
      <owner-organization-acronym>PIFSC</owner-organization-acronym>
      <owner-organization-address>1845 Wasp Blvd.</owner-organization-address>
      <owner-organization-address-city>Honolulu</owner-organization-address-city>
      <owner-organization-address-state>HI</owner-organization-address-state>
      <owner-organization-address-zip>96818</owner-organization-address-zip>
      <owner-organization-address-country>USA</owner-organization-address-country>
      <owner-organization-phone>808-725-5300</owner-organization-phone>
      <owner-organization-url>https://www.pifsc.noaa.gov</owner-organization-url>
      <owner-organization-business-hours>8:00 a.m. - 4:30 p.m.</owner-organization-business-hours>
      <owner-organization-group-id>1001</owner-organization-group-id>
      <publication-status>Public</publication-status>
      <is-do-not-publish>No</is-do-not-publish>
      <metadata-review-frequency>1 Year</metadata-review-frequency>
   </catalog-details>
</inport-metadata>
