FHIRClient
extension FHIRClient
-
Convenience function for searching for pharmacies
[REQ:gemSpec_eRp_FdV:A_19984] validate pharmacy data format conforming to FHIR
Declaration
Swift
public func searchPharmacies( by searchTerm: String, position: Position?, filter: [String: String], accessToken: String? = nil ) -> AnyPublisher<[PharmacyLocation], FHIRClient.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
accessToken
access token to interact with the service
Return Value
AnyPublisher
that emits allPharmacyLocation
s for the givensearchTerm
-
Convenience function for requesting a certain pharmacy by ID
Declaration
Swift
public func fetchPharmacy( by telematikId: String, accessToken: String? = nil ) -> AnyPublisher<PharmacyLocation?, Error>
Parameters
telematikId
The Telematik-ID of the pharmacy to be requested
accessToken
access token to interact with the service
Return Value
AnyPublisher
that emits thePharmacyLocation
or nil when not found -
Convenience function for requesting the certificates of a pharmacy
Declaration
Swift
public func loadAvsCertificates(for locationId: String) -> AnyPublisher<[X509], Error>
Parameters
locationId
The id of the pharmacy to be requested
Return Value
AnyPublisher
that emits an array ofX509
certificates