openmrs-module-fhir2 liquibase problem

Hi everyone,

I’ve configured the OpenMRS environment with an existing database, and everything was working fine. However, after installing the FHIR module and making some requests via the FHIR API for Encounter, Location, and Patient resources, I encountered an issue with the Patient resource. I received the following error:

BaseFhirDao uuid = 001801a2-e7b6-480e-a5db-7fd5635e0fa2
ERROR - SqlExceptionHelper.logExceptions(142) |2023-09-07T11:41:26,093| Table 'jcmenard_openmrs.fhir_patient_identifier_system' doesn't exist
ERROR - ExceptionHandlingInterceptor.createOperationOutcome(140) |2023-09-07T11:41:26,095| Failure during REST processing
ca.uhn.fhir.rest.server.exceptions.InternalErrorException: Failed to call access method: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
        at ca.uhn.fhir.rest.server.method.BaseMethodBinding.invokeServerMethod(BaseMethodBinding.java:272) ~[hapi-fhir-server-5.4.0.jar:?]
        at ca.uhn.fhir.rest.server.method.ReadMethodBinding.invokeServer(ReadMethodBinding.java:176) ~[hapi-fhir-server-5.4.0.jar:?]
        at ca.uhn.fhir.rest.server.method.ReadMethodBinding.invokeServer(ReadMethodBinding.java:58) ~[hapi-fhir-server-5.4.0.jar:?]
        at ca.uhn.fhir.rest.server.method.BaseResourceReturningMethodBinding.doInvokeServer(BaseResourceReturningMethodBinding.java:296) ~[hapi-fhir-server-5.4.0.jar:?]

It appears that Liquibase did not update the database as expected. I would appreciate it if someone could explain why the FHIR API module has the FhirPatientIdentifierSystem class.

Thank you!

The table exists to provide a facility for mapping between OpenMRS’s “Identifier Type” concept and FHIR’s concept of identifier systems.

It should be installed when the module is started. I guess you can try to manually remove the entry for add_fhir_patient_identifier_system_20210507 from the LIQUIBASECHANGELOG table so that it gets reapplied?

3 Likes

Thank you!