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

split FHIR 4.0.1 conformance artifacts into separate module and exclude by default #3447

Closed
lmsurpre opened this issue Mar 9, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request r4b reindex Resolution of issue will require a $reindex during upgrade

Comments

@lmsurpre
Copy link
Member

lmsurpre commented Mar 9, 2022

Is your feature request related to a problem? Please describe.
After rebasing onto the latest from main, I noticed our build logs filling with messages like the following:

2022-03-09T16:36:39.7405501Z WARNING: Replacing http://hl7.org/fhir/SearchParameter/clinical-patient|4.0.1 [AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient] with http://hl7.org/fhir/SearchParameter/clinical-patient|4.3.0-CIBUILD [AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject.where(resolve() is Patient) | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient]

Because each SearchParameter is now in the registry twice (once for 4.0.1 and once for 4.3.0), we get a conflict on every one.

Describe the solution you'd like
Move the 4.0.1 conformance artifacts from the registry to a separate module and do not include that in the server by default.
If that proves problematic, consider moving just the SearchParameters out.

Describe alternatives you've considered
Add some kind of feature to just always use the newer search parameter definition by default.

Acceptance Criteria

  1. GIVEN a 5.0.0-SNAPSHOT server with no its default config
    WHEN the server starts
    THEN there should be no warnings in the logs during startup (or at least they should be minimal)

Additional context
I thought that we used 4.0.1 structure definitions while validating profiles but, based on local testing, that doesn't actually seem to be the case. I think because we use the snapshot and not the differential, having just the profile (without the StructureDefinition on which its based) is sufficient for runtime validation.

The only time we should need the actual 4.0.1 StructureDefinitions is if we're using a utility like our ProfileBuilder or ExtensionBuilder to actually build new profiles.

We should probably also package up the latest HL7 terminologies into a separate jar. These used to be distributed with the FHIR specification but now they have their own separate packaging. separate issue?

@lmsurpre lmsurpre added the enhancement New feature or request label Mar 9, 2022
lmsurpre added a commit that referenced this issue Mar 10, 2022
lmsurpre added a commit that referenced this issue Mar 10, 2022
lmsurpre added a commit that referenced this issue Mar 10, 2022
Also added core-r4b and this new hl7-terminology modules to the list of
modules in fhir-parent and also added them as dependencies to
fhir-validation.
In the future, I'd like to take these out of the main build and
build+release them separately (similar to fhir-examples).

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Mar 10, 2022
I thought that we needed the hl7.terminology package so that we could
expand the R4B ValueSets, but it turns out the R4B downloads page has
its own "expansions.json" download that contains all of the necessary
ValueSets.

Now only fhir-core-r4b will be packaged on the server by default...if
someone needs the other 3000+ resources from hl7.terminology they can
still add that to the userlib.

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Mar 10, 2022
I thought that we needed the hl7.terminology package so that we could
expand the R4B ValueSets, but it turns out the R4B downloads page has
its own "expansions.json" download that contains all of the necessary
ValueSets.

Now only fhir-core-r4b will be packaged on the server by default...if
someone needs the other 3000+ resources from hl7.terminology they can
still add that to the userlib.

Signed-off-by: Lee Surprenant <[email protected]>
@lmsurpre lmsurpre self-assigned this Mar 14, 2022
@lmsurpre
Copy link
Member Author

While investigating this one, I found some rather significant changes in the way v2 and v3 codesystems are represented in FHIR.

Firstly, the v3 codesystems now use a property-based hierarchy instead of a nested-code hierachy. I opened #3448 for that one, but I think we can do without it if we package the pre-expanded valuesets that are downloadable from the r4b downloads page.

Second, at least the v2 codesystems (and maybe others) now indicate that they are caseSensitive. Previously they were missing this element and, in these cases, our implementation assumed them to be not case-sensitive.
This means that we'll need to re-index to get the proper casing in the db for all affected codesystems.

@lmsurpre lmsurpre added the reindex Resolution of issue will require a $reindex during upgrade label Mar 14, 2022
lmsurpre added a commit that referenced this issue Mar 14, 2022
lmsurpre added a commit that referenced this issue Mar 14, 2022
Also added core-r4b and this new hl7-terminology modules to the list of
modules in fhir-parent and also added them as dependencies to
fhir-validation.
In the future, I'd like to take these out of the main build and
build+release them separately (similar to fhir-examples).

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Mar 14, 2022
I thought that we needed the hl7.terminology package so that we could
expand the R4B ValueSets, but it turns out the R4B downloads page has
its own "expansions.json" download that contains all of the necessary
ValueSets in their expanded form.

Now only fhir-core-r4b will be packaged on the server by default...if
someone needs the other 3000+ resources from hl7.terminology they can
still add that to the userlib.

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Mar 14, 2022
lmsurpre added a commit that referenced this issue Mar 14, 2022
Also added core-r4b and this new hl7-terminology modules to the list of
modules in fhir-parent and also added them as dependencies to
fhir-validation.
In the future, I'd like to take these out of the main build and
build+release them separately (similar to fhir-examples).

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Mar 14, 2022
I thought that we needed the hl7.terminology package so that we could
expand the R4B ValueSets, but it turns out the R4B downloads page has
its own "expansions.json" download that contains all of the necessary
ValueSets in their expanded form.

Now only fhir-core-r4b will be packaged on the server by default...if
someone needs the other 3000+ resources from hl7.terminology they can
still add that to the userlib.

Signed-off-by: Lee Surprenant <[email protected]>
@lmsurpre
Copy link
Member Author

After current PR is approved and merged to r4b branch:

  • separate issue for partially expanded valuesets
    • remove from expansions.json
    • update server logic to avoid this when computing isExpaned
  • add fhir-core-r4 and fhir-hl7-terminology to the CI and release workflows
    • my assumption is fhir-core-r4b will be automatically covered since its now a module under fhir-parent

@lmsurpre lmsurpre added the r4b label Mar 16, 2022
lmsurpre added a commit that referenced this issue Apr 8, 2022
lmsurpre added a commit that referenced this issue Apr 8, 2022
lmsurpre added a commit that referenced this issue Apr 8, 2022
Also added core-r4b and this new hl7-terminology modules to the list of
modules in fhir-parent and also added them as dependencies to
fhir-validation.
In the future, I'd like to take these out of the main build and
build+release them separately (similar to fhir-examples).

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Apr 8, 2022
I thought that we needed the hl7.terminology package so that we could
expand the R4B ValueSets, but it turns out the R4B downloads page has
its own "expansions.json" download that contains all of the necessary
ValueSets in their expanded form.

Now only fhir-core-r4b will be packaged on the server by default...if
someone needs the other 3000+ resources from hl7.terminology they can
still add that to the userlib.

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Apr 22, 2022
lmsurpre added a commit that referenced this issue Apr 22, 2022
lmsurpre added a commit that referenced this issue Apr 22, 2022
Also added core-r4b and this new hl7-terminology modules to the list of
modules in fhir-parent and also added them as dependencies to
fhir-validation.
In the future, I'd like to take these out of the main build and
build+release them separately (similar to fhir-examples).

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue Apr 22, 2022
I thought that we needed the hl7.terminology package so that we could
expand the R4B ValueSets, but it turns out the R4B downloads page has
its own "expansions.json" download that contains all of the necessary
ValueSets in their expanded form.

Now only fhir-core-r4b will be packaged on the server by default...if
someone needs the other 3000+ resources from hl7.terminology they can
still add that to the userlib.

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue May 12, 2022
lmsurpre added a commit that referenced this issue May 12, 2022
lmsurpre added a commit that referenced this issue May 12, 2022
Also added core-r4b and this new hl7-terminology modules to the list of
modules in fhir-parent and also added them as dependencies to
fhir-validation.
In the future, I'd like to take these out of the main build and
build+release them separately (similar to fhir-examples).

Signed-off-by: Lee Surprenant <[email protected]>
lmsurpre added a commit that referenced this issue May 12, 2022
I thought that we needed the hl7.terminology package so that we could
expand the R4B ValueSets, but it turns out the R4B downloads page has
its own "expansions.json" download that contains all of the necessary
ValueSets in their expanded form.

Now only fhir-core-r4b will be packaged on the server by default...if
someone needs the other 3000+ resources from hl7.terminology they can
still add that to the userlib.

Signed-off-by: Lee Surprenant <[email protected]>
@d0roppe
Copy link
Collaborator

d0roppe commented May 27, 2022

Verified based on acceptance criteria. Closing issue

@d0roppe d0roppe closed this as completed May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request r4b reindex Resolution of issue will require a $reindex during upgrade
Projects
None yet
Development

No branches or pull requests

2 participants