Skip to content

Commit

Permalink
Add preliminary process JSON Schema
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Ho <[email protected]>
  • Loading branch information
jujaga committed Dec 11, 2024
1 parent 3ee8a48 commit ebaa40e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 32 deletions.
3 changes: 2 additions & 1 deletion docs/spec/data/parcel_id.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
"title": "pin",
"required": ["pin"]
}
]
],
"additionalProperties": false
}
8 changes: 3 additions & 5 deletions docs/spec/data/process.example.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"class": "status",
"class": ["Application", "Review", "Assessment"],
"concept": "http://bcgov.github.io/nr-pies/docs/concept/process_tracking",
"description": "The authorization request is under review by subject matter expert.",
"parent_class": "stage",
"parent_concept": "underreview",
"system": "http://bcgov.github.io/nr-pies/docs/concept/process_tracking",
"value": "pending review"
"status": "UnderReview"
}
10 changes: 5 additions & 5 deletions docs/spec/data/process.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: process
title: Process
description: Represents a process concept.
description: Represents a process tracking concept.
tags:
- developer
---
Expand All @@ -12,9 +12,9 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

import Example from "@site/docs/spec/data/process.example.json";
// import Schema from "@site/docs/spec/data/process.schema.json";
import Schema from "@site/docs/spec/data/process.schema.json";

Represents a process concept.
Represents a process tracking concept.

## Scope

Expand All @@ -31,14 +31,14 @@ Loosely taking inspiration from [HL7 Timing](https://www.hl7.org/fhir/datatypes.
## Specification

<Tabs queryString="tab">
{/* <TabItem value="schema" label="Schema" default>
<TabItem value="schema" label="Schema" default>
<JSONSchemaViewer schema={Schema} viewerOptions={{ showExamples: true }} />
</TabItem>
<TabItem value="source" label="Source">
<CodeBlock language="json" showLineNumbers>
{JSON.stringify(Schema, null, 2)}
</CodeBlock>
</TabItem> */}
</TabItem>
<TabItem value="example" label="Example">
<CodeBlock language="json" showLineNumbers>
{JSON.stringify(Example, null, 2)}
Expand Down
38 changes: 25 additions & 13 deletions docs/spec/data/process.schema.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
{
"$id": "https://github.com/bcgov/nr-pies/blob/main/docs/spec/types/project_bundle.schema.json",
"$schema": "https://json-schema.org/draft-07/schema",
"title": "Project Bundle",
"description": "An identifier for a specific area with clear boundaries.",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Process",
"description": "Represents a process tracking concept.",
"type": "object",
"properties": {
"project_id": {
"type": "string",
"description": "A unique key to track all permits related to a project or activity across all permitting systems.",
"pattern": "/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i"
"class": {
"type": "array",
"items": {
"type": "string",
"description": "A process tracking term."
},
"minItems": 1,
"maxItems": 3,
"uniqueItems": true
},
"project_name": {
"concept": {
"type": "string",
"description": "Short name of the project."
"description": "A reference to the concept map encodings used.",
"format": "uri",
"pattern": "^https://bcgov.github.io/nr-pies/docs/concept/*$"
},
"project_description": {
"type": "string",
"description": "Full description of the project. This may contain information to better understand a project."
"description": {
"description": "An optional description of the status if present.",
"type": "string"
},
"status": {
"description": "A description of the current condition or update of an application or authorization. Additional details about the current state are frequently conveyed (e.g., 'Pending Review', 'Under Inspection'). Statuses may be defined by the line of business.",
"type": "string"
}
},
"required": ["project_id", "project_name"]
"required": ["class", "concept"],
"additionalProperties": false
}
14 changes: 6 additions & 8 deletions docs/spec/resource/process_event.example.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
{
"event": [
{
"start": "2017-01-01T00:00:00.000Z",
"end": "2017-01-02T00:00:00.000Z"
"start": "2017-01-02T00:00:00.000Z",
"end": "2017-01-03T00:00:00.000Z"
},
{
"start": "2017-01-03T00:00:00.000Z"
"start": "2017-01-04T00:00:00.000Z"
}
],
"process": {
"class": "status",
"class": ["Application", "Review", "Assessment"],
"concept": "http://bcgov.github.io/nr-pies/docs/concept/process_tracking",
"description": "The authorization request is under review by subject matter expert.",
"parent_class": "stage",
"parent_concept": "underreview",
"system": "http://bcgov.github.io/nr-pies/docs/concept/process_tracking",
"value": "pending review"
"status": "UnderReview"
}
}

0 comments on commit ebaa40e

Please sign in to comment.