@claudebernard/patient-profile-element 0.6.4 → 0.7.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.
@@ -47,6 +47,27 @@
47
47
  "type": {
48
48
  "text": "WebComponentsStory<any, any>"
49
49
  }
50
+ },
51
+ {
52
+ "kind": "variable",
53
+ "name": "PatientUnderweightWithAlert",
54
+ "type": {
55
+ "text": "WebComponentsStory<any, any>"
56
+ }
57
+ },
58
+ {
59
+ "kind": "variable",
60
+ "name": "PatientUnderweightMeasuredToday",
61
+ "type": {
62
+ "text": "WebComponentsStory<any, any>"
63
+ }
64
+ },
65
+ {
66
+ "kind": "variable",
67
+ "name": "HeightOnlyEdit",
68
+ "type": {
69
+ "text": "WebComponentsStory<any, any>"
70
+ }
50
71
  }
51
72
  ],
52
73
  "exports": [
@@ -97,6 +118,30 @@
97
118
  "name": "ChangePatientProfile",
98
119
  "module": "src/patient-profile/patient-profile.stories.ts"
99
120
  }
121
+ },
122
+ {
123
+ "kind": "js",
124
+ "name": "PatientUnderweightWithAlert",
125
+ "declaration": {
126
+ "name": "PatientUnderweightWithAlert",
127
+ "module": "src/patient-profile/patient-profile.stories.ts"
128
+ }
129
+ },
130
+ {
131
+ "kind": "js",
132
+ "name": "PatientUnderweightMeasuredToday",
133
+ "declaration": {
134
+ "name": "PatientUnderweightMeasuredToday",
135
+ "module": "src/patient-profile/patient-profile.stories.ts"
136
+ }
137
+ },
138
+ {
139
+ "kind": "js",
140
+ "name": "HeightOnlyEdit",
141
+ "declaration": {
142
+ "name": "HeightOnlyEdit",
143
+ "module": "src/patient-profile/patient-profile.stories.ts"
144
+ }
100
145
  }
101
146
  ]
102
147
  },
@@ -149,7 +194,7 @@
149
194
  "type": {
150
195
  "text": "PatientProfilePreferences | undefined"
151
196
  },
152
- "default": "{ forms: { age: { display: true, readOnly: false }, sexe: { display: true, readOnly: false }, }, }",
197
+ "default": "{ forms: { age: { display: true, readOnly: false }, sexe: { display: true, readOnly: false }, }, overview: { warning: { missingWeight: { display: false }, missingHeight: { display: false }, missingGfr: { display: false }, }, }, }",
153
198
  "attribute": "preferences"
154
199
  },
155
200
  {
@@ -315,7 +360,7 @@
315
360
  "type": {
316
361
  "text": "PatientProfilePreferences | undefined"
317
362
  },
318
- "default": "{ forms: { age: { display: true, readOnly: false }, sexe: { display: true, readOnly: false }, }, }",
363
+ "default": "{ forms: { age: { display: true, readOnly: false }, sexe: { display: true, readOnly: false }, }, overview: { warning: { missingWeight: { display: false }, missingHeight: { display: false }, missingGfr: { display: false }, }, }, }",
319
364
  "fieldName": "preferences"
320
365
  }
321
366
  ],
@@ -810,46 +855,6 @@
810
855
  }
811
856
  ]
812
857
  },
813
- {
814
- "kind": "javascript-module",
815
- "path": "src/shared/mocks/patient-profile.mock.ts",
816
- "declarations": [
817
- {
818
- "kind": "variable",
819
- "name": "patientComplete",
820
- "type": {
821
- "text": "Bundle"
822
- },
823
- "default": "{ resourceType: \"Bundle\", id: \"patient-complete\", type: \"document\", entry: [ { fullUrl: \"Composition/2a480f2a-27eb-43d6-943e-576588f9087e\", resource: { resourceType: \"Composition\", // On a Bundle of type document, the first entry must be a Composition id: \"2a480f2a-27eb-43d6-943e-576588f9087e\", status: \"final\", type: { coding: [ { system: \"http://loinc.org\", code: \"34133-9\", display: \"Summary of episode note\", }, ], }, subject: [{ reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }], date: \"2025-09-02\", title: \"Patient complete composition\", author: [{ reference: \"Practitioner/dr-martin\" }], }, }, { fullUrl: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\", resource: { resourceType: \"Patient\", id: \"f5181376-2137-4724-8797-c57a453f7d1a\", gender: \"female\", // sex at birth birthDate: \"1984-01-01\", // birthDate used to calculate age name: [ { family: \"Dupont\", given: [\"Marie\"], }, ], }, }, { resource: { resourceType: \"Observation\", id: \"obs-gestational-age\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"18185-9\", display: \"Gestational age\", // Most used Loinc code for gestational age / number of weeks of amenorrhea }, ], text: \"Âge gestationnel\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueQuantity: { value: 20, unit: \"weeks\", system: \"http://unitsofmeasure.org\", code: \"wk\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-creatinine-clearance\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"2164-2\", display: \"Creatinine renal clearance in 24 hour Urine and Serum or Plasma\", // Most used Loinc code for creatinine clearance }, ], text: \"Clairance de la créatinine\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueQuantity: { value: 71, unit: \"mL/min\", system: \"http://unitsofmeasure.org\", code: \"mL/min\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-creatinine\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"15051-6\", display: \"Creatinine [Moles/volume] in Serum or Plasma\", // LOINC code for serum creatinine in μmol/L }, ], text: \"Créatininémie\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueQuantity: { value: 121, unit: \"μmol/L\", system: \"http://unitsofmeasure.org\", code: \"umol/L\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-creatinine\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"2160-0\", display: \"Creatinine [Mass/volume] in Serum or Plasma\", // Most used Loinc code for serum creatinine }, ], text: \"Créatininémie\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueQuantity: { value: 1.4, unit: \"mg/dL\", system: \"http://unitsofmeasure.org\", code: \"mg/dL\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-dfg\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"48642-3\", display: \"Glomerular filtration rate [Volume Rate/Area] in Serum, Plasma or Blood by Creatinine-based formula (MDRD)/1.73 sq M\", }, ], text: \"DFG\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueQuantity: { value: 45, unit: \"mL/min/1.73.m2\", system: \"http://unitsofmeasure.org\", code: \"mL/min/1.73.m2\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-child-pugh-score\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"98152-2\", display: \"Total score [Child-Pugh]\", }, ], text: \"Score total Child-Pugh\", }, subject: { \"reference\": \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\", }, valueQuantity: { value: 7, unit: \"score\", system: \"http://unitsofmeasure.org\", code: \"{score}\", }, valueCodeableConcept: { coding: [ { system: \"http://snomed.info/sct\", code: \"710066005\", display: \"Child-Pugh score class B\", }, ], text: \"Stade B\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-body-weight\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"29463-7\", display: \"Body weight\", // Most used Loinc code for body weight }, ], text: \"Poids corporel\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\", }, valueQuantity: { value: 84, unit: \"kg\", system: \"http://unitsofmeasure.org\", code: \"kg\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-body-height\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"8302-2\", display: \"Body height\", // Most used Loinc code for body height }, ], text: \"Taille corporelle\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueQuantity: { value: 170, unit: \"cm\", system: \"http://unitsofmeasure.org\", code: \"cm\", }, }, }, { resource: { resourceType: \"AdverseEvent\", // Resource used to specify adverse events like drug side effects the patient is experiencing id: \"adverseevent-amoxicillin-rash\", actuality: \"actual\", subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, status: \"unknown\", code: { coding: [ { system: \"http://snomed.info/sct\", code: \"271807003\", display: \"Rash\", }, ], text: \"Éruption cutanée\", }, suspectEntity: [ // Link to the medication request that supposedly or certainly caused the adverse event { instanceReference: { reference: \"MedicationRequest/req-cardensiel\", }, causality: { assessmentMethod: { coding: [ { system: \"http://terminology.hl7.org/CodeSystem/adverse-event-causality-assess\", code: \"certain\", display: \"Certain\", }, ], }, }, }, ], seriousness: { coding: [ { system: \"http://terminology.hl7.org/CodeSystem/adverse-event-seriousness\", code: \"non-serious\", display: \"Non-serious\", }, ], }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-pregnancy-status\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"82810-3\", display: \"Pregnancy status\", // Most used Loinc code for pregnancy status }, ], text: \"Statut de grossesse\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueCodeableConcept: { // result of the observation meaning the patient is currently pregnant (it can also be represented more simply by a Condition resource with the same snomed code) coding: [ { system: \"http://snomed.info/sct\", code: \"77386006\", display: \"Pregnant\", }, ], text: \"Grossesse\", }, }, }, { resource: { resourceType: \"Observation\", id: \"obs-breastfeeding-status\", status: \"final\", code: { coding: [ { system: \"http://loinc.org\", code: \"63895-7\", display: \"Breastfeeding status\", // Most used Loinc code for breastfeeding status }, ], text: \"Statut d'allaitement\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, valueCodeableConcept: { // result of the observation meaning the patient is currently breastfeeding (it can also be represented more simply by a Condition resource with the same snomed code) coding: [ { system: \"http://snomed.info/sct\", code: \"69840006\", display: \"Breastfeeding\", }, ], text: \"Allaitement\", }, }, }, { resource: { resourceType: \"Condition\", // Resources of type Condition are used to specify pathologies id: \"hepatic-insufficiency\", clinicalStatus: { coding: [{ system: \"http://terminology.hl7.org/CodeSystem/condition-clinical\", code: \"active\" }] }, code: { coding: [ { system: \"http://snomed.info/sct\", code: \"59927004\", display: \"Hepatic failure\", }, ], text: \"Insuffisance hépatique\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, }, }, { resource: { resourceType: \"Condition\", id: \"cond-medical-terrain\", clinicalStatus: { coding: [{ system: \"http://terminology.hl7.org/CodeSystem/condition-clinical\", code: \"active\" }] }, code: { coding: [ { system: \"http://snomed.info/sct\", code: \"723189000\", display: \"Insuffisance rénale aigüe\", }, ], text: \"Insuffisance rénale aigüe\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, }, }, { resource: { resourceType: \"Condition\", id: \"cond-medical-terrain\", clinicalStatus: { coding: [{ system: \"http://terminology.hl7.org/CodeSystem/condition-clinical\", code: \"active\" }] }, code: { coding: [ { system: \"http://snomed.info/sct\", code: \"723188000\", display: \"Insuffisance hépatique modérée\", }, ], text: \"Insuffisance hépatique modérée\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, }, }, { resource: { resourceType: \"Condition\", id: \"cond-followed-pathology\", clinicalStatus: { coding: [{ system: \"http://terminology.hl7.org/CodeSystem/condition-clinical\", code: \"active\" }] }, code: { coding: [ { system: \"http://snomed.info/sct\", code: \"84114007\", display: \"Insuffisance cardiaque\", }, ], text: \"Insuffisance cardiaque\", }, subject: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, }, }, { resource: { resourceType: \"AllergyIntolerance\", // Resource used to specify allergies or intolerances the patient has id: \"allergy-paracetamol\", clinicalStatus: { coding: [{ system: \"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical\", code: \"active\" }] }, code: { coding: [ { system: \"http://snomed.info/sct\", code: \"293584003\", display: \"Allergie au paracétamol\", }, ], text: \"Allergie au paracétamol\", }, patient: { reference: \"Patient/f5181376-2137-4724-8797-c57a453f7d1a\" }, }, }, ], }"
824
- },
825
- {
826
- "kind": "variable",
827
- "name": "patientProfileEmpty",
828
- "type": {
829
- "text": "object"
830
- },
831
- "default": "{}"
832
- }
833
- ],
834
- "exports": [
835
- {
836
- "kind": "js",
837
- "name": "patientComplete",
838
- "declaration": {
839
- "name": "patientComplete",
840
- "module": "src/shared/mocks/patient-profile.mock.ts"
841
- }
842
- },
843
- {
844
- "kind": "js",
845
- "name": "patientProfileEmpty",
846
- "declaration": {
847
- "name": "patientProfileEmpty",
848
- "module": "src/shared/mocks/patient-profile.mock.ts"
849
- }
850
- }
851
- ]
852
- },
853
858
  {
854
859
  "kind": "javascript-module",
855
860
  "path": "src/shared/services/api-prescription.service.ts",
@@ -1221,6 +1226,34 @@
1221
1226
  },
1222
1227
  "description": "Génère un UUID v4 aléatoire"
1223
1228
  },
1229
+ {
1230
+ "kind": "function",
1231
+ "name": "getTodayDateString",
1232
+ "return": {
1233
+ "type": {
1234
+ "text": "string"
1235
+ }
1236
+ },
1237
+ "description": "Retourne la date du jour au format \"YYYY-MM-DD\" (format attendu par `effectiveDateTime`)"
1238
+ },
1239
+ {
1240
+ "kind": "function",
1241
+ "name": "parseDisplayDateToISO",
1242
+ "return": {
1243
+ "type": {
1244
+ "text": "string"
1245
+ }
1246
+ },
1247
+ "parameters": [
1248
+ {
1249
+ "name": "displayDate",
1250
+ "type": {
1251
+ "text": "string"
1252
+ }
1253
+ }
1254
+ ],
1255
+ "description": "Convertit une date affichée au format \"DD/MM/YYYY\" (retournée par `formatEffectiveDateTime`)\nen date ISO \"YYYY-MM-DD\" comparable lexicalement"
1256
+ },
1224
1257
  {
1225
1258
  "kind": "function",
1226
1259
  "name": "getPatientFullUrl",
@@ -1411,6 +1444,25 @@
1411
1444
  ],
1412
1445
  "description": "Extrait le poids du patient (avec l'unité correspondante) depuis la ressource Observation concernée"
1413
1446
  },
1447
+ {
1448
+ "kind": "function",
1449
+ "name": "getPatientWeightDate",
1450
+ "return": {
1451
+ "type": {
1452
+ "text": ""
1453
+ }
1454
+ },
1455
+ "parameters": [
1456
+ {
1457
+ "name": "bundle",
1458
+ "type": {
1459
+ "text": "Bundle | undefined"
1460
+ },
1461
+ "description": "Bundle Patient FHIR"
1462
+ }
1463
+ ],
1464
+ "description": "Extrait la date de mesure du poids du patient depuis la ressource Observation concernée"
1465
+ },
1414
1466
  {
1415
1467
  "kind": "function",
1416
1468
  "name": "setPatientWeight",
@@ -1473,6 +1525,25 @@
1473
1525
  ],
1474
1526
  "description": "Extrait la taille du patient (avec l'unité correspondante) depuis la ressource Observation concernée"
1475
1527
  },
1528
+ {
1529
+ "kind": "function",
1530
+ "name": "getPatientHeightDate",
1531
+ "return": {
1532
+ "type": {
1533
+ "text": ""
1534
+ }
1535
+ },
1536
+ "parameters": [
1537
+ {
1538
+ "name": "bundle",
1539
+ "type": {
1540
+ "text": "Bundle | undefined"
1541
+ },
1542
+ "description": "Bundle Patient FHIR"
1543
+ }
1544
+ ],
1545
+ "description": "Extrait la date de mesure de la taille du patient depuis la ressource Observation concernée"
1546
+ },
1476
1547
  {
1477
1548
  "kind": "function",
1478
1549
  "name": "setPatientHeight",
@@ -1643,6 +1714,25 @@
1643
1714
  }
1644
1715
  ]
1645
1716
  },
1717
+ {
1718
+ "kind": "function",
1719
+ "name": "getPatientGfrDate",
1720
+ "return": {
1721
+ "type": {
1722
+ "text": ""
1723
+ }
1724
+ },
1725
+ "parameters": [
1726
+ {
1727
+ "name": "bundle",
1728
+ "type": {
1729
+ "text": "Bundle | undefined"
1730
+ },
1731
+ "description": "Bundle Patient FHIR"
1732
+ }
1733
+ ],
1734
+ "description": "Extrait la date de mesure du DFG du patient depuis la ressource Observation concernée"
1735
+ },
1646
1736
  {
1647
1737
  "kind": "function",
1648
1738
  "name": "setPatientClearance",
@@ -2138,6 +2228,22 @@
2138
2228
  "module": "src/shared/utils/patient-fhir-utils.ts"
2139
2229
  }
2140
2230
  },
2231
+ {
2232
+ "kind": "js",
2233
+ "name": "getTodayDateString",
2234
+ "declaration": {
2235
+ "name": "getTodayDateString",
2236
+ "module": "src/shared/utils/patient-fhir-utils.ts"
2237
+ }
2238
+ },
2239
+ {
2240
+ "kind": "js",
2241
+ "name": "parseDisplayDateToISO",
2242
+ "declaration": {
2243
+ "name": "parseDisplayDateToISO",
2244
+ "module": "src/shared/utils/patient-fhir-utils.ts"
2245
+ }
2246
+ },
2141
2247
  {
2142
2248
  "kind": "js",
2143
2249
  "name": "getPatientFullUrl",
@@ -2218,6 +2324,14 @@
2218
2324
  "module": "src/shared/utils/patient-fhir-utils.ts"
2219
2325
  }
2220
2326
  },
2327
+ {
2328
+ "kind": "js",
2329
+ "name": "getPatientWeightDate",
2330
+ "declaration": {
2331
+ "name": "getPatientWeightDate",
2332
+ "module": "src/shared/utils/patient-fhir-utils.ts"
2333
+ }
2334
+ },
2221
2335
  {
2222
2336
  "kind": "js",
2223
2337
  "name": "setPatientWeight",
@@ -2242,6 +2356,14 @@
2242
2356
  "module": "src/shared/utils/patient-fhir-utils.ts"
2243
2357
  }
2244
2358
  },
2359
+ {
2360
+ "kind": "js",
2361
+ "name": "getPatientHeightDate",
2362
+ "declaration": {
2363
+ "name": "getPatientHeightDate",
2364
+ "module": "src/shared/utils/patient-fhir-utils.ts"
2365
+ }
2366
+ },
2245
2367
  {
2246
2368
  "kind": "js",
2247
2369
  "name": "setPatientHeight",
@@ -2306,6 +2428,14 @@
2306
2428
  "module": "src/shared/utils/patient-fhir-utils.ts"
2307
2429
  }
2308
2430
  },
2431
+ {
2432
+ "kind": "js",
2433
+ "name": "getPatientGfrDate",
2434
+ "declaration": {
2435
+ "name": "getPatientGfrDate",
2436
+ "module": "src/shared/utils/patient-fhir-utils.ts"
2437
+ }
2438
+ },
2309
2439
  {
2310
2440
  "kind": "js",
2311
2441
  "name": "setPatientClearance",
@@ -3006,6 +3136,36 @@
3006
3136
  "privacy": "private",
3007
3137
  "readonly": true
3008
3138
  },
3139
+ {
3140
+ "kind": "field",
3141
+ "name": "NARROW_VIEWPORT_QUERY",
3142
+ "type": {
3143
+ "text": "string"
3144
+ },
3145
+ "privacy": "private",
3146
+ "static": true,
3147
+ "readonly": true,
3148
+ "default": "\"(max-width: 949px)\""
3149
+ },
3150
+ {
3151
+ "kind": "field",
3152
+ "name": "narrowViewportQuery",
3153
+ "privacy": "private",
3154
+ "readonly": true
3155
+ },
3156
+ {
3157
+ "kind": "field",
3158
+ "name": "datePickerPlacement",
3159
+ "type": {
3160
+ "text": "\"bottom\" | \"bottom-right\""
3161
+ }
3162
+ },
3163
+ {
3164
+ "kind": "field",
3165
+ "name": "updateDatePickerPlacement",
3166
+ "privacy": "private",
3167
+ "readonly": true
3168
+ },
3009
3169
  {
3010
3170
  "kind": "field",
3011
3171
  "name": "patientBirthDate",
@@ -3958,6 +4118,16 @@
3958
4118
  }
3959
4119
  ]
3960
4120
  },
4121
+ {
4122
+ "kind": "method",
4123
+ "name": "handleGestationalWeeksChange",
4124
+ "privacy": "private",
4125
+ "return": {
4126
+ "type": {
4127
+ "text": "void"
4128
+ }
4129
+ }
4130
+ },
3961
4131
  {
3962
4132
  "kind": "method",
3963
4133
  "name": "getValue",
@@ -100,6 +100,20 @@ const childPughStadeToSnomedMap = {
100
100
  function generateUUID() {
101
101
  return crypto.randomUUID();
102
102
  }
103
+ function getTodayDateString() {
104
+ return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
105
+ }
106
+ function formatEffectiveDateTime(effectiveDateTime) {
107
+ const date = new Date(effectiveDateTime);
108
+ const day = date.getUTCDate().toString().padStart(2, "0");
109
+ const month = (date.getUTCMonth() + 1).toString().padStart(2, "0");
110
+ const year = date.getUTCFullYear();
111
+ return `${day}/${month}/${year}`;
112
+ }
113
+ function parseDisplayDateToISO(displayDate) {
114
+ const [day, month, year] = displayDate.split("/");
115
+ return `${year}-${month}-${day}`;
116
+ }
103
117
  function getPatientFullUrl(bundle) {
104
118
  const patientEntry = bundle.entry?.find(
105
119
  (entry) => entry.resource?.resourceType === "Patient"
@@ -151,6 +165,7 @@ function upsertQuantityObservation(bundle, codes, meta, quantity, removeIfZero)
151
165
  ],
152
166
  text: meta.text
153
167
  },
168
+ effectiveDateTime: getTodayDateString(),
154
169
  subject: {
155
170
  reference: getPatientFullUrl(bundle)
156
171
  },
@@ -164,6 +179,9 @@ function upsertQuantityObservation(bundle, codes, meta, quantity, removeIfZero)
164
179
  removeEntryById(bundle, obs.id);
165
180
  return;
166
181
  }
182
+ if (obs.valueQuantity?.value !== quantity.value) {
183
+ obs.effectiveDateTime = getTodayDateString();
184
+ }
167
185
  obs.valueQuantity = quantity;
168
186
  }
169
187
  function setInitialPatientProfile() {
@@ -281,6 +299,10 @@ function getPatientWeightWithUnit(bundle) {
281
299
  const obs = findObservationByCode(bundle, [WEIGHT_LOINC_CODE]);
282
300
  return (obs?.valueQuantity?.value ? obs.valueQuantity.value.toString() : "") + (obs?.valueQuantity?.unit ? ` ${obs.valueQuantity.unit}` : "");
283
301
  }
302
+ function getPatientWeightDate(bundle) {
303
+ const effectiveDateTime = findObservationByCode(bundle, [WEIGHT_LOINC_CODE])?.effectiveDateTime;
304
+ return effectiveDateTime ? formatEffectiveDateTime(effectiveDateTime) : void 0;
305
+ }
284
306
  function setPatientWeight(bundle, weight) {
285
307
  upsertQuantityObservation(
286
308
  bundle,
@@ -298,6 +320,10 @@ function getPatientHeightWithUnit(bundle) {
298
320
  const obs = findObservationByCode(bundle, [HEIGHT_LOINC_CODE]);
299
321
  return (obs?.valueQuantity?.value ? obs.valueQuantity.value.toString() : "") + (obs?.valueQuantity?.unit ? ` ${obs.valueQuantity.unit}` : "");
300
322
  }
323
+ function getPatientHeightDate(bundle) {
324
+ const effectiveDateTime = findObservationByCode(bundle, [HEIGHT_LOINC_CODE])?.effectiveDateTime;
325
+ return effectiveDateTime ? formatEffectiveDateTime(effectiveDateTime) : void 0;
326
+ }
301
327
  function setPatientHeight(bundle, height) {
302
328
  upsertQuantityObservation(
303
329
  bundle,
@@ -437,6 +463,10 @@ function getPatientRenalInsufficiencyStatus(bundle) {
437
463
  gfr: gfrValue
438
464
  };
439
465
  }
466
+ function getPatientGfrDate(bundle) {
467
+ const effectiveDateTime = findObservationByCode(bundle, acceptedLoincCodesForRenalGFRPerBSA)?.effectiveDateTime;
468
+ return effectiveDateTime ? formatEffectiveDateTime(effectiveDateTime) : void 0;
469
+ }
440
470
  function setPatientClearance(bundle, clearance) {
441
471
  upsertQuantityObservation(
442
472
  bundle,
@@ -1341,7 +1371,7 @@ function e$1(e2, r2) {
1341
1371
  } });
1342
1372
  };
1343
1373
  }
1344
- const patientProfileCSS = '@charset "UTF-8";\n.claudebernard-patient-profile {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n padding: 1rem;\n border-radius: 0.5rem;\n background-color: var(--bcbd-white-color, #FFFFFF);\n container-type: inline-size;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__no-profile {\n display: flex;\n flex-direction: column;\n gap: 0.3rem;\n}\n.claudebernard-patient-profile__no-profile__first {\n font-weight: bold;\n}\n.claudebernard-patient-profile__no-profile__second {\n color: var(--bcbd-gray-500-color, #64748B);\n font-size: 0.8rem;\n}\n.claudebernard-patient-profile__separator {\n border-right: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n}\n.claudebernard-patient-profile__first-info-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 0.5rem;\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__first-info-container {\n flex-wrap: wrap;\n gap: 1rem;\n align-items: center;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__first-info-container {\n justify-content: center;\n }\n}\n.claudebernard-patient-profile__id-info-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 0.5rem;\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__id-info-container {\n flex: 1;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__id-info-container {\n flex: 0 0 auto;\n align-items: center;\n }\n}\n.claudebernard-patient-profile__name-info {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__id-info {\n width: fit-content;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n border-radius: 1rem;\n display: flex;\n flex-direction: row;\n padding: 0 0.8rem;\n gap: 0.5rem;\n}\n.claudebernard-patient-profile__id-info-info {\n padding: 0.2rem 0;\n white-space: nowrap;\n font-size: 1rem;\n}\n.claudebernard-patient-profile__physical-info-container {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__physical-info-container {\n gap: 0.5rem;\n }\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__physical-info-container {\n order: 3;\n width: 100%;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__physical-info-container {\n order: 2;\n }\n}\n.claudebernard-patient-profile__physical-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n padding: 1rem 0;\n font-size: 1rem;\n}\n.claudebernard-patient-profile__physical-info-result {\n white-space: nowrap;\n}\n.claudebernard-patient-profile__physical-info-label {\n color: var(--bcbd-gray-600-color, #475569);\n}\n.claudebernard-patient-profile__action-buttons-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-content: center;\n flex-wrap: wrap;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__action-buttons-container {\n gap: 0.5rem;\n }\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__action-buttons-container {\n order: 2;\n margin: 0 auto;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__action-buttons-container {\n order: 3;\n }\n}\n.claudebernard-patient-profile__second-info-container {\n margin-top: 1rem;\n display: none;\n}\n.claudebernard-patient-profile__second-info-container.active {\n display: flex;\n flex-direction: column;\n}\n.claudebernard-patient-profile__second-info {\n margin-top: 1rem;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip {\n display: inline-block;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip > span {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__second-info-label {\n padding-right: 0.5rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__second-info-label {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__second-info-result.sep-dots > * + *::before {\n content: "•";\n margin: 0 0.5rem;\n}';
1374
+ const patientProfileCSS = '@charset "UTF-8";\n.claudebernard-patient-profile {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n padding: 1rem;\n border-radius: 0.5rem;\n background-color: var(--bcbd-white-color, #FFFFFF);\n container-type: inline-size;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__no-profile {\n display: flex;\n flex-direction: column;\n gap: 0.3rem;\n}\n.claudebernard-patient-profile__no-profile__first {\n font-weight: bold;\n}\n.claudebernard-patient-profile__no-profile__second {\n color: var(--bcbd-gray-500-color, #64748B);\n font-size: 0.8rem;\n}\n.claudebernard-patient-profile__separator {\n border-right: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n}\n.claudebernard-patient-profile__first-info-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 0.5rem;\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__first-info-container {\n flex-wrap: wrap;\n gap: 1rem;\n align-items: center;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__first-info-container {\n justify-content: center;\n }\n}\n.claudebernard-patient-profile__id-info-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 0.5rem;\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__id-info-container {\n flex: 1;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__id-info-container {\n flex: 0 0 auto;\n align-items: center;\n }\n}\n.claudebernard-patient-profile__name-info {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__id-info {\n width: fit-content;\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n border-radius: 1rem;\n display: flex;\n flex-direction: row;\n padding: 0 0.8rem;\n gap: 0.5rem;\n}\n.claudebernard-patient-profile__id-info-info {\n padding: 0.2rem 0;\n white-space: nowrap;\n font-size: 1rem;\n}\n.claudebernard-patient-profile__physical-info-container {\n display: flex;\n flex-direction: row;\n justify-content: center;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__physical-info-container {\n gap: 0.5rem;\n }\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__physical-info-container {\n order: 3;\n width: 100%;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__physical-info-container {\n order: 2;\n }\n}\n.claudebernard-patient-profile__physical-info {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n padding: 1rem 0;\n font-size: 1rem;\n}\n.claudebernard-patient-profile__physical-info-result {\n white-space: nowrap;\n}\n.claudebernard-patient-profile__physical-info-label {\n color: var(--bcbd-gray-600-color, #475569);\n}\n.claudebernard-patient-profile__action-buttons-container {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-content: center;\n flex-wrap: wrap;\n gap: 1rem;\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__action-buttons-container {\n gap: 0.5rem;\n }\n}\n@container (max-width: 450px) {\n .claudebernard-patient-profile__action-buttons-container {\n order: 2;\n margin: 0 auto;\n }\n}\n@container (max-width: 320px) {\n .claudebernard-patient-profile__action-buttons-container {\n order: 3;\n }\n}\n.claudebernard-patient-profile__second-info-container {\n margin-top: 1rem;\n display: none;\n}\n.claudebernard-patient-profile__second-info-container.active {\n display: flex;\n flex-direction: column;\n}\n.claudebernard-patient-profile__second-info {\n margin-top: 1rem;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip {\n display: inline-block;\n}\n.claudebernard-patient-profile__second-info bcbd-tooltip > span {\n font-size: 1rem;\n}\n.claudebernard-patient-profile__second-info-label {\n padding-right: 0.5rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n@container (max-width: 600px) {\n .claudebernard-patient-profile__second-info-label {\n font-size: 0.8rem;\n }\n}\n.claudebernard-patient-profile__second-info-result.sep-dots > * + *::before {\n content: "•";\n margin: 0 0.5rem;\n}\n.claudebernard-patient-profile__alert-container bcbd-alert {\n margin-top: 10px;\n}\n.claudebernard-patient-profile__alert-container {\n display: flex;\n flex-direction: column;\n}';
1345
1375
  const e = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
1346
1376
  let i$1 = class i2 {
1347
1377
  constructor(t2) {
@@ -1381,7 +1411,7 @@ const hepaticStadeOptions = [
1381
1411
  { value: "B", label: "Stade B" },
1382
1412
  { value: "C", label: "Stade C" }
1383
1413
  ];
1384
- const patientDemographicsFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}\n\n.claudebernard-edition-modal-demographic-div {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}";
1414
+ const patientDemographicsFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-little-section__with-info {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n gap: 8px;\n}\n.claudebernard-edition-modal-little-section__with-info bcbd-icon {\n --bcbd-icon-width: 1rem;\n --bcbd-icon-height: 1rem;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}\n\n.claudebernard-edition-modal-demographic-div {\n display: flex;\n flex-direction: column;\n gap: 16px;\n}";
1385
1415
  var __defProp$7 = Object.defineProperty;
1386
1416
  var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
1387
1417
  var __decorateClass$8 = (decorators, target, key, kind) => {
@@ -1395,6 +1425,11 @@ var __decorateClass$8 = (decorators, target, key, kind) => {
1395
1425
  let PatientDemographicsForm = class extends i$2 {
1396
1426
  constructor() {
1397
1427
  super(...arguments);
1428
+ this.narrowViewportQuery = window.matchMedia(PatientDemographicsForm.NARROW_VIEWPORT_QUERY);
1429
+ this.datePickerPlacement = this.narrowViewportQuery.matches ? "bottom-right" : "bottom";
1430
+ this.updateDatePickerPlacement = (event) => {
1431
+ this.datePickerPlacement = event.matches ? "bottom-right" : "bottom";
1432
+ };
1398
1433
  this.patientBirthDate = "";
1399
1434
  this.patientAgeValue = void 0;
1400
1435
  this.patientUnitAge = "ans";
@@ -1416,6 +1451,14 @@ let PatientDemographicsForm = class extends i$2 {
1416
1451
  get isSexeReadOnly() {
1417
1452
  return this.preferences?.forms?.sexe?.readOnly ?? false;
1418
1453
  }
1454
+ connectedCallback() {
1455
+ super.connectedCallback();
1456
+ this.narrowViewportQuery.addEventListener("change", this.updateDatePickerPlacement);
1457
+ }
1458
+ disconnectedCallback() {
1459
+ super.disconnectedCallback();
1460
+ this.narrowViewportQuery.removeEventListener("change", this.updateDatePickerPlacement);
1461
+ }
1419
1462
  get patientAge() {
1420
1463
  return this.patientAgeValue === void 0 ? "" : `${this.patientAgeValue} ${this.patientUnitAge}`;
1421
1464
  }
@@ -1457,7 +1500,7 @@ let PatientDemographicsForm = class extends i$2 {
1457
1500
  this.patientBirthDate = birthDate?.toISOString().split("T")[0] ?? "";
1458
1501
  let isPregnancyEligible = false;
1459
1502
  if (birthDate) {
1460
- this.ageInputText.setAttribute("warning-msg", "");
1503
+ this.birthDateInput.setAttribute("warning-msg", "");
1461
1504
  const { age, unit } = calculateAgeFromBirthDate(birthDate);
1462
1505
  this.patientAgeValue = age;
1463
1506
  this.patientUnitAge = unit;
@@ -1465,7 +1508,7 @@ let PatientDemographicsForm = class extends i$2 {
1465
1508
  } else {
1466
1509
  this.patientAgeValue = void 0;
1467
1510
  this.ageErrorMessageInput = "L'âge est requis";
1468
- this.ageInputText.setAttribute("warning-msg", this.ageErrorMessageInput);
1511
+ this.ageInputText.setAttribute("warning-msg", "");
1469
1512
  }
1470
1513
  this.emitChange(isPregnancyEligible, false);
1471
1514
  }
@@ -1493,7 +1536,7 @@ let PatientDemographicsForm = class extends i$2 {
1493
1536
  const today = /* @__PURE__ */ new Date();
1494
1537
  if (!birthDateValue || isNaN(birthDate.getTime()) || birthDate > today) {
1495
1538
  this.ageErrorMessageInput = "La date de naissance n'est pas valide";
1496
- this.ageInputText.setAttribute("warning-msg", this.ageErrorMessageInput);
1539
+ this.birthDateInput.setAttribute("warning-msg", this.ageErrorMessageInput);
1497
1540
  this.patientAgeValue = void 0;
1498
1541
  this.emitChange(false, true);
1499
1542
  return;
@@ -1503,7 +1546,7 @@ let PatientDemographicsForm = class extends i$2 {
1503
1546
  this.patientAgeValue = age;
1504
1547
  this.patientUnitAge = unit;
1505
1548
  this.ageErrorMessageInput = this.getAgeErrorMessage(age);
1506
- this.ageInputText.setAttribute("warning-msg", this.ageErrorMessageInput);
1549
+ this.birthDateInput.setAttribute("warning-msg", this.ageErrorMessageInput);
1507
1550
  this.emitChange(this.isPregnancyAge, true);
1508
1551
  }
1509
1552
  verifySizeInput() {
@@ -1551,7 +1594,7 @@ let PatientDemographicsForm = class extends i$2 {
1551
1594
  ${this.isAgeDisplay ? b`
1552
1595
  <div class="${PREFIX}-edition-modal-little-section">
1553
1596
  <span>Date de naissance</span>
1554
- <bcbd-input data-test-id="birth-date-input" id="birthDateInput" ?disabled=${this.isAgeReadOnly} .value=${this.patientBirthDate} type="date" aria-label="Date de naissance" warning-msg="" ?readonly=${this.isAgeReadOnly} @change=${this.verifyAgeInput}></bcbd-input>
1597
+ <bcbd-input data-test-id="birth-date-input" id="birthDateInput" ?disabled=${this.isAgeReadOnly} .value=${this.patientBirthDate} type="date" date-picker-placement=${this.datePickerPlacement} aria-label="Date de naissance" warning-msg="" ?readonly=${this.isAgeReadOnly} @change=${this.verifyAgeInput}></bcbd-input>
1555
1598
  </div>
1556
1599
  <div class="${PREFIX}-edition-modal-little-section">
1557
1600
  <span>Age</span>
@@ -1559,11 +1602,23 @@ let PatientDemographicsForm = class extends i$2 {
1559
1602
  </div>` : A}
1560
1603
  <div class="${PREFIX}-edition-modal-information-section-secondary-group">
1561
1604
  <div class="${PREFIX}-edition-modal-little-section">
1562
- <span>Taille (cm)</span>
1605
+ <div class="${PREFIX}-edition-modal-little-section__with-info">
1606
+ <span>Taille (cm)</span>
1607
+ <bcbd-tooltip content=${`Dernière date mesurée : ${getPatientHeightDate(this.patientProfile)}`} placement="top" delay="0">
1608
+ <bcbd-icon color="primary" size="medium" icon="circle-info">
1609
+ </bcbd-icon>
1610
+ </bcbd-tooltip>
1611
+ </div>
1563
1612
  <bcbd-input data-test-id="size-input" id="sizeInput" type="number" aria-label="Taille (cm)" .value=${getPatientHeight(this.patientProfile) ?? ""} warning-msg="" @change=${this.verifySizeInput}></bcbd-input>
1564
1613
  </div>
1565
1614
  <div class="${PREFIX}-edition-modal-little-section">
1566
- <span>Poids (kg)</span>
1615
+ <div class="${PREFIX}-edition-modal-little-section__with-info">
1616
+ <span>Poids (kg)</span>
1617
+ <bcbd-tooltip content=${`Dernière date mesurée : ${getPatientWeightDate(this.patientProfile)}`} placement="top" delay="0">
1618
+ <bcbd-icon color="primary" size="medium" icon="circle-info">
1619
+ </bcbd-icon>
1620
+ </bcbd-tooltip>
1621
+ </div>
1567
1622
  <bcbd-input data-test-id="weight-input" id="weightInput" type="number" aria-label="Poids (kg)" .value=${getPatientWeight(this.patientProfile) ?? ""} warning-msg="" @change=${this.verifyWeightInput}></bcbd-input>
1568
1623
  </div>
1569
1624
  <div class="${PREFIX}-edition-modal-little-section">
@@ -1576,6 +1631,7 @@ let PatientDemographicsForm = class extends i$2 {
1576
1631
  `;
1577
1632
  }
1578
1633
  };
1634
+ PatientDemographicsForm.NARROW_VIEWPORT_QUERY = "(max-width: 949px)";
1579
1635
  PatientDemographicsForm.styles = i$5`${r$4(patientDemographicsFormCSS)}`;
1580
1636
  __decorateClass$8([
1581
1637
  n2({ type: Object, attribute: "patient-profile" })
@@ -1583,6 +1639,9 @@ __decorateClass$8([
1583
1639
  __decorateClass$8([
1584
1640
  n2({ type: Object })
1585
1641
  ], PatientDemographicsForm.prototype, "preferences", 2);
1642
+ __decorateClass$8([
1643
+ r()
1644
+ ], PatientDemographicsForm.prototype, "datePickerPlacement", 2);
1586
1645
  __decorateClass$8([
1587
1646
  r()
1588
1647
  ], PatientDemographicsForm.prototype, "patientBirthDate", 2);
@@ -1625,7 +1684,7 @@ __decorateClass$8([
1625
1684
  PatientDemographicsForm = __decorateClass$8([
1626
1685
  t("bcb-patient-demographics-form")
1627
1686
  ], PatientDemographicsForm);
1628
- const patientReproductiveFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}\n\n.claudebernard-edition-modal-pregnant-div {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n.claudebernard-edition-modal-pregnant-div bcbd-input {\n width: 40% !important;\n}";
1687
+ const patientReproductiveFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-little-section__with-info {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n gap: 8px;\n}\n.claudebernard-edition-modal-little-section__with-info bcbd-icon {\n --bcbd-icon-width: 1rem;\n --bcbd-icon-height: 1rem;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}\n\n.claudebernard-edition-modal-pregnant-div {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n.claudebernard-edition-modal-pregnant-div bcbd-input {\n width: 40% !important;\n}";
1629
1688
  var __defProp$6 = Object.defineProperty;
1630
1689
  var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
1631
1690
  var __decorateClass$7 = (decorators, target, key, kind) => {
@@ -1656,6 +1715,10 @@ let PatientReproductiveForm = class extends i$2 {
1656
1715
  handleBreastfeeding(event) {
1657
1716
  this.breastfeeding = event.detail;
1658
1717
  }
1718
+ handleGestationalWeeksChange() {
1719
+ const gestationalWeeksValue = this.gestationalWeeksInput?.value ?? "";
1720
+ this.isPregnant = gestationalWeeksValue !== "";
1721
+ }
1659
1722
  getValue() {
1660
1723
  if (!this.visible) {
1661
1724
  return { isPregnant: false, breastfeeding: false, gestationalWeeks: 0 };
@@ -1673,7 +1736,7 @@ let PatientReproductiveForm = class extends i$2 {
1673
1736
  return b`
1674
1737
  <div class="${PREFIX}-edition-modal-pregnant-div">
1675
1738
  <bcbd-checkbox data-test-id="pregnancy-checkbox" id="pregnancyCheckbox" .checked=${this.isPregnant} label="Grossesse" color="primary" @change=${this.handlePregnancy}></bcbd-checkbox>
1676
- <bcbd-input data-test-id="gestational-input" id="gestationalWeeksInput" .value=${getPatientAmenorrheaStatus(this.patientProfile) ?? 0} type="number" warning-msg="" label="Nombre de semaines" placeholder=""></bcbd-input>
1739
+ <bcbd-input data-test-id="gestational-input" id="gestationalWeeksInput" .value=${getPatientAmenorrheaStatus(this.patientProfile) ?? ""} type="number" warning-msg="" label="Nombre de semaines" placeholder="" @change=${this.handleGestationalWeeksChange}></bcbd-input>
1677
1740
  <bcbd-checkbox data-test-id="breastfeeding-checkbox" id="breastfeedingCheckbox" .checked=${this.breastfeeding} label="Allaitement" color="primary" @change=${this.handleBreastfeeding}></bcbd-checkbox>
1678
1741
  </div>`;
1679
1742
  }
@@ -1788,7 +1851,7 @@ __decorateClass$6([
1788
1851
  __decorateClass$6([
1789
1852
  r()
1790
1853
  ], PatientCodeSearchFormBase.prototype, "apiErrorMessage");
1791
- const patientCodeSearchFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
1854
+ const patientCodeSearchFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-little-section__with-info {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n gap: 8px;\n}\n.claudebernard-edition-modal-little-section__with-info bcbd-icon {\n --bcbd-icon-width: 1rem;\n --bcbd-icon-height: 1rem;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
1792
1855
  var __defProp$4 = Object.defineProperty;
1793
1856
  var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
1794
1857
  var __decorateClass$5 = (decorators, target, key, kind) => {
@@ -1880,7 +1943,7 @@ const convertRenalInsufficiency = async (type, value, patient, apiUrl) => {
1880
1943
  });
1881
1944
  return response.json();
1882
1945
  };
1883
- const patientRenalFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
1946
+ const patientRenalFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-little-section__with-info {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n gap: 8px;\n}\n.claudebernard-edition-modal-little-section__with-info bcbd-icon {\n --bcbd-icon-width: 1rem;\n --bcbd-icon-height: 1rem;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
1884
1947
  var __defProp$3 = Object.defineProperty;
1885
1948
  var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
1886
1949
  var __decorateClass$3 = (decorators, target, key, kind) => {
@@ -2016,7 +2079,13 @@ let PatientRenalForm = class extends i$2 {
2016
2079
  <bcbd-input data-test-id="clearance-input" id="clairanceCreatinineInput" type="number" aria-label="Clairance créatinine (ml/min)" .value=${this.clairanceCreatinine <= 0 ? "" : this.clairanceCreatinine} warning-msg="" @change=${() => this.handleRenalConversion(3, Number(this.clairanceCreatinineInput?.value ?? 0))}></bcbd-input>
2017
2080
  </div>
2018
2081
  <div class="${PREFIX}-edition-modal-little-section">
2019
- <span>DFG (mL/min/1.73.m2)</span>
2082
+ <div class="${PREFIX}-edition-modal-little-section__with-info">
2083
+ <span>DFG (mL/min/1.73.m2)</span>
2084
+ <bcbd-tooltip content=${`Dernière date mesurée : ${getPatientGfrDate(this.patientProfile)}`} placement="top" delay="0">
2085
+ <bcbd-icon color="primary" size="medium" icon="circle-info">
2086
+ </bcbd-icon>
2087
+ </bcbd-tooltip>
2088
+ </div>
2020
2089
  <bcbd-input data-test-id="dfg-input" id="dfgInput" type="number" aria-label="DFG (mL/min/1.73.m2)" .value=${this.dfg <= 0 ? "" : this.dfg} warning-msg="" @change=${() => this.handleRenalConversion(4, Number(this.dfgInput?.value ?? 0))}></bcbd-input>
2021
2090
  </div>
2022
2091
  </div>
@@ -2063,7 +2132,7 @@ __decorateClass$3([
2063
2132
  PatientRenalForm = __decorateClass$3([
2064
2133
  t("bcb-patient-renal-form")
2065
2134
  ], PatientRenalForm);
2066
- const patientHepaticFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
2135
+ const patientHepaticFormCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-large-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n width: 100%;\n}\n.claudebernard-edition-modal-information-section {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex-wrap: wrap;\n}\n.claudebernard-edition-modal-information-section span {\n white-space: nowrap;\n}\n.claudebernard-edition-modal-information-section-secondary-group {\n display: flex;\n flex-direction: row;\n gap: 16px;\n flex: 3;\n flex-wrap: wrap;\n}\n@media (max-width: 950px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n flex-basis: 100%;\n }\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-information-section-secondary-group {\n display: contents;\n }\n}\n.claudebernard-edition-modal-little-section {\n display: flex;\n flex-direction: column;\n gap: 5px;\n flex: 1;\n min-width: 0;\n}\n.claudebernard-edition-modal-little-section bcbd-input {\n height: 100%;\n}\n@media (max-width: 600px) {\n .claudebernard-edition-modal-little-section {\n flex: 1 1 calc(50% - 8px);\n }\n .claudebernard-edition-modal-little-section span {\n white-space: nowrap;\n }\n}\n.claudebernard-edition-modal-little-section__with-info {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n gap: 8px;\n}\n.claudebernard-edition-modal-little-section__with-info bcbd-icon {\n --bcbd-icon-width: 1rem;\n --bcbd-icon-height: 1rem;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color, #CF406E);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color, #CBD5E1);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
2067
2136
  var __defProp$2 = Object.defineProperty;
2068
2137
  var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
2069
2138
  var __decorateClass$2 = (decorators, target, key, kind) => {
@@ -2317,6 +2386,13 @@ let PatientProfile = class extends i$2 {
2317
2386
  forms: {
2318
2387
  age: { display: true, readOnly: false },
2319
2388
  sexe: { display: true, readOnly: false }
2389
+ },
2390
+ overview: {
2391
+ warning: {
2392
+ missingWeight: { display: false },
2393
+ missingHeight: { display: false },
2394
+ missingGfr: { display: false }
2395
+ }
2320
2396
  }
2321
2397
  };
2322
2398
  this.moreInformationVisible = false;
@@ -2502,6 +2578,8 @@ let PatientProfile = class extends i$2 {
2502
2578
  const renalStatus = this.displayRenalInsufficiencyStatus();
2503
2579
  const creatinine = this.displayCreatininemieSection();
2504
2580
  const hepatic = this.displayHepaticInsufficiencySection();
2581
+ const patientWeight = getPatientWeight(this.patientProfile);
2582
+ const patientWeightDate = getPatientWeightDate(this.patientProfile);
2505
2583
  const hasSecondaryInfo = [pregnancy, breastfeeding, pathologies, allergies, renalStatus, creatinine, hepatic].some((section) => section !== A);
2506
2584
  return b`
2507
2585
  <div class="${PREFIX}-patient-profile">
@@ -2570,6 +2648,24 @@ let PatientProfile = class extends i$2 {
2570
2648
  <bcbd-button icon=${this.moreInformationVisible ? "chevron-up" : "chevron-down"} size="medium" background-color="primary" aria-label=${this.moreInformationVisible ? "Masquer les informations supplémentaires" : "Afficher les informations supplémentaires"} @click=${this.handleMoreInformation} data-test-id="visible-button"></bcbd-button>
2571
2649
  </div>`}
2572
2650
  </div>
2651
+ <div class="${PREFIX}-patient-profile__alert-container" data-test-id="alert-container">
2652
+ ${patientWeight !== void 0 && patientWeight < 30 && (patientWeightDate !== void 0 && parseDisplayDateToISO(patientWeightDate) < getTodayDateString()) ? b`
2653
+ <bcbd-alert description-message="Attention, le poids renseigné du patient est inférieur à 30kg et n'a pas été saisi aujourd'hui, sa variation même mineure en dessous de 30kg peut avoir un impact significatif sur les thérapies médicamenteuses en cours, il est conseillé de le mettre à jour si vous possédez des informations plus récentes." type="error">
2654
+ </bcbd-alert>
2655
+ ` : A}
2656
+ ${this.preferences?.overview?.warning?.missingWeight?.display && patientWeight === void 0 ? b`
2657
+ <bcbd-alert description-message="Le poids du patient n'étant pas renseigné, les alertes de sécurité du contrôle des posologies pourraient perdre en précision et en pertinence." type="warning">
2658
+ </bcbd-alert>
2659
+ ` : A}
2660
+ ${this.preferences?.overview?.warning?.missingHeight?.display && getPatientHeight(this.patientProfile) === void 0 ? b`
2661
+ <bcbd-alert description-message="La taille du patient n'étant pas renseigné, les alertes de sécurité du contrôle des posologies pourraient perdre en précision et en pertinence." type="warning">
2662
+ </bcbd-alert>
2663
+ ` : A}
2664
+ ${this.preferences?.overview?.warning?.missingGfr?.display && getPatientRenalInsufficiencyStatus(this.patientProfile).gfr === void 0 ? b`
2665
+ <bcbd-alert description-message="La DFG du patient n'étant pas renseigné, les alertes de sécurité du contrôle des posologies pourraient perdre en précision et en pertinence" type="warning">
2666
+ </bcbd-alert>
2667
+ ` : A}
2668
+ </div>
2573
2669
  <div class="${PREFIX}-patient-profile__second-info-container ${this.moreInformationVisible ? "active" : ""}" data-test-id="more-information-section">
2574
2670
  ${pregnancy}
2575
2671
  ${breastfeeding}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudebernard/patient-profile-element",
3
- "version": "0.6.4",
3
+ "version": "0.7.0",
4
4
  "main": "dist/patient-profile.es.js",
5
5
  "module": "dist/patient-profile.es.js",
6
6
  "types": "dist/patient-profile.d.ts",
@@ -46,6 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@chromatic-com/storybook": "^5.0.1",
49
+ "@claudebernard/fhir-prescription-mocks": "^2.4.1",
49
50
  "@claudebernard/storybook-addon-theme-switcher": "0.1.0",
50
51
  "@custom-elements-manifest/analyzer": "^0.11.0",
51
52
  "@hey-api/openapi-ts": "^0.99.0",
@@ -84,7 +85,7 @@
84
85
  "vitest": "^4.0.7"
85
86
  },
86
87
  "peerDependencies": {
87
- "@claudebernard/design-system": "^2.34.2",
88
+ "@claudebernard/design-system": "^2.37.2",
88
89
  "@claudebernard/types": "^0.35.0 || ^0.36.0"
89
90
  },
90
91
  "customElements": "dist/custom-elements.json",