Stream: hapi
Topic: HAPI RI support of latest US Core profiles
Eric Haas (Dec 20 2021 at 22:05):
US Core IG 4.1.0 STU4 Ballot version and several new profiles and profile updates. Who do I ask to see if the HAPI RI can support them for the Jan connectathon? @James Agnew ?
Jens Villadsen (Dec 20 2021 at 22:09):
You can spin up the jpa starter project and declare the IGs in the config
Eric Haas (Dec 23 2021 at 16:22):
OK,,,I assume that works for the custom search parameters as well? and just to confirm this is for the RI at http://hapi.fhir.org/baseR4 ?
Jens Villadsen (Dec 23 2021 at 16:36):
Jens Villadsen said:
You can spin up the jpa starter project and declare the IGs in the config
Let me correct myself - @Eric Haas I suggest that you give it a shot by spinning up the jpa starter project with the IG as part of the configuration
Jens Villadsen (Dec 23 2021 at 16:36):
This one, right? http://hl7.org/fhir/us/core/2022Jan/
Jens Villadsen (Dec 23 2021 at 20:02):
I just tried loading the US Core IG into a vanilla HAPI FHIR jpa starter instance and the loading worked flawlessly. I then posted the patient example from http://hl7.org/fhir/us/core/2022Jan/Patient-example.json.html and tried the search parameter race (http://hl7.org/fhir/us/core/2022Jan/SearchParameter-us-core-race.html) which worked as intended. @Eric Haas from those sparse efforts I would say that it works as intended.
Eric Haas (Jan 04 2022 at 23:30):
OK I am just getting starting on this and confused about how this all works since first time using docker. I have gotten the server running locally with a few tweaks using this CLI command:
docker run -p 8080:8080 -e hapi.fhir.allow_external_references=true -e hapi.fhir.narrative_enabled=false hapiproject/hapi:latest
now I want add US Core profiles using the CLI and tried this variable which did not work:
-e implementationguides=hl7.fhir.us.core#4.1.0
- What is the syntax to add an IG via command line?
- does the container use my local copy of the forked repro by default or do I have to tell where to look for it? ( where does it look by default?)
- After adding the IG, will it validate them as well?
Eric Haas (Jan 05 2022 at 01:10):
tried updating a local config file copying from documentation but keep getting :
Config data resource 'file [[path]/application.yml]' via location 'file:{path]application.yml' does not exist
for example:
docker run -p 8080:8080 -v "$(pwd)/yourLocalFolder:/configs" -e "--spring.config.location=file:///Users/ehaas/Documents/HAPI/hapi-fhir-jpaserver-starter/src/main/resources/application.yaml" hapiproject/hapi:latest
Don't know what I am missing
Eric Haas (Jan 05 2022 at 01:57):
OK fixed that but now getting java memory error....
Eric Haas (Jan 05 2022 at 03:13):
..due to the VSAC package caching. Tried different -Xmx and -Xms flags. but when try 2 or 4M the process just exits.
Jens Villadsen (Jan 05 2022 at 06:31):
You need 4Gigs
Jens Villadsen (Jan 05 2022 at 09:15):
not 4 megs
Jens Villadsen (Jan 05 2022 at 09:15):
@Eric Haas if you can supply me with your application.yaml file I'll have a look
Eric Haas (Jan 05 2022 at 18:14):
ok thanks !!! I fixed the config file issue, will try with gigs
Jens Villadsen (Jan 05 2022 at 18:17):
See eg. https://stackoverflow.com/questions/5374455/what-does-java-option-xmx-stand-for/5374501
Eric Haas (Jan 05 2022 at 21:05):
4 gigs, still a memory error:
docker run -p 8080:8080 -v "$(pwd)/yourLocalFolder:/configs" -e "--spring.config.location=file:///configs/application.yaml" -e JAVA_OPTS="-Xmx4G -Xms4G" hapiproject/hapi:latest
leads to this :sad:
(docker just kicks out to command prompt)
this is local on MacBookAir, @Jens Villadsen what did you do when you got it to run? It seems to me the vsac package seems to be causing memory issue
Jens Villadsen (Jan 05 2022 at 21:59):
@Eric Haas the JVM inside docker cannot expand beyond what your docker supplies. If you attach your config.yaml I'll give it a try
Jens Villadsen (Jan 05 2022 at 22:00):
docker = docker engine
Jens Villadsen (Jan 05 2022 at 22:01):
if you have throttled it down to eg. 0.5 gigs of mem, your JVM cannot expand beyond that
Eric Haas (Jan 05 2022 at 23:42):
do you mean my "application.yaml" file or a another file called "confing.yaml"?
Eric Haas (Jan 05 2022 at 23:43):
here is the application.yaml file:
Jens Villadsen (Jan 05 2022 at 23:58):
your docker engine definetly needs more than 4 gigs of mem - and you probably as well would like to throw the resources in a database and not in a file-based database which your current conf does
Jens Villadsen (Jan 05 2022 at 23:59):
I allocated 7 gigs and then I started seeing other errors probably related to the amount of data in the IG's in combination with the file-based db
Jens Villadsen (Jan 06 2022 at 00:00):
I dont think you even need the -e JAVA_OPTS="-Xmx4G -Xms4G"
Jens Villadsen (Jan 06 2022 at 00:01):
If you do, it should be even greater than 4G
Eric Haas (Jan 06 2022 at 00:09):
OK so if I set up a db then it should work?
Eric Haas (Jan 06 2022 at 00:10):
... and add more to the docker engine
Jens Villadsen (Jan 06 2022 at 00:11):
The odds are better I would say
Jens Villadsen (Jan 06 2022 at 00:12):
you could also do it step wise and use the install_transitive_ig_dependencies
flipped to false and take on IG at a time
Jens Villadsen (Jan 06 2022 at 00:14):
so something like this:
install_transitive_ig_dependencies: false
implementationguides:
## example from registry (packages.fhir.org)
uscore:
name: hl7.fhir.us.core
version: 4.1.0
bulkdata:
name: hl7.fhir.uv.bulkdata
version: 1.0.1
vsac:
name: us.nlm.vsac
version: 0.3.0
Jens Villadsen (Jan 06 2022 at 00:15):
you actually do not need the install_transitive_ig_dependencies
then
Jens Villadsen (Jan 06 2022 at 00:15):
and then install them one at a time and comment out the rest
Jens Villadsen (Jan 06 2022 at 00:16):
stop the server and then rerun the server with the next IG
Jens Villadsen (Jan 06 2022 at 00:16):
starting from vsac
Jens Villadsen (Jan 06 2022 at 00:16):
and your mem consumption probably wont explode then
Jens Villadsen (Jan 06 2022 at 00:17):
but GLHF - I'm off to bed
Eric Haas (Jan 06 2022 at 00:17):
thanks
Jens Villadsen (Jan 06 2022 at 00:19):
keep me posted if it works out for you
Jens Villadsen (Jan 06 2022 at 16:55):
@Eric Haas did you succeed?
Eric Haas (Jan 06 2022 at 20:59):
I am struggling with getting to connect with mySQL, I am missing some steps, I started a mySql in docker and updated the yaml as documented but not connecting.
Jens Villadsen (Jan 06 2022 at 21:13):
You need to do it as a docker Compose setup
Last updated: Apr 12 2022 at 19:14 UTC