Versioning policy

95 views
Skip to first unread message

Dr. Humberto Trejos

unread,
Jul 23, 2023, 2:43:58 PM7/23/23
to HAPI FHIR
Hello.
Is there a way to configure the jpasever starter versioning policy to "no-version" ?

John Moehrke

unread,
Sep 6, 2023, 12:23:06 PM9/6/23
to HAPI FHIR
I too want the answer... is there a way to set no-versioning?

James Agnew

unread,
Sep 6, 2023, 1:15:10 PM9/6/23
to John Moehrke, HAPI FHIR
Unfortunately this isn't yet a feature we support. Would be a great addition though, will add to backlog.


--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/f7604221-9408-44de-96d4-23abd104b1aen%40googlegroups.com.

John Moehrke

unread,
Sep 6, 2023, 1:18:08 PM9/6/23
to James Agnew, HAPI FHIR
thanks for the response. I understand that most will want versioning.
but some settings really do not want/need it. I have one of these
settings where the database will quickly be overwhelmed by historic
versions, and there is no need for these historic versions.

John Moehrke 🔥 Architect: Healthcare Informatics Standards -
Interoperability, Privacy, and Security
IHE Co-Chair IT Infrastructure Planning and Technical
HL7 Co-Chair Security WG, FHIR FMG, FHIR facilitator, and FHIR
Foundation founding member
Employee of By Light -- Contractor to VHA MyHealtheVet
JohnM...@gmail.com | M +1 920-564-2067 | John.M...@bylight.com
https://healthcaresecprivacy.blogspot.com

John Moehrke

unread,
Jan 3, 2024, 10:14:59 AM1/3/24
to James Agnew, HAPI FHIR
Hi James and team,

We had the discussion below in September. I was wondering if there is any movement toward a configurable feature in HAPI server to "not preserve version history". We are running into the history becoming a problem. 

Are there tools for purging version history?

John Moehrke 🔥 Architect: Healthcare Informatics Standards - Interoperability, Privacy, and Security
IHE Co-Chair IT Infrastructure Planning and Technical
HL7 Co-Chair Security WG, FHIR FMG, FHIR facilitator, and 
FHIR Foundation founding member
Employee of By Light -- Contractor to VHA MyHealtheVet
JohnM...@gmail.com  |  M +1 920-564-2067  |  John.M...@bylight.com
 https://healthcaresecprivacy.blogspot.com


On Wed, Sep 6, 2023 at 12:15 PM James Agnew <james...@gmail.com> wrote:

James Agnew

unread,
Jan 3, 2024, 10:59:37 AM1/3/24
to John Moehrke, HAPI FHIR
A setting was actually added to the JpaStorageSettings object called "setResourceDbHistoryEnabled". If this is set to false, the sever won't maintain the history of resources and will instead only keep the current version.

I don't believe anyone has yet added a way to set this in the jpaserver-starter project via the YAML file, but if someone wanted to do so and submit a PR, it would be happily accepted.

Cheers,
James

John Moehrke

unread,
Jan 3, 2024, 11:06:20 AM1/3/24
to James Agnew, HAPI FHIR
Ah, thanks. Is there a version this was added in?

John Moehrke 🔥 Architect: Healthcare Informatics Standards - Interoperability, Privacy, and Security
IHE Co-Chair IT Infrastructure Planning and Technical
HL7 Co-Chair Security WG, FHIR FMG, FHIR facilitator, and 
FHIR Foundation founding member
Employee of By Light -- Contractor to VHA MyHealtheVet
JohnM...@gmail.com  |  M +1 920-564-2067  |  John.M...@bylight.com
 https://healthcaresecprivacy.blogspot.com


James Agnew

unread,
Jan 3, 2024, 11:22:16 AM1/3/24
to John Moehrke, HAPI FHIR
I believe that went in in 6.10.0

Cheers,
James

James Agnew

unread,
Jan 16, 2024, 12:59:55 PM1/16/24
to John Moehrke, HAPI FHIR
Hi John,

With setResoruceDbHistoryEnabled=false, an update to a resource will return to the client exactly as though the server was preserving history still. The version number will be incremented if there are actual changes, and will stay the same if the new contents match the old. The new version number is returned to the client in the Location header.

The only differences are that the server won't actually preserve the previous version in the DB, and the _history on the resource will only ever show one version.

I figure it should be easy enough to create an interceptor that hides the versioning details if someone wants there server to not even look like it understands versions, but so far that hasn't been needed.

Cheers,
James


On Tue, Jan 16, 2024 at 10:12 AM John Moehrke <johnm...@gmail.com> wrote:
Using the setResoruceDbHistoryEnabled to false... will a normal UPDATE of a resource still be recorded as an update of that resource id? Or will this result in a new id being issued as a new resource? My developer thinks that this will result in a new id.

John Moehrke 🔥 Architect: Healthcare Informatics Standards - Interoperability, Privacy, and Security
IHE Co-Chair IT Infrastructure Planning and Technical
HL7 Co-Chair Security WG, FHIR FMG, FHIR facilitator, and 
FHIR Foundation founding member
Employee of By Light -- Contractor to VHA MyHealtheVet
JohnM...@gmail.com  |  M +1 920-564-2067  |  John.M...@bylight.com
 https://healthcaresecprivacy.blogspot.com


On Wed, Jan 3, 2024 at 9:59 AM James Agnew <james...@gmail.com> wrote:

John Moehrke

unread,
Jan 16, 2024, 1:55:49 PM1/16/24
to James Agnew, HAPI FHIR
Thanks. That is what i expected. 

John Moehrke 🔥 Architect: Healthcare Informatics Standards - Interoperability, Privacy, and Security
IHE Co-Chair IT Infrastructure Planning and Technical
HL7 Co-Chair Security WG, FHIR FMG, FHIR facilitator, and 
FHIR Foundation founding member
Employee of By Light -- Contractor to VHA MyHealtheVet
JohnM...@gmail.com  |  M +1 920-564-2067  |  John.M...@bylight.com
 https://healthcaresecprivacy.blogspot.com


Reply all
Reply to author
Forward
0 new messages