Re: HAPI and FHIR RDF R5?

Hi Tim,

thank you for pointing me to the official hl7.org code for the serializer.
Actually, I found a version of the RdfParser that is in the r5.formats namespace:
https://github.com/hapifhir/org.hl7.fhir.core/blob/master/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/formats/RdfParser.java


So I assume that I can use this one to create R5 compliant FHIR RDF.

Best,
Detlef
________________________________
From: Tim <tmprdh@gmail.com>
Sent: Saturday, July 12, 2025 21:16
To: Detlef Grittner <detlef.grittner@cureator.de>
Cc: Eric Prud'hommeaux <eric@uu3.org>; David Booth <david@dbooth.org>; Erich Bremer <erich.bremer@stonybrook.edu>; w3c semweb HCLS <public-semweb-lifesci@w3.org> <public-semweb-lifesci@w3.org>
Subject: Re: HAPI and FHIR RDF R5?

Hi Detlef,

The RDF serialization used in the official FHIR spec is implemented here: https://github.com/hapifhir/org.hl7.fhir.core

Here are direct links to the most relevant files and where they're used: https://github.com/w3c/hcls-fhir-rdf?tab=readme-ov-file#rdf--shex-generation


R4 example patient: https://hl7.org/fhir/R4/patient-example.ttl.html

R5 example patient: https://hl7.org/fhir/R5/patient-example.ttl.html


HAPI is one implementation that may need to be updated and should probably use some of the updated code from org.hl7.fhir.core.
https://github.com/w3c/hcls-fhir-rdf/issues?q=hapi


Best,
Tim

On Fri, Jul 11, 2025 at 5:57 PM Detlef Grittner <detlef.grittner@cureator.de<mailto:detlef.grittner@cureator.de>> wrote:
Hello Eric,

after we had the discussion about a potential conversion from FHIR RDF R4 to R5, I had a look at the latest release of HAPI/FHIR.

Now I'm a bit puzzled, because even though I've chosen an R5 context the output of the RDFParser looks like R4.
For example it has predicates like fhir:Patient.identifier instead of fhir:identifier.

Looking at the source code on github<https://github.com/hapifhir/hapi-fhir>, I couldn't find any test related to FHIR/RDF and R5 either.
I think this is the currently used RDFParser: https://github.com/hapifhir/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/RDFParser.java

I had a short glance at the constructPredicateName method and it looks like as if it produces R4 style predicates.

Is there even an implementation for HL7/FHIR R5 RDF?

Best Regards,
Detlef



Detlef Grittner MSc, M.A.
CTO

SOHARD Software GmbH
Würzburger Str. 197
90766 Fürth

Phone: +49 (0) 911 97341-54
Fax:   +49 (0) 911 97341-10
E-Mail: detlef.grittner@cureator.de<mailto:detlef.grittner@cureator.de>

Geschäftsführer: Peter Feltens, Sebastian Schnitzenbaumer
Sitz der Gesellschaft: Fürth
Registergericht: Amtsgericht Fürth; HRB 11478


--
Tim Prudhomme

Received on Tuesday, 15 July 2025 16:18:18 UTC