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

Utilize Subclass Name for DefaultValue and Expressions #3752

Open
Fernananas opened this issue May 16, 2024 · 2 comments
Open

Utilize Subclass Name for DefaultValue and Expressions #3752

Fernananas opened this issue May 16, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request ern schema-app
Milestone

Comments

@Fernananas
Copy link

Is your feature request related to a problem? Please describe.
Description:
Currently, emx2 allows the use of attributes for setting default values and expressions. However, it would be beneficial to extend this functionality to utilize subclass names as well.

Use Case:
For instance, consider a scenario where a treatment class is extended to create specialized treatments such as diabetes treatment (treatmentdiabetes subclass). In this case, it would be useful to set a default value for the "treatment for" attribute to dynamically reflect the subclass name, providing clarity on the type of treatment in the overview.

Describe the solution you'd like
I propose extending emx2 to support the following:

DefaultValue: Allow the use of the subclass name to automatically set default values for specific attributes. For example, setting a default value for the "treatment for" attribute to reflect the subclass name.
Expressions: Enable the use of the subclass name in expressions to perform operations or comparisons based on the subclass type.

Example of how the feature could be utilized in schema configuration:

  defaultValue: $subclass_name  # Use subclass name as default value
expressions:
  is_diabetes_treatment: "subclass_name === 'treatmentdiabetes'"  # Use subclass name in expressions

Describe alternatives you've considered
I tried using current set-up for defaultvalue and expressions, but Didi

This for ERN -ITHACA:

Scherm­afbeelding 2024-05-16 om 09 10 25
@Fernananas Fernananas added enhancement New feature or request schema-app ern labels May 16, 2024
@mswertz mswertz added this to the Sprint 221 milestone May 16, 2024
@mswertz
Copy link
Member

mswertz commented May 16, 2024

Did you try mg_tableclass?

@mswertz
Copy link
Member

mswertz commented May 29, 2024

should be mg_tableclass

@chinook25 chinook25 self-assigned this May 29, 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 ern schema-app
Projects
None yet
Development

No branches or pull requests

4 participants