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])
        -> AnyPublisher<[PharmacyLocation], FHIRClient.Error>

    Parameters

    searchTerm

    Search term

    position

    Pharmacy position (latitude and longitude)

    Return Value

    AnyPublisher that emits a list of PharmacyLocations or is empty when not found

  • 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 PharmacyLocation 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 of X509 certificates