
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 String
getCode
(FhirContext theContext, IBaseResource theResource) static String
getExpression
(FhirContext theFhirContext, IBaseResource theResource) static RuntimeSearchParam
getOnlyPatientCompartmentRuntimeSearchParam
(FhirContext theFhirContext, String theResourceType) Search the resource definition for a compartment named 'patient' and return its related Search Parameter.static RuntimeSearchParam
getOnlyPatientCompartmentRuntimeSearchParam
(RuntimeResourceDefinition runtimeResourceDefinition) static Optional<RuntimeSearchParam>
getOnlyPatientSearchParamForResourceType
(FhirContext theFhirContext, String theResourceType) Given the resource type, fetch its patient-based search parameter name 1.static String
getURL
(FhirContext theContext, IBaseResource theResource) static boolean
isResourceTypeInPatientCompartment
(FhirContext theFhirContext, String theResourceType) Return true if any search parameter in the resource can point at a patient, false otherwisestatic String
stripModifier
(String theSearchParam)
-
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) -
isResourceTypeInPatientCompartment
public static boolean isResourceTypeInPatientCompartment(FhirContext theFhirContext, String theResourceType) Return true if any search parameter in the resource can point at a patient, false otherwise -
getCode
-
getURL
-
getExpression
-
stripModifier
-