FHIR Chat · Archive HAPI - CDR - Messages · hapi

Stream: hapi

Topic: Archive HAPI - CDR - Messages


view this post on Zulip Vibin_chander (Sep 14 2020 at 06:09):

We have a lot of messages in our HAPI CDR. We would Like to Archive all the resources in the HAPI CDR from 2020 Jan to 2020 April and then remove those messages from the current CDR repository. Any insights on how to perform this? and what is the best approach to do this?.

We have a huge database size now because of the traffic of messages we receive. We would like to minimize the size of the DB at the same time we would also want to ensure we don't miss any data. So we would like to archive the messages from the HAPI CDR.

view this post on Zulip Gjergj Sheldija (Sep 15 2020 at 07:07):

hi,
depending on the database you use, you can try partitioning it based on dates

view this post on Zulip Vibin_chander (Sep 15 2020 at 10:11):

@Gjergj Sheldija We are using PostgreSQL for CDR. But the databases looks complicated

view this post on Zulip Gjergj Sheldija (Sep 15 2020 at 12:36):

hi @Vibin_chander
it's not really that complicated, if you look at the schema here https://hapifhir.io/hapi-fhir/docs/server_jpa/schema.html you'll notice that you already have everything you need. what you might be missing is how to perform the partition in postgres, which you can find here https://www.postgresql.org/docs/10/ddl-partitioning.html

view this post on Zulip Vibin_chander (Sep 15 2020 at 12:57):

@Gjergj Sheldija Checking the same


Last updated: Apr 12 2022 at 19:14 UTC