Class GenericPatientIdExtractor
java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.audit.GenericPatientIdExtractor
- All Implemented Interfaces:
PatientIdExtractor
Generic extractor of patient references, independent of the FHIR resource and version
-
Constructor Summary
-
Method Summary
Modifier 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
-
Constructor Details
-
GenericPatientIdExtractor
-
-
Method Details
-
patientReferenceFromResource
Description copied from interface:PatientIdExtractor
Returns the patient reference from a resource orOptional.empty()
if the resource has none.- Specified by:
patientReferenceFromResource
in interfacePatientIdExtractor
- Parameters:
resource
- FHIR resource- Returns:
- patient reference from the resource
-
patientReferenceParameterName
Description copied from interface:PatientIdExtractor
Returns the name of the search parameter that is used to restrict a search to a certain patient- Specified by:
patientReferenceParameterName
in interfacePatientIdExtractor
- Parameters:
resourceName
- resource Name- Returns:
- the name of the patient search parameter
-
patientReferenceFromSearchParameter
Description copied from interface:PatientIdExtractor
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. When a Patient resource is searched, the _id parameter value will be returned.- Specified by:
patientReferenceFromSearchParameter
in interfacePatientIdExtractor
- Parameters:
requestDetails
- HAPI FHIR request details- Returns:
- patient ID from the search parameters
-
patientIdentifierParameterName
- Specified by:
patientIdentifierParameterName
in interfacePatientIdExtractor
-
patientIdentifierFromSearchParameter
Description copied from interface:PatientIdExtractor
Returns 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.- Specified by:
patientIdentifierFromSearchParameter
in interfacePatientIdExtractor
- Parameters:
requestDetails
- HAPI FHIR request details- Returns:
- patient identifier extension from the search parameters
-