Interface PatientIdExtractor
- All Known Implementing Classes:
- GenericPatientIdExtractor
public interface PatientIdExtractor
Interface used to extract patient references from FHIR resources or search parameters.
 This is useful for obtaining patient context for auditing and other purposes.
- 
Method SummaryModifier and TypeMethodDescriptionpatientIdentifierFromSearchParameter(RequestDetails requestDetails) Returns the patient domain identifier from a search parameter orOptional.empty()if the search has no such parameter or if it is empty.patientIdentifierParameterName(RequestDetails requestDetails) Optional<? extends IBaseReference> patientReferenceFromResource(IBaseResource resource) Returns the patient reference from a resource orOptional.empty()if the resource has none.patientReferenceFromSearchParameter(RequestDetails requestDetails) Returns the patient ID from a search parameter referencing a Patient resource orOptional.empty()if the search has no such parameter or if it is empty.patientReferenceParameterName(String resourceName) Returns the name of the search parameter that is used to restrict a search to a certain patient
- 
Method Details- 
patientReferenceFromResourceReturns the patient reference from a resource orOptional.empty()if the resource has none.- Parameters:
- resource- FHIR resource
- Returns:
- patient reference from the resource
 
- 
patientReferenceParameterNameReturns the name of the search parameter that is used to restrict a search to a certain patient- Parameters:
- resourceName- resource Name
- Returns:
- the name of the patient search parameter
 
- 
patientIdentifierParameterName
- 
patientReferenceFromSearchParameterReturns the patient ID from a search parameter referencing a Patient resource orOptional.empty()if the search has no such parameter or if it is empty. When a Patient resource is searched, the _id parameter value will be returned.- Parameters:
- requestDetails- HAPI FHIR request details
- Returns:
- patient ID from the search parameters
 
- 
patientIdentifierFromSearchParameterReturns the patient domain identifier from a search parameter orOptional.empty()if the search has no such parameter or if it is empty. This is usually a chained token parameter (i.e. subject.identifier=system|value), where this function will return the value. When a Patient resource is searched, the identifier parameter value will be returned.- Parameters:
- requestDetails- HAPI FHIR request details
- Returns:
- patient identifier extension from the search parameters
 
 
-