Skip to content

Commit

Permalink
Merge pull request #1906 from bids-standard/fix/pet-dependencies
Browse files Browse the repository at this point in the history
FIX: Update PET metadata dependencies
  • Loading branch information
effigies authored Mar 7, 2024
2 parents 7773eda + 08167de commit 70dcc1a
Showing 1 changed file with 55 additions and 71 deletions.
126 changes: 55 additions & 71 deletions bids-validator/validators/json/schemas/pet.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,74 +154,6 @@
"$ref": "common_definitions.json#/definitions/Instructions"
}
},
"allOf": [
{
"if": {
"properties": {
"InjectedMass": {
"enum": ["n/a"]
},
"InjectedMassUnits": {
"enum": ["n/a"]
}
}
},
"then": {},
"else": {
"required": ["InjectedMass", "InjectedMassUnits"]
}
},
{
"if": {
"properties": {
"SpecificRadioactivity": {
"enum": ["n/a"]
},
"SpecificRadioactivityUnits": {
"enum": ["n/a"]
}
}
},
"then": {},
"else": {
"required": ["SpecificRadioactivity", "SpecificRadioactivityUnits"]
}
},
{
"if": {
"properties": {
"ReconFilterType": {
"enum": ["n/a"]
},
"ReconFilterSize": {
"enum": ["n/a"]
}
}
},
"then": {},
"else": {
"required": ["ReconFilterType", "ReconFilterSize"]
}
},
{
"if": {
"properties": {
"ModeOfAdministration": {
"enum": ["bolus-infusion"]
}
}
},
"then": {
"required": [
"InfusionRadioactivity",
"InfusionStart",
"InfusionSpeed",
"InjectedVolume"
]
},
"else": {}
}
],

"required": [
"Manufacturer",
Expand Down Expand Up @@ -249,12 +181,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"],
Expand All @@ -265,5 +205,49 @@
"ReconMethodParameterUnits",
"ReconMethodParameterValues"
]
},
"dependency-definitions": {
"if-ReconMethodParameterLabels-then-Units-and-Values": {
"if": {
"type": "object",
"properties": {
"ReconMethodParameterLabels": { "const": "none" }
},
"required": ["ReconMethodParameterLabels"]
},
"then": {},
"else": {
"required": ["ReconMethodParameterUnits", "ReconMethodParameterValues"]
}
},
"if-bolus-infusion-then-infusion-details": {
"if": {
"type": "object",
"properties": {
"ModeOfAdministration": { "const": "bolus-infusion" }
},
"required": ["ModeOfAdministration"]
},
"then": {
"required": [
"InfusionRadioactivity",
"InfusionStart",
"InfusionSpeed",
"InfusionSpeedUnits",
"InjectedVolume"
]
}
},
"if-ReconFilterType-then-ReconFilterSize": {
"if": {
"type": "object",
"properties": {
"ReconFilterType": { "const": "none" }
},
"required": ["ReconFilterType"]
},
"then": {},
"else": { "required": ["ReconFilterSize"] }
}
}
}

0 comments on commit 70dcc1a

Please sign in to comment.