I'm using HAPI-FHIR library and I'm trying to introduce a new search parameter to resource provider for example :
@Read
public Patient getResourceById(@IdParam IdDt id,
@RequiredParam(name="session") String session){}
But I have an exception
"ca.uhn.fhir.rest.server.ConfigurationException: Method[public ca.uhn.fhir.model.dstu.resource.Patient PatientResourceProvider.getResourceById(ca.uhn.fhir.model.primitive.IdDt,java.lang.String)] is not allowed to have a parameter annotated with @ca.uhn.fhir.rest.annotation.RequiredParam(compositeTypes=[], chainBlacklist=[], targetTypes=[], chainWhitelist=[*], name=session)"
Any suggestions how to do it?