Stream: hapi
Topic: Extension with link and searchparameter
Björn Kroll (Nov 22 2018 at 15:29):
We want to setup a HAPI FHIR / JPA Server. It works quite well but now I am stuck. We want to use only a small number of resource types (Patient, DiagnosticReport, Bundle) but we must adopt them. Following requirements do we have:
(1) Extend Patient by a subclass (GbaPatient) and profile
(2) Extend DiagnosticReport by a subclass (GbaDiagnosticReport) and profile
(3) Having a link from MyPatient to a list of MyDiagnosticReport
(4) Having a searchparameter "report" corresponding to this link
What exactly must I implement? Is there a documentation describing this scenario or even a repo where I can find an answer?
Thank you in advance!
PS: So far I have implemented the subclasses includig an extension field of type List<Reference> and a searchparameter. Moreover, I have implemented IResourceProviders as subclasses of JpaResourceProviderDstu3.However, the searchparameter is ignored.
Patrick Werner (Nov 22 2018 at 18:05):
Hi Björn, normally you don't have to extend/ derive classes from the FHIR classes. You could handle profiled classes with the normal hapi code because profiled instances, e.g. a patient is still a patient.
Björn Kroll (Nov 23 2018 at 04:18):
Hi Patrick, thank you for your answer. Right now we are using fluent API to create queries. Do we not have to extend the classes in order to include the link in our searches and also to create a searchparameter which creates an index on the database?
Björn Kroll (Nov 27 2018 at 05:47):
Is it possible to add a searchprameter without extending a class of the JPA HAPI Server?
Last updated: Apr 12 2022 at 19:14 UTC