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

[r4b] Support for generating a 4.0.1-compatible CapabilityStatement #3192

Closed
lmsurpre opened this issue Jan 12, 2022 · 6 comments
Closed

[r4b] Support for generating a 4.0.1-compatible CapabilityStatement #3192

lmsurpre opened this issue Jan 12, 2022 · 6 comments
Assignees
Labels

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Jan 12, 2022

Is your feature request related to a problem? Please describe.
During connectathon, I noted that almost everyone was still using R4.
For almost all use cases, R4B should be backwards-compatible with R4.
R4 clients should be able to work with our R4B server.

However, one challenge we hit is that R4 clients are unable to parse our R4B CapabilityStatement due to a couple issues:

  1. https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.fhirVersion has a required binding to https://www.hl7.org/fhir/valueset-FHIR-version.html and 4.3.0 is not in that list
  2. https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.type has a required binding to https://www.hl7.org/fhir/valueset-resource-types.html and the new R4B resource types are not on that list

Describe the solution you'd like
If a client tries to retrieve our CapabilityStatement with an Accept header that indicates they are using version 4.0 (or 4.0.1), make the following changes to our generated CapabilityStatement:

  1. advertise 4.0.1 in the CapabilityStatement instead of 4.3.0
  2. omit resource types that didn’t exist in 4.0.1

Note that we cache these CapabilityStatements on a per-tenant basis, so for this to work I think we'd need to add the fhir version to the cache's key.

Describe alternatives you've considered
Always generate a 4.3.0 CapabilityStatement and suggest clients update to handle it.

Acceptance Criteria

  1. GIVEN a 5.0.0-SNAPSHOT server
    AND a 4.x client (e.g. our fhir-client from 4.11.1)
    WHEN the client invokes /metadata without specifying the fhirVersion
    THEN it can successfully parse the response (i.e. only R4 resource types are present in the CapabilityStatement)

Also:

  1. GIVEN a 5.0.0-SNAPSHOT server
    AND /fhirserver/core/defaultFhirVersion is set to 4.0 (the default)
    WHEN the client invokes /metadata without specifying the fhirVersion
    THEN the CapabilityStatement says the server supports FHIR version 4.0.1

  2. GIVEN a 5.0.0-SNAPSHOT server
    AND /fhirserver/core/defaultFhirVersion is set to 4.0 (the default)
    WHEN the client invokes /metadata with an accept header of application/fhir+json;fhirVersion=4.3
    THEN the CapabilityStatement says the server supports FHIR version 4.3.0-cibuild

  3. GIVEN a 5.0.0-SNAPSHOT server
    AND /fhirserver/core/defaultFhirVersion is set to 4.3
    WHEN the client invokes /metadata without specifying the fhirVersion
    THEN the CapabilityStatement says the server supports FHIR version 4.3.0-cibuild

  4. GIVEN a 5.0.0-SNAPSHOT server
    AND /fhirserver/core/defaultFhirVersion is set to 4.3
    WHEN the client invokes /metadata with an accept header of application/fhir+json;fhirVersion=4.0
    THEN the CapabilityStatement says the server supports FHIR version 4.0.1

Additional context
some related discussion at https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20technical.20corrections

@lmsurpre lmsurpre added the enhancement New feature or request label Jan 12, 2022
@lmsurpre lmsurpre changed the title Support for generating a 4.0.1-compatible CapabilityStatement [r4b] Support for generating a 4.0.1-compatible CapabilityStatement Jan 12, 2022
lmsurpre added a commit that referenced this issue Jan 12, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@lmsurpre lmsurpre self-assigned this Jan 12, 2022
lmsurpre added a commit that referenced this issue Jan 13, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jan 13, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jan 14, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jan 20, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@lmsurpre
Copy link
Member Author

A related complication: A few of the R4B resource types are incompatible with their R4 equivalents.

  • DeviceDefinition
  • Evidence
  • EvidenceVariable

For these ones, our 5.0 server implementation will only support the R4B flavor of these.
Therefor, I'm thinking to remove these from the 4.0.1 flavor of our CapabilityStatement.

There's also a potential breaking change on the ActivityDefinition and PlanDefinition resource types if a 4.3.0 client creates instances of these with the new subjectCanonical choice type element. Should we remove those from the 4.0.1 flavor of the CapabilityStatement as well?

Some related discussion at
https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414682

@lmsurpre
Copy link
Member Author

Test note: verify that we ignore fhir-server-config resources config values that are no longer valid in R4B.

lmsurpre added a commit that referenced this issue Jan 27, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jan 27, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Jan 28, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 5, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 5, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 5, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 5, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 5, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 5, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 15, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 15, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 16, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Feb 16, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Mar 9, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Mar 9, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Mar 9, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Mar 9, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@lmsurpre lmsurpre added the r4b label Mar 21, 2022
lmsurpre added a commit that referenced this issue Apr 8, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Apr 8, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Apr 22, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Apr 22, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue May 12, 2022
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue May 12, 2022
In the current draft of FHIR R4B, the following resource types have
backwards-incompatible changes:
* DeviceDefinition
* Evidence
* EvidenceVariable

Now these resource types will be omitted from the FHIR 4.0.1 version of
our CapabilityStatement (similar to the types that are newly added in
R4B).

Based on https://chat.fhir.org/#narrow/stream/179166-implementers/topic/R4B.20compatibilty/near/269414612,
I left a TODO in the code about whether to remove ActivityDefinition and
PlanDefinition from the 4.0.1 flavor of the CapabilityStatement as well.
At least for now, they are still advertised and should work for R4
clients just fine (so long as there's no R4B instances that use the new
subjectCanonical choice type).

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

I'm not sure if it was added for this issue or for some other issue, but we introduced a new config parameter /fhirServer/core/defaultFhirVersion and the version that we claim to support in the CapabilityStatement should be contingent on that. I'll update the acceptance criteria in the description to make this more clear.

@d0roppe
Copy link
Collaborator

d0roppe commented May 29, 2022

In testing this it looks like resources that are supposed to show up do not show up when 4.0.1 is the version. Like SubstancePolymer, SubstanceSpecification, and others, Anything starting with Medicinal...

@lmsurpre
Copy link
Member Author

lmsurpre commented May 31, 2022

Those are the types that got dropped in FHIR 4.3.0. When the version is 4.0.1, the design is to only claim support for the set of resources that are backwards-compatible in 4.3.0. That means we will no longer support 4.0.1 resource types that have been removed in 4.3.0. That same idea was the reason for adding warnings to indicate that these resource types shouldn't be used any more which is #3114

@d0roppe
Copy link
Collaborator

d0roppe commented May 31, 2022

Verified this issue based on acceptance criteria, and the latest comment for clarification.

@d0roppe d0roppe closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants