FHIR Chat · UUID instead of autoincrement · hapi

Stream: hapi

Topic: UUID instead of autoincrement


view this post on Zulip Brian Kaney (Mar 11 2020 at 18:42):

Hi - Is there a setting that I might be missing (in jpaserver-starter) that would use UUIDs instead of an auto-incrementing IDs as a default primary-key/logical-id when creating (POSTing) new resources?

view this post on Zulip James Agnew (Mar 12 2020 at 15:17):

Hey @Brian Kaney - There is indeed a setting for this, called the "server ID strategy". It can be used to force the server to assign a UUID for all resources it assigns IDs to. This is the setting: https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoConfig.java#L760

Sadly, it's not yet exposed as a property in hapi-fhir.properties, so you'd have to manually set it via code.


Last updated: Apr 12 2022 at 19:14 UTC