-
Notifications
You must be signed in to change notification settings - Fork 156
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
Support slice-specific constraints #2501
Comments
Here is an example of an IdentifiedOrganization. |
JohnTimm
added a commit
that referenced
this issue
Jun 17, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm
added a commit
that referenced
this issue
Jun 21, 2021
* Issue #2501 - add support for slice specific constraints Signed-off-by: John T.E. Timm <johntimm@us.ibm.com> * Issue #2501, #2530 - updates Signed-off-by: John T.E. Timm <johntimm@us.ibm.com> * Issue #2530 - generateProfileConstraint updates Signed-off-by: John T.E. Timm <johntimm@us.ibm.com> * Issue #2501, #2530 - updates Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
We've upgraded to the latest, and I confirm the build is in 4.9.0, and we support slice specific constraints. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a number of profiles where we do slicing and then we have constraints that are specific to one of the slices. It appears that the IBM validation applies all the constraints to all of the slices. If the constraint is expressed assuming the slice discriminator holds true, then this results in validation occurring when it shouldn't.
As an example, we sliced Organization.identifier based on the identifier system. We then had slice-specific validation based on the slices.
In slice A, we said that the identifier.value needed to be 9 digits
In slice B, we said that the identifier.value needed to be 5 or 7 digits.
When we ran examples against the validation, both constraints fired in both slices which raised errors.
The workaround was to include the slice discriminator in the constraint.
This resulted in the constraint changing from 'value.length() = 9' to 'system = 'X' implies value.length() = 9'. We could have also moved the constraint to identifier but we left it at the slice level for documentation purposes, i.e. it reads better if the constraint is specific to the slice.
Acceptance Criteria
NOTE: I have included a sample StructureDefinition that shows the constraint attached to the specific slice.
StructureDefinition-IdentifiedOrganization.txt
The text was updated successfully, but these errors were encountered: