How do you express reverse chaining in a HAPI FHIR Plain server

Viewed 19
1 Answers

This is another search parameter, a HasParam. There are also HasAndListParam and HasOrListParam variants.

Example:

@Search()
public List<ResearchStudy> searchByHas(@RequiredParam(name=Constants.PARAM_HAS) HasParam has) {

  final var paramName = has.getParameterName();
  final var paramVal = has.getParameterValue();
  final var fieldName = has.getReferenceFieldName();
  final var targetType = has.getTargetResourceType();
   
   List<ResearchStudy> retVal = new ArrayList<Patient>();
   // ...populate...
   return retVal;
}
Related