Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting rules should allow multiple inputs #852

Open
hugohills-regnosys opened this issue Oct 3, 2024 · 0 comments
Open

Reporting rules should allow multiple inputs #852

hugohills-regnosys opened this issue Oct 3, 2024 · 0 comments
Labels
enhancement New feature or request subject: syntax This issue is about the syntax of Rosetta

Comments

@hugohills-regnosys
Copy link
Contributor

hugohills-regnosys commented Oct 3, 2024

The limitation that reporting rules only support a single input causes problems with repeatable rules if the rule requirements multiple inputs.

Repeating rule:

extract enclosingRuleInput [ fooList
    then extract
        FooReport {
            attr1: Attr1Rule, // single input "item" to Attr1Rule  
            attr2: Attr2Func(item, inputType // 2 inputs, "item" and "enclosingRuleInput", for Attr2Func , so unable to use a rule
        }
]

Repeating rule returns a list of FooReport. Each attribute has a rule reference.

type FooReport:
    attr1 string (0..1)
        [ruleReference Attr1Rule]
    attr2 string (0..1)
        [ruleReference Attr2Rule] // rule specified here used for regulatoryReference and "as" rule name, but not extract logic

Rules

reporting rule Attr1Rule from Foo:
    [regulatoryReference "blah blah blah reg reference for Attr1Rule"]
    extract item -> attr1
    as "Foo attr1 rule name"
reporting rule Attr2Rule from Foo:
    [regulatoryReference "blah blah blah reg reference for Attr2Rule"] // this is used in regulation
    empty // unreachable / unused extract code
    as "Foo attr2 rule name" // this used in tabulation
@SimonCockx SimonCockx added enhancement New feature or request subject: syntax This issue is about the syntax of Rosetta labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request subject: syntax This issue is about the syntax of Rosetta
Projects
None yet
Development

No branches or pull requests

2 participants