Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract common ag inspection info into its own schema #584

Merged
merged 3 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
$linkedData:
term: AgricultureInspectionCommonInfo
'@id': https://w3id.org/traceability#AgricultureInspectionCommonInfo
title: Agriculture Inspection Common Info
description: Information common to agriculture inspection credentials.
type: object
properties:
type:
oneOf:
- type: array
items:
type: string
enum:
- AgricultureInspectionCommonInfo
- type: string
const:
- AgricultureInspectionCommonInfo
applicant:
title: Applicant
description: Entity that is applying for the inspection.
$ref: ./Entity.yml
$linkedData:
term: applicant
'@id': https://service.unece.org/trade/uncefact/vocabulary/uncefact/#associatedParty
facility:
title: Facility
description: Information on the inspection facility.
$ref: ./Place.yml
$linkedData:
term: facility
'@id': https://www.gs1.org/voc/location
inspector:
title: Inspector
description: >-
Inspector performing the Agriculture Inspection. The following link
provides further insight:
https://www.lawinsider.com/dictionary/food-inspector
$ref: ./Inspector.yml
$linkedData:
term: inspector
'@id': https://w3id.org/traceability#Inspector
delegateOf:
title: Delegate Of
description: Inspector is acting on behalf of this entity (common with many ag. inspections).
$ref: ./Entity.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will likely create other issues, but not a blocker.

$linkedData:
term: delegateOf
'@id': https://service.unece.org/trade/uncefact/vocabulary/uncefact/#specifiedOrganization
regulatoryAgency:
title: Regulatory Agency
description: The regulatory agency responsible for the regulation (public or private) that mandates or implies the inspection.
$ref: ./Organization.yml
$linkedData:
term: regulatoryAgency
'@id': https://service.unece.org/trade/uncefact/vocabulary/uncefact/#specifiedOrganization
inspectionStarted:
title: Inspection Started
description: Date and time inspection started in 24hr ISO 8601 format (e.g. 1970-01-01T00:00Z for UTC, or 1970:01:01T00:00-5:00 for New York on standard time).
type: string
$linkedData:
term: inspectionStarted
'@id': https://schema.org/startDate
inspectionEnded:
title: Inspection Ended
description: Date and time inspection ended in ISO 8601 format (e.g. 1970-01-01T00:00Z for UTC, or 1970:01:01T00:00-5:00 for New York on standard time).
type: string
$linkedData:
term: inspectionEnded
'@id': https://schema.org/endDate
additionalProperties: false
example: |-
{
"type": ["AgricultureInspectionCommonInfo"],
"applicant": {
"type" : ["Entity"],
"entityType": "Organization",
"name" : "Jessica Sherawat",
"email": "[email protected]",
"phoneNumber": "+1-555-581-2077"
},
"facility": {
"type": [
"Place"
],
"globalLocationNumber": "5449782976823",
"geo": {
"type": [
"GeoCoordinates"
],
"latitude": "-79.6395",
"longitude": "178.5353"
},
"address": {
"type": [
"PostalAddress"
],
"name": "Ace Foodstuffs",
"streetAddress": "853 Wisozk River",
"addressLocality": "New Noemyfort",
"addressRegion": "New Mexico",
"postalCode": "18047-2038",
"addressCountry": "Togo"
},
"unLocode": "DKCPH"
},
"inspector": {
"type": [
"Inspector"
],
"person": {
"type": [
"Person"
],
"firstName": "Jason",
"lastName": "Grant",
"email": "[email protected]",
"phoneNumber": "555-460-4373",
"worksFor": {
"type": [
"Organization"
],
"name": "Glayson & Co. Inspections",
"description": "Agricultural cleanliness & grade assurance",
"email": "[email protected]",
"phoneNumber": "555-521-6143",
"faxNumber": "555-150-7668"
},
"jobTitle": "Principal Data Supervisor"
},
"qualification": [
{
"type": ["Qualification"],
"qualificationCategory": "Agricultural Security Analyst",
"qualificationValue": "Executive"
},
{
"type": ["Qualification"],
"qualificationCategory": "Future Metrics Planner",
"qualificationValue": "Coordinator"
},
{
"type": ["Qualification"],
"qualificationCategory": "Internal Identity Agent",
"qualificationValue": "Assistant"
}
]
},
"delegateOf": {
"type": ["Entity"],
"entityType" : "Organization",
"name": "Glayson & Co. Inspections",
"description": "Agricultural cleanliness & grade assurance",
"email": "[email protected]",
"phoneNumber": "555-521-6143",
"faxNumber": "555-150-7668"
},
"regulatoryAgency": {
"type": ["Organization"],
"name": "CDFA",
"description": "California Department of Food and Agriculture",
"email": "[email protected]",
"phoneNumber": "555-467-2604",
"faxNumber": "+1-555-486-3154"
},
"inspectionStarted": "2020-03-15T14:30-08:00",
"inspectionEnded": "2020-03-15T17:30-08:00"
}
Loading