Value set in custom FHIR IG has FAILED_TO_EXPAND status in DB, which is causing FHIR profile validation errors

36 views
Skip to first unread message

Ben Reddy

unread,
Jun 30, 2025, 5:25:49 PMJun 30
to HAPI FHIR

We updated our custom FHIR IG from version 0.2.6 to 0.2.8. The application.yaml file has been updated to use 0.2.8 version of the IG. However, after we deployed the IG to our FHIR server, we are seeing a validation error that should’ve been resolved in the latest FHIR IG version.

We are getting an error message that says the following.

<severity value="error"/>

        <code value="processing"/>

        <details>

            <coding>

                <system value="http://hl7.org/fhir/java-core-messageId"/>

                <code value="Terminology_TX_NoValid_12"/>

            </coding>

        </details>

        <diagnostics value="The Coding provided (http://loinc.org#53410-7) is not in the value set 'Organization Submission Message Types' (http://hl7.org/fhir/us/spl/ValueSet/valueset-organizationSubmissionMessageTypes|0.2.6), and a code is required from this value set.  (error message = Unknown code 'http://loinc.org#53410-7' for in-memory expansion of ValueSet 'http://hl7.org/fhir/us/spl/ValueSet/valueset-organizationSubmissionMessageTypes')"/>

        <location value="Bundle.entry[0].resource/*MessageHeader/SampleNoChangeNotificationMessage*/.event.ofType(Coding)"/>

        <location value="Line[21] Col[22]"/>

 

The error message says that the coding 53410-7 is not found in the value set organizationSubmissionMessageTypes, even though we have specified it in the IG. Additionally, I see the error message saying it is coming from the 0.2.6 version of the IG, even though it has been updated to 0.2.8.

I checked the FHIR server database table trm_valueset. I see the row for the value set organizationSubmissionMessageTypes, but it has the expansion_status set as FAILED_TO_EXPAND. This seems to be causing the validation issue. When I run a validation and check the FHIR server logs, I see the following message:

ValueSet.url[http://hl7.org/fhir/us/spl/ValueSet/valueset-topLevelOrganizationTypes] is present in terminology tables but not ready for persistence-backed invocation of operation $validation-code. Will perform in-memory code validation. Current status: FAILED_TO_EXPAND | The ValueSet has been picked up by a scheduled task and pre-expansion has failed.

Most of the rows in the trm_valueset table have the expansion_status set as EXPANDED. Do you know what could be causing the organizationSubmissionMessageTypes value set to fail expansion?

Additionally, all the rows in the table say that all the value sets are for version 0.2.6, even though we are using the updated IG version 0.2.8. Is there a reason why this is not being updated?

The custom FHIR IG we are working with can be found here: https://github.com/HL7/fhir-spl/blob/R5/package/hl7.fhir.us.spl.tgz


Ben Reddy

unread,
Jul 17, 2025, 11:23:23 AMJul 17
to HAPI FHIR
I figured out what was causing the issue. Some time ago, we did a test where we modified application.yaml to have install_mode: STORE_AND_INSTALL parameter for the 0.2.6 version of the implementation guide. However, we got rid of that install_mode parameter for future versions of the IG.

This meant that the database wasn't updating certain tables with data from the latest IG. One of these tables includes the value set table, which was stuck using 0.2.6 versions of data.

By adding the "install_mode: STORE_AND_INSTALL" parameter with the latest IG version 0.2.8 in application.yaml, it will update the tables in the database. After the database is updated, the validation API uses the correct data for validating resources.

Reply all
Reply to author
Forward
0 new messages