@nmshd/connector-tui 2.14.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConnectorTUI.js +3 -3
- package/dist/ConnectorTUIBase.js +1 -4
- package/dist/client/ConnectorClient.js +9 -0
- package/dist/{IdentityDeletionProcessEndpoint.js → client/IdentityDeletionProcessEndpoint.js} +1 -1
- package/dist/mixins/AddIdentityDeletionProcess.js +3 -3
- package/dist/mixins/AddSendPremadeRequestByMessage.js +360 -0
- package/dist/mixins/AddSendRequestByMessage.js +24 -0
- package/dist/mixins/ConnectorTUIBaseWithMixins.js +3 -3
- package/dist/mixins/index.js +1 -0
- package/package.json +9 -9
package/dist/ConnectorTUI.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ConnectorClient } from "@nmshd/connector-sdk";
|
|
2
1
|
import chalk from "chalk";
|
|
3
2
|
import { readFile } from "fs/promises";
|
|
4
3
|
import { DateTime } from "luxon";
|
|
5
4
|
import prompts from "prompts";
|
|
5
|
+
import { ConnectorClient } from "./client/ConnectorClient.js";
|
|
6
6
|
import { ConnectorTUIBaseWithMixins } from "./mixins/index.js";
|
|
7
7
|
export class ConnectorTUI extends ConnectorTUIBaseWithMixins {
|
|
8
8
|
static async create(baseUrl, apiKey) {
|
|
9
|
-
const client = ConnectorClient
|
|
9
|
+
const client = new ConnectorClient({ baseUrl, apiKey });
|
|
10
10
|
const address = (await client.account.getIdentityInfo()).result.address;
|
|
11
11
|
const support = await client.monitoring.getSupport();
|
|
12
12
|
return new ConnectorTUI(client, address, support);
|
|
@@ -18,7 +18,7 @@ export class ConnectorTUI extends ConnectorTUIBaseWithMixins {
|
|
|
18
18
|
await this.#showStartupMessage(connectorVersionInfo);
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
20
20
|
while (true) {
|
|
21
|
-
const activeIdentityDeletionProcess = this.isDebugMode() ? await this.
|
|
21
|
+
const activeIdentityDeletionProcess = this.isDebugMode() ? await this.connectorClient.identityDeletionProcess.getActiveIdentityDeletionProcess() : undefined;
|
|
22
22
|
if (activeIdentityDeletionProcess?.isSuccess && activeIdentityDeletionProcess.result.status === "Approved") {
|
|
23
23
|
const gracePeriodEndsAtDateTime = DateTime.fromISO(activeIdentityDeletionProcess.result.gracePeriodEndsAt);
|
|
24
24
|
if (gracePeriodEndsAtDateTime.diffNow().milliseconds < 0) {
|
package/dist/ConnectorTUIBase.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { RelationshipStatus } from "@nmshd/connector-sdk";
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
3
|
import prompts from "prompts";
|
|
4
|
-
import { IdentityDeletionProcessEndpoint } from "./IdentityDeletionProcessEndpoint.js";
|
|
5
4
|
export class ConnectorTUIBase {
|
|
6
5
|
connectorClient;
|
|
7
6
|
connectorAddress;
|
|
8
7
|
support;
|
|
9
8
|
choices = [];
|
|
10
9
|
choicesInDeletion = [];
|
|
11
|
-
identityDeletionProcessEndpoint;
|
|
12
10
|
constructor(connectorClient, connectorAddress, support) {
|
|
13
11
|
this.connectorClient = connectorClient;
|
|
14
12
|
this.connectorAddress = connectorAddress;
|
|
15
13
|
this.support = support;
|
|
16
|
-
this.identityDeletionProcessEndpoint = new IdentityDeletionProcessEndpoint(this.connectorClient.account["httpClient"]);
|
|
17
14
|
}
|
|
18
15
|
async selectRelationship(prompt, ...status) {
|
|
19
16
|
if (status.length === 0)
|
|
@@ -63,7 +60,7 @@ export class ConnectorTUIBase {
|
|
|
63
60
|
const surname = relationshipAttributes.find((a) => a.content.value["@type"] === "Surname");
|
|
64
61
|
const givenName = relationshipAttributes.find((a) => a.content.value["@type"] === "GivenName");
|
|
65
62
|
if (!!surname || givenName) {
|
|
66
|
-
const name = `${(
|
|
63
|
+
const name = `${(givenName?.content.value).value || ""} ${(surname?.content.value).value || ""}`.trim();
|
|
67
64
|
return {
|
|
68
65
|
title: `${relationship.peer} (${name})`,
|
|
69
66
|
value,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConnectorClient as BaseConnectorClient } from "@nmshd/connector-sdk";
|
|
2
|
+
import { IdentityDeletionProcessEndpoint } from "./IdentityDeletionProcessEndpoint.js";
|
|
3
|
+
export class ConnectorClient extends BaseConnectorClient {
|
|
4
|
+
identityDeletionProcess;
|
|
5
|
+
constructor(config) {
|
|
6
|
+
super(config);
|
|
7
|
+
this.identityDeletionProcess = new IdentityDeletionProcessEndpoint(this.axiosInstance);
|
|
8
|
+
}
|
|
9
|
+
}
|
package/dist/{IdentityDeletionProcessEndpoint.js → client/IdentityDeletionProcessEndpoint.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Endpoint } from "@nmshd/connector-sdk
|
|
1
|
+
import { Endpoint } from "@nmshd/connector-sdk";
|
|
2
2
|
export var IdentityDeletionProcessStatus;
|
|
3
3
|
(function (IdentityDeletionProcessStatus) {
|
|
4
4
|
IdentityDeletionProcessStatus["WaitingForApproval"] = "WaitingForApproval";
|
|
@@ -13,7 +13,7 @@ export function AddIdentityDeletionProcess(Base) {
|
|
|
13
13
|
}
|
|
14
14
|
async identityDeletionProcess() {
|
|
15
15
|
const choices = [];
|
|
16
|
-
const activeIdentityDeletionProcess = await this.
|
|
16
|
+
const activeIdentityDeletionProcess = await this.connectorClient.identityDeletionProcess.getActiveIdentityDeletionProcess();
|
|
17
17
|
if (activeIdentityDeletionProcess.isSuccess) {
|
|
18
18
|
choices.push({ title: "Show IdentityDeletionProcess", value: "Show" });
|
|
19
19
|
if (activeIdentityDeletionProcess.result.status === "Approved") {
|
|
@@ -49,12 +49,12 @@ export function AddIdentityDeletionProcess(Base) {
|
|
|
49
49
|
});
|
|
50
50
|
const oneSecondInDays = 1 / (24 * 60 * 60);
|
|
51
51
|
const lengthOfGracePeriodInDays = confirmation["IdentityDeletionProcess grace period"] ? oneSecondInDays : undefined;
|
|
52
|
-
const identityDeletionProcess = (await this.
|
|
52
|
+
const identityDeletionProcess = (await this.connectorClient.identityDeletionProcess.initiateIdentityDeletionProcess(lengthOfGracePeriodInDays)).result;
|
|
53
53
|
console.log("Identity Deletion Process initiated.");
|
|
54
54
|
this.showIdentityDeletionProcesses(identityDeletionProcess);
|
|
55
55
|
}
|
|
56
56
|
async cancelIdentityDeletionProcess() {
|
|
57
|
-
const identityDeletionProcess = (await this.
|
|
57
|
+
const identityDeletionProcess = (await this.connectorClient.identityDeletionProcess.cancelIdentityDeletionProcess()).result;
|
|
58
58
|
console.log("Identity Deletion Process canceled.");
|
|
59
59
|
this.showIdentityDeletionProcesses(identityDeletionProcess);
|
|
60
60
|
}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import prompts from "prompts";
|
|
2
|
+
export function AddSendPremadeRequestByMessage(Base) {
|
|
3
|
+
return class SendPremadeRequestByMessage extends Base {
|
|
4
|
+
constructor(...args) {
|
|
5
|
+
super(...args);
|
|
6
|
+
this.choices.push({ title: "Send Premade Request By Message", value: this.sendPremadeRequestByMessage });
|
|
7
|
+
}
|
|
8
|
+
async sendPremadeRequestByMessage() {
|
|
9
|
+
const recipient = await this.selectRelationship("Which relationship do you want to send the request to?");
|
|
10
|
+
if (!recipient)
|
|
11
|
+
return console.log("No recipient selected");
|
|
12
|
+
const peer = recipient.peer;
|
|
13
|
+
const whatRequest = await prompts({
|
|
14
|
+
message: "What kind of premade request do you want to send?",
|
|
15
|
+
type: "select",
|
|
16
|
+
name: "requestMethod",
|
|
17
|
+
choices: [
|
|
18
|
+
{
|
|
19
|
+
title: "Gynaecology Questionnaire",
|
|
20
|
+
value: this.createGynaecologyQuestionnaire.bind(this),
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
});
|
|
24
|
+
if (!whatRequest.requestMethod || typeof whatRequest.requestMethod !== "function")
|
|
25
|
+
return;
|
|
26
|
+
const request = await whatRequest.requestMethod(peer);
|
|
27
|
+
const response = await this.connectorClient.outgoingRequests.createRequest({ peer, content: request });
|
|
28
|
+
if (response.isError) {
|
|
29
|
+
console.error("Error while creating LocalRequest", response.error);
|
|
30
|
+
const details = await this.connectorClient.outgoingRequests.canCreateRequest({ peer, content: request });
|
|
31
|
+
console.log("Details: ", details.result);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const messageResponse = await this.connectorClient.messages.sendMessage({
|
|
35
|
+
recipients: [peer],
|
|
36
|
+
content: response.result.content,
|
|
37
|
+
});
|
|
38
|
+
if (messageResponse.isError) {
|
|
39
|
+
return console.error("Error while sending message", messageResponse.error);
|
|
40
|
+
}
|
|
41
|
+
console.log("The following Request was sent:", JSON.stringify(response.result.content, null, 2));
|
|
42
|
+
console.log(`Request sent to '${peer}'`);
|
|
43
|
+
}
|
|
44
|
+
createGynaecologyQuestionnaire(_) {
|
|
45
|
+
const description = `Sehr geehrte Patientin,
|
|
46
|
+
wir begrüßen Sie herzlich in unserer Praxis.
|
|
47
|
+
Bitte beantworten Sie in Ruhe diese ersten Fragen,
|
|
48
|
+
die für eine richtige Beurteilung Ihrer Beschwerden
|
|
49
|
+
und die Behandlung wesentlich sind.
|
|
50
|
+
Selbstverständlich unterliegen alle Ihre Angaben der
|
|
51
|
+
ärztlichen Schweigepflicht.`;
|
|
52
|
+
return {
|
|
53
|
+
"@type": "Request",
|
|
54
|
+
description,
|
|
55
|
+
items: [
|
|
56
|
+
{
|
|
57
|
+
"@type": "RequestItemGroup",
|
|
58
|
+
title: "Persönliche Daten",
|
|
59
|
+
description: "Geben Sie hier Ihre grundlegenden persönlichen Informationen ein.",
|
|
60
|
+
items: [
|
|
61
|
+
{
|
|
62
|
+
"@type": "ReadAttributeRequestItem",
|
|
63
|
+
mustBeAccepted: true,
|
|
64
|
+
query: { "@type": "IdentityAttributeQuery", valueType: "GivenName" },
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"@type": "ReadAttributeRequestItem",
|
|
68
|
+
mustBeAccepted: true,
|
|
69
|
+
query: { "@type": "IdentityAttributeQuery", valueType: "Surname" },
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"@type": "ReadAttributeRequestItem",
|
|
73
|
+
mustBeAccepted: false,
|
|
74
|
+
query: { "@type": "IdentityAttributeQuery", valueType: "StreetAddress" },
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"@type": "ReadAttributeRequestItem",
|
|
78
|
+
mustBeAccepted: false,
|
|
79
|
+
description: "Geben Sie eine Festnetz- oder Mobilfunknummer an.",
|
|
80
|
+
query: { "@type": "IdentityAttributeQuery", valueType: "PhoneNumber" },
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"@type": "ReadAttributeRequestItem",
|
|
84
|
+
mustBeAccepted: false,
|
|
85
|
+
query: { "@type": "IdentityAttributeQuery", valueType: "EMailAddress" },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"@type": "ReadAttributeRequestItem",
|
|
89
|
+
mustBeAccepted: false,
|
|
90
|
+
query: { "@type": "IdentityAttributeQuery", valueType: "BirthDate" },
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"@type": "RequestItemGroup",
|
|
96
|
+
title: "Allgemeines",
|
|
97
|
+
description: "In diesem Bereich werden allgemeine Informationen zu Ihrer Person und Ihrem Versichertenstatus abgefragt",
|
|
98
|
+
items: [
|
|
99
|
+
{
|
|
100
|
+
"@type": "FormFieldRequestItem",
|
|
101
|
+
mustBeAccepted: false,
|
|
102
|
+
title: "Ihr momentaner Hausarzt",
|
|
103
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"@type": "FormFieldRequestItem",
|
|
107
|
+
mustBeAccepted: false,
|
|
108
|
+
title: "Ihre Krankenkasse",
|
|
109
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"@type": "FormFieldRequestItem",
|
|
113
|
+
mustBeAccepted: true,
|
|
114
|
+
title: "Sind Sie privat versichert?",
|
|
115
|
+
settings: { "@type": "BooleanFormFieldSettings" },
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"@type": "FormFieldRequestItem",
|
|
119
|
+
mustBeAccepted: true,
|
|
120
|
+
title: "Körpergröße",
|
|
121
|
+
settings: { "@type": "IntegerFormFieldSettings", unit: "cm" },
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"@type": "FormFieldRequestItem",
|
|
125
|
+
mustBeAccepted: true,
|
|
126
|
+
title: "Gewicht",
|
|
127
|
+
settings: { "@type": "DoubleFormFieldSettings", unit: "kg" },
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"@type": "RequestItemGroup",
|
|
133
|
+
title: "Zyklus und Schwangerschaften",
|
|
134
|
+
description: "Bitte geben Sie hier alle Details zu Zyklus, Schwangerschaften und Geburten oder möglichen Komplikationen an.",
|
|
135
|
+
items: [
|
|
136
|
+
{
|
|
137
|
+
"@type": "FormFieldRequestItem",
|
|
138
|
+
mustBeAccepted: false,
|
|
139
|
+
title: "Wann war Ihre letzte reguläre Regelblutung?",
|
|
140
|
+
description: "Wenn Ihnen das genaue Datum bekannt ist, tragen Sie es hier ein. Andernfalls können Sie im folgenden Feld alternativ einen Zeitraum nennen.",
|
|
141
|
+
settings: { "@type": "DateFormFieldSettings" },
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"@type": "FormFieldRequestItem",
|
|
145
|
+
mustBeAccepted: false,
|
|
146
|
+
title: "Wann war Ihre letzte reguläre Regelblutung?",
|
|
147
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"@type": "FormFieldRequestItem",
|
|
151
|
+
mustBeAccepted: false,
|
|
152
|
+
title: "In welchem Alter hatten Sie Ihre erste Regelblutung?",
|
|
153
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"@type": "FormFieldRequestItem",
|
|
157
|
+
mustBeAccepted: false,
|
|
158
|
+
title: "Wie lange dauert Ihr Zyklus?",
|
|
159
|
+
settings: { "@type": "SelectionFormFieldSettings", options: ["24 Tage", "26 Tage", "28 Tage", "30 Tage", "32 Tage", "kürzer", "länger", "unregelmäßig"] },
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"@type": "FormFieldRequestItem",
|
|
163
|
+
mustBeAccepted: false,
|
|
164
|
+
title: "Anzahl Ihrer natürlichen Geburten",
|
|
165
|
+
settings: { "@type": "IntegerFormFieldSettings" },
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"@type": "FormFieldRequestItem",
|
|
169
|
+
mustBeAccepted: false,
|
|
170
|
+
title: "Geburtsjahre",
|
|
171
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"@type": "FormFieldRequestItem",
|
|
175
|
+
mustBeAccepted: false,
|
|
176
|
+
title: "Anzahl Ihrer Kaiserschnitte",
|
|
177
|
+
settings: { "@type": "IntegerFormFieldSettings" },
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"@type": "FormFieldRequestItem",
|
|
181
|
+
mustBeAccepted: false,
|
|
182
|
+
title: "Geburtsjahre",
|
|
183
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"@type": "FormFieldRequestItem",
|
|
187
|
+
mustBeAccepted: false,
|
|
188
|
+
title: "Anzahl Ihrer Saugglocken- oder Zangengeburten",
|
|
189
|
+
settings: { "@type": "IntegerFormFieldSettings" },
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"@type": "FormFieldRequestItem",
|
|
193
|
+
mustBeAccepted: false,
|
|
194
|
+
title: "Geburtsjahre",
|
|
195
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"@type": "FormFieldRequestItem",
|
|
199
|
+
mustBeAccepted: false,
|
|
200
|
+
title: "Anzahl Ihrer Schwangerschaftsabbrüche",
|
|
201
|
+
settings: { "@type": "IntegerFormFieldSettings" },
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"@type": "FormFieldRequestItem",
|
|
205
|
+
mustBeAccepted: false,
|
|
206
|
+
title: "Jahre",
|
|
207
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"@type": "FormFieldRequestItem",
|
|
211
|
+
mustBeAccepted: false,
|
|
212
|
+
title: "Gab es während der Schwangerschaft oder Geburt Komplikationen?",
|
|
213
|
+
settings: { "@type": "BooleanFormFieldSettings" },
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"@type": "FormFieldRequestItem",
|
|
217
|
+
mustBeAccepted: false,
|
|
218
|
+
title: "Welcher Art waren die Komplikationen?",
|
|
219
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"@type": "FormFieldRequestItem",
|
|
223
|
+
mustBeAccepted: false,
|
|
224
|
+
title: "Hatten Sie jemals eine gynäkologische Operation?",
|
|
225
|
+
settings: { "@type": "BooleanFormFieldSettings" },
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"@type": "RequestItemGroup",
|
|
231
|
+
title: "Verhütung und Vorsorge",
|
|
232
|
+
description: "Nennen Sie uns hier Ihre Verhütungsmethoden und Ihre erfolgten Vorsorgemaßnahmen.",
|
|
233
|
+
items: [
|
|
234
|
+
{
|
|
235
|
+
"@type": "FormFieldRequestItem",
|
|
236
|
+
mustBeAccepted: false,
|
|
237
|
+
title: "Wurde eine HPV-Impfung gegen Gebärmutterhalskrebs durchgeführt?",
|
|
238
|
+
settings: { "@type": "BooleanFormFieldSettings" },
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"@type": "FormFieldRequestItem",
|
|
242
|
+
mustBeAccepted: false,
|
|
243
|
+
title: "Mit welcher Methode verhüten Sie?",
|
|
244
|
+
settings: {
|
|
245
|
+
"@type": "SelectionFormFieldSettings",
|
|
246
|
+
allowMultipleSelection: true,
|
|
247
|
+
options: [
|
|
248
|
+
"keine",
|
|
249
|
+
"Verhütungsstäbchen (Implanon)",
|
|
250
|
+
"Sterilisation",
|
|
251
|
+
"3-Monats-Spritze",
|
|
252
|
+
"Hormonspirae (Mirena, Jaydess)",
|
|
253
|
+
"Sterilisation des Partners",
|
|
254
|
+
"Pflaster",
|
|
255
|
+
"Kondom",
|
|
256
|
+
"Kupferspirale",
|
|
257
|
+
"Nuvaring",
|
|
258
|
+
"Pille",
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"@type": "FormFieldRequestItem",
|
|
264
|
+
mustBeAccepted: false,
|
|
265
|
+
title: "Name der Pille",
|
|
266
|
+
description: "Wenn Sie mit der Pille verhüten, tragen Sie hier bitte den Namen ein.",
|
|
267
|
+
settings: { "@type": "StringFormFieldSettings" },
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"@type": "RequestItemGroup",
|
|
273
|
+
title: "Bekannte Erkrankungen und Infektionen",
|
|
274
|
+
description: "Nennen Sie uns alle Ihnen bekannten Erkrankungen oder Infektionen, die Sie in der Vergangenheit hatten.",
|
|
275
|
+
items: [
|
|
276
|
+
{
|
|
277
|
+
"@type": "FormFieldRequestItem",
|
|
278
|
+
mustBeAccepted: false,
|
|
279
|
+
title: "Haben oder hatten Sie eine der folgenden Erkrankungen oder Infektionen?",
|
|
280
|
+
settings: {
|
|
281
|
+
"@type": "SelectionFormFieldSettings",
|
|
282
|
+
allowMultipleSelection: true,
|
|
283
|
+
options: [
|
|
284
|
+
"Gerinnungsstörung",
|
|
285
|
+
"Bluthochdruck",
|
|
286
|
+
"Herzinfarkt",
|
|
287
|
+
"Diabetes mellitus",
|
|
288
|
+
"HIV",
|
|
289
|
+
"Hormonstörung",
|
|
290
|
+
"Arthrose",
|
|
291
|
+
"Asthma/COPD",
|
|
292
|
+
"Thrombose",
|
|
293
|
+
"Lebererkrankung",
|
|
294
|
+
"Epilepsie",
|
|
295
|
+
"Schilddrüsenerkrankung",
|
|
296
|
+
"Wechseljahrsbeschwerden",
|
|
297
|
+
"Krebserkrankungen",
|
|
298
|
+
"Schlaganfall",
|
|
299
|
+
"Migräne",
|
|
300
|
+
"Nierenerkrankung",
|
|
301
|
+
"Blutungsneigung",
|
|
302
|
+
"Hepatitis",
|
|
303
|
+
"Krampfadern",
|
|
304
|
+
"Harninkontinenz",
|
|
305
|
+
"Osteoporose",
|
|
306
|
+
],
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"@type": "RequestItemGroup",
|
|
313
|
+
title: "Abschließendes und Einwilligungen",
|
|
314
|
+
description: "Bestätigen Sie abschließend die Richtigkeit Ihrer Angaben und geben Sie uns Einwilligungen.",
|
|
315
|
+
items: [
|
|
316
|
+
{
|
|
317
|
+
"@type": "FormFieldRequestItem",
|
|
318
|
+
mustBeAccepted: false,
|
|
319
|
+
title: "Wie finden Sie die Zeitschriftenauswahl in unserem Wartezimmer?",
|
|
320
|
+
description: "1 = sehr schlecht, 10 = sehr gut",
|
|
321
|
+
settings: { "@type": "RatingFormFieldSettings", maxRating: 10 },
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"@type": "FormFieldRequestItem",
|
|
325
|
+
mustBeAccepted: false,
|
|
326
|
+
title: "Wie zufrieden waren Sie mit dem Ablauf der Terminvereinbarung?",
|
|
327
|
+
description: "Vergeben Sie bis zu 5 Sterne, ein Stern bedeutet sehr unzufrieden, 5 Sterne vollstens zufrieden.",
|
|
328
|
+
settings: { "@type": "RatingFormFieldSettings", maxRating: 5 },
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"@type": "FormFieldRequestItem",
|
|
332
|
+
mustBeAccepted: false,
|
|
333
|
+
title: "Wie haben Sie von unserer Praxis erfahren?",
|
|
334
|
+
settings: { "@type": "SelectionFormFieldSettings", options: ["Hausarzt", "Internet", "von Bekannten", "zufällig", "sonstiges"] },
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"@type": "FormFieldRequestItem",
|
|
338
|
+
mustBeAccepted: true,
|
|
339
|
+
title: "Dürfen wir Ihnen Informationen zu unserer Praxis per E-Mail zusenden? ",
|
|
340
|
+
settings: { "@type": "BooleanFormFieldSettings" },
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"@type": "FormFieldRequestItem",
|
|
344
|
+
mustBeAccepted: true,
|
|
345
|
+
title: "Falls nötig bin ich damit einverstanden, dass Arztberichte an meine behandelnden Ärzte geschickt werden.",
|
|
346
|
+
settings: { "@type": "BooleanFormFieldSettings" },
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"@type": "ConsentRequestItem",
|
|
350
|
+
mustBeAccepted: true,
|
|
351
|
+
title: "Bestätigung",
|
|
352
|
+
consent: "Ich bestätige hiermit die Richtigkeit und Vollständigkeit meiner Angaben.",
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
}
|
|
@@ -283,6 +283,15 @@ export function AddSendRequestByMessage(Base) {
|
|
|
283
283
|
type: "text",
|
|
284
284
|
name: "valueType",
|
|
285
285
|
},
|
|
286
|
+
{
|
|
287
|
+
message: "Type in the comma separated tags the fallback attribute should have",
|
|
288
|
+
type: "text",
|
|
289
|
+
format: (value) => value
|
|
290
|
+
.split(",")
|
|
291
|
+
.map((tag) => tag.trim())
|
|
292
|
+
.filter((tag) => tag.length > 0),
|
|
293
|
+
name: "tags",
|
|
294
|
+
},
|
|
286
295
|
]);
|
|
287
296
|
const requestItem = {
|
|
288
297
|
"@type": "ReadAttributeRequestItem",
|
|
@@ -292,6 +301,7 @@ export function AddSendRequestByMessage(Base) {
|
|
|
292
301
|
queryString: result.queryString,
|
|
293
302
|
attributeCreationHints: {
|
|
294
303
|
valueType: result.valueType,
|
|
304
|
+
tags: result.tags.length > 0 ? result.tags : undefined,
|
|
295
305
|
},
|
|
296
306
|
},
|
|
297
307
|
};
|
|
@@ -403,6 +413,15 @@ export function AddSendRequestByMessage(Base) {
|
|
|
403
413
|
type: "text",
|
|
404
414
|
name: "value",
|
|
405
415
|
},
|
|
416
|
+
{
|
|
417
|
+
message: "Type in the comma separated tags your proposed attribute or created attributes should have",
|
|
418
|
+
type: "text",
|
|
419
|
+
format: (value) => value
|
|
420
|
+
.split(",")
|
|
421
|
+
.map((tag) => tag.trim())
|
|
422
|
+
.filter((tag) => tag.length > 0),
|
|
423
|
+
name: "tags",
|
|
424
|
+
},
|
|
406
425
|
]);
|
|
407
426
|
const requestItem = {
|
|
408
427
|
"@type": "ProposeAttributeRequestItem",
|
|
@@ -410,6 +429,10 @@ export function AddSendRequestByMessage(Base) {
|
|
|
410
429
|
query: {
|
|
411
430
|
"@type": "IQLQuery",
|
|
412
431
|
queryString: result.queryString,
|
|
432
|
+
attributeCreationHints: {
|
|
433
|
+
valueType: result.attributeType,
|
|
434
|
+
tags: result.tags.length > 0 ? result.tags : undefined,
|
|
435
|
+
},
|
|
413
436
|
},
|
|
414
437
|
attribute: {
|
|
415
438
|
"@type": "IdentityAttribute",
|
|
@@ -418,6 +441,7 @@ export function AddSendRequestByMessage(Base) {
|
|
|
418
441
|
"@type": result.attributeType,
|
|
419
442
|
value: result.value,
|
|
420
443
|
},
|
|
444
|
+
tags: result.tags.length > 0 ? result.tags : undefined,
|
|
421
445
|
},
|
|
422
446
|
};
|
|
423
447
|
return requestItem;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConnectorTUIBase } from "../ConnectorTUIBase.js";
|
|
2
|
-
import { AddAcceptPendingRelationships, AddAcceptPendingRequests, AddConnectorInfo, AddDecomposeRelationship, AddExit, AddGetAttributesOfRelationship, AddIdentityDeletionProcess, AddSendMail, AddSendRequestByMessage, AddShareRequestByTemplate, AddSync, AddTerminateRelationship, AddUploadFile, } from "./index.js";
|
|
2
|
+
import { AddAcceptPendingRelationships, AddAcceptPendingRequests, AddConnectorInfo, AddDecomposeRelationship, AddExit, AddGetAttributesOfRelationship, AddIdentityDeletionProcess, AddSendMail, AddSendPremadeRequestByMessage, AddSendRequestByMessage, AddShareRequestByTemplate, AddSync, AddTerminateRelationship, AddUploadFile, } from "./index.js";
|
|
3
3
|
export class ConnectorTUIBaseWithMixins
|
|
4
4
|
//
|
|
5
|
-
extends AddExit(AddConnectorInfo(AddDecomposeRelationship(AddTerminateRelationship(AddAcceptPendingRelationships(AddAcceptPendingRequests(AddGetAttributesOfRelationship(AddSendMail(AddSendRequestByMessage(AddShareRequestByTemplate(AddSync(AddUploadFile(AddIdentityDeletionProcess(
|
|
5
|
+
extends AddExit(AddConnectorInfo(AddDecomposeRelationship(AddTerminateRelationship(AddAcceptPendingRelationships(AddAcceptPendingRequests(AddGetAttributesOfRelationship(AddSendMail(AddSendPremadeRequestByMessage(AddSendRequestByMessage(AddShareRequestByTemplate(AddSync(AddUploadFile(AddIdentityDeletionProcess(
|
|
6
6
|
//
|
|
7
|
-
ConnectorTUIBase))))))))))))) {
|
|
7
|
+
ConnectorTUIBase)))))))))))))) {
|
|
8
8
|
}
|
package/dist/mixins/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./AddExit.js";
|
|
|
6
6
|
export * from "./AddGetAttributesOfRelationship.js";
|
|
7
7
|
export * from "./AddIdentityDeletionProcess.js";
|
|
8
8
|
export * from "./AddSendMail.js";
|
|
9
|
+
export * from "./AddSendPremadeRequestByMessage.js";
|
|
9
10
|
export * from "./AddSendRequestByMessage.js";
|
|
10
11
|
export * from "./AddShareRequestByTemplate.js";
|
|
11
12
|
export * from "./AddSync.js";
|
package/package.json
CHANGED
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"watch": "node --watch --import 'data:text/javascript,import { register } from \"node:module\"; import { pathToFileURL } from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' src/run.ts"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nmshd/connector-sdk": "^6.36.
|
|
32
|
-
"axios": "^1.
|
|
33
|
-
"chalk": "^5.6.
|
|
34
|
-
"dotenv": "^17.2.
|
|
35
|
-
"luxon": "^3.7.
|
|
31
|
+
"@nmshd/connector-sdk": "^6.36.6",
|
|
32
|
+
"axios": "^1.12.2",
|
|
33
|
+
"chalk": "^5.6.2",
|
|
34
|
+
"dotenv": "^17.2.2",
|
|
35
|
+
"luxon": "^3.7.2",
|
|
36
36
|
"prompts": "^2.4.2",
|
|
37
37
|
"qrcode-terminal": "^0.12.0",
|
|
38
38
|
"yargs": "^18.0.0"
|
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
"@js-soft/eslint-config-ts": "^2.0.3",
|
|
42
42
|
"@js-soft/license-check": "^1.0.9",
|
|
43
43
|
"@types/luxon": "^3.7.1",
|
|
44
|
-
"@types/node": "^24.
|
|
44
|
+
"@types/node": "^24.5.2",
|
|
45
45
|
"@types/prompts": "^2.4.9",
|
|
46
46
|
"@types/qrcode-terminal": "^0.12.2",
|
|
47
47
|
"@types/yargs": "^17.0.33",
|
|
48
|
-
"eslint": "^9.
|
|
48
|
+
"eslint": "^9.35.0",
|
|
49
49
|
"prettier": "^3.6.2",
|
|
50
50
|
"ts-node": "^10.9.2",
|
|
51
51
|
"typescript": "^5.9.2"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
|
-
"node": ">=22.
|
|
54
|
+
"node": ">=22.19.0"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public",
|
|
58
58
|
"provenance": true
|
|
59
59
|
},
|
|
60
|
-
"version": "2.
|
|
60
|
+
"version": "2.16.0"
|
|
61
61
|
}
|