-
Notifications
You must be signed in to change notification settings - Fork 160
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
Conversation
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(); |
There was a problem hiding this comment.
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).
fhir-registry/src/main/java/com/ibm/fhir/registry/FHIRRegistry.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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)
fhir-registry/src/main/java/com/ibm/fhir/registry/resource/FHIRRegistryResource.java
Outdated
Show resolved
Hide resolved
8cc9787
to
240745d
Compare
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
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