PharmacyRemoteDataStore
public protocol PharmacyRemoteDataStore
Interface for the remote data store
-
API for requesting pharmacies with the passed search term
[REQ:gemSpec_eRp_FdV:A_20183]
Declaration
Swift
func searchPharmacies(by searchTerm: String, position: Position?, filter: [String: String]) -> AnyPublisher<[PharmacyLocation], PharmacyFHIRDataSource.Error>
Parameters
searchTerm
String that send to the server for filtering the pharmacies response
position
Position (latitude and longitude) of pharmacy
filter
further filter parameters for pharmacies
Return Value
AnyPublisher
that emits allPharmacyLocation
s for the givensearchTerm
-
Convenience function for requesting a certain pharmacy by ID
Declaration
Swift
func fetchPharmacy(by telematikId: String) -> AnyPublisher<PharmacyLocation?, PharmacyFHIRDataSource.Error>
Parameters
telematikId
The Telematik-ID of the pharmacy to be requested
Return Value
AnyPublisher
that emits thePharmacyLocation
or nil when not found -
Load certificates for a given
PharmacyLocation
idDeclaration
Swift
func loadAvsCertificates(for locationId: String) -> AnyPublisher<[X509], PharmacyFHIRDataSource.Error>
Parameters
locationId
id of
PharmacyLocation
from which to load the certificateReturn Value
Emits an array of certificates on success or fails with a
PharmacyFHIRDataSource.Error