@hedia/recommendation-screen 1.0.7 → 1.1.1
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/App.jsx +36 -15
- package/android/app/src/main/res/values/color.xml +3 -0
- package/android/app/src/main/res/values/styles.xml +3 -0
- package/index.d.ts +3 -3
- package/index.js +23 -7
- package/index.ts +3 -16
- package/ios/HediaRecommendationScreen/Info.plist +80 -57
- package/ios/HediaRecommendationScreen.xcodeproj/project.pbxproj +1085 -807
- package/ios/HediaRecommendationScreen.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/HediaRecommendationScreen.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/Podfile +106 -104
- package/ios/Podfile.lock +474 -0
- package/jest.mock.js +1 -0
- package/package.json +9 -2
- package/src/RecommendationScreen.d.ts +19 -5
- package/src/RecommendationScreen.jsx +69 -33
- package/src/RecommendationScreen.tsx +130 -60
- package/src/assets/activity/Cyclist.png +0 -0
- package/src/assets/activity/Other.png +0 -0
- package/src/assets/activity/Runner.png +0 -0
- package/src/assets/activity/Swimmer.png +0 -0
- package/src/assets/activity/Walk.png +0 -0
- package/src/components/Header.d.ts +1 -5
- package/src/components/Header.jsx +4 -9
- package/src/components/Header.tsx +7 -14
- package/src/components/HediaRecommendationModal.d.ts +26 -0
- package/src/components/HediaRecommendationModal.jsx +207 -0
- package/src/components/HediaRecommendationModal.tsx +231 -0
- package/src/components/InfoBars.jsx +1 -1
- package/src/components/InfoBars.tsx +3 -3
- package/src/components/InvisibleNumberInput.tsx +7 -7
- package/src/components/RecentInsulin.jsx +5 -4
- package/src/components/RecentInsulin.tsx +6 -5
- package/src/components/RecommendedCarbs.jsx +17 -17
- package/src/components/RecommendedCarbs.tsx +24 -24
- package/src/components/RecommendedInsulin.jsx +12 -9
- package/src/components/RecommendedInsulin.tsx +18 -15
- package/src/components/Remeasure.jsx +7 -5
- package/src/components/Remeasure.tsx +15 -13
- package/src/components/TransferToLogbook.jsx +4 -3
- package/src/components/TransferToLogbook.tsx +6 -4
- package/src/components/activity/Activity.d.ts +11 -0
- package/src/components/activity/Activity.jsx +68 -0
- package/src/components/activity/Activity.tsx +74 -0
- package/src/components/activity/ActivityIcon.d.ts +7 -0
- package/src/components/activity/ActivityIcon.jsx +50 -0
- package/src/components/activity/ActivityIcon.tsx +52 -0
- package/src/components/activity/ActivityIntensity.d.ts +5 -0
- package/src/components/activity/ActivityIntensity.jsx +67 -0
- package/src/components/activity/ActivityIntensity.tsx +66 -0
- package/src/components/mood/Emotion.d.ts +12 -0
- package/src/components/{Emotion.jsx → mood/Emotion.jsx} +12 -16
- package/src/components/mood/Emotion.tsx +64 -0
- package/src/components/{MoodIcon.d.ts → mood/MoodIcon.d.ts} +1 -1
- package/src/components/{MoodIcon.jsx → mood/MoodIcon.jsx} +15 -15
- package/src/components/{MoodIcon.tsx → mood/MoodIcon.tsx} +17 -17
- package/src/locale/da/messages.js +1 -1
- package/src/locale/da/messages.po +191 -49
- package/src/locale/en/messages.js +1 -1
- package/src/locale/en/messages.po +193 -51
- package/src/types/enum.d.ts +48 -6
- package/src/types/enum.js +53 -7
- package/src/types/enum.ts +48 -3
- package/src/types/types.d.ts +18 -1
- package/src/types/types.ts +21 -1
- package/src/utils/AttentionMessages.d.ts +21 -0
- package/src/utils/AttentionMessages.js +62 -0
- package/src/utils/AttentionMessages.ts +59 -0
- package/src/utils/Constants.d.ts +16 -1
- package/src/utils/Constants.js +16 -2
- package/src/utils/Constants.ts +20 -1
- package/src/utils/RecommendationError.d.ts +18 -6
- package/src/utils/RecommendationError.js +23 -7
- package/src/utils/RecommendationError.ts +114 -28
- package/src/utils/RecommendationUtils.d.ts +12 -0
- package/src/utils/RecommendationUtils.js +118 -0
- package/src/utils/RecommendationUtils.ts +128 -0
- package/src/utils/Utils.d.ts +3 -1
- package/src/utils/Utils.js +6 -0
- package/src/utils/Utils.ts +13 -5
- package/src/utils/Validations.d.ts +22 -0
- package/src/utils/Validations.js +175 -0
- package/src/utils/Validations.ts +210 -0
- package/src/components/Emotion.d.ts +0 -14
- package/src/components/Emotion.tsx +0 -70
- /package/src/assets/{happy.png → mood/happy.png} +0 -0
- /package/src/assets/{happy_active.png → mood/happy_active.png} +0 -0
- /package/src/assets/{neutral.png → mood/neutral.png} +0 -0
- /package/src/assets/{neutral_active.png → mood/neutral_active.png} +0 -0
- /package/src/assets/{sad.png → mood/sad.png} +0 -0
- /package/src/assets/{sad_active.png → mood/sad_active.png} +0 -0
- /package/src/assets/{semi_happy.png → mood/semi_happy.png} +0 -0
- /package/src/assets/{semi_happy_active.png → mood/semi_happy_active.png} +0 -0
- /package/src/assets/{semi_sad.png → mood/semi_sad.png} +0 -0
- /package/src/assets/{semi_sad_active.png → mood/semi_sad_active.png} +0 -0
|
@@ -13,117 +13,259 @@ msgstr ""
|
|
|
13
13
|
"Language-Team: \n"
|
|
14
14
|
"Plural-Forms: \n"
|
|
15
15
|
|
|
16
|
-
#: src/RecommendationScreen.tsx:
|
|
16
|
+
#: src/RecommendationScreen.tsx:128
|
|
17
17
|
msgid "Active Insulin"
|
|
18
18
|
msgstr "Active Insulin"
|
|
19
19
|
|
|
20
|
-
#: src/components/
|
|
20
|
+
#: src/components/activity/Activity.tsx:17
|
|
21
|
+
msgid "Activity"
|
|
22
|
+
msgstr "Activity"
|
|
23
|
+
|
|
24
|
+
#: src/components/RecommendedCarbs.tsx:46
|
|
21
25
|
msgid "Additional"
|
|
22
26
|
msgstr "Additional"
|
|
23
27
|
|
|
24
|
-
#: src/
|
|
28
|
+
#: src/components/activity/Activity.tsx:32
|
|
29
|
+
msgid "Based on the selected activity your insulin recommendation is reduced by:"
|
|
30
|
+
msgstr "Based on the selected activity your insulin recommendation is reduced by:"
|
|
31
|
+
|
|
32
|
+
#: src/RecommendationScreen.tsx:129
|
|
25
33
|
msgid "Blood Glucose Level"
|
|
26
34
|
msgstr "Blood Glucose Level"
|
|
27
35
|
|
|
28
|
-
#: src/components/RecommendedCarbs.tsx:
|
|
36
|
+
#: src/components/RecommendedCarbs.tsx:101
|
|
29
37
|
msgid "Entered"
|
|
30
38
|
msgstr "Entered"
|
|
31
39
|
|
|
32
|
-
#: src/
|
|
40
|
+
#: src/utils/RecommendationError.ts:24
|
|
41
|
+
msgid "Error. Hedia Calculator does not support an insulin dosis greater that 50 units"
|
|
42
|
+
msgstr "Error. Hedia Calculator does not support an insulin dosis greater that 50 units"
|
|
43
|
+
|
|
44
|
+
#: src/utils/RecommendationError.ts:25
|
|
45
|
+
msgid "Error. Hedia Calculator does not support insulin recommendations with boluses older than 4 hours"
|
|
46
|
+
msgstr "Error. Hedia Calculator does not support insulin recommendations with boluses older than 4 hours"
|
|
47
|
+
|
|
48
|
+
#: src/utils/RecommendationError.ts:14
|
|
49
|
+
msgid "Error. Hedia Calculator does not support your activity intensity value"
|
|
50
|
+
msgstr "Error. Hedia Calculator does not support your activity intensity value"
|
|
51
|
+
|
|
52
|
+
#: src/utils/RecommendationError.ts:22
|
|
53
|
+
msgid "Error. Hedia Calculator does not support your current blood glucose level."
|
|
54
|
+
msgstr "Error. Hedia Calculator does not support your current blood glucose level."
|
|
55
|
+
|
|
56
|
+
#: src/utils/RecommendationError.ts:29
|
|
57
|
+
msgid "Error. Hedia Calculator does not support your current blood glucose unit."
|
|
58
|
+
msgstr "Error. Hedia Calculator does not support your current blood glucose unit."
|
|
59
|
+
|
|
60
|
+
#: src/utils/RecommendationError.ts:28
|
|
61
|
+
msgid "Error. Hedia Calculator does not support your current language."
|
|
62
|
+
msgstr "Error. Hedia Calculator does not support your current language."
|
|
63
|
+
|
|
64
|
+
#: src/utils/RecommendationError.ts:27
|
|
65
|
+
msgid "Error. Hedia Calculator does not support your injection method."
|
|
66
|
+
msgstr "Error. Hedia Calculator does not support your injection method."
|
|
67
|
+
|
|
68
|
+
#: src/utils/RecommendationError.ts:12
|
|
69
|
+
msgid "Error. Hedia Calculator only supports activities with a duration of maximum 60 minutes."
|
|
70
|
+
msgstr "Error. Hedia Calculator only supports activities with a duration of maximum 60 minutes."
|
|
71
|
+
|
|
72
|
+
#: src/utils/RecommendationError.ts:11
|
|
73
|
+
msgid "Error. Please verify that your activity settings are set up correctly."
|
|
74
|
+
msgstr "Error. Please verify that your activity settings are set up correctly."
|
|
75
|
+
|
|
76
|
+
#: src/utils/RecommendationError.ts:15
|
|
77
|
+
msgid "Error. Please verify that your activity target blood glucose value is correct."
|
|
78
|
+
msgstr "Error. Please verify that your activity target blood glucose value is correct."
|
|
79
|
+
|
|
80
|
+
#: src/utils/RecommendationError.ts:20
|
|
81
|
+
msgid "Error. Please verify that your insulin sensitivity value is correct."
|
|
82
|
+
msgstr "Error. Please verify that your insulin sensitivity value is correct."
|
|
83
|
+
|
|
84
|
+
#: src/utils/RecommendationError.ts:21
|
|
85
|
+
msgid "Error. Please verify that your insulin to carb ratio value is correct."
|
|
86
|
+
msgstr "Error. Please verify that your insulin to carb ratio value is correct."
|
|
87
|
+
|
|
88
|
+
#: src/utils/RecommendationError.ts:23
|
|
89
|
+
msgid "Error. Please verify that your target blood glucose value is correct."
|
|
90
|
+
msgstr "Error. Please verify that your target blood glucose value is correct."
|
|
91
|
+
|
|
92
|
+
#: src/utils/RecommendationError.ts:26
|
|
93
|
+
msgid "Error. Please verify your notifications settings."
|
|
94
|
+
msgstr "Error. Please verify your notifications settings."
|
|
95
|
+
|
|
96
|
+
#: src/components/RecommendedCarbs.tsx:100
|
|
33
97
|
msgid "Food"
|
|
34
98
|
msgstr "Food"
|
|
35
99
|
|
|
36
|
-
#: src/components/
|
|
100
|
+
#: src/components/activity/ActivityIntensity.tsx:9
|
|
101
|
+
msgid "Hard"
|
|
102
|
+
msgstr "Hard"
|
|
103
|
+
|
|
104
|
+
#: src/components/RecentInsulin.tsx:16
|
|
37
105
|
msgid "Have you taken insulin within the last 4 hours?"
|
|
38
106
|
msgstr "Have you taken insulin within the last 4 hours?"
|
|
39
107
|
|
|
40
|
-
#: src/utils/RecommendationError.ts:
|
|
41
|
-
msgid "Hedia does not support
|
|
42
|
-
msgstr "Hedia does not support
|
|
108
|
+
#: src/utils/RecommendationError.ts:13
|
|
109
|
+
msgid "Hedia Calculator does not support activities that finished more than 4 hours ago."
|
|
110
|
+
msgstr "Hedia Calculator does not support activities that finished more than 4 hours ago."
|
|
111
|
+
|
|
112
|
+
#: src/utils/RecommendationError.ts:16
|
|
113
|
+
msgid "Hedia Calculator does not support insulin recommendations with more than 300 grams of carbohydrates present."
|
|
114
|
+
msgstr "Hedia Calculator does not support insulin recommendations with more than 300 grams of carbohydrates present."
|
|
43
115
|
|
|
44
|
-
#: src/utils/
|
|
45
|
-
msgid "Hedia
|
|
46
|
-
msgstr "Hedia
|
|
116
|
+
#: src/utils/AttentionMessages.ts:20
|
|
117
|
+
msgid "Hedia doesn't support more than {0} units of insulin per log, but because of the physical activity you entered it has been further reduced by {1}% to {2} units for this log."
|
|
118
|
+
msgstr "Hedia doesn't support more than {0} units of insulin per log, but because of the physical activity you entered it has been further reduced by {1}% to {2} units for this log."
|
|
47
119
|
|
|
48
|
-
#: src/components/Emotion.tsx:
|
|
120
|
+
#: src/components/mood/Emotion.tsx:24
|
|
49
121
|
msgid "How are you feeling?"
|
|
50
122
|
msgstr "How are you feeling?"
|
|
51
123
|
|
|
52
|
-
#: src/components/Header.tsx:
|
|
53
|
-
msgid ""
|
|
54
|
-
"INSULIN
|
|
55
|
-
"RECOMMENDATION"
|
|
56
|
-
msgstr ""
|
|
57
|
-
"INSULIN\n"
|
|
58
|
-
"RECOMMENDATION"
|
|
124
|
+
#: src/components/Header.tsx:23
|
|
125
|
+
msgid "INSULIN{0}RECOMMENDATION"
|
|
126
|
+
msgstr "INSULIN{0}RECOMMENDATION"
|
|
59
127
|
|
|
60
|
-
#: src/utils/
|
|
61
|
-
msgid "
|
|
62
|
-
msgstr "
|
|
128
|
+
#: src/utils/AttentionMessages.ts:9
|
|
129
|
+
msgid "If it is possible, postpone your planned exercise."
|
|
130
|
+
msgstr "If it is possible, postpone your planned exercise."
|
|
63
131
|
|
|
64
|
-
#: src/
|
|
65
|
-
msgid ""
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
132
|
+
#: src/components/HediaRecommendationModal.tsx:35
|
|
133
|
+
msgid "Instead of taking insulin"
|
|
134
|
+
msgstr "Instead of taking insulin"
|
|
135
|
+
|
|
136
|
+
#: src/utils/RecommendationError.ts:16
|
|
137
|
+
#~ msgid "Insulin limit reached, for your safety Hedia will not recommend more than this."
|
|
138
|
+
#~ msgstr "Insulin limit reached, for your safety Hedia will not recommend more than this."
|
|
71
139
|
|
|
72
|
-
#: src/components/
|
|
140
|
+
#: src/components/activity/ActivityIntensity.tsx:7
|
|
141
|
+
msgid "Light"
|
|
142
|
+
msgstr "Light"
|
|
143
|
+
|
|
144
|
+
#: src/components/activity/ActivityIntensity.tsx:8
|
|
145
|
+
msgid "Moderate"
|
|
146
|
+
msgstr "Moderate"
|
|
147
|
+
|
|
148
|
+
#: src/utils/RecommendationError.ts:30
|
|
149
|
+
msgid "More than 15 minutes has passed since this calculation was started.{0}Please go through the calculation steps with new measurements to ensure a safe recommendation."
|
|
150
|
+
msgstr "More than 15 minutes has passed since this calculation was started.{0}Please go through the calculation steps with new measurements to ensure a safe recommendation."
|
|
151
|
+
|
|
152
|
+
#: src/components/HediaRecommendationModal.tsx:20
|
|
153
|
+
msgid "NO"
|
|
154
|
+
msgstr "NO"
|
|
155
|
+
|
|
156
|
+
#: src/components/RecentInsulin.tsx:25
|
|
73
157
|
msgid "No"
|
|
74
158
|
msgstr "No"
|
|
75
159
|
|
|
76
|
-
#: src/components/Remeasure.tsx:
|
|
160
|
+
#: src/components/Remeasure.tsx:38
|
|
77
161
|
msgid "OFF"
|
|
78
162
|
msgstr "OFF"
|
|
79
163
|
|
|
80
|
-
#: src/
|
|
81
|
-
|
|
82
|
-
|
|
164
|
+
#: src/components/HediaRecommendationModal.tsx:17
|
|
165
|
+
#: src/components/HediaRecommendationModal.tsx:76
|
|
166
|
+
msgid "OK"
|
|
167
|
+
msgstr "OK"
|
|
168
|
+
|
|
169
|
+
#: src/components/HediaRecommendationModal.tsx:69
|
|
170
|
+
msgid "OKAY"
|
|
171
|
+
msgstr "OKAY"
|
|
172
|
+
|
|
173
|
+
#: src/components/activity/ActivityIntensity.tsx:10
|
|
174
|
+
msgid "Post"
|
|
175
|
+
msgstr "Post"
|
|
83
176
|
|
|
84
|
-
#: src/components/RecommendedCarbs.tsx:
|
|
177
|
+
#: src/components/RecommendedCarbs.tsx:43
|
|
85
178
|
msgid "Recommended"
|
|
86
179
|
msgstr "Recommended"
|
|
87
180
|
|
|
88
|
-
#: src/components/RecentInsulin.tsx:
|
|
89
|
-
#: src/components/RecommendedInsulin.tsx:
|
|
181
|
+
#: src/components/RecentInsulin.tsx:12
|
|
182
|
+
#: src/components/RecommendedInsulin.tsx:44
|
|
90
183
|
msgid "Recommended amount of insulin"
|
|
91
184
|
msgstr "Recommended amount of insulin"
|
|
92
185
|
|
|
93
|
-
#: src/components/Remeasure.tsx:
|
|
186
|
+
#: src/components/Remeasure.tsx:34
|
|
94
187
|
msgid "Remind me to remeasure in"
|
|
95
188
|
msgstr "Remind me to remeasure in"
|
|
96
189
|
|
|
97
|
-
#: src/components/RecommendedCarbs.tsx:
|
|
190
|
+
#: src/components/RecommendedCarbs.tsx:68
|
|
98
191
|
msgid "Total"
|
|
99
192
|
msgstr "Total"
|
|
100
193
|
|
|
101
|
-
#: src/components/TransferToLogbook.tsx:
|
|
194
|
+
#: src/components/TransferToLogbook.tsx:25
|
|
102
195
|
msgid "Transfer to logbook"
|
|
103
196
|
msgstr "Transfer to logbook"
|
|
104
197
|
|
|
105
|
-
#: src/components/TransferToLogbook.tsx:
|
|
106
|
-
msgid "
|
|
107
|
-
msgstr "
|
|
198
|
+
#: src/components/TransferToLogbook.tsx:28
|
|
199
|
+
msgid "Transferred to logbook"
|
|
200
|
+
msgstr "Transferred to logbook"
|
|
108
201
|
|
|
109
|
-
#: src/components/RecommendedInsulin.tsx:
|
|
202
|
+
#: src/components/RecommendedInsulin.tsx:50
|
|
110
203
|
msgid "Units"
|
|
111
204
|
msgstr "Units"
|
|
112
205
|
|
|
113
|
-
#: src/components/
|
|
206
|
+
#: src/components/activity/ActivityIcon.tsx:25
|
|
207
|
+
msgid "Untitled Activity"
|
|
208
|
+
msgstr "Untitled Activity"
|
|
209
|
+
|
|
210
|
+
#: src/components/HediaRecommendationModal.tsx:29
|
|
211
|
+
msgid "We recommend eating an additional:"
|
|
212
|
+
msgstr "We recommend eating an additional:"
|
|
213
|
+
|
|
214
|
+
#: src/components/HediaRecommendationModal.tsx:39
|
|
215
|
+
msgid "Would you like to add this to your current calculation?"
|
|
216
|
+
msgstr "Would you like to add this to your current calculation?"
|
|
217
|
+
|
|
218
|
+
#: src/components/RecentInsulin.tsx:22
|
|
114
219
|
msgid "Yes"
|
|
115
220
|
msgstr "Yes"
|
|
116
221
|
|
|
117
|
-
#: src/
|
|
118
|
-
|
|
119
|
-
|
|
222
|
+
#: src/utils/AttentionMessages.ts:10
|
|
223
|
+
msgid "You have a high blood glucose level."
|
|
224
|
+
msgstr "You have a high blood glucose level."
|
|
225
|
+
|
|
226
|
+
#: src/utils/AttentionMessages.ts:11
|
|
227
|
+
msgid "You should take rapid-acting insulin and measure ketones."
|
|
228
|
+
msgstr "You should take rapid-acting insulin and measure ketones."
|
|
229
|
+
|
|
230
|
+
#: src/utils/AttentionMessages.ts:8
|
|
231
|
+
msgid "You will be reminded to measure your blood glucose level in 15 min."
|
|
232
|
+
msgstr "You will be reminded to measure your blood glucose level in 15 min."
|
|
233
|
+
|
|
234
|
+
#: src/utils/AttentionMessages.ts:7
|
|
235
|
+
msgid "Your blood glucose level is very low."
|
|
236
|
+
msgstr "Your blood glucose level is very low."
|
|
237
|
+
|
|
238
|
+
#: src/utils/AttentionMessages.ts:6
|
|
239
|
+
msgid "Your blood glucose level is very low. Take glucagon or eat carbohydrates if possible. Seek medical attention."
|
|
240
|
+
msgstr "Your blood glucose level is very low. Take glucagon or eat carbohydrates if possible. Seek medical attention."
|
|
241
|
+
|
|
242
|
+
#: src/utils/AttentionMessages.ts:12
|
|
243
|
+
#: src/utils/AttentionMessages.ts:22
|
|
244
|
+
msgid "Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons."
|
|
245
|
+
msgstr "Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons."
|
|
246
|
+
|
|
247
|
+
#: src/utils/AttentionMessages.ts:13
|
|
248
|
+
msgid "Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons.{1} Hedia never recommends more than {2} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {3}% to {4}."
|
|
249
|
+
msgstr "Your recommendation would have been higher than {0} units of insulin, but it has been limited for safety reasons.{1} Hedia never recommends more than {2} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by {3}% to {4}."
|
|
250
|
+
|
|
251
|
+
#: src/components/RecommendedCarbs.tsx:60
|
|
252
|
+
#: src/components/RecommendedCarbs.tsx:70
|
|
253
|
+
#: src/components/RecommendedCarbs.tsx:103
|
|
120
254
|
msgid "g carbs"
|
|
121
255
|
msgstr "g carbs"
|
|
122
256
|
|
|
123
|
-
#: src/components/
|
|
257
|
+
#: src/components/HediaRecommendationModal.tsx:33
|
|
258
|
+
msgid "grams of carbohydrates"
|
|
259
|
+
msgstr "grams of carbohydrates"
|
|
260
|
+
|
|
261
|
+
#: src/components/Remeasure.tsx:41
|
|
124
262
|
msgid "hours"
|
|
125
263
|
msgstr "hours"
|
|
126
264
|
|
|
127
|
-
#: src/
|
|
265
|
+
#: src/components/activity/Activity.tsx:24
|
|
266
|
+
msgid "min"
|
|
267
|
+
msgstr "min"
|
|
268
|
+
|
|
269
|
+
#: src/RecommendationScreen.tsx:128
|
|
128
270
|
msgid "units"
|
|
129
271
|
msgstr "units"
|
package/src/types/enum.d.ts
CHANGED
|
@@ -5,6 +5,13 @@ export declare enum MoodEnum {
|
|
|
5
5
|
SemiHappy = 4,
|
|
6
6
|
Happy = 5
|
|
7
7
|
}
|
|
8
|
+
export declare enum ActivityEnum {
|
|
9
|
+
Running = 0,
|
|
10
|
+
Walking = 1,
|
|
11
|
+
Cycling = 2,
|
|
12
|
+
Swimming = 3,
|
|
13
|
+
Other = 4
|
|
14
|
+
}
|
|
8
15
|
export declare enum BGUnit {
|
|
9
16
|
MMOL_L = "mmol/l",
|
|
10
17
|
MG_DL = "mg/dl"
|
|
@@ -18,13 +25,30 @@ export declare enum Languages {
|
|
|
18
25
|
da = "da",
|
|
19
26
|
en = "en"
|
|
20
27
|
}
|
|
28
|
+
export declare enum ActivityInterval {
|
|
29
|
+
fromZero = "fromZero",
|
|
30
|
+
fromThirty = "fromThirty",
|
|
31
|
+
fromFortysix = "fromFortysix"
|
|
32
|
+
}
|
|
21
33
|
export declare enum RecommendationErrorEnum {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
ActivityDuration = 0,
|
|
35
|
+
ActivityTargetBGL = 1,
|
|
36
|
+
ActivitySettings = 2,
|
|
37
|
+
ActivityDate = 3,
|
|
38
|
+
ActivityIntensity = 4,
|
|
39
|
+
BolusInsulinDosis = 5,
|
|
40
|
+
BolusInsulinSecondsPassed = 6,
|
|
41
|
+
CarbohydrateLimit = 7,
|
|
42
|
+
InsulinLimit = 8,
|
|
43
|
+
InsulinSensitivity = 9,
|
|
44
|
+
InsulinToCarbsRatio = 10,
|
|
45
|
+
CurrentBGL = 11,
|
|
46
|
+
TargetBGL = 12,
|
|
47
|
+
UserReminder = 13,
|
|
48
|
+
Language = 14,
|
|
49
|
+
InjectionMethod = 15,
|
|
50
|
+
Unit = 16,
|
|
51
|
+
TimeoutLimit = 17
|
|
28
52
|
}
|
|
29
53
|
export declare enum Milliseconds {
|
|
30
54
|
Second = 1000,
|
|
@@ -32,3 +56,21 @@ export declare enum Milliseconds {
|
|
|
32
56
|
Hour = 3600000,
|
|
33
57
|
Day = 86400000
|
|
34
58
|
}
|
|
59
|
+
export declare enum BgLevel {
|
|
60
|
+
SevereHypoglycemia = 0,
|
|
61
|
+
Hypoglycemia = 1,
|
|
62
|
+
MildHypoglycemia = 2,
|
|
63
|
+
Normoglycemia = 3,
|
|
64
|
+
NormoglycemiaUnder5MMOL = 4,
|
|
65
|
+
MildHyperglycemia = 5,
|
|
66
|
+
Hyperglycemia = 6,
|
|
67
|
+
SevereHyperglycemia = 7,
|
|
68
|
+
UnsupportedBGLevel = 8,
|
|
69
|
+
BGLevelNotProvided = 9
|
|
70
|
+
}
|
|
71
|
+
export declare enum RecommendationReminders {
|
|
72
|
+
ReminderOff = 0,
|
|
73
|
+
Reminder15Minutes = 0.25,
|
|
74
|
+
Reminder60Minutes = 1,
|
|
75
|
+
HediaReminderDefault = 1.5
|
|
76
|
+
}
|
package/src/types/enum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Milliseconds = exports.RecommendationErrorEnum = exports.Languages = exports.InjectionMethod = exports.BGUnit = exports.MoodEnum = void 0;
|
|
3
|
+
exports.RecommendationReminders = exports.BgLevel = exports.Milliseconds = exports.RecommendationErrorEnum = exports.ActivityInterval = exports.Languages = exports.InjectionMethod = exports.BGUnit = exports.ActivityEnum = exports.MoodEnum = void 0;
|
|
4
4
|
var MoodEnum;
|
|
5
5
|
(function (MoodEnum) {
|
|
6
6
|
MoodEnum[MoodEnum["Sad"] = 1] = "Sad";
|
|
@@ -9,6 +9,14 @@ var MoodEnum;
|
|
|
9
9
|
MoodEnum[MoodEnum["SemiHappy"] = 4] = "SemiHappy";
|
|
10
10
|
MoodEnum[MoodEnum["Happy"] = 5] = "Happy";
|
|
11
11
|
})(MoodEnum = exports.MoodEnum || (exports.MoodEnum = {}));
|
|
12
|
+
var ActivityEnum;
|
|
13
|
+
(function (ActivityEnum) {
|
|
14
|
+
ActivityEnum[ActivityEnum["Running"] = 0] = "Running";
|
|
15
|
+
ActivityEnum[ActivityEnum["Walking"] = 1] = "Walking";
|
|
16
|
+
ActivityEnum[ActivityEnum["Cycling"] = 2] = "Cycling";
|
|
17
|
+
ActivityEnum[ActivityEnum["Swimming"] = 3] = "Swimming";
|
|
18
|
+
ActivityEnum[ActivityEnum["Other"] = 4] = "Other";
|
|
19
|
+
})(ActivityEnum = exports.ActivityEnum || (exports.ActivityEnum = {}));
|
|
12
20
|
var BGUnit;
|
|
13
21
|
(function (BGUnit) {
|
|
14
22
|
BGUnit["MMOL_L"] = "mmol/l";
|
|
@@ -25,14 +33,32 @@ var Languages;
|
|
|
25
33
|
Languages["da"] = "da";
|
|
26
34
|
Languages["en"] = "en";
|
|
27
35
|
})(Languages = exports.Languages || (exports.Languages = {}));
|
|
36
|
+
var ActivityInterval;
|
|
37
|
+
(function (ActivityInterval) {
|
|
38
|
+
ActivityInterval["fromZero"] = "fromZero";
|
|
39
|
+
ActivityInterval["fromThirty"] = "fromThirty";
|
|
40
|
+
ActivityInterval["fromFortysix"] = "fromFortysix";
|
|
41
|
+
})(ActivityInterval = exports.ActivityInterval || (exports.ActivityInterval = {}));
|
|
28
42
|
var RecommendationErrorEnum;
|
|
29
43
|
(function (RecommendationErrorEnum) {
|
|
30
|
-
RecommendationErrorEnum[RecommendationErrorEnum["
|
|
31
|
-
RecommendationErrorEnum[RecommendationErrorEnum["
|
|
32
|
-
RecommendationErrorEnum[RecommendationErrorEnum["
|
|
33
|
-
RecommendationErrorEnum[RecommendationErrorEnum["
|
|
34
|
-
RecommendationErrorEnum[RecommendationErrorEnum["
|
|
35
|
-
RecommendationErrorEnum[RecommendationErrorEnum["
|
|
44
|
+
RecommendationErrorEnum[RecommendationErrorEnum["ActivityDuration"] = 0] = "ActivityDuration";
|
|
45
|
+
RecommendationErrorEnum[RecommendationErrorEnum["ActivityTargetBGL"] = 1] = "ActivityTargetBGL";
|
|
46
|
+
RecommendationErrorEnum[RecommendationErrorEnum["ActivitySettings"] = 2] = "ActivitySettings";
|
|
47
|
+
RecommendationErrorEnum[RecommendationErrorEnum["ActivityDate"] = 3] = "ActivityDate";
|
|
48
|
+
RecommendationErrorEnum[RecommendationErrorEnum["ActivityIntensity"] = 4] = "ActivityIntensity";
|
|
49
|
+
RecommendationErrorEnum[RecommendationErrorEnum["BolusInsulinDosis"] = 5] = "BolusInsulinDosis";
|
|
50
|
+
RecommendationErrorEnum[RecommendationErrorEnum["BolusInsulinSecondsPassed"] = 6] = "BolusInsulinSecondsPassed";
|
|
51
|
+
RecommendationErrorEnum[RecommendationErrorEnum["CarbohydrateLimit"] = 7] = "CarbohydrateLimit";
|
|
52
|
+
RecommendationErrorEnum[RecommendationErrorEnum["InsulinLimit"] = 8] = "InsulinLimit";
|
|
53
|
+
RecommendationErrorEnum[RecommendationErrorEnum["InsulinSensitivity"] = 9] = "InsulinSensitivity";
|
|
54
|
+
RecommendationErrorEnum[RecommendationErrorEnum["InsulinToCarbsRatio"] = 10] = "InsulinToCarbsRatio";
|
|
55
|
+
RecommendationErrorEnum[RecommendationErrorEnum["CurrentBGL"] = 11] = "CurrentBGL";
|
|
56
|
+
RecommendationErrorEnum[RecommendationErrorEnum["TargetBGL"] = 12] = "TargetBGL";
|
|
57
|
+
RecommendationErrorEnum[RecommendationErrorEnum["UserReminder"] = 13] = "UserReminder";
|
|
58
|
+
RecommendationErrorEnum[RecommendationErrorEnum["Language"] = 14] = "Language";
|
|
59
|
+
RecommendationErrorEnum[RecommendationErrorEnum["InjectionMethod"] = 15] = "InjectionMethod";
|
|
60
|
+
RecommendationErrorEnum[RecommendationErrorEnum["Unit"] = 16] = "Unit";
|
|
61
|
+
RecommendationErrorEnum[RecommendationErrorEnum["TimeoutLimit"] = 17] = "TimeoutLimit";
|
|
36
62
|
})(RecommendationErrorEnum = exports.RecommendationErrorEnum || (exports.RecommendationErrorEnum = {}));
|
|
37
63
|
var Milliseconds;
|
|
38
64
|
(function (Milliseconds) {
|
|
@@ -41,3 +67,23 @@ var Milliseconds;
|
|
|
41
67
|
Milliseconds[Milliseconds["Hour"] = 3600000] = "Hour";
|
|
42
68
|
Milliseconds[Milliseconds["Day"] = 86400000] = "Day";
|
|
43
69
|
})(Milliseconds = exports.Milliseconds || (exports.Milliseconds = {}));
|
|
70
|
+
var BgLevel;
|
|
71
|
+
(function (BgLevel) {
|
|
72
|
+
BgLevel[BgLevel["SevereHypoglycemia"] = 0] = "SevereHypoglycemia";
|
|
73
|
+
BgLevel[BgLevel["Hypoglycemia"] = 1] = "Hypoglycemia";
|
|
74
|
+
BgLevel[BgLevel["MildHypoglycemia"] = 2] = "MildHypoglycemia";
|
|
75
|
+
BgLevel[BgLevel["Normoglycemia"] = 3] = "Normoglycemia";
|
|
76
|
+
BgLevel[BgLevel["NormoglycemiaUnder5MMOL"] = 4] = "NormoglycemiaUnder5MMOL";
|
|
77
|
+
BgLevel[BgLevel["MildHyperglycemia"] = 5] = "MildHyperglycemia";
|
|
78
|
+
BgLevel[BgLevel["Hyperglycemia"] = 6] = "Hyperglycemia";
|
|
79
|
+
BgLevel[BgLevel["SevereHyperglycemia"] = 7] = "SevereHyperglycemia";
|
|
80
|
+
BgLevel[BgLevel["UnsupportedBGLevel"] = 8] = "UnsupportedBGLevel";
|
|
81
|
+
BgLevel[BgLevel["BGLevelNotProvided"] = 9] = "BGLevelNotProvided";
|
|
82
|
+
})(BgLevel = exports.BgLevel || (exports.BgLevel = {}));
|
|
83
|
+
var RecommendationReminders;
|
|
84
|
+
(function (RecommendationReminders) {
|
|
85
|
+
RecommendationReminders[RecommendationReminders["ReminderOff"] = 0] = "ReminderOff";
|
|
86
|
+
RecommendationReminders[RecommendationReminders["Reminder15Minutes"] = 0.25] = "Reminder15Minutes";
|
|
87
|
+
RecommendationReminders[RecommendationReminders["Reminder60Minutes"] = 1] = "Reminder60Minutes";
|
|
88
|
+
RecommendationReminders[RecommendationReminders["HediaReminderDefault"] = 1.5] = "HediaReminderDefault";
|
|
89
|
+
})(RecommendationReminders = exports.RecommendationReminders || (exports.RecommendationReminders = {}));
|
package/src/types/enum.ts
CHANGED
|
@@ -6,6 +6,14 @@ export enum MoodEnum {
|
|
|
6
6
|
Happy = 5,
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
export enum ActivityEnum {
|
|
10
|
+
Running,
|
|
11
|
+
Walking,
|
|
12
|
+
Cycling,
|
|
13
|
+
Swimming,
|
|
14
|
+
Other,
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
export enum BGUnit {
|
|
10
18
|
MMOL_L = "mmol/l",
|
|
11
19
|
MG_DL = "mg/dl",
|
|
@@ -21,13 +29,30 @@ export enum Languages {
|
|
|
21
29
|
da = "da",
|
|
22
30
|
en = "en",
|
|
23
31
|
}
|
|
32
|
+
export enum ActivityInterval {
|
|
33
|
+
fromZero = `fromZero`,
|
|
34
|
+
fromThirty = `fromThirty`,
|
|
35
|
+
fromFortysix = `fromFortysix`,
|
|
36
|
+
}
|
|
24
37
|
|
|
25
38
|
export enum RecommendationErrorEnum {
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
ActivityDuration,
|
|
40
|
+
ActivityTargetBGL,
|
|
41
|
+
ActivitySettings,
|
|
42
|
+
ActivityDate,
|
|
43
|
+
ActivityIntensity,
|
|
44
|
+
BolusInsulinDosis,
|
|
45
|
+
BolusInsulinSecondsPassed,
|
|
28
46
|
CarbohydrateLimit,
|
|
29
47
|
InsulinLimit,
|
|
30
|
-
|
|
48
|
+
InsulinSensitivity,
|
|
49
|
+
InsulinToCarbsRatio,
|
|
50
|
+
CurrentBGL,
|
|
51
|
+
TargetBGL,
|
|
52
|
+
UserReminder,
|
|
53
|
+
Language,
|
|
54
|
+
InjectionMethod,
|
|
55
|
+
Unit,
|
|
31
56
|
TimeoutLimit,
|
|
32
57
|
}
|
|
33
58
|
|
|
@@ -37,3 +62,23 @@ export enum Milliseconds {
|
|
|
37
62
|
Hour = 3600000,
|
|
38
63
|
Day = 86400000,
|
|
39
64
|
}
|
|
65
|
+
|
|
66
|
+
export enum BgLevel {
|
|
67
|
+
SevereHypoglycemia,
|
|
68
|
+
Hypoglycemia,
|
|
69
|
+
MildHypoglycemia,
|
|
70
|
+
Normoglycemia,
|
|
71
|
+
NormoglycemiaUnder5MMOL,
|
|
72
|
+
MildHyperglycemia,
|
|
73
|
+
Hyperglycemia,
|
|
74
|
+
SevereHyperglycemia,
|
|
75
|
+
UnsupportedBGLevel,
|
|
76
|
+
BGLevelNotProvided,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export enum RecommendationReminders {
|
|
80
|
+
ReminderOff = 0,
|
|
81
|
+
Reminder15Minutes = 0.25,
|
|
82
|
+
Reminder60Minutes = 1,
|
|
83
|
+
HediaReminderDefault = 1.5,
|
|
84
|
+
}
|
package/src/types/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActivityIntensity } from "@hedia/recommendation-calculator/src/RecommendationCalculator";
|
|
2
|
+
import { ActivityEnum, MoodEnum } from "./enum";
|
|
2
3
|
export interface logbookEntry {
|
|
3
4
|
uuid: string;
|
|
4
5
|
entry_timestamp: string;
|
|
@@ -19,3 +20,19 @@ export interface logbookEntry {
|
|
|
19
20
|
is_deleted: Date | null;
|
|
20
21
|
utc_timezone_offset?: string | null;
|
|
21
22
|
}
|
|
23
|
+
export interface IInterval {
|
|
24
|
+
min: number;
|
|
25
|
+
max: number;
|
|
26
|
+
}
|
|
27
|
+
export interface IActivityType {
|
|
28
|
+
activityType: ActivityEnum;
|
|
29
|
+
}
|
|
30
|
+
export interface IActivityIntensity {
|
|
31
|
+
activityIntensity: ActivityIntensity;
|
|
32
|
+
}
|
|
33
|
+
export interface IActivity {
|
|
34
|
+
activity?: IActivityTitle;
|
|
35
|
+
}
|
|
36
|
+
export interface IActivityTitle {
|
|
37
|
+
activityTitle?: string;
|
|
38
|
+
}
|
package/src/types/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActivityIntensity } from "@hedia/recommendation-calculator/src/RecommendationCalculator";
|
|
2
|
+
import { ActivityEnum, MoodEnum } from "./enum";
|
|
2
3
|
|
|
3
4
|
// tslint:disable-next-line: interface-name class-name
|
|
4
5
|
export interface logbookEntry {
|
|
@@ -21,3 +22,22 @@ export interface logbookEntry {
|
|
|
21
22
|
is_deleted: Date | null;
|
|
22
23
|
utc_timezone_offset?: string | null;
|
|
23
24
|
}
|
|
25
|
+
export interface IInterval {
|
|
26
|
+
min: number;
|
|
27
|
+
max: number;
|
|
28
|
+
}
|
|
29
|
+
export interface IActivityType {
|
|
30
|
+
activityType: ActivityEnum;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface IActivityIntensity {
|
|
34
|
+
activityIntensity: ActivityIntensity;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface IActivity {
|
|
38
|
+
activity?: IActivityTitle;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface IActivityTitle {
|
|
42
|
+
activityTitle?: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class AttentionMessage {
|
|
2
|
+
static SevereHypoglycemia: () => string;
|
|
3
|
+
static Hypoglycemia: () => string;
|
|
4
|
+
static MildHypoglycemia: () => string;
|
|
5
|
+
static NormoglycemiaActivityUnder5MMOL: () => string;
|
|
6
|
+
static HyperglycemiaActivity: () => string;
|
|
7
|
+
static SevereHyperglycemia: () => string;
|
|
8
|
+
static SevereHyperglycemiaActivity: () => string;
|
|
9
|
+
}
|
|
10
|
+
export declare function addPostponeActivityMessage(message: AttentionMessage): string;
|
|
11
|
+
export declare class Messages {
|
|
12
|
+
static VeryLowBGL: () => string;
|
|
13
|
+
static LowBGL: () => string;
|
|
14
|
+
static Reminder15Minutes: () => string;
|
|
15
|
+
static PostponePhysicalActivity: () => string;
|
|
16
|
+
static HighBGL: () => string;
|
|
17
|
+
static InsulinKetones: () => string;
|
|
18
|
+
static RecommendationWasLimited: () => string;
|
|
19
|
+
static RecommendationWasLimitedActivity: (activityReduction: number) => string;
|
|
20
|
+
static InsulinWasLimitedActivity: (activityReduction?: number) => string;
|
|
21
|
+
}
|