Stream: hapi
Topic: database schema
nicola (RIO/SS) (May 29 2019 at 20:19):
Hey HAPI guys - I'm working on a presentation on DevDays about FHIR storage implementations - is there some good top-level overview for HAPI - how data are stored in the database and how search works. As I understand from a codebase you have a resource table for all resources and tables for each search parameter type - is it most popular configuration?
James Agnew (May 31 2019 at 09:29):
I don't know that there are any good online explanations of it unfortunately- But I'd say your understanding is correct FWIW.
nicola (RIO/SS) (May 31 2019 at 10:27):
Thank you, @James Agnew !
Y.T.Dai (Dec 16 2021 at 00:37):
Hello, I'm now useing hapi server, I found that the Schema from hapi docunment is not yet comprehensive.
There is a sample data from https://www.hl7.org/fhir/observation-example-sample-data.json.html
"valueSampledData": {
"origin": {
"value": 2048
},
"period": 10,
"factor": 1.612,
"lowerLimit": -3300,
"upperLimit": 3300,
"dimensions": 1,
"data": "2041 2043 2037 2047 2060 2062 2051 2023 2014 2027 2034 2033 2040 2047 2047 2053"
}
The question is, where can I found "valueSampledData" in Hapi PostgreSQL database? I search for several tabels in database, but still can not find the resoult. Thanks!
James Agnew (Dec 16 2021 at 14:09):
Assuming you haven't added any search parameter indexes on that field (which I wouldn't recommend for a SampledData), you'll find this in the table HFJ_RES_VER
in the column RES_TEXT
. Note that in default config, this column has gzipped contents so you'll need to un-gzip the contents.
Lin Zhang (Dec 16 2021 at 14:34):
For PG, the gzipped json is actually stored in the PG's system table something like "large_object..." that I don't remember its exact name. And hfj_res_ver.res_text just holds the OID for the gzipped data. Right?
James Agnew (Dec 16 2021 at 20:23):
Correct.
Y.T.Dai (Dec 17 2021 at 00:26):
I will check for the information, thanks a lot!
Lin Zhang (Dec 17 2021 at 06:07):
path: yourhapi_dbname.pg_catalog.pg_largeobject
Last updated: Apr 12 2022 at 19:14 UTC