framework icon indicating copy to clipboard operation
framework copied to clipboard

JSON Schema Creation for Conditional Validations in ObservationScreeningResponse

Open megin1989 opened this issue 1 year ago • 0 comments

I encountered an issue while creating a JSON schema using Frictionless where I need to enforce specific conditional validations for certain LOINC question codes. Specifically:

LOINC question code: 44250-9

The allowed answer codes must be one of the following:
LA6568-5, LA6569-3, LA6570-1, LA6571-9.

LOINC question code: 44255-89

The allowed answer codes must be one of the following:
LA6568-5, LA6569-3, LA6570-1, LA6571-9.

Expected Behavior: When defining the JSON schema, the conditional validation should be able to enforce that for each ObservationScreeningResponse, if the LOINC question code is 44250-9, the answer code must match the specified values. Similarly, for the question code 44255-8, the same rule applies.

Could support for such conditional validations be added to Frictionless, or is there an existing workaround to achieve this?

megin1989 avatar Nov 21 '24 04:11 megin1989