I'm in the process of upgrading FHIR Microservices that have been developed using HAPI on FHIR 3.6 to HAPI on FHIR 4.0. I thought I'd share some of my experiences with the HAPI on FHIR community.
There's really about 8 key steps I had to go through, each of which took just a minute or so.
- Changing hapi.server.version in my pom.xml to 4.0.1
- Second, change the name of hapi-fhir-utiltities in my pom.xml file to org.hl7.fhir.utilities
- Replace all instances of org.hl7.instance.model with org.hl7.fhir.dstu2.model
- Undo some of the above by replacing org.hl7.fhir.dstu2.model.api with org.hl7.fhir.instance.model.api.
- Replace some uses of org.hl7.fhir.dstu2.model.TemporalPrecisionEnum with ca.uhn.fhir.model.api.TemporalPrecisionEnum
- Change calls to getServerConformance(HttpServletRequest) to support instead getServerConformance(HttpServletRequest, RequestDetails)
- Eliminate calls to ServerConformanceProvider.initializeOperations() for some of my delegated conformance providers (I have a converter stack that implements STU3 and R4 FHIR APIs over top of a DSTU2 native implementation, it delegates some calls).
- Upgrade from Spring-Boot 1.5.6 to 2.1.1
Along the way I had some other issues to address
- Change some of my patched converter code to deal with API changes and R4 final changes
- Change import org.hl7.fhir.instance.utils.ToolingExtensions to org.hl7.fhir.dstu2.utils.ToolingExtensions
- Remove references to context for various resources
- Clean up some other mintor changes in converters
- Rework my integration with Spring Cloud Sleuth so that I could use release 2.0 (required since I upgraded Spring Boot). This wasn't FHIR related work, but was essential for the Microservice tracing stack. Mostly I got to delete a lot of code, and just figure out how to configure a couple of key things.
- Change an import for LocalServerPort (necessitated by changes to Spring version changes).
All in all, the process has so far been fairly painless for dealing with a framework that has a little bit more than 10,000 lines of code (not counting about 50K lines of version converters which are hand patched). It's taken me about 2 days to get my framework to pass all unit tests, and 90% of that was in the "other issues" space (which means you won't likely have to deal with it). Next up, I'll be applying the upgraded framework to a half-dozen and more microservices to get them to run. I'll let you know how that goes when I get done with it. If all goes well, the rest of it should take me little more than a day.
Keith
0 comments:
Post a Comment