PharmacyFHIRDataSource

public struct PharmacyFHIRDataSource : PharmacyRemoteDataStore

The remote data source for any pharmacy requests

  • Default initializer of PharmacyFHIRDataSource

    Declaration

    Swift

    public init(fhirClient: FHIRClient)

    Parameters

    fhirClient

    FHIRClient which is capable to perform FHIR requests

  • API for requesting pharmacies with the passed search term

    [REQ:gemSpec_eRp_FdV:A_20183]

    Declaration

    Swift

    public func searchPharmacies(by searchTerm: String,
                                 position: Position?,
                                 filter: [String: String])
        -> AnyPublisher<[PharmacyLocation], 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 all PharmacyLocations for the given searchTerm

  • Convenience function for requesting a certain pharmacy by ID

    Declaration

    Swift

    public func fetchPharmacy(by telematikId: String)
        -> AnyPublisher<PharmacyLocation?, Error>

    Parameters

    telematikId

    The Telematik-ID of the pharmacy to be requested

    Return Value

    AnyPublisher that emits the pharmacy or nil when not found

  • Declaration

    Swift

    public func loadAvsCertificates(for locationId: String) -> AnyPublisher<[X509], Error>
  • Declaration

    Swift

    public enum Error : Swift.Error, Equatable