diff --git a/bids-validator/validators/json/schemas/pet.json b/bids-validator/validators/json/schemas/pet.json index 24f5f827a..328537060 100644 --- a/bids-validator/validators/json/schemas/pet.json +++ b/bids-validator/validators/json/schemas/pet.json @@ -249,12 +249,20 @@ "ImageDecayCorrectionTime", "ReconMethodName", "ReconMethodParameterLabels", - "ReconMethodParameterUnits", - "ReconMethodParameterValues", "ReconFilterType", - "ReconFilterSize", "AttenuationCorrection" ], + "allOf": [ + { + "$ref": "#/dependency-definitions/if-ReconMethodParameterLabels-then-Units-and-Values" + }, + { + "$ref": "#/dependency-definitions/if-bolus-infusion-then-infusion-details" + }, + { + "$ref": "#/dependency-definitions/if-ReconFilterType-then-ReconFilterSize" + } + ], "dependencies": { "TracerMolecularWeight": ["TracerMolecularWeightUnits"], "InjectedRadioactivity": ["InjectedRadioactivityUnits"], @@ -265,5 +273,46 @@ "ReconMethodParameterUnits", "ReconMethodParameterValues" ] + }, + "dependency-definitions": { + "if-ReconMethodParameterLabels-then-Units-and-Values": { + "if": { + "type": "object", + "properties": { + "ReconMethodParameterLabels": { "const": "none" } + } + }, + "else": { + "required": ["ReconMethodParameterUnits", "ReconMethodParameterValues"] + } + }, + "if-bolus-infusion-then-infusion-details": { + "if": { + "type": "object", + "properties": { + "ModeOfAdministration": { "const": "bolus-infusion" } + } + }, + "then": { + "required": [ + "InfusionRadioactivity", + "InfusionStart", + "InfusionSpeed", + "InfusionSpeedUnits", + "InjectedVolume" + ] + } + }, + "if-ReconFilterType-then-ReconFilterSize": { + "if": { + "type": "object", + "properties": { + "ReconMethodParameterLabels": { "const": "none" } + } + }, + "else": { + "required": ["ReconFilterSize"] + } + } } }