Blueprint:InlineValueSet
Inline Components with Specifications from a third Table
Background
Certain data models define semi-abstract components, with concrete specifications and constraints for the component data determined by records in a third table (spec table).
One example are medical analyses (e.g. blood tests), where the concrete analysis results that can be recorded are specified in a third table, including data types and plausible/permitted ranges:
- Master:
med_analysis - Component:
med_analysis_result - Specification:
med_parameter
Problems
Wile the current InlineComponent concept can facilitate the inline data entry for components, it cannot be configured to use specifications from a third table to build the sub-form rows. Validation is done against the component table model alone, without taking constraints from a third table into account.
Additionally, InlineComponent does not limit the sub-form to a fixed set of specifications - any number of records, including multiple of the same type, can be added.
Analysis / Requirements
We want a SubForm implementation that
- generates a list of specifications (parameters) that can be selected by the user for data entry (and de-selected), permitting only one sub-record per spec
- reads these specification from a third table, including validation constraints for each individual parameter, using them to provide a suitable input field (varying SELECT or text-INPUT) and validate the input
- creates or updates the sub-records upon form submission, de-duplicating them by specification (parameter), so that only one record per spec can exist (or zero)
- supports at least one value-field, as well as additional fields for status or references (which could be boolean or choice)
- can be embedded and configured in
CustomCRUDFormdeclarations, likeInlineComponent