@claudebernard/patient-profile-element 0.7.0 → 0.7.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.
|
@@ -402,6 +402,13 @@
|
|
|
402
402
|
"text": "WebComponentsStory<any, any>"
|
|
403
403
|
}
|
|
404
404
|
},
|
|
405
|
+
{
|
|
406
|
+
"kind": "variable",
|
|
407
|
+
"name": "InvalidMeasureDates",
|
|
408
|
+
"type": {
|
|
409
|
+
"text": "WebComponentsStory<any, any>"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
405
412
|
{
|
|
406
413
|
"kind": "variable",
|
|
407
414
|
"name": "AgeAndSexeEditable",
|
|
@@ -419,6 +426,14 @@
|
|
|
419
426
|
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts"
|
|
420
427
|
}
|
|
421
428
|
},
|
|
429
|
+
{
|
|
430
|
+
"kind": "js",
|
|
431
|
+
"name": "InvalidMeasureDates",
|
|
432
|
+
"declaration": {
|
|
433
|
+
"name": "InvalidMeasureDates",
|
|
434
|
+
"module": "src/patient-profile/patient-profile-edition/patient-profile-edition.stories.ts"
|
|
435
|
+
}
|
|
436
|
+
},
|
|
422
437
|
{
|
|
423
438
|
"kind": "js",
|
|
424
439
|
"name": "AgeAndSexeEditable",
|
|
@@ -1236,6 +1251,24 @@
|
|
|
1236
1251
|
},
|
|
1237
1252
|
"description": "Retourne la date du jour au format \"YYYY-MM-DD\" (format attendu par `effectiveDateTime`)"
|
|
1238
1253
|
},
|
|
1254
|
+
{
|
|
1255
|
+
"kind": "function",
|
|
1256
|
+
"name": "getMeasureDateTooltipLabel",
|
|
1257
|
+
"return": {
|
|
1258
|
+
"type": {
|
|
1259
|
+
"text": "string"
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
"parameters": [
|
|
1263
|
+
{
|
|
1264
|
+
"name": "measureDate",
|
|
1265
|
+
"type": {
|
|
1266
|
+
"text": "string | undefined"
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
],
|
|
1270
|
+
"description": "Construit le libellé du tooltip affiché à côté d'une mesure (taille, poids, DFG...)\nà partir de sa date de mesure, ou un libellé par défaut si celle-ci est absente"
|
|
1271
|
+
},
|
|
1239
1272
|
{
|
|
1240
1273
|
"kind": "function",
|
|
1241
1274
|
"name": "parseDisplayDateToISO",
|
|
@@ -2236,6 +2269,14 @@
|
|
|
2236
2269
|
"module": "src/shared/utils/patient-fhir-utils.ts"
|
|
2237
2270
|
}
|
|
2238
2271
|
},
|
|
2272
|
+
{
|
|
2273
|
+
"kind": "js",
|
|
2274
|
+
"name": "getMeasureDateTooltipLabel",
|
|
2275
|
+
"declaration": {
|
|
2276
|
+
"name": "getMeasureDateTooltipLabel",
|
|
2277
|
+
"module": "src/shared/utils/patient-fhir-utils.ts"
|
|
2278
|
+
}
|
|
2279
|
+
},
|
|
2239
2280
|
{
|
|
2240
2281
|
"kind": "js",
|
|
2241
2282
|
"name": "parseDisplayDateToISO",
|
|
@@ -105,11 +105,17 @@ function getTodayDateString() {
|
|
|
105
105
|
}
|
|
106
106
|
function formatEffectiveDateTime(effectiveDateTime) {
|
|
107
107
|
const date = new Date(effectiveDateTime);
|
|
108
|
+
if (isNaN(date.getTime())) {
|
|
109
|
+
return void 0;
|
|
110
|
+
}
|
|
108
111
|
const day = date.getUTCDate().toString().padStart(2, "0");
|
|
109
112
|
const month = (date.getUTCMonth() + 1).toString().padStart(2, "0");
|
|
110
113
|
const year = date.getUTCFullYear();
|
|
111
114
|
return `${day}/${month}/${year}`;
|
|
112
115
|
}
|
|
116
|
+
function getMeasureDateTooltipLabel(measureDate) {
|
|
117
|
+
return measureDate ? `Dernière date mesurée : ${measureDate}` : "Aucune date de cette mesure";
|
|
118
|
+
}
|
|
113
119
|
function parseDisplayDateToISO(displayDate) {
|
|
114
120
|
const [day, month, year] = displayDate.split("/");
|
|
115
121
|
return `${year}-${month}-${day}`;
|
|
@@ -1604,7 +1610,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1604
1610
|
<div class="${PREFIX}-edition-modal-little-section">
|
|
1605
1611
|
<div class="${PREFIX}-edition-modal-little-section__with-info">
|
|
1606
1612
|
<span>Taille (cm)</span>
|
|
1607
|
-
<bcbd-tooltip content=${
|
|
1613
|
+
<bcbd-tooltip content=${getMeasureDateTooltipLabel(getPatientHeightDate(this.patientProfile))} placement="top" delay="0">
|
|
1608
1614
|
<bcbd-icon color="primary" size="medium" icon="circle-info">
|
|
1609
1615
|
</bcbd-icon>
|
|
1610
1616
|
</bcbd-tooltip>
|
|
@@ -1614,7 +1620,7 @@ let PatientDemographicsForm = class extends i$2 {
|
|
|
1614
1620
|
<div class="${PREFIX}-edition-modal-little-section">
|
|
1615
1621
|
<div class="${PREFIX}-edition-modal-little-section__with-info">
|
|
1616
1622
|
<span>Poids (kg)</span>
|
|
1617
|
-
<bcbd-tooltip content=${
|
|
1623
|
+
<bcbd-tooltip content=${getMeasureDateTooltipLabel(getPatientWeightDate(this.patientProfile))} placement="top" delay="0">
|
|
1618
1624
|
<bcbd-icon color="primary" size="medium" icon="circle-info">
|
|
1619
1625
|
</bcbd-icon>
|
|
1620
1626
|
</bcbd-tooltip>
|
|
@@ -2081,7 +2087,7 @@ let PatientRenalForm = class extends i$2 {
|
|
|
2081
2087
|
<div class="${PREFIX}-edition-modal-little-section">
|
|
2082
2088
|
<div class="${PREFIX}-edition-modal-little-section__with-info">
|
|
2083
2089
|
<span>DFG (mL/min/1.73.m2)</span>
|
|
2084
|
-
<bcbd-tooltip content=${
|
|
2090
|
+
<bcbd-tooltip content=${getMeasureDateTooltipLabel(getPatientGfrDate(this.patientProfile))} placement="top" delay="0">
|
|
2085
2091
|
<bcbd-icon color="primary" size="medium" icon="circle-info">
|
|
2086
2092
|
</bcbd-icon>
|
|
2087
2093
|
</bcbd-tooltip>
|