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

issue #2143 - support custom compartment types via extension #2440

Merged
merged 1 commit into from
May 28, 2021

Conversation

lmsurpre
Copy link
Member

@lmsurpre lmsurpre commented May 27, 2021

The CompartmentDefinition resource has a required binding to a fixed
list of compartment types. To support a custom compartments, we will now
look for the http://ibm.com/fhir/extension/custom-compartment-type
extension on this element (when it has no value).

Additionally, I created a constant in fhir-core FHIRConstants for our
base extension url and I updated all the different places we have
extension urls to use it.

Signed-off-by: Lee Surprenant lmsurpre@us.ibm.com

Comment on lines 2615 to 2624
if (paramEntry.getValue().size() != 1) {
log.warning("CompartmentDefinition inclusion criteria must be of type Reference unless they have 1 and only 1 resource target");
continue;
}
compartmentName = paramEntry.getValue().iterator().next();
compartmentId = element.as(FHIR_STRING).getValue();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously, we supported only inclusion criteria that selected elements of type Reference. now we will support elements of type String as well, but only in cases where the compartment type is unambiguous (so that we do not need to check the target resourceType from the reference to determine which compartment the value is for).

Copy link
Contributor

@prb112 prb112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - left one comment (just clarifying code history/decisions with John)

@lmsurpre lmsurpre force-pushed the issue-2143-2 branch 2 times, most recently from 8cc9787 to 240745d Compare May 28, 2021 03:41
The CompartmentDefinition resource has a required binding to a fixed
list of compartment types. To support a custom compartments, we will now
look for the `http://ibm.com/fhir/extension/custom-compartment-type`
extension on this element (when it has no value).

Additionally, I created a constant in fhir-core FHIRConstants for our
base extension url and I updated all the different places we have
extension urls to use it.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Copy link
Collaborator

@JohnTimm JohnTimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lmsurpre lmsurpre merged commit 354d145 into main May 28, 2021
@lmsurpre lmsurpre deleted the issue-2143-2 branch May 28, 2021 19:46
tbieste pushed a commit that referenced this pull request Jun 9, 2021
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants