|
154 | 154 | "$ref": "common_definitions.json#/definitions/Instructions" |
155 | 155 | } |
156 | 156 | }, |
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 | | - ], |
225 | 157 |
|
226 | 158 | "required": [ |
227 | 159 | "Manufacturer", |
|
249 | 181 | "ImageDecayCorrectionTime", |
250 | 182 | "ReconMethodName", |
251 | 183 | "ReconMethodParameterLabels", |
252 | | - "ReconMethodParameterUnits", |
253 | | - "ReconMethodParameterValues", |
254 | 184 | "ReconFilterType", |
255 | | - "ReconFilterSize", |
256 | 185 | "AttenuationCorrection" |
257 | 186 | ], |
| 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 | + ], |
258 | 198 | "dependencies": { |
259 | 199 | "TracerMolecularWeight": ["TracerMolecularWeightUnits"], |
260 | 200 | "InjectedRadioactivity": ["InjectedRadioactivityUnits"], |
|
265 | 205 | "ReconMethodParameterUnits", |
266 | 206 | "ReconMethodParameterValues" |
267 | 207 | ] |
| 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 | + } |
268 | 252 | } |
269 | 253 | } |
0 commit comments