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>getAllPatientCompartmenRuntimeSearchParams(FhirContext theFhirContext) static List<RuntimeSearchParam>getAllPatientCompartmentRuntimeSearchParamsForResourceType(FhirContext theFhirContext, String theResourceType) getAllResourceTypesThatAreInPatientCompartment(FhirContext theFhirContext) 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.getPatientSearchParamsForResourceType(FhirContext theFhirContext, String theResourceType) Given the resource type, fetch all its patient-based search parameter name that's availablestatic StringgetURL(FhirContext theContext, IBaseResource theResource) static booleanisResourceTypeInPatientCompartment(FhirContext theFhirContext, String theResourceType) Return true if any search parameter in the resource can point at a patient, false otherwisestatic StringstripModifier(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 one by Patient Compartment. 3.1 If that returns >1 result, throw an error 3.2 If that returns 1 result, return it -
getPatientSearchParamsForResourceType
public static Set<String> getPatientSearchParamsForResourceType(FhirContext theFhirContext, String theResourceType) Given the resource type, fetch all its patient-based search parameter name that's available -
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) -
getAllPatientCompartmentRuntimeSearchParamsForResourceType
public static List<RuntimeSearchParam> getAllPatientCompartmentRuntimeSearchParamsForResourceType(FhirContext theFhirContext, String theResourceType) -
getAllPatientCompartmenRuntimeSearchParams
public static List<RuntimeSearchParam> getAllPatientCompartmenRuntimeSearchParams(FhirContext theFhirContext) -
getAllResourceTypesThatAreInPatientCompartment
public static Set<String> getAllResourceTypesThatAreInPatientCompartment(FhirContext theFhirContext) -
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
-