Interface IheFhirProfile
- All Known Implementing Classes:
MhdProfile, PdqmProfile, PixmProfile
public interface IheFhirProfile
Common interface for IHE FHIR profile enumerations.
Provides default implementations for common profile operations.
- Since:
- 5.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCommon prefix of the canonical URLs of the IHE ITI profiles. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends IBaseResource> Gets the resource class associated with this profilegetUrl()Gets the canonical URL of the profiledefault booleanhasProfile(Resource resource) Checks if the resource has this profilestatic <E extends Enum<E> & IheFhirProfile>
Optional<E> profileForResource(IBaseResource resource, Class<E> profileEnum) Finds the profile enum value for a given resourcestatic <E extends Enum<E> & IheFhirProfile>
Optional<E> profileForUrl(String url, Class<E> profileEnum) Finds the profile enum value for a given URLstatic <E extends Enum<E> & IheFhirProfile>
voidregisterProfiles(FhirContext fhirContext, Class<E> profileEnum) Registers all profiles from an enum in the FhirContextstatic <E extends Enum<E> & IheFhirProfile>
voidregisterProfiles(FhirContext fhirContext, Class<E> profileEnum, Class<? extends IBase>... customTypes) Registers all profiles from an enum in the FhirContext, with additional custom typesdefault voidsetProfile(Resource resource) Set the Meta/Profile of the resource
-
Field Details
-
IHE_ITI_PREFIX
Common prefix of the canonical URLs of the IHE ITI profiles. A constant expression, so that the constants built from it remain usable in annotations and in enum constant arguments.- See Also:
-
-
Method Details
-
getUrl
-
getResourceClass
Class<? extends IBaseResource> getResourceClass()Gets the resource class associated with this profile- Returns:
- the resource class, or null if not applicable
-
setProfile
Set the Meta/Profile of the resource- Parameters:
resource- FHIR resource
-
hasProfile
Checks if the resource has this profile- Parameters:
resource- FHIR resource- Returns:
- true if the resource has this profile
-
registerProfiles
static <E extends Enum<E> & IheFhirProfile> void registerProfiles(FhirContext fhirContext, Class<E> profileEnum) Registers all profiles from an enum in the FhirContext- Type Parameters:
E- the enum type- Parameters:
fhirContext- FhirContextprofileEnum- the enum class containing profiles
-
registerProfiles
@SafeVarargs static <E extends Enum<E> & IheFhirProfile> void registerProfiles(FhirContext fhirContext, Class<E> profileEnum, Class<? extends IBase>... customTypes) Registers all profiles from an enum in the FhirContext, with additional custom types- Type Parameters:
E- the enum type- Parameters:
fhirContext- FhirContextprofileEnum- the enum class containing profilescustomTypes- additional custom types to register
-
profileForResource
static <E extends Enum<E> & IheFhirProfile> Optional<E> profileForResource(IBaseResource resource, Class<E> profileEnum) Finds the profile enum value for a given resource- Type Parameters:
E- the enum type- Parameters:
resource- the FHIR resourceprofileEnum- the enum class containing profiles- Returns:
- Optional containing the matching profile, or empty if not found
-
profileForUrl
static <E extends Enum<E> & IheFhirProfile> Optional<E> profileForUrl(String url, Class<E> profileEnum) Finds the profile enum value for a given URL- Type Parameters:
E- the enum type- Parameters:
url- the profile URLprofileEnum- the enum class containing profiles- Returns:
- Optional containing the matching profile, or empty if not found
-