ErxTask
public struct ErxTask : Identifiable, Equatable, Hashable, Codable
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: redeemedOn: avsTransactions: author: prescriptionId: source: medication: medicationRequest: medicationSchedule: patient: practitioner: organization: communications: medicationDispenses: ) ErxTask default initializer
Declaration
Swift
public init( identifier: String, status: Status, flowType: FlowType? = nil, accessCode: String? = nil, fullUrl: String? = nil, authoredOn: String? = nil, lastModified: String? = nil, expiresOn: String? = nil, acceptedUntil: 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] = [] )
-
When the prescription was redeemed (only for scanned tasks)
Declaration
Swift
public var redeemedOn: String?
-
Indicates if the task was fetched from the
FHIRClient
or scanned by theScannerDomain
Declaration
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 <= expireDate
Declaration
Swift
public let acceptedUntil: 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?
-
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]
-
Changes status of
ErxTask
and updates the manual changedredeemedOn
property Use this method only for scannedErxTask
s that have been manually redeemed by the userDeclaration
Swift
public mutating func update(with redeemedOn: String?)
Parameters
redeemedOn
Date string when the
ErxTask
has been redeemed. Passnil
to reset the redeem status -
All defined states of a task (see
See moregemSysL_eRp
chapter 2.4.6 “Konzept Status E-Rezept”)Declaration
Swift
public enum Status : Equatable, RawRepresentable, Codable
-
Declaration
Swift
public enum CoPaymentStatus : String, Equatable, Codable
-
Declaration
Swift
public enum FlowType : Equatable, RawRepresentable, Codable
-
Declaration
Swift
public enum Source : String, Codable
-
Declaration
Swift
public static func < (lhs: ErxTask, rhs: ErxTask) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)