ErxTask
public struct ErxTask : Identifiable, Equatable, Hashable, Codable, Sendable
extension ErxTask: Comparable
Represents all information needed by the Erx App to handle profiled Erx Tasks (e.g. Prescriptions).
-
init(identifier:status: flowType: accessCode: fullUrl: authoredOn: lastModified: expiresOn: acceptedUntil: lastMedicationDispense: redeemedOn: avsTransactions: author: prescriptionId: source: medication: medicationRequest: medicationSchedule: patient: practitioner: organization: communications: medicationDispenses: deviceRequest: isEURedeemable: isSetEURedeemableByPatient: ) ErxTask default initializer
Declaration
Swift
public init( identifier: String, status: Status, flowType: FlowType, accessCode: String? = nil, fullUrl: String? = nil, authoredOn: String? = nil, lastModified: String? = nil, expiresOn: String? = nil, acceptedUntil: String? = nil, lastMedicationDispense: String? = nil, redeemedOn: String? = nil, avsTransactions: [AVSTransaction] = [], author: String? = nil, prescriptionId: String? = nil, source: Source = .server, medication: ErxMedication? = nil, medicationRequest: ErxMedicationRequest = ErxMedicationRequest(quantity: nil), medicationSchedule: MedicationSchedule? = nil, patient: ErxPatient? = nil, practitioner: ErxPractitioner? = nil, organization: ErxOrganization? = nil, communications: [Communication] = [], medicationDispenses: [ErxMedicationDispense] = [], deviceRequest: ErxDeviceRequest? = nil, isEURedeemable: Bool = false, isSetEURedeemableByPatient: Bool = false )
-
When the prescription was redeemed (only for scanned tasks)
Declaration
Swift
public var redeemedOn: String? -
Indicates if the task was fetched from the
FHIRClientor scanned by theScannerDomainDeclaration
Swift
public let source: Source -
When redeemed via AVSRedeemService a transaction will be produced
Declaration
Swift
public let avsTransactions: [AVSTransaction]
-
Id of the task
Declaration
Swift
public var id: String { get } -
Identifier of the task
Declaration
Swift
public let identifier: String -
Status of the current task
Declaration
Swift
public var status: Status -
FlowType describes type of task (e.G. Direktzuweisung). Usually the flowtype is identical to the beginning of the task id
Declaration
Swift
public var flowType: FlowType -
When the prescription will be expired
Declaration
Swift
public let expiresOn: String? -
When the prescription was authored
Declaration
Swift
public let authoredOn: String? -
Date until which a prescription can be redeemed in the pharmacy without paying the entire prescription. Note that
acceptDate <= expireDateDeclaration
Swift
public let acceptedUntil: String? -
Declaration
Swift
public let lastMedicationDispense: String? -
Prescription Id of the task
Declaration
Swift
public let prescriptionId: String? -
Access code authorizing for the task
Declaration
Swift
public let accessCode: String? -
The full URL composed of id and access code e.g. “https://prescriptionserver.telematik/Task/588780”
Declaration
Swift
public let fullUrl: String? -
This flag is set by the server if the prescription is redeemable in the EU
Declaration
Swift
public let isEURedeemable: Bool -
This flag is set by the user if the prescription is redeemable in the EU
Declaration
Swift
public var isSetEURedeemableByPatient: Bool
-
Timestamp of the last modification of the task
Declaration
Swift
public let lastModified: String? -
Practitioner who authored the prescription
Declaration
Swift
public let author: String? -
The prescribed medication
Declaration
Swift
public let medication: ErxMedication? -
Everything contained in a MedicationRequest resource
Declaration
Swift
public let medicationRequest: ErxMedicationRequest -
Associated MedicationSchedule if setup, nil otherwise
Declaration
Swift
public let medicationSchedule: MedicationSchedule? -
Patient for whom the prescription is issued
Declaration
Swift
public let patient: ErxPatient? -
Practitioner who issued the prescription
Declaration
Swift
public let practitioner: ErxPractitioner? -
Organization that issued the prescription
Declaration
Swift
public let organization: ErxOrganization?
-
List of all communications for the task, sorted by timestamp Every time when redeemed via ErxTaskRepository a Communication will linked to the task
Declaration
Swift
public let communications: [Communication] -
List of actual medication dispenses
Declaration
Swift
public let medicationDispenses: [ErxMedicationDispense] -
DiGa of the task
Declaration
Swift
public let deviceRequest: ErxDeviceRequest? -
Changes status of
ErxTaskand updates the manual changedredeemedOnproperty Use this method only for scannedErxTasks that have been manually redeemed by the userDeclaration
Swift
public mutating func update(with redeemedOn: String?)Parameters
redeemedOnDate string when the
ErxTaskhas been redeemed. Passnilto reset the redeem status -
Declaration
Swift
public func cancelled(on date: String?) -> ErxTask -
All defined states of a task (see
See moregemSysL_eRpchapter 2.4.6 “Konzept Status E-Rezept”)Declaration
Swift
public enum Status : Equatable, RawRepresentable, Codable, Sendable -
Declaration
Swift
public enum CoPaymentStatus : String, Equatable, Codable, Sendable -
Declaration
Swift
public enum FlowType : Equatable, RawRepresentable, Codable, Sendable -
Declaration
Swift
public enum Source : String, Codable, Sendable -
Declaration
Swift
public static func < (lhs: ErxTask, rhs: ErxTask) -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher)
View on GitHub
ErxTask Structure Reference