{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": false, "properties": { "MainDeclaration": { "$ref": "#/definitions/MainDeclaration" } }, "definitions": { "MainDeclaration": { "type": "object", "additionalProperties": true, "properties": { "version": { "type": "string", "enum": [ "2.0" ] }, "BusinessInfo": { "$ref": "#/definitions/BusinessInfo" }, "IPC-1753A": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Include" } } }, "required": [ "BusinessInfo" ] }, "Request": { "type": "object", "additionalProperties": true, "properties": { "date": { "type": "string" }, "docID": { "type": "string" }, "comment": { "type": "string" }, "respondByDate": { "type": "string" }, "internalSupplierID": { "type": "string" }, "fieldLock": { "type": "boolean" }, "supplierCheckbox": { "type": "boolean" }, "Contact": { "$ref": "#/definitions/Contact" }, "RequestCompany": { "$ref": "#/definitions/Company" } } }, "Contact": { "type": "object", "additionalProperties": true, "properties": { "name": { "type": "string" }, "title": { "type": "string" }, "comment": { "type": "string" }, "encrypted": { "type": "boolean" }, "Email": { "$ref": "#/definitions/Email" }, "SurfaceAddress": { "$ref": "#/definitions/SurfaceAddress" }, "Phone": { "type": "array", "items": { "$ref": "#/definitions/Phone" } } }, "required": [ "name" ] }, "UniqueID": { "type": "object", "additionalProperties": true, "properties": { "identity": { "type": "string" }, "authority": { "type": "string" } } }, "UniqueIDExtended": { "type": "object", "additionalProperties": true, "properties": { "revision": { "type": [ "string", "number", "boolean" ] }, "date": { "type": "string" } }, "allOf": [ { "$ref": "#/definitions/UniqueID" } ] }, "ProductID": { "type": "object", "additionalProperties": true, "properties": { "itemName": { "type": "string" }, "itemNumber": { "type": "string" }, "manufacturingSite": { "type": "string" }, "effectiveDate": { "type": "string" }, "version": { "type": "string" }, "requesterItemName": { "type": "string" }, "requesterItemNumber": { "type": "string" }, "encrypted": { "type": "boolean" }, "Amount": { "$ref": "#/definitions/Amount" }, "InstanceID": { "type": "array", "items": { "$ref": "#/definitions/UniqueID" } } } }, "Product": { "type": "object", "additionalProperties": true, "properties": { "unitType": { "type": "string", "enum": [ "Each", "Meter", "m^2", "m^3", "cm", "cm^2", "cm^3", "Liter" ] }, "comment": { "type": "string" }, "numberOfInstances": { "type": "number" }, "ProductID": { "type": "array", "items": { "$ref": "#/definitions/ProductID" } }, "SampleID": { "type": "array", "items": { "$ref": "#/definitions/ProductID" } }, "TestRequested": { "type": "array", "items": { "$ref": "#/definitions/TestRequested" } }, "SubProduct": { "type": "array", "items": { "$ref": "#/definitions/Product" } }, "Sample": { "type": "array", "items": { "$ref": "#/definitions/Product" } }, "Attachment": { "type": "array", "items": { "$ref": "#/definitions/Attachment" } } } }, "Response": { "type": "object", "additionalProperties": true, "properties": { "date": { "type": "string" }, "docID": { "type": "string" }, "fieldLock": { "type": "boolean" }, "comment": { "type": "string" }, "encrypted": { "type": "boolean" }, "Authorizer": { "$ref": "#/definitions/Contact" }, "SupplyCompany": { "$ref": "#/definitions/Company" }, "Contact": { "type": "array", "items": { "$ref": "#/definitions/Contact" } }, "Manufacturer": { "type": "array", "items": { "$ref": "#/definitions/Company" } }, "Laboratory": { "type": "array", "items": { "$ref": "#/definitions/Company" } } }, "required": [ "date" ] }, "Company": { "type": "object", "additionalProperties": true, "properties": { "name": { "type": "string" }, "encrypted": { "type": "boolean" }, "CompanyID": { "type": "array", "items": { "$ref": "#/definitions/UniqueID" } } } }, "Declaration": { "type": "object", "additionalProperties": true, "properties": { "legalType": { "type": "string", "enum": [ "Standard", "Custom" ] }, "supplierAcceptance": { "type": "boolean" }, "legalDef": { "type": "string" }, "uncertaintyStatement": { "type": "string" } }, "required": [ "legalType", "supplierAcceptance", "legalDef" ] }, "Amount": { "type": "object", "additionalProperties": true, "properties": { "UOM": { "type": "string", "enum": [ "mg", "g", "kg", "ppm", "ppb", "massPercent" ] }, "value": { "type": "number" } }, "required": [ "UOM", "value" ] }, "TestRequested": { "type": "object", "additionalProperties": true, "properties": { "identity": { "type": [ "string", "number", "boolean" ] }, "version": { "type": "string" }, "authority": { "type": "string" }, "summary": { "type": "string" }, "conclusion": { "type": "string", "enum": [ "Pass", "Fail" ] }, "Analyte": { "type": "array", "items": { "$ref": "#/definitions/Analyte" } } }, "required": [ "identity" ] }, "Analyte": { "type": "object", "additionalProperties": true, "properties": { "name": { "type": "string" }, "comment": { "type": "string" }, "AnalyteID": { "type": "array", "items": { "$ref": "#/definitions/UniqueIDExtended" } }, "ReportedValue": { "type": "array", "items": { "$ref": "#/definitions/ReportedValue" } } }, "required": [ "name" ] }, "Attachment": { "type": "object", "additionalProperties": true, "properties": { "encrypted": { "type": "boolean" }, "name": { "type": "string" }, "fileType": { "type": "string" }, "fileData": { "type": "string" }, "fileURL": { "type": "string" }, "fileZipLocation": { "type": "string" } } }, "BusinessInfo": { "type": "object", "additionalProperties": true, "properties": { "mode": { "type": "string", "enum": [ "Distribute", "Request/Reply" ] }, "Response": { "$ref": "#/definitions/Response" }, "Request": { "$ref": "#/definitions/Request" }, "Declaration": { "$ref": "#/definitions/Declaration" }, "EBusinessInfo": { "$ref": "#/definitions/EBusinessInfo" } }, "required": [ "mode" ] }, "EBusinessInfo": { "type": "object", "additionalProperties": true, "properties": { "Attachment": { "type": "array", "items": { "$ref": "#/definitions/Attachment" } } } }, "Phone": { "type": "object", "additionalProperties": true, "properties": { "number": { "type": "string" }, "type": { "type": "string" } } }, "Email": { "type": "object", "additionalProperties": true, "properties": { "address": { "type": "string" }, "type": { "type": "string" } }, "required": [ "address" ] }, "SurfaceAddress": { "type": "object", "additionalProperties": true, "properties": { "internal": { "type": "string" }, "street": { "type": "string" }, "city": { "type": "string" }, "stateProvince": { "type": "string" }, "country": { "type": "string" }, "postalCode": { "type": "string" }, "type": { "type": "string" } } }, "Include": { "type": "object", "additionalProperties": true, "properties": { "Sectional": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Sectional" } }, "EncryptionMethod": { "$ref": "#/definitions/EncryptionMethod" }, "Response": { "$ref": "#/definitions/Response" }, "Request": { "$ref": "#/definitions/Request" }, "Product": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Product" } } } }, "EncryptionMethod": { "type": "object", "additionalProperties": true, "properties": { "standard": { "type": "string", "enum": [ "AES", "DES", "RSA", "other" ] }, "numberOfBits": { "type": "string", "enum": [ "64", "128", "192", "256", "512", "1024", "2048", "4096" ] }, "mode": { "type": [ "string", "number", "boolean" ] }, "cipherType": { "type": [ "string", "number", "boolean" ] }, "output": { "type": "string", "enum": [ "base64", "hex" ] }, "comment": { "type": "string" } }, "required": [ "standard", "numberOfBits" ] }, "Sectional": { "type": "object", "additionalProperties": true, "properties": { "name": { "type": "string", "enum": [ "LaboratoryReport" ] } }, "required": [ "name" ] }, "ReportedValue": { "type": "object", "additionalProperties": true, "properties": { "subSampleID": { "type": "string" }, "UOM": { "type": [ "string", "number", "boolean" ] }, "value": { "type": "string" }, "testMethod": { "type": "string" }, "testSequence": { "type": "string" }, "dateOfAnalysis": { "type": "string" }, "dateOfSampleReceipt": { "type": "string" }, "samplePreparationProcedure": { "type": "string" }, "qualifiers": { "type": "string" }, "laboratoryReportConclusion": { "type": "string" }, "description": { "type": "string" }, "LaboratoryReportingLimit": { "type": "array", "maxItems": 3, "items": { "$ref": "#/definitions/LaboratoryReportingLimit" } } }, "required": [ "subSampleID" ] }, "LaboratoryReportingLimit": { "type": "object", "additionalProperties": true, "properties": { "value": { "type": "string" }, "typeOfLimit": { "type": "string", "enum": [ "methodDetectionLimit", "reportingLimit", "practicalQuantitationLimit" ] }, "typeOfLimitReference": { "type": [ "string", "number", "boolean" ] }, "quantitative": { "type": "boolean" }, "UOM": { "type": [ "string", "number", "boolean" ] } }, "required": [ "value", "typeOfLimit" ] } } }