Communication
public struct Communication : Equatable, Identifiable, Codable
extension ErxTask.Communication: Comparable, Hashable
Acts as the intermediate data model from a communication resource response and the local store representation
-
Identifier for this communication resource (e.g.: “16d2cfc8-2023-11b2-81e1-783a425d8e87”)
Declaration
Swift
public let identifier: String
-
Profile of the communication resource (e.g.: “ErxCommunicationReply”)
Declaration
Swift
public let profile: Profile
-
Id for the task this communication is related to (e.g.: “39c67d5b-1df3-11b2-80b4-783a425d8e87”
Declaration
Swift
public let taskId: String
-
KVNR of the user (e.g.: “X110461389”)
Declaration
Swift
public let insuranceId: String
-
Telematik id of the sender (e.g. “3-09.2.S.10.743”)
Declaration
Swift
public let telematikId: String
-
Id for every order of prescriptions
Declaration
Swift
public let orderId: String?
-
Date time string representing the time of sending the communication
Declaration
Swift
public let timestamp: String
-
true
if user has interacted with this communication, otherwise false if loaded from serverDeclaration
Swift
public var isRead: Bool
-
JSON string containing informations the actual message (to-do: parse into object)
Declaration
Swift
public let payloadJSON: String
-
Parsed
payloadJSON
intoPayload
or nil if format is wrongDeclaration
Swift
public let payload: Payload?
-
Declaration
Swift
public var id: String { get }
-
Default initializer for a ErxTaskCommunication which represent a ModulesR4.Communication
Declaration
Swift
public init( identifier: String, profile: Profile, taskId: String, userId: String, telematikId: String, orderId: String? = nil, timestamp: String, payloadJSON: String, isRead: Bool = false )
Parameters
identifier
Identifier for this communication resource
profile
communication profile
taskId
Id for the task this communication is related to
userId
KVNR of the use
telematikId
Telematik id of the sender
orderId
Id for every order of prescriptions
timestamp
Date time string representing the time of sending the communication
payloadJSON
Payload contains informations about the actual message
isRead
Indicates if the user has interacted (true) with this communication resource
-
Declaration
Swift
public struct Payload : Codable, Equatable
-
Declaration
Swift
public enum Profile : String, Codable
-
Declaration
Swift
public func hash(into hasher: inout Hasher)