Skip to content

Commit 70dcc1a

Browse files
authored
Merge pull request #1906 from bids-standard/fix/pet-dependencies
FIX: Update PET metadata dependencies
2 parents 7773eda + 08167de commit 70dcc1a

File tree

1 file changed

+55
-71
lines changed
  • bids-validator/validators/json/schemas

1 file changed

+55
-71
lines changed

bids-validator/validators/json/schemas/pet.json

Lines changed: 55 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -154,74 +154,6 @@
154154
"$ref": "common_definitions.json#/definitions/Instructions"
155155
}
156156
},
157-
"allOf": [
158-
{
159-
"if": {
160-
"properties": {
161-
"InjectedMass": {
162-
"enum": ["n/a"]
163-
},
164-
"InjectedMassUnits": {
165-
"enum": ["n/a"]
166-
}
167-
}
168-
},
169-
"then": {},
170-
"else": {
171-
"required": ["InjectedMass", "InjectedMassUnits"]
172-
}
173-
},
174-
{
175-
"if": {
176-
"properties": {
177-
"SpecificRadioactivity": {
178-
"enum": ["n/a"]
179-
},
180-
"SpecificRadioactivityUnits": {
181-
"enum": ["n/a"]
182-
}
183-
}
184-
},
185-
"then": {},
186-
"else": {
187-
"required": ["SpecificRadioactivity", "SpecificRadioactivityUnits"]
188-
}
189-
},
190-
{
191-
"if": {
192-
"properties": {
193-
"ReconFilterType": {
194-
"enum": ["n/a"]
195-
},
196-
"ReconFilterSize": {
197-
"enum": ["n/a"]
198-
}
199-
}
200-
},
201-
"then": {},
202-
"else": {
203-
"required": ["ReconFilterType", "ReconFilterSize"]
204-
}
205-
},
206-
{
207-
"if": {
208-
"properties": {
209-
"ModeOfAdministration": {
210-
"enum": ["bolus-infusion"]
211-
}
212-
}
213-
},
214-
"then": {
215-
"required": [
216-
"InfusionRadioactivity",
217-
"InfusionStart",
218-
"InfusionSpeed",
219-
"InjectedVolume"
220-
]
221-
},
222-
"else": {}
223-
}
224-
],
225157

226158
"required": [
227159
"Manufacturer",
@@ -249,12 +181,20 @@
249181
"ImageDecayCorrectionTime",
250182
"ReconMethodName",
251183
"ReconMethodParameterLabels",
252-
"ReconMethodParameterUnits",
253-
"ReconMethodParameterValues",
254184
"ReconFilterType",
255-
"ReconFilterSize",
256185
"AttenuationCorrection"
257186
],
187+
"allOf": [
188+
{
189+
"$ref": "#/dependency-definitions/if-ReconMethodParameterLabels-then-Units-and-Values"
190+
},
191+
{
192+
"$ref": "#/dependency-definitions/if-bolus-infusion-then-infusion-details"
193+
},
194+
{
195+
"$ref": "#/dependency-definitions/if-ReconFilterType-then-ReconFilterSize"
196+
}
197+
],
258198
"dependencies": {
259199
"TracerMolecularWeight": ["TracerMolecularWeightUnits"],
260200
"InjectedRadioactivity": ["InjectedRadioactivityUnits"],
@@ -265,5 +205,49 @@
265205
"ReconMethodParameterUnits",
266206
"ReconMethodParameterValues"
267207
]
208+
},
209+
"dependency-definitions": {
210+
"if-ReconMethodParameterLabels-then-Units-and-Values": {
211+
"if": {
212+
"type": "object",
213+
"properties": {
214+
"ReconMethodParameterLabels": { "const": "none" }
215+
},
216+
"required": ["ReconMethodParameterLabels"]
217+
},
218+
"then": {},
219+
"else": {
220+
"required": ["ReconMethodParameterUnits", "ReconMethodParameterValues"]
221+
}
222+
},
223+
"if-bolus-infusion-then-infusion-details": {
224+
"if": {
225+
"type": "object",
226+
"properties": {
227+
"ModeOfAdministration": { "const": "bolus-infusion" }
228+
},
229+
"required": ["ModeOfAdministration"]
230+
},
231+
"then": {
232+
"required": [
233+
"InfusionRadioactivity",
234+
"InfusionStart",
235+
"InfusionSpeed",
236+
"InfusionSpeedUnits",
237+
"InjectedVolume"
238+
]
239+
}
240+
},
241+
"if-ReconFilterType-then-ReconFilterSize": {
242+
"if": {
243+
"type": "object",
244+
"properties": {
245+
"ReconFilterType": { "const": "none" }
246+
},
247+
"required": ["ReconFilterType"]
248+
},
249+
"then": {},
250+
"else": { "required": ["ReconFilterSize"] }
251+
}
268252
}
269253
}

0 commit comments

Comments
 (0)