Package ca.uhn.fhir.util
Class SearchParameterUtil
java.lang.Object
ca.uhn.fhir.util.SearchParameterUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<RuntimeSearchParam>getAllPatientCompartmentRuntimeSearchParams(FhirContext theFhirContext, String theResourceType)getBaseAsStrings(FhirContext theContext, IBaseResource theResource)static StringgetCode(FhirContext theContext, IBaseResource theResource)static StringgetExpression(FhirContext theFhirContext, IBaseResource theResource)static RuntimeSearchParamgetOnlyPatientCompartmentRuntimeSearchParam(FhirContext theFhirContext, String theResourceType)Search the resource definition for a compartment named 'patient' and return its related Search Parameter.static RuntimeSearchParamgetOnlyPatientCompartmentRuntimeSearchParam(RuntimeResourceDefinition runtimeResourceDefinition)static Optional<RuntimeSearchParam>getOnlyPatientSearchParamForResourceType(FhirContext theFhirContext, String theResourceType)Given the resource type, fetch its patient-based search parameter name 1.
-
Constructor Details
-
SearchParameterUtil
public SearchParameterUtil()
-
-
Method Details
-
getBaseAsStrings
-
getOnlyPatientSearchParamForResourceType
public static Optional<RuntimeSearchParam> getOnlyPatientSearchParamForResourceType(FhirContext theFhirContext, String theResourceType)Given the resource type, fetch its patient-based search parameter name 1. Attempt to find one called 'patient' 2. If that fails, find one called 'subject' 3. If that fails, find find by Patient Compartment. 3.1 If that returns >1 result, throw an error 3.2 If that returns 1 result, return it -
getOnlyPatientCompartmentRuntimeSearchParam
public static RuntimeSearchParam getOnlyPatientCompartmentRuntimeSearchParam(FhirContext theFhirContext, String theResourceType)Search the resource definition for a compartment named 'patient' and return its related Search Parameter. -
getOnlyPatientCompartmentRuntimeSearchParam
public static RuntimeSearchParam getOnlyPatientCompartmentRuntimeSearchParam(RuntimeResourceDefinition runtimeResourceDefinition) -
getAllPatientCompartmentRuntimeSearchParams
public static List<RuntimeSearchParam> getAllPatientCompartmentRuntimeSearchParams(FhirContext theFhirContext, String theResourceType) -
getCode
-
getExpression
@Nullable public static String getExpression(FhirContext theFhirContext, IBaseResource theResource)
-