Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
mfiebig committed Dec 3, 2024
1 parent 898bbf6 commit 1885ff6
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 46 deletions.
188 changes: 152 additions & 36 deletions concept/concept.html
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,16 @@ <h1>Notification Management <span class="image right"><img src="../images/gemati
<ul class="sectlevel2">
<li><a href="#_device_registrierung">Device Registrierung</a></li>
<li><a href="#_event_trigger">Event-Trigger</a></li>
<li><a href="#_apple_push">Apple Push</a>
<li><a href="#_push_gateway_2">Push Gateway</a>
<ul class="sectlevel3">
<li><a href="#_push_gateway_2">Push Gateway</a></li>
<li><a href="#_in">IN</a></li>
<li><a href="#_out">OUT</a></li>
</ul>
</li>
<li><a href="#_mobile_app">Mobile App</a>
<ul class="sectlevel3">
<li><a href="#_ios_extension">iOS-Extension:</a></li>
<li><a href="#_android">Android:</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -961,15 +968,42 @@ <h3 id="_event_trigger">Event-Trigger</h3>
</div>
</div>
<div class="sect2">
<h3 id="_apple_push">Apple Push</h3>
<div class="sect3">
<h4 id="_push_gateway_2">Push Gateway</h4>
<h3 id="_push_gateway_2">Push Gateway</h3>
<div class="paragraph">
<p>Endpoint: <a href="http://localhost:8080/push/v1/notify" class="bare">http://localhost:8080/push/v1/notify</a></p>
</div>
<div class="sect3">
<h4 id="_in">IN</h4>
<div class="listingblock">
<div class="title">Push Gateway payload received</div>
<div class="content">
<pre class="highlight"><code class="language-json" data-lang="json">{
"month": "2024-11",
"ciphertext": "asdfdfjksfjklsdljkdsf==",
"prio": "high",
"counts": {},
"devices": [
{
"app_id": "de.gematikkk.app.ios",
"pushkey": "abcd-efghi-jklm-nopq",
"pushkey_ts": 0,
"data": {
"format": "string"
},
"tweaks": {
}
}
]
}</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_out">OUT</h4>
<div class="sect4">
<h5 id="_in">IN</h5>
<h5 id="_apns_apple_push_notification_service">APNS (Apple Push Notification Service)</h5>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. HTTP-Header</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
Expand Down Expand Up @@ -1009,32 +1043,6 @@ <h5 id="_in">IN</h5>
</tbody>
</table>
<div class="listingblock">
<div class="title">Push Gateway payload received</div>
<div class="content">
<pre class="highlight"><code class="language-json" data-lang="json">"notification": {
"month": "2024-11",
"ciphertext": "asdfdfjksfjklsdljkdsf==",
"prio": "high",
"counts": {},
"devices": [
{
"app_id": "de.gematikkk.app.ios",
"pushkey": "abcd-efghi-jklm-nopq",
"pushkey_ts": 0,
"data": {
"format": "string"
},
"tweaks": {
}
}
]
}</code></pre>
</div>
</div>
</div>
<div class="sect4">
<h5 id="_out">OUT</h5>
<div class="listingblock">
<div class="title">Push Gateway payload send to Push Provider</div>
<div class="content">
<pre class="highlight"><code class="language-json" data-lang="json">Payload:
Expand All @@ -1055,9 +1063,69 @@ <h5 id="_out">OUT</h5>
end if</code></pre>
</div>
</div>
<div class="paragraph">
<p>Extension:</p>
</div>
<div class="sect4">
<h5 id="_fcm_firebase_cloud_messaging">FCM (Firebase Cloud Messaging)</h5>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 2. HTTP-Header</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">HTTP-Header</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Wert</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Beschreibung</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>:method</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>POST</code></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>:Content-Type</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>application/json</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Defines the format of the request</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>:access_token_auth</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>true</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Confirms token-based authentication (optional, specific to certain systems)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">authorization</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Authorization</code>: <code>Bearer</code> <code><strong>&lt;provider_token&gt;</strong></code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Required for token-based authentication.</p></td>
</tr>
</tbody>
</table>
<div class="listingblock">
<div class="title">Push Gateway payload send to Push Provider</div>
<div class="content">
<pre class="highlight"><code class="language-json" data-lang="json">Payload:
{
"message":{
"token":"PUSH_KEY",
"android": {
"priority": "HIGH",
}
"data":{
"ciphertext": "ENCRYPTED_DATA_HERE",
"month": notification.month
}
}
}</code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_mobile_app">Mobile App</h3>
<div class="sect3">
<h4 id="_ios_extension">iOS-Extension:</h4>
<div class="listingblock">
<div class="title">Swift Pseudo Code</div>
<div class="content">
Expand All @@ -1084,6 +1152,55 @@ <h5 id="_out">OUT</h5>
}</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_android">Android:</h4>
<div class="listingblock">
<div class="title">Kotlin Pseudo Code</div>
<div class="content">
<pre class="highlight"><code class="language-kotlin" data-lang="kotlin">fun onMessageReceived(
request: RemoteMessage
) {
// Retrieve the push notification payload
val payload = request.data

// Decrypt the ciphertext
val ciphertext = payload["ciphertext"]
val plaintext = decrypt(ciphertext)

// Update the notification content
val eventId = payload["event_id"]

val title = resources.getString(resources.getIdentifier("notification_title_$eventId", "string", packageName))
val body = resources.getString(resources.getIdentifier("notification_body_$eventId", "string", packageName))

// Display the notification using the processed title and body
showNotification(title, body)
}

fun showNotification(title: String?, body: String?) {
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val notificationId = 1

// Create a notification channel for Android O (API 26) and above
if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {
val channel = NotificationChannel(
"default_channel",
"Default Channel",
NotificationManager.IMPORTANCE_HIGH
)
notificationManager.createNotificationChannel(channel)
}
// Build the notification using NotificationCompat for backward compatibility
val notification = NotificationCompat.Builder(this, "default_channel")
.setContentTitle(title)
.setContentText(body)
.build()
// Display the notification with a unique notification ID
notificationManager.notify(notificationId, notification)
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Sync: 22.11.2024 14:56</p>
</div>
Expand All @@ -1092,10 +1209,9 @@ <h5 id="_out">OUT</h5>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-11-28 17:29:23 +0100
Last updated 2024-12-03 11:37:17 +0100
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion concept/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-11-28 17:29:23 +0100
Last updated 2024-12-03 11:37:18 +0100
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion concept/optional-features.html
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ <h3 id="_beispiel">Beispiel</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-11-28 17:29:24 +0100
Last updated 2024-12-03 11:37:18 +0100
</div>
</div>
</body>
Expand Down
16 changes: 8 additions & 8 deletions concept/trigger_ePA.html
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dokument eingestellt durch LEI, DiGA, KTR oder Vertreter</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dokumente</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ja</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">[technische ID]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">gem.epa.xds.put</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
Expand All @@ -491,7 +491,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dokument gelesen durch LEI, DiGA, KTR oder Vertreter</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Dokumente</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">nein</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">[technische ID]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">gem.epa.xds.update</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
Expand Down Expand Up @@ -752,7 +752,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Vertreter hat eine Befugnis für LEI oder DiGA erteilt</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Befugnis</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ja</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">[technische ID]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">gem.epa.entitle.put</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
Expand All @@ -761,7 +761,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Vertreter hat eine Befugnis für LEI oder DiGA gelöscht.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Befugnis</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ja</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">[technische ID]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">gem.epa.entitle.del</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">email an Versicherten, wenn Vertreter eigene Befugnis löscht</p></td>
</tr>
<tr>
Expand Down Expand Up @@ -851,7 +851,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Verborgenes Dokument durch Vertreter wieder sichtbar</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Sichtbarkeit</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ja</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">[technische ID]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">gem.epa.constraint.del oder gem.epa.constraintdoc.del</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
Expand All @@ -869,7 +869,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Kategorie durch Vertreter wieder sichtbar</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Sichtbarkeit</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ja</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">[technische ID]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">gem.epa.constraint.del oder gem.epa.constraintcat.del</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
Expand All @@ -887,7 +887,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
<td class="tableblock halign-left valign-top"><p class="tableblock">Ordner durch Vertreter wieder sichtbar</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Sichtbarkeit</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ja</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">[technische ID]</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">gem.epa.constraint.del oder gem.epa.constraintfolder.del</p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
Expand Down Expand Up @@ -915,7 +915,7 @@ <h2 id="_festlegungen_zum_mvp">Festlegungen zum MVP</h2>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2024-11-28 17:29:23 +0100
Last updated 2024-12-03 11:37:18 +0100
</div>
</div>
</body>
Expand Down

0 comments on commit 1885ff6

Please sign in to comment.