@claudebernard/patient-profile-element 0.3.2 → 0.3.4

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.
@@ -1,6 +1,29 @@
1
1
  import { SearchRequestBody } from "@claudebernard/types";
2
2
  import "@claudebernard/design-system";
3
3
  const PREFIX = "claudebernard";
4
+ function calculateBMI(weight, height) {
5
+ if (height === 0 || weight === 0) {
6
+ return 0;
7
+ }
8
+ const heightInMeters = height / 100;
9
+ return Math.round(weight / (heightInMeters * heightInMeters) * 10) / 10;
10
+ }
11
+ function calculateCreatinineClearance(age, weight, scrMgdl, isFemale) {
12
+ const sexFactor = isFemale ? 0.85 : 1;
13
+ return (140 - age) * weight * sexFactor / (72 * scrMgdl);
14
+ }
15
+ function convertCreatinineUmolToMgdL(creatinineUmolL) {
16
+ return creatinineUmolL / 88.4;
17
+ }
18
+ function convertCreatinineMgdLToUmol(creatinineMgdL) {
19
+ return creatinineMgdL * 88.4;
20
+ }
21
+ function convertCreatinineMgdLToMgL(creatinineMgdL) {
22
+ return creatinineMgdL * 10;
23
+ }
24
+ function convertCreatinineMgLToMgdL(creatinineMgL) {
25
+ return creatinineMgL / 10;
26
+ }
4
27
  const isStrTagged = (val) => typeof val !== "string" && "strTag" in val;
5
28
  const joinStringsAndValues = (strings, values, valueOrder) => {
6
29
  let concat = strings[0];
@@ -81,13 +104,6 @@ const childPughStadeToSnomedMap = {
81
104
  "B": "710066005",
82
105
  "C": "710067001"
83
106
  };
84
- function calculateBMI(weight, height) {
85
- if (height === 0 || weight === 0) {
86
- return 0;
87
- }
88
- const heightInMeters = height / 100;
89
- return Math.round(weight / (heightInMeters * heightInMeters) * 10) / 10;
90
- }
91
107
  function getPatientGender(bundle) {
92
108
  const patient = bundle?.entry?.find(
93
109
  (entry) => entry.resource?.resourceType === "Patient"
@@ -509,8 +525,8 @@ function setPatientGFRByBSA(bundle, gfr) {
509
525
  coding: [
510
526
  {
511
527
  system: "http://loinc.org",
512
- code: acceptedLoincCodesForRenalGFRPerBSA[0],
513
- display: "Glomerular filtration rate [Volume Rate/Area] in Serum, Plasma or Blood by Creatinine-based formula (MDRD)/1.73 sq M among black population"
528
+ code: "48642-3",
529
+ display: "Glomerular filtration rate [Volume Rate/Area] in Serum, Plasma or Blood by Creatinine-based formula (MDRD)/1.73 sq M"
514
530
  }
515
531
  ],
516
532
  text: "DFG"
@@ -846,6 +862,11 @@ function setPatientHepaticInsufficiencyStatus(bundle, stade, score) {
846
862
  }
847
863
  }
848
864
  }
865
+ function deletePatientHepaticInsufficiencyStatus(bundle) {
866
+ bundle.entry = bundle.entry?.filter((entry) => !(entry.resource?.resourceType === "Observation" && entry.resource.code?.coding?.some(
867
+ (coding) => coding.code === "98152-2"
868
+ )));
869
+ }
849
870
  function getPatientConditions(patient) {
850
871
  if (!patient?.entry) {
851
872
  return [];
@@ -881,9 +902,9 @@ function getPatientConditionsWithCode(patient) {
881
902
  }
882
903
  }
883
904
  if (entry.resource.code?.text) {
884
- condition = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code.text, subType };
905
+ condition = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code.text, category: subType };
885
906
  } else {
886
- condition = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code?.coding?.[0].display ?? "", subType };
907
+ condition = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code?.coding?.[0].display ?? "", category: subType };
887
908
  }
888
909
  conditions.push(condition);
889
910
  }
@@ -907,7 +928,7 @@ function setPatientConditions(patient, conditions) {
907
928
  code: {
908
929
  coding: [
909
930
  {
910
- system: condition.subType === "snomed" ? "http://snomed.info/sct" : condition.subType === "CIM10" ? "http://hl7.org/fhir/sid/icd-10" : condition.subType === "AMM" ? "http://example.org/fhir/amm-codes" : "",
931
+ system: condition.category === "snomed" ? "http://snomed.info/sct" : condition.category === "CIM10" ? "http://hl7.org/fhir/sid/icd-10" : condition.category === "AMM" ? "http://example.org/fhir/amm-codes" : "",
911
932
  code: condition.value,
912
933
  display: condition.label
913
934
  }
@@ -947,9 +968,9 @@ function getPatientAllergiesWithCode(patient) {
947
968
  if (entry.resource?.resourceType === "AllergyIntolerance") {
948
969
  let allergy;
949
970
  if (entry.resource.code?.text) {
950
- allergy = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code.text, subType: "" };
971
+ allergy = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code.text, category: "" };
951
972
  } else {
952
- allergy = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code?.coding?.[0].display ?? "", subType: "" };
973
+ allergy = { value: entry.resource.code?.coding?.[0].code ?? "", label: entry.resource.code?.coding?.[0].display ?? "", category: "" };
953
974
  }
954
975
  allergies.push(allergy);
955
976
  }
@@ -996,6 +1017,16 @@ function childPughScore(score) {
996
1017
  }
997
1018
  return msg("Stade C");
998
1019
  }
1020
+ function calculateGFRFromCreatinine(age, isFemale, creatinine) {
1021
+ const sexFactor = isFemale ? 0.742 : 1;
1022
+ const gfr = 186 * (creatinine * 0.0113) ** -1.154 * age ** -0.203 * sexFactor;
1023
+ return round2(gfr);
1024
+ }
1025
+ function calculateCreatinineFromGFR(age, isFemale, gfr) {
1026
+ const sexFactor = isFemale ? 0.742 : 1;
1027
+ const creatinine = 1 / 0.0113 * (gfr / (sexFactor * 186 * age ** -0.203)) ** (-1 / 1.154);
1028
+ return round2(creatinine);
1029
+ }
999
1030
  const t$2 = globalThis, e$4 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = /* @__PURE__ */ Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
1000
1031
  let n$3 = class n {
1001
1032
  constructor(t2, e2, o2) {
@@ -1016,14 +1047,14 @@ let n$3 = class n {
1016
1047
  }
1017
1048
  };
1018
1049
  const r$4 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$2), i$3 = (t2, ...e2) => {
1019
- const o2 = 1 === t2.length ? t2[0] : e2.reduce(((e3, s2, o3) => e3 + ((t3) => {
1050
+ const o2 = 1 === t2.length ? t2[0] : e2.reduce((e3, s2, o3) => e3 + ((t3) => {
1020
1051
  if (true === t3._$cssResult$) return t3.cssText;
1021
1052
  if ("number" == typeof t3) return t3;
1022
1053
  throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
1023
- })(s2) + t2[o3 + 1]), t2[0]);
1054
+ })(s2) + t2[o3 + 1], t2[0]);
1024
1055
  return new n$3(o2, t2, s$2);
1025
1056
  }, S$1 = (s2, o2) => {
1026
- if (e$4) s2.adoptedStyleSheets = o2.map(((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet));
1057
+ if (e$4) s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
1027
1058
  else for (const e2 of o2) {
1028
1059
  const o3 = document.createElement("style"), n3 = t$2.litNonce;
1029
1060
  void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
@@ -1061,7 +1092,7 @@ const { is: i$2, defineProperty: e$3, getOwnPropertyDescriptor: h$1, getOwnPrope
1061
1092
  }
1062
1093
  }
1063
1094
  return i2;
1064
- } }, f$1 = (t2, s2) => !i$2(t2, s2), b = { attribute: true, type: String, converter: u$1, reflect: false, useDefault: false, hasChanged: f$1 };
1095
+ } }, f$1 = (t2, s2) => !i$2(t2, s2), b$1 = { attribute: true, type: String, converter: u$1, reflect: false, useDefault: false, hasChanged: f$1 };
1065
1096
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
1066
1097
  let y$1 = class y extends HTMLElement {
1067
1098
  static addInitializer(t2) {
@@ -1070,7 +1101,7 @@ let y$1 = class y extends HTMLElement {
1070
1101
  static get observedAttributes() {
1071
1102
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
1072
1103
  }
1073
- static createProperty(t2, s2 = b) {
1104
+ static createProperty(t2, s2 = b$1) {
1074
1105
  if (s2.state && (s2.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t2) && ((s2 = Object.create(s2)).wrapped = true), this.elementProperties.set(t2, s2), !s2.noAccessor) {
1075
1106
  const i2 = /* @__PURE__ */ Symbol(), h2 = this.getPropertyDescriptor(t2, i2, s2);
1076
1107
  void 0 !== h2 && e$3(this.prototype, t2, h2);
@@ -1088,7 +1119,7 @@ let y$1 = class y extends HTMLElement {
1088
1119
  }, configurable: true, enumerable: true };
1089
1120
  }
1090
1121
  static getPropertyOptions(t2) {
1091
- return this.elementProperties.get(t2) ?? b;
1122
+ return this.elementProperties.get(t2) ?? b$1;
1092
1123
  }
1093
1124
  static _$Ei() {
1094
1125
  if (this.hasOwnProperty(d$1("elementProperties"))) return;
@@ -1129,7 +1160,7 @@ let y$1 = class y extends HTMLElement {
1129
1160
  super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
1130
1161
  }
1131
1162
  _$Ev() {
1132
- this._$ES = new Promise(((t2) => this.enableUpdating = t2)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t2) => t2(this)));
1163
+ this._$ES = new Promise((t2) => this.enableUpdating = t2), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t2) => t2(this));
1133
1164
  }
1134
1165
  addController(t2) {
1135
1166
  (this._$EO ??= /* @__PURE__ */ new Set()).add(t2), void 0 !== this.renderRoot && this.isConnected && t2.hostConnected?.();
@@ -1147,12 +1178,12 @@ let y$1 = class y extends HTMLElement {
1147
1178
  return S$1(t2, this.constructor.elementStyles), t2;
1148
1179
  }
1149
1180
  connectedCallback() {
1150
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(((t2) => t2.hostConnected?.()));
1181
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t2) => t2.hostConnected?.());
1151
1182
  }
1152
1183
  enableUpdating(t2) {
1153
1184
  }
1154
1185
  disconnectedCallback() {
1155
- this._$EO?.forEach(((t2) => t2.hostDisconnected?.()));
1186
+ this._$EO?.forEach((t2) => t2.hostDisconnected?.());
1156
1187
  }
1157
1188
  attributeChangedCallback(t2, s2, i2) {
1158
1189
  this._$AK(t2, i2);
@@ -1173,10 +1204,10 @@ let y$1 = class y extends HTMLElement {
1173
1204
  this[e2] = r2 ?? this._$Ej?.get(e2) ?? r2, this._$Em = null;
1174
1205
  }
1175
1206
  }
1176
- requestUpdate(t2, s2, i2) {
1207
+ requestUpdate(t2, s2, i2, e2 = false, h2) {
1177
1208
  if (void 0 !== t2) {
1178
- const e2 = this.constructor, h2 = this[t2];
1179
- if (i2 ??= e2.getPropertyOptions(t2), !((i2.hasChanged ?? f$1)(h2, s2) || i2.useDefault && i2.reflect && h2 === this._$Ej?.get(t2) && !this.hasAttribute(e2._$Eu(t2, i2)))) return;
1209
+ const r2 = this.constructor;
1210
+ if (false === e2 && (h2 = this[t2]), i2 ??= r2.getPropertyOptions(t2), !((i2.hasChanged ?? f$1)(h2, s2) || i2.useDefault && i2.reflect && h2 === this._$Ej?.get(t2) && !this.hasAttribute(r2._$Eu(t2, i2)))) return;
1180
1211
  this.C(t2, s2, i2);
1181
1212
  }
1182
1213
  false === this.isUpdatePending && (this._$ES = this._$EP());
@@ -1213,7 +1244,7 @@ let y$1 = class y extends HTMLElement {
1213
1244
  let t2 = false;
1214
1245
  const s2 = this._$AL;
1215
1246
  try {
1216
- t2 = this.shouldUpdate(s2), t2 ? (this.willUpdate(s2), this._$EO?.forEach(((t3) => t3.hostUpdate?.())), this.update(s2)) : this._$EM();
1247
+ t2 = this.shouldUpdate(s2), t2 ? (this.willUpdate(s2), this._$EO?.forEach((t3) => t3.hostUpdate?.()), this.update(s2)) : this._$EM();
1217
1248
  } catch (s3) {
1218
1249
  throw t2 = false, this._$EM(), s3;
1219
1250
  }
@@ -1222,7 +1253,7 @@ let y$1 = class y extends HTMLElement {
1222
1253
  willUpdate(t2) {
1223
1254
  }
1224
1255
  _$AE(t2) {
1225
- this._$EO?.forEach(((t3) => t3.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
1256
+ this._$EO?.forEach((t3) => t3.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
1226
1257
  }
1227
1258
  _$EM() {
1228
1259
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
@@ -1237,76 +1268,76 @@ let y$1 = class y extends HTMLElement {
1237
1268
  return true;
1238
1269
  }
1239
1270
  update(t2) {
1240
- this._$Eq &&= this._$Eq.forEach(((t3) => this._$ET(t3, this[t3]))), this._$EM();
1271
+ this._$Eq &&= this._$Eq.forEach((t3) => this._$ET(t3, this[t3])), this._$EM();
1241
1272
  }
1242
1273
  updated(t2) {
1243
1274
  }
1244
1275
  firstUpdated(t2) {
1245
1276
  }
1246
1277
  };
1247
- y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.1");
1248
- const t$1 = globalThis, i$1 = t$1.trustedTypes, s$1 = i$1 ? i$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$2 = "$lit$", h = `lit$${Math.random().toFixed(9).slice(2)}$`, o$2 = "?" + h, n$1 = `<${o$2}>`, r$2 = document, l = () => r$2.createComment(""), c = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, a = Array.isArray, u = (t2) => a(t2) || "function" == typeof t2?.[Symbol.iterator], d = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
1249
- \f\r"'\`<>=]|("|')|))|$)`, "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y2 = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), x = y2(1), T = /* @__PURE__ */ Symbol.for("lit-noChange"), E = /* @__PURE__ */ Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r$2.createTreeWalker(r$2, 129);
1250
- function P(t2, i2) {
1251
- if (!a(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
1252
- return void 0 !== s$1 ? s$1.createHTML(i2) : i2;
1253
- }
1254
- const V = (t2, i2) => {
1255
- const s2 = t2.length - 1, o2 = [];
1256
- let r2, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = f;
1278
+ y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.2");
1279
+ const t$1 = globalThis, i$1 = (t2) => t2, s$1 = t$1.trustedTypes, e$2 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, h = "$lit$", o$2 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$1 = "?" + o$2, r$2 = `<${n$1}>`, l = document, c = () => l.createComment(""), a = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u = Array.isArray, d = (t2) => u(t2) || "function" == typeof t2?.[Symbol.iterator], f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^
1280
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y2 = /^(?:script|style|textarea|title)$/i, x = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), b = x(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), A = /* @__PURE__ */ Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
1281
+ function V(t2, i2) {
1282
+ if (!u(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
1283
+ return void 0 !== e$2 ? e$2.createHTML(i2) : i2;
1284
+ }
1285
+ const N = (t2, i2) => {
1286
+ const s2 = t2.length - 1, e2 = [];
1287
+ let n3, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = v;
1257
1288
  for (let i3 = 0; i3 < s2; i3++) {
1258
1289
  const s3 = t2[i3];
1259
- let a2, u2, d2 = -1, y3 = 0;
1260
- for (; y3 < s3.length && (c2.lastIndex = y3, u2 = c2.exec(s3), null !== u2); ) y3 = c2.lastIndex, c2 === f ? "!--" === u2[1] ? c2 = v : void 0 !== u2[1] ? c2 = _ : void 0 !== u2[2] ? ($.test(u2[2]) && (r2 = RegExp("</" + u2[2], "g")), c2 = m) : void 0 !== u2[3] && (c2 = m) : c2 === m ? ">" === u2[0] ? (c2 = r2 ?? f, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? m : '"' === u2[3] ? g : p) : c2 === g || c2 === p ? c2 = m : c2 === v || c2 === _ ? c2 = f : (c2 = m, r2 = void 0);
1261
- const x2 = c2 === m && t2[i3 + 1].startsWith("/>") ? " " : "";
1262
- l2 += c2 === f ? s3 + n$1 : d2 >= 0 ? (o2.push(a2), s3.slice(0, d2) + e$2 + s3.slice(d2) + h + x2) : s3 + h + (-2 === d2 ? i3 : x2);
1290
+ let a2, u2, d2 = -1, f2 = 0;
1291
+ for (; f2 < s3.length && (c2.lastIndex = f2, u2 = c2.exec(s3), null !== u2); ) f2 = c2.lastIndex, c2 === v ? "!--" === u2[1] ? c2 = _ : void 0 !== u2[1] ? c2 = m : void 0 !== u2[2] ? (y2.test(u2[2]) && (n3 = RegExp("</" + u2[2], "g")), c2 = p) : void 0 !== u2[3] && (c2 = p) : c2 === p ? ">" === u2[0] ? (c2 = n3 ?? v, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? p : '"' === u2[3] ? $ : g) : c2 === $ || c2 === g ? c2 = p : c2 === _ || c2 === m ? c2 = v : (c2 = p, n3 = void 0);
1292
+ const x2 = c2 === p && t2[i3 + 1].startsWith("/>") ? " " : "";
1293
+ l2 += c2 === v ? s3 + r$2 : d2 >= 0 ? (e2.push(a2), s3.slice(0, d2) + h + s3.slice(d2) + o$2 + x2) : s3 + o$2 + (-2 === d2 ? i3 : x2);
1263
1294
  }
1264
- return [P(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), o2];
1295
+ return [V(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), e2];
1265
1296
  };
1266
- class N {
1267
- constructor({ strings: t2, _$litType$: s2 }, n3) {
1297
+ class S {
1298
+ constructor({ strings: t2, _$litType$: i2 }, e2) {
1268
1299
  let r2;
1269
1300
  this.parts = [];
1270
- let c2 = 0, a2 = 0;
1271
- const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = V(t2, s2);
1272
- if (this.el = N.createElement(f2, n3), C.currentNode = this.el.content, 2 === s2 || 3 === s2) {
1301
+ let l2 = 0, a2 = 0;
1302
+ const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = N(t2, i2);
1303
+ if (this.el = S.createElement(f2, e2), P.currentNode = this.el.content, 2 === i2 || 3 === i2) {
1273
1304
  const t3 = this.el.content.firstChild;
1274
1305
  t3.replaceWith(...t3.childNodes);
1275
1306
  }
1276
- for (; null !== (r2 = C.nextNode()) && d2.length < u2; ) {
1307
+ for (; null !== (r2 = P.nextNode()) && d2.length < u2; ) {
1277
1308
  if (1 === r2.nodeType) {
1278
- if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(e$2)) {
1279
- const i2 = v2[a2++], s3 = r2.getAttribute(t3).split(h), e2 = /([.?@])?(.*)/.exec(i2);
1280
- d2.push({ type: 1, index: c2, name: e2[2], strings: s3, ctor: "." === e2[1] ? H : "?" === e2[1] ? I : "@" === e2[1] ? L : k }), r2.removeAttribute(t3);
1281
- } else t3.startsWith(h) && (d2.push({ type: 6, index: c2 }), r2.removeAttribute(t3));
1282
- if ($.test(r2.tagName)) {
1283
- const t3 = r2.textContent.split(h), s3 = t3.length - 1;
1284
- if (s3 > 0) {
1285
- r2.textContent = i$1 ? i$1.emptyScript : "";
1286
- for (let i2 = 0; i2 < s3; i2++) r2.append(t3[i2], l()), C.nextNode(), d2.push({ type: 2, index: ++c2 });
1287
- r2.append(t3[s3], l());
1309
+ if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(h)) {
1310
+ const i3 = v2[a2++], s2 = r2.getAttribute(t3).split(o$2), e3 = /([.?@])?(.*)/.exec(i3);
1311
+ d2.push({ type: 1, index: l2, name: e3[2], strings: s2, ctor: "." === e3[1] ? I : "?" === e3[1] ? L : "@" === e3[1] ? z : H }), r2.removeAttribute(t3);
1312
+ } else t3.startsWith(o$2) && (d2.push({ type: 6, index: l2 }), r2.removeAttribute(t3));
1313
+ if (y2.test(r2.tagName)) {
1314
+ const t3 = r2.textContent.split(o$2), i3 = t3.length - 1;
1315
+ if (i3 > 0) {
1316
+ r2.textContent = s$1 ? s$1.emptyScript : "";
1317
+ for (let s2 = 0; s2 < i3; s2++) r2.append(t3[s2], c()), P.nextNode(), d2.push({ type: 2, index: ++l2 });
1318
+ r2.append(t3[i3], c());
1288
1319
  }
1289
1320
  }
1290
- } else if (8 === r2.nodeType) if (r2.data === o$2) d2.push({ type: 2, index: c2 });
1321
+ } else if (8 === r2.nodeType) if (r2.data === n$1) d2.push({ type: 2, index: l2 });
1291
1322
  else {
1292
1323
  let t3 = -1;
1293
- for (; -1 !== (t3 = r2.data.indexOf(h, t3 + 1)); ) d2.push({ type: 7, index: c2 }), t3 += h.length - 1;
1324
+ for (; -1 !== (t3 = r2.data.indexOf(o$2, t3 + 1)); ) d2.push({ type: 7, index: l2 }), t3 += o$2.length - 1;
1294
1325
  }
1295
- c2++;
1326
+ l2++;
1296
1327
  }
1297
1328
  }
1298
1329
  static createElement(t2, i2) {
1299
- const s2 = r$2.createElement("template");
1330
+ const s2 = l.createElement("template");
1300
1331
  return s2.innerHTML = t2, s2;
1301
1332
  }
1302
1333
  }
1303
- function S(t2, i2, s2 = t2, e2) {
1304
- if (i2 === T) return i2;
1334
+ function M(t2, i2, s2 = t2, e2) {
1335
+ if (i2 === E) return i2;
1305
1336
  let h2 = void 0 !== e2 ? s2._$Co?.[e2] : s2._$Cl;
1306
- const o2 = c(i2) ? void 0 : i2._$litDirective$;
1307
- return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ??= [])[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = S(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
1337
+ const o2 = a(i2) ? void 0 : i2._$litDirective$;
1338
+ return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ??= [])[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = M(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
1308
1339
  }
1309
- class M {
1340
+ class R {
1310
1341
  constructor(t2, i2) {
1311
1342
  this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
1312
1343
  }
@@ -1317,29 +1348,29 @@ class M {
1317
1348
  return this._$AM._$AU;
1318
1349
  }
1319
1350
  u(t2) {
1320
- const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = (t2?.creationScope ?? r$2).importNode(i2, true);
1321
- C.currentNode = e2;
1322
- let h2 = C.nextNode(), o2 = 0, n3 = 0, l2 = s2[0];
1323
- for (; void 0 !== l2; ) {
1324
- if (o2 === l2.index) {
1351
+ const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = (t2?.creationScope ?? l).importNode(i2, true);
1352
+ P.currentNode = e2;
1353
+ let h2 = P.nextNode(), o2 = 0, n3 = 0, r2 = s2[0];
1354
+ for (; void 0 !== r2; ) {
1355
+ if (o2 === r2.index) {
1325
1356
  let i3;
1326
- 2 === l2.type ? i3 = new R(h2, h2.nextSibling, this, t2) : 1 === l2.type ? i3 = new l2.ctor(h2, l2.name, l2.strings, this, t2) : 6 === l2.type && (i3 = new z(h2, this, t2)), this._$AV.push(i3), l2 = s2[++n3];
1357
+ 2 === r2.type ? i3 = new k(h2, h2.nextSibling, this, t2) : 1 === r2.type ? i3 = new r2.ctor(h2, r2.name, r2.strings, this, t2) : 6 === r2.type && (i3 = new Z(h2, this, t2)), this._$AV.push(i3), r2 = s2[++n3];
1327
1358
  }
1328
- o2 !== l2?.index && (h2 = C.nextNode(), o2++);
1359
+ o2 !== r2?.index && (h2 = P.nextNode(), o2++);
1329
1360
  }
1330
- return C.currentNode = r$2, e2;
1361
+ return P.currentNode = l, e2;
1331
1362
  }
1332
1363
  p(t2) {
1333
1364
  let i2 = 0;
1334
1365
  for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
1335
1366
  }
1336
1367
  }
1337
- class R {
1368
+ class k {
1338
1369
  get _$AU() {
1339
1370
  return this._$AM?._$AU ?? this._$Cv;
1340
1371
  }
1341
1372
  constructor(t2, i2, s2, e2) {
1342
- this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = e2?.isConnected ?? true;
1373
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = e2?.isConnected ?? true;
1343
1374
  }
1344
1375
  get parentNode() {
1345
1376
  let t2 = this._$AA.parentNode;
@@ -1353,7 +1384,7 @@ class R {
1353
1384
  return this._$AB;
1354
1385
  }
1355
1386
  _$AI(t2, i2 = this) {
1356
- t2 = S(this, t2, i2), c(t2) ? t2 === E || null == t2 || "" === t2 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t2 !== this._$AH && t2 !== T && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : u(t2) ? this.k(t2) : this._(t2);
1387
+ t2 = M(this, t2, i2), a(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== E && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : d(t2) ? this.k(t2) : this._(t2);
1357
1388
  }
1358
1389
  O(t2) {
1359
1390
  return this._$AA.parentNode.insertBefore(t2, this._$AB);
@@ -1362,38 +1393,38 @@ class R {
1362
1393
  this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
1363
1394
  }
1364
1395
  _(t2) {
1365
- this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(r$2.createTextNode(t2)), this._$AH = t2;
1396
+ this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(l.createTextNode(t2)), this._$AH = t2;
1366
1397
  }
1367
1398
  $(t2) {
1368
- const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = N.createElement(P(s2.h, s2.h[0]), this.options)), s2);
1399
+ const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = S.createElement(V(s2.h, s2.h[0]), this.options)), s2);
1369
1400
  if (this._$AH?._$AD === e2) this._$AH.p(i2);
1370
1401
  else {
1371
- const t3 = new M(e2, this), s3 = t3.u(this.options);
1402
+ const t3 = new R(e2, this), s3 = t3.u(this.options);
1372
1403
  t3.p(i2), this.T(s3), this._$AH = t3;
1373
1404
  }
1374
1405
  }
1375
1406
  _$AC(t2) {
1376
- let i2 = A.get(t2.strings);
1377
- return void 0 === i2 && A.set(t2.strings, i2 = new N(t2)), i2;
1407
+ let i2 = C.get(t2.strings);
1408
+ return void 0 === i2 && C.set(t2.strings, i2 = new S(t2)), i2;
1378
1409
  }
1379
1410
  k(t2) {
1380
- a(this._$AH) || (this._$AH = [], this._$AR());
1411
+ u(this._$AH) || (this._$AH = [], this._$AR());
1381
1412
  const i2 = this._$AH;
1382
1413
  let s2, e2 = 0;
1383
- for (const h2 of t2) e2 === i2.length ? i2.push(s2 = new R(this.O(l()), this.O(l()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
1414
+ for (const h2 of t2) e2 === i2.length ? i2.push(s2 = new k(this.O(c()), this.O(c()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
1384
1415
  e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
1385
1416
  }
1386
- _$AR(t2 = this._$AA.nextSibling, i2) {
1387
- for (this._$AP?.(false, true, i2); t2 !== this._$AB; ) {
1388
- const i3 = t2.nextSibling;
1389
- t2.remove(), t2 = i3;
1417
+ _$AR(t2 = this._$AA.nextSibling, s2) {
1418
+ for (this._$AP?.(false, true, s2); t2 !== this._$AB; ) {
1419
+ const s3 = i$1(t2).nextSibling;
1420
+ i$1(t2).remove(), t2 = s3;
1390
1421
  }
1391
1422
  }
1392
1423
  setConnected(t2) {
1393
1424
  void 0 === this._$AM && (this._$Cv = t2, this._$AP?.(t2));
1394
1425
  }
1395
1426
  }
1396
- class k {
1427
+ class H {
1397
1428
  get tagName() {
1398
1429
  return this.element.tagName;
1399
1430
  }
@@ -1401,53 +1432,53 @@ class k {
1401
1432
  return this._$AM._$AU;
1402
1433
  }
1403
1434
  constructor(t2, i2, s2, e2, h2) {
1404
- this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = E;
1435
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
1405
1436
  }
1406
1437
  _$AI(t2, i2 = this, s2, e2) {
1407
1438
  const h2 = this.strings;
1408
1439
  let o2 = false;
1409
- if (void 0 === h2) t2 = S(this, t2, i2, 0), o2 = !c(t2) || t2 !== this._$AH && t2 !== T, o2 && (this._$AH = t2);
1440
+ if (void 0 === h2) t2 = M(this, t2, i2, 0), o2 = !a(t2) || t2 !== this._$AH && t2 !== E, o2 && (this._$AH = t2);
1410
1441
  else {
1411
1442
  const e3 = t2;
1412
1443
  let n3, r2;
1413
- for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r2 = S(this, e3[s2 + n3], i2, n3), r2 === T && (r2 = this._$AH[n3]), o2 ||= !c(r2) || r2 !== this._$AH[n3], r2 === E ? t2 = E : t2 !== E && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
1444
+ for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r2 = M(this, e3[s2 + n3], i2, n3), r2 === E && (r2 = this._$AH[n3]), o2 ||= !a(r2) || r2 !== this._$AH[n3], r2 === A ? t2 = A : t2 !== A && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
1414
1445
  }
1415
1446
  o2 && !e2 && this.j(t2);
1416
1447
  }
1417
1448
  j(t2) {
1418
- t2 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
1449
+ t2 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
1419
1450
  }
1420
1451
  }
1421
- class H extends k {
1452
+ class I extends H {
1422
1453
  constructor() {
1423
1454
  super(...arguments), this.type = 3;
1424
1455
  }
1425
1456
  j(t2) {
1426
- this.element[this.name] = t2 === E ? void 0 : t2;
1457
+ this.element[this.name] = t2 === A ? void 0 : t2;
1427
1458
  }
1428
1459
  }
1429
- class I extends k {
1460
+ class L extends H {
1430
1461
  constructor() {
1431
1462
  super(...arguments), this.type = 4;
1432
1463
  }
1433
1464
  j(t2) {
1434
- this.element.toggleAttribute(this.name, !!t2 && t2 !== E);
1465
+ this.element.toggleAttribute(this.name, !!t2 && t2 !== A);
1435
1466
  }
1436
1467
  }
1437
- class L extends k {
1468
+ class z extends H {
1438
1469
  constructor(t2, i2, s2, e2, h2) {
1439
1470
  super(t2, i2, s2, e2, h2), this.type = 5;
1440
1471
  }
1441
1472
  _$AI(t2, i2 = this) {
1442
- if ((t2 = S(this, t2, i2, 0) ?? E) === T) return;
1443
- const s2 = this._$AH, e2 = t2 === E && s2 !== E || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== E && (s2 === E || e2);
1473
+ if ((t2 = M(this, t2, i2, 0) ?? A) === E) return;
1474
+ const s2 = this._$AH, e2 = t2 === A && s2 !== A || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== A && (s2 === A || e2);
1444
1475
  e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
1445
1476
  }
1446
1477
  handleEvent(t2) {
1447
1478
  "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t2) : this._$AH.handleEvent(t2);
1448
1479
  }
1449
1480
  }
1450
- class z {
1481
+ class Z {
1451
1482
  constructor(t2, i2, s2) {
1452
1483
  this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
1453
1484
  }
@@ -1455,17 +1486,17 @@ class z {
1455
1486
  return this._$AM._$AU;
1456
1487
  }
1457
1488
  _$AI(t2) {
1458
- S(this, t2);
1489
+ M(this, t2);
1459
1490
  }
1460
1491
  }
1461
- const j = t$1.litHtmlPolyfillSupport;
1462
- j?.(N, R), (t$1.litHtmlVersions ??= []).push("3.3.1");
1463
- const B = (t2, i2, s2) => {
1492
+ const B = t$1.litHtmlPolyfillSupport;
1493
+ B?.(S, k), (t$1.litHtmlVersions ??= []).push("3.3.2");
1494
+ const D = (t2, i2, s2) => {
1464
1495
  const e2 = s2?.renderBefore ?? i2;
1465
1496
  let h2 = e2._$litPart$;
1466
1497
  if (void 0 === h2) {
1467
1498
  const t3 = s2?.renderBefore ?? null;
1468
- e2._$litPart$ = h2 = new R(i2.insertBefore(l(), t3), t3, void 0, s2 ?? {});
1499
+ e2._$litPart$ = h2 = new k(i2.insertBefore(c(), t3), t3, void 0, s2 ?? {});
1469
1500
  }
1470
1501
  return h2._$AI(t2), h2;
1471
1502
  };
@@ -1480,7 +1511,7 @@ class i extends y$1 {
1480
1511
  }
1481
1512
  update(t2) {
1482
1513
  const r2 = this.render();
1483
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do = B(r2, this.renderRoot, this.renderOptions);
1514
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do = D(r2, this.renderRoot, this.renderOptions);
1484
1515
  }
1485
1516
  connectedCallback() {
1486
1517
  super.connectedCallback(), this._$Do?.setConnected(true);
@@ -1489,17 +1520,17 @@ class i extends y$1 {
1489
1520
  super.disconnectedCallback(), this._$Do?.setConnected(false);
1490
1521
  }
1491
1522
  render() {
1492
- return T;
1523
+ return E;
1493
1524
  }
1494
1525
  }
1495
1526
  i._$litElement$ = true, i["finalized"] = true, s.litElementHydrateSupport?.({ LitElement: i });
1496
1527
  const o$1 = s.litElementPolyfillSupport;
1497
1528
  o$1?.({ LitElement: i });
1498
- (s.litElementVersions ??= []).push("4.2.1");
1529
+ (s.litElementVersions ??= []).push("4.2.2");
1499
1530
  const t = (t2) => (e2, o2) => {
1500
- void 0 !== o2 ? o2.addInitializer((() => {
1531
+ void 0 !== o2 ? o2.addInitializer(() => {
1501
1532
  customElements.define(t2, e2);
1502
- })) : customElements.define(t2, e2);
1533
+ }) : customElements.define(t2, e2);
1503
1534
  };
1504
1535
  const o = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 }, r$1 = (t2 = o, e2, r2) => {
1505
1536
  const { kind: n3, metadata: i2 } = r2;
@@ -1508,7 +1539,7 @@ const o = { attribute: true, type: String, converter: u$1, reflect: false, hasCh
1508
1539
  const { name: o2 } = r2;
1509
1540
  return { set(r3) {
1510
1541
  const n4 = e2.get.call(this);
1511
- e2.set.call(this, r3), this.requestUpdate(o2, n4, t2);
1542
+ e2.set.call(this, r3), this.requestUpdate(o2, n4, t2, true, r3);
1512
1543
  }, init(e3) {
1513
1544
  return void 0 !== e3 && this.C(o2, void 0, t2, e3), e3;
1514
1545
  } };
@@ -1517,7 +1548,7 @@ const o = { attribute: true, type: String, converter: u$1, reflect: false, hasCh
1517
1548
  const { name: o2 } = r2;
1518
1549
  return function(r3) {
1519
1550
  const n4 = this[o2];
1520
- e2.call(this, r3), this.requestUpdate(o2, n4, t2);
1551
+ e2.call(this, r3), this.requestUpdate(o2, n4, t2, true, r3);
1521
1552
  };
1522
1553
  }
1523
1554
  throw Error("Unsupported decorator location: " + n3);
@@ -1575,7 +1606,7 @@ const fetchMoleculesByTerm = async (term, params, apiUrl) => {
1575
1606
  });
1576
1607
  return response.json();
1577
1608
  };
1578
- const patientProfileEditionCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-content {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 60vw;\n height: 100%;\n max-height: 60vh;\n gap: 16px;\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}\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.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}\n.claudebernard-edition-modal-action-buttons {\n display: flex;\n justify-content: flex-end;\n height: 100%;\n gap: 16px;\n padding-top: 10px;\n padding-bottom: 30px;\n align-items: flex-end;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-age-input-group {\n display: flex;\n gap: 8px;\n}\n.claudebernard-edition-modal-age-input-group bcbd-input {\n width: 50% !important;\n}\n.claudebernard-edition-modal-age-input-group bcbd-select {\n width: 50% !important;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color);\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}";
1609
+ const patientProfileEditionCSS = ".claudebernard-edition-modal {\n font-size: 0.9rem;\n}\n.claudebernard-edition-modal-content {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 60vw;\n height: 100%;\n max-height: 60vh;\n gap: 16px;\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}\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.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}\n.claudebernard-edition-modal-action-buttons {\n display: flex;\n justify-content: flex-end;\n height: 100%;\n gap: 16px;\n padding-top: 10px;\n padding-bottom: 30px;\n align-items: flex-end;\n}\n.claudebernard-edition-modal-subtitle {\n font-weight: 600;\n font-size: 1.1rem;\n color: var(--bcbd-primary-color);\n}\n.claudebernard-edition-modal-error-message {\n color: var(--bcbd-danger-color);\n font-size: 0.8rem;\n}\n.claudebernard-edition-modal-age-input-group {\n display: flex;\n gap: 8px;\n}\n.claudebernard-edition-modal-age-input-group bcbd-input {\n width: 50% !important;\n}\n.claudebernard-edition-modal-age-input-group bcbd-select {\n width: 50% !important;\n}\n.claudebernard-edition-modal-fieldset {\n border: 1px solid var(--bcbd-border-gray-color);\n margin-inline: 0;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n.claudebernard-edition-modal-disclaimer-section {\n font-size: 0.8rem;\n}\n\nbcbd-checkbox {\n --bcbd-checkbox-font-size: .9rem;\n}";
1579
1610
  var __defProp$1 = Object.defineProperty;
1580
1611
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
1581
1612
  var __decorateClass$1 = (decorators, target, key, kind) => {
@@ -1612,6 +1643,7 @@ let PatientProfileEdition = class extends i {
1612
1643
  this.allergyOptions = [];
1613
1644
  this.selectedPathologyOptions = [];
1614
1645
  this.selectedAllergyOptions = [];
1646
+ this.imc = 0;
1615
1647
  }
1616
1648
  open() {
1617
1649
  this.editionModalElement.open();
@@ -1625,6 +1657,7 @@ let PatientProfileEdition = class extends i {
1625
1657
  }
1626
1658
  }
1627
1659
  firstUpdated() {
1660
+ this.imc = calculateBMI(getPatientWeight(this.patientProfile) ?? 0, getPatientHeight(this.patientProfile) ?? 0);
1628
1661
  this.defaultPatientSex = this.getPatientSexFromProfile();
1629
1662
  this.defaultHepaticStade = this.getPatientHepaticStadeFromProfile();
1630
1663
  this.selectedPathologyOptions = getPatientConditionsWithCode(this.patientProfile);
@@ -1694,6 +1727,7 @@ let PatientProfileEdition = class extends i {
1694
1727
  this.sizeErrorMessageInput = "";
1695
1728
  }
1696
1729
  this.sizeInput.setAttribute("warning-msg", this.sizeErrorMessageInput);
1730
+ this.imc = calculateBMI(Number(this.weightInput?.value ?? 0), size);
1697
1731
  }
1698
1732
  verifyWeightInput() {
1699
1733
  const weight = Number(this.weightInput?.value ?? 0);
@@ -1703,6 +1737,7 @@ let PatientProfileEdition = class extends i {
1703
1737
  this.weightErrorMessageInput = "";
1704
1738
  }
1705
1739
  this.weightInput.setAttribute("warning-msg", this.weightErrorMessageInput);
1740
+ this.imc = calculateBMI(weight, Number(this.sizeInput?.value ?? 0));
1706
1741
  }
1707
1742
  getPatientSexFromProfile() {
1708
1743
  let gender = getPatientGender(this.patientProfile);
@@ -1735,7 +1770,7 @@ let PatientProfileEdition = class extends i {
1735
1770
  return;
1736
1771
  }
1737
1772
  this.creatinineByUmol = inputValue;
1738
- const scrMgdl = inputValue / 88.4;
1773
+ const scrMgdl = convertCreatinineUmolToMgdL(inputValue);
1739
1774
  if (scrMgdl <= 0) {
1740
1775
  return;
1741
1776
  }
@@ -1743,16 +1778,16 @@ let PatientProfileEdition = class extends i {
1743
1778
  const weight = getPatientWeight(this.patientProfile);
1744
1779
  const gender = getPatientGender(this.patientProfile);
1745
1780
  const isFemale = gender === "Femme";
1746
- const sexFactor = isFemale ? 0.85 : 1;
1747
1781
  if (!age || !weight || !gender) {
1748
1782
  this.clairanceCreatinine = 0;
1749
1783
  this.creatinineByMg = 0;
1750
1784
  return;
1751
1785
  }
1752
- const clearance = (140 - age) * weight * sexFactor / (72 * scrMgdl);
1786
+ const clearance = calculateCreatinineClearance(age, weight, scrMgdl, isFemale);
1753
1787
  this.clairanceCreatinine = Math.round(clearance);
1754
- const scrMgl = scrMgdl * 10;
1788
+ const scrMgl = convertCreatinineMgdLToMgL(scrMgdl);
1755
1789
  this.creatinineByMg = Math.round(scrMgl);
1790
+ this.dfg = Math.round(calculateGFRFromCreatinine(age, isFemale, inputValue));
1756
1791
  }
1757
1792
  setFormWithCreatinineMgL() {
1758
1793
  const inputValue = Number(this.creatinineMgLInput?.value ?? "");
@@ -1760,7 +1795,7 @@ let PatientProfileEdition = class extends i {
1760
1795
  return;
1761
1796
  }
1762
1797
  this.creatinineByMg = inputValue;
1763
- const scrMgdl = inputValue / 10;
1798
+ const scrMgdl = convertCreatinineMgLToMgdL(inputValue);
1764
1799
  if (scrMgdl <= 0) {
1765
1800
  return;
1766
1801
  }
@@ -1768,16 +1803,16 @@ let PatientProfileEdition = class extends i {
1768
1803
  const weight = getPatientWeight(this.patientProfile);
1769
1804
  const gender = getPatientGender(this.patientProfile);
1770
1805
  const isFemale = gender === "Femme";
1771
- const sexFactor = isFemale ? 0.85 : 1;
1772
1806
  if (!age || !weight || !gender) {
1773
1807
  this.clairanceCreatinine = 0;
1774
1808
  this.creatinineByUmol = 0;
1775
1809
  return;
1776
1810
  }
1777
- const clearance = (140 - age) * weight * sexFactor / (72 * scrMgdl);
1811
+ const clearance = calculateCreatinineClearance(age, weight, scrMgdl, isFemale);
1778
1812
  this.clairanceCreatinine = Math.round(clearance);
1779
- const scrUmolL = scrMgdl * 88.4;
1813
+ const scrUmolL = convertCreatinineMgdLToUmol(scrMgdl);
1780
1814
  this.creatinineByUmol = Math.round(scrUmolL);
1815
+ this.dfg = Math.round(calculateGFRFromCreatinine(age, isFemale, scrUmolL));
1781
1816
  }
1782
1817
  setFormWithClairance() {
1783
1818
  const inputValue = Number(this.clairanceCreatinineInput?.value ?? "");
@@ -1801,12 +1836,30 @@ let PatientProfileEdition = class extends i {
1801
1836
  this.creatinineByMg = Math.round(this.creatinineByMg);
1802
1837
  this.creatinineByUmol = creatinineByUmol?.value ?? 0;
1803
1838
  this.creatinineByUmol = Math.round(this.creatinineByUmol);
1839
+ this.dfg = Math.round(calculateGFRFromCreatinine(age, isFemale, creatinineByUmol?.value ?? 0));
1840
+ }
1841
+ setFormWithDFG() {
1842
+ const inputValue = Number(this.dfgInput?.value ?? "");
1843
+ if (isNaN(inputValue) || inputValue <= 0) {
1844
+ return;
1845
+ }
1846
+ this.dfg = inputValue;
1847
+ const age = getPatientAge(this.patientProfile) ?? 0;
1848
+ const weight = getPatientWeight(this.patientProfile) ?? 0;
1849
+ const gender = getPatientGender(this.patientProfile);
1850
+ const isFemale = gender === "Femme";
1851
+ const creatinine = calculateCreatinineFromGFR(age, isFemale, this.dfg);
1852
+ this.creatinineByUmol = Math.round(creatinine);
1853
+ const scrMgdl = convertCreatinineUmolToMgdL(creatinine);
1854
+ this.creatinineByMg = Math.round(convertCreatinineMgdLToMgL(scrMgdl));
1855
+ const clearance = calculateCreatinineClearance(age, weight, scrMgdl, isFemale);
1856
+ this.clairanceCreatinine = Math.round(clearance);
1804
1857
  }
1805
1858
  apiReturntoSelectOption(pathology) {
1806
1859
  return {
1807
1860
  value: pathology.code,
1808
1861
  label: pathology.label,
1809
- subType: pathology.subType
1862
+ category: pathology.subType
1810
1863
  };
1811
1864
  }
1812
1865
  searchPathologies(event) {
@@ -1859,6 +1912,23 @@ let PatientProfileEdition = class extends i {
1859
1912
  this.selectedAllergyOptions = [...updatedSelections, ...newSelections];
1860
1913
  this.allergyOptions = [];
1861
1914
  }
1915
+ handleHepaticStade(event) {
1916
+ if (event.detail === null) {
1917
+ this.childPughInput.value = "";
1918
+ }
1919
+ }
1920
+ handleHepaticScore() {
1921
+ const childPughInputScore = Number(this.childPughInput?.value ?? "");
1922
+ if (isNaN(childPughInputScore) || childPughInputScore <= 0) {
1923
+ this.hepaticStadeSelect.value = "";
1924
+ } else {
1925
+ const stade = childPughScore(childPughInputScore);
1926
+ const selectedOption = hepaticStadeOptions.find((option) => option.label === stade);
1927
+ if (selectedOption) {
1928
+ this.hepaticStadeSelect.value = selectedOption.value;
1929
+ }
1930
+ }
1931
+ }
1862
1932
  // eslint-disable-next-line complexity
1863
1933
  validateForm() {
1864
1934
  if (!this.patientProfile) {
@@ -1902,6 +1972,8 @@ let PatientProfileEdition = class extends i {
1902
1972
  }
1903
1973
  if (hepaticStade === "A" || hepaticStade === "B" || hepaticStade === "C") {
1904
1974
  setPatientHepaticInsufficiencyStatus(this.patientProfile, hepaticStade, childPughScore2);
1975
+ } else {
1976
+ deletePatientHepaticInsufficiencyStatus(this.patientProfile);
1905
1977
  }
1906
1978
  if (!this.isPregnancyDivVisible) {
1907
1979
  this.isPregnant = false;
@@ -1928,7 +2000,7 @@ let PatientProfileEdition = class extends i {
1928
2000
  this.editionModalElement.close();
1929
2001
  }
1930
2002
  render() {
1931
- return x`
2003
+ return b`
1932
2004
  <bcbd-modal title="Édition du profil patient" persistent id="patient-profile-edition-modal" class="${PREFIX}-edition-modal" data-test-id="patient-profile-edition-modal" >
1933
2005
  <div class="${PREFIX}-edition-modal-content">
1934
2006
  <div class="${PREFIX}-edition-modal-large-section">
@@ -1939,10 +2011,6 @@ let PatientProfileEdition = class extends i {
1939
2011
  <span>Sexe</span>
1940
2012
  <bcbd-select data-test-id="sex-select" id="genderSelect" placeholder="Choisir" .options=${sexOptions} .selectedOptions=${this.defaultPatientSex} @change=${this.modifyGender}></bcbd-select>
1941
2013
  </div>
1942
- <div class="${PREFIX}-edition-modal-little-section">
1943
- <span>Taille (cm)</span>
1944
- <bcbd-input data-test-id="size-input" id="sizeInput" type="number" .value=${getPatientHeight(this.patientProfile) ?? ""} warning-msg="" @input=${this.verifySizeInput}></bcbd-input>
1945
- </div>
1946
2014
  <div class="${PREFIX}-edition-modal-little-section">
1947
2015
  <span>Age</span>
1948
2016
  <div class="${PREFIX}-edition-modal-age-input-group">
@@ -1950,28 +2018,36 @@ let PatientProfileEdition = class extends i {
1950
2018
  <bcbd-select data-test-id="age-unit-select" id="ageUnitSelect" .options=${ageOptions} .selectedOptions=${this.defaultPatientUnitAge} @change=${this.handleAgeUnit}></bcbd-select>
1951
2019
  </div>
1952
2020
  </div>
2021
+ <div class="${PREFIX}-edition-modal-little-section">
2022
+ <span>Taille (cm)</span>
2023
+ <bcbd-input data-test-id="size-input" id="sizeInput" type="number" .value=${getPatientHeight(this.patientProfile) ?? ""} warning-msg="" @input=${this.verifySizeInput}></bcbd-input>
2024
+ </div>
1953
2025
  <div class="${PREFIX}-edition-modal-little-section">
1954
2026
  <span>Poids (kg)</span>
1955
2027
  <bcbd-input data-test-id="weight-input" id="weightInput" type="number" .value=${getPatientWeight(this.patientProfile) ?? ""} warning-msg="" @input=${this.verifyWeightInput}></bcbd-input>
1956
2028
  </div>
2029
+ <div class="${PREFIX}-edition-modal-little-section">
2030
+ <span>IMC</span>
2031
+ <bcbd-input data-test-id="weight-input" id="weightInput" type="number" disabled .value=${this.imc} warning-msg=""></bcbd-input>
2032
+ </div>
1957
2033
  </div>
1958
- ${this.isPregnancyDivVisible ? x`
2034
+ ${this.isPregnancyDivVisible ? b`
1959
2035
  <div class="${PREFIX}-edition-modal-pregnant-div">
1960
2036
  <bcbd-checkbox data-test-id="pregnancy-checkbox" id="pregnancyCheckbox" .checked=${this.isPregnant} label="Grossesse" color="primary" @change=${this.handlePregnancy}></bcbd-checkbox>
1961
2037
  <bcbd-input data-test-id="gestational-input" id="gestationalWeeksInput" .value=${getPatientAmenorrheaStatus(this.patientProfile)} type="number" warning-msg="" label="Nombre de semaines" placeholder=""></bcbd-input>
1962
2038
  <bcbd-checkbox data-test-id="breastfeeding-checkbox" id="breastfeedingCheckbox" .checked=${this.breastfeeding} label="Allaitement" color="primary" @change=${this.handleBreastfeeding}></bcbd-checkbox>
1963
- </div>` : x` `}
2039
+ </div>` : b` `}
1964
2040
 
1965
2041
  <div class="${PREFIX}-edition-modal-large-section">
1966
2042
  <span>Pathologies suivies</span>
1967
- ${this.pathologiesApiErrorMessage !== "" ? x`<span class="${PREFIX}-edition-modal-error-message">${this.pathologiesApiErrorMessage}</span>` : x` `}
2043
+ ${this.pathologiesApiErrorMessage !== "" ? b`<span class="${PREFIX}-edition-modal-error-message">${this.pathologiesApiErrorMessage}</span>` : b` `}
1968
2044
  <bcbd-select data-test-id="pathologies-select" id="pathologiesSelect" use-input multiple
1969
2045
  .selectedOptions=${this.selectedPathologyOptions} .options=${this.pathologyOptions}
1970
2046
  @filter=${this.searchPathologies} @change=${this.updatePathologies}></bcbd-select>
1971
2047
  </div>
1972
2048
  <div class="${PREFIX}-edition-modal-large-section">
1973
2049
  <span>Allergies</span>
1974
- ${this.allergiesApiErrorMessage !== "" ? x`<span class="${PREFIX}-edition-modal-error-message">${this.allergiesApiErrorMessage}</span>` : x` `}
2050
+ ${this.allergiesApiErrorMessage !== "" ? b`<span class="${PREFIX}-edition-modal-error-message">${this.allergiesApiErrorMessage}</span>` : b` `}
1975
2051
  <bcbd-select data-test-id="allergies-select" id="allergiesSelect" use-input multiple
1976
2052
  .selectedOptions=${this.selectedAllergyOptions} .options=${this.allergyOptions}
1977
2053
  @filter=${this.searchAllergies} @change=${this.updateAllergies}
@@ -1998,7 +2074,7 @@ let PatientProfileEdition = class extends i {
1998
2074
  </div>
1999
2075
  <div class="${PREFIX}-edition-modal-little-section">
2000
2076
  <span>DFG (mL/min/1.73.m2)</span>
2001
- <bcbd-input data-test-id="dfg-input" id="dfgInput" type="number" .value=${this.dfg <= 0 ? "" : this.dfg} warning-msg=""></bcbd-input>
2077
+ <bcbd-input data-test-id="dfg-input" id="dfgInput" type="number" .value=${this.dfg <= 0 ? "" : this.dfg} warning-msg="" @input=${this.setFormWithDFG}></bcbd-input>
2002
2078
  </div>
2003
2079
  </div>
2004
2080
  </fieldset>
@@ -2010,14 +2086,22 @@ let PatientProfileEdition = class extends i {
2010
2086
  <div class="${PREFIX}-edition-modal-information-section">
2011
2087
  <div class="${PREFIX}-edition-modal-little-section">
2012
2088
  <span>Stade de l'insuffisance hépatique</span>
2013
- <bcbd-select data-test-id="hepatic-stade-select" id="hepaticStadeSelect" .options=${hepaticStadeOptions} .selectedOptions=${this.defaultHepaticStade}></bcbd-select>
2089
+ <bcbd-select data-test-id="hepatic-stade-select" id="hepaticStadeSelect"
2090
+ .options=${hepaticStadeOptions} .selectedOptions=${this.defaultHepaticStade} clearable
2091
+ @change=${this.handleHepaticStade}>
2092
+ </bcbd-select>
2014
2093
  </div>
2015
2094
  <div class="${PREFIX}-edition-modal-little-section">
2016
2095
  <span>Score de Child-Pugh</span>
2017
- <bcbd-input data-test-id="hepatic-score-input" id="childPughInput" type="number" warning-msg="" .value=${getPatientHepaticInsufficiencyScore(this.patientProfile)}></bcbd-input>
2096
+ <bcbd-input data-test-id="hepatic-score-input" id="childPughInput" type="number" warning-msg=""
2097
+ .value=${getPatientHepaticInsufficiencyScore(this.patientProfile)} @input=${this.handleHepaticScore}></bcbd-input>
2018
2098
  </div>
2019
2099
  </div>
2020
2100
  </fieldset>
2101
+
2102
+ <div class="${PREFIX}-edition-modal-disclaimer-section">
2103
+ <b>Important :</b> La qualité des alertes générées est directement liée à l'exhaustivité des données patient renseignées. Des informations incomplètes peuvent entraîner des alertes manquantes ou peu pertinentes. Nous vous recommandons de compléter l'ensemble des champs disponibles pour une analyse pharmaceutique fiable.
2104
+ </div>
2021
2105
 
2022
2106
  <div class="${PREFIX}-edition-modal-action-buttons" data-test-id="action-buttons">
2023
2107
  <bcbd-button ?disabled=${this.ageErrorMessageInput !== "" || this.sizeErrorMessageInput !== "" || this.weightErrorMessageInput !== ""}
@@ -2107,6 +2191,9 @@ __decorateClass$1([
2107
2191
  __decorateClass$1([
2108
2192
  r()
2109
2193
  ], PatientProfileEdition.prototype, "selectedAllergyOptions", 2);
2194
+ __decorateClass$1([
2195
+ r()
2196
+ ], PatientProfileEdition.prototype, "imc", 2);
2110
2197
  __decorateClass$1([
2111
2198
  e("#sizeInput")
2112
2199
  ], PatientProfileEdition.prototype, "sizeInput", 2);
@@ -2172,10 +2259,10 @@ let PatientProfile = class extends i {
2172
2259
  }
2173
2260
  displayRenalInsufficiencyStatus() {
2174
2261
  const renalStatus = getPatientRenalInsufficiencyStatus(this.patientProfile);
2175
- let renderRenalInsufficiency = E;
2262
+ let renderRenalInsufficiency = A;
2176
2263
  if (renalStatus.clearance?.value) {
2177
2264
  const clearance = renalStatus.clearance;
2178
- renderRenalInsufficiency = x`
2265
+ renderRenalInsufficiency = b`
2179
2266
  <div class="${PREFIX}-patient-profile__second-info" data-test-id="clearance-section">
2180
2267
  <span class="${PREFIX}-patient-profile__second-info-label">Clairance créatinine </span>
2181
2268
  <span class="${PREFIX}-patient-profile__second-info-result">${clearance.value} ${clearance.unit}</span>
@@ -2183,7 +2270,7 @@ let PatientProfile = class extends i {
2183
2270
  }
2184
2271
  if (renalStatus.gfr?.value) {
2185
2272
  const clearance = renalStatus.gfr;
2186
- renderRenalInsufficiency = x`
2273
+ renderRenalInsufficiency = b`
2187
2274
  ${renderRenalInsufficiency}
2188
2275
  <div class="${PREFIX}-patient-profile__second-info" data-test-id="dfg-section">
2189
2276
  <span class="${PREFIX}-patient-profile__second-info-label">DFG </span>
@@ -2196,7 +2283,7 @@ let PatientProfile = class extends i {
2196
2283
  const creatinine = getCreatinine(this.patientProfile);
2197
2284
  const creatinineByMg = creatinine.find((c2) => c2.unit?.toLowerCase() === "mg/l");
2198
2285
  const creatinineByUmol = creatinine.find((c2) => c2.unit === "μmol/L");
2199
- return x`
2286
+ return b`
2200
2287
  <div class="${PREFIX}-patient-profile__second-info" id="creatinine-section" data-test-id="creatinine-section">
2201
2288
  <span class="${PREFIX}-patient-profile__second-info-label">Créatininémie </span>
2202
2289
  <span class="${PREFIX}-patient-profile__second-info-result sep-dots">
@@ -2205,6 +2292,18 @@ let PatientProfile = class extends i {
2205
2292
  </span>
2206
2293
  </div>`;
2207
2294
  }
2295
+ displayHepaticInsufficiencySection() {
2296
+ const stade = getPatientHepaticInsufficiencyStade(this.patientProfile);
2297
+ if (!stade) {
2298
+ return A;
2299
+ }
2300
+ return b`
2301
+ <div class="${PREFIX}-patient-profile__second-info" data-test-id="hepatic-insufficiency-section">
2302
+ <span class="${PREFIX}-patient-profile__second-info-label">Insuffisance hépatique </span>
2303
+ <span class="${PREFIX}-patient-profile__second-info-result">${getPatientHepaticInsufficiencyStade(this.patientProfile)} </span>
2304
+ </div>
2305
+ `;
2306
+ }
2208
2307
  truncateLabel(label, maxLength = 25) {
2209
2308
  if (!label) {
2210
2309
  return "";
@@ -2221,7 +2320,7 @@ let PatientProfile = class extends i {
2221
2320
  if (isPregnant) {
2222
2321
  const gestationalMonth = getPatientAmenorrheaStatus(this.patientProfile);
2223
2322
  const gestationalInfo = gestationalMonth ? `- ${gestationalMonth} semaine(s)` : "";
2224
- return x`
2323
+ return b`
2225
2324
  <div class="${PREFIX}-patient-profile__second-info" data-test-id="pregnancy-section">
2226
2325
  <span class="${PREFIX}-patient-profile__second-info-label">Grossesse </span>
2227
2326
  <span class="${PREFIX}-patient-profile__second-info-result"> Oui ${gestationalInfo} </span>
@@ -2229,14 +2328,14 @@ let PatientProfile = class extends i {
2229
2328
  `;
2230
2329
  }
2231
2330
  }
2232
- return E;
2331
+ return A;
2233
2332
  }
2234
2333
  displayBreastfeeding() {
2235
2334
  const gender = getPatientGender(this.patientProfile);
2236
2335
  if (gender !== "Homme") {
2237
2336
  const isBreastfeeding = getPatientBreastfeedingStatus(this.patientProfile);
2238
2337
  if (isBreastfeeding) {
2239
- return x`
2338
+ return b`
2240
2339
  <div class="${PREFIX}-patient-profile__second-info" data-test-id="breastfeeding-section">
2241
2340
  <span class="${PREFIX}-patient-profile__second-info-label">Allaitement </span>
2242
2341
  <span class="${PREFIX}-patient-profile__second-info-result"> Oui </span>
@@ -2244,7 +2343,7 @@ let PatientProfile = class extends i {
2244
2343
  `;
2245
2344
  }
2246
2345
  }
2247
- return E;
2346
+ return A;
2248
2347
  }
2249
2348
  displayPathologies() {
2250
2349
  const conditions = getPatientConditions(this.patientProfile);
@@ -2252,11 +2351,11 @@ let PatientProfile = class extends i {
2252
2351
  const truncated = this.truncateLabel(condition);
2253
2352
  const separator = index < conditions.length - 1 ? ", " : "";
2254
2353
  if (truncated === condition) {
2255
- return x`
2354
+ return b`
2256
2355
  <span>${truncated}${separator}</span>
2257
2356
  `;
2258
2357
  }
2259
- return x`
2358
+ return b`
2260
2359
  <bcbd-tooltip
2261
2360
  content=${condition}
2262
2361
  placement="top"
@@ -2265,7 +2364,7 @@ let PatientProfile = class extends i {
2265
2364
  </bcbd-tooltip>
2266
2365
  `;
2267
2366
  });
2268
- return x`${items}`;
2367
+ return b`${items}`;
2269
2368
  }
2270
2369
  displayAllergies() {
2271
2370
  const allergies = getPatientAllergies(this.patientProfile);
@@ -2273,11 +2372,11 @@ let PatientProfile = class extends i {
2273
2372
  const truncated = this.truncateLabel(allergy);
2274
2373
  const separator = index < allergies.length - 1 ? ", " : "";
2275
2374
  if (truncated === allergy) {
2276
- return x`
2375
+ return b`
2277
2376
  <span>${truncated}${separator}</span>
2278
2377
  `;
2279
2378
  }
2280
- return x`
2379
+ return b`
2281
2380
  <bcbd-tooltip
2282
2381
  content=${allergy}
2283
2382
  placement="top"
@@ -2286,7 +2385,7 @@ let PatientProfile = class extends i {
2286
2385
  </bcbd-tooltip>
2287
2386
  `;
2288
2387
  });
2289
- return x`${items}`;
2388
+ return b`${items}`;
2290
2389
  }
2291
2390
  openEditionModal() {
2292
2391
  this.editionModalElement.open();
@@ -2312,7 +2411,7 @@ let PatientProfile = class extends i {
2312
2411
  return null;
2313
2412
  }
2314
2413
  render() {
2315
- return x`
2414
+ return b`
2316
2415
  <div class="${PREFIX}-patient-profile">
2317
2416
  <div class="${PREFIX}-patient-profile__first-info-container">
2318
2417
  <div class="${PREFIX}-patient-profile__id-info-container">
@@ -2363,7 +2462,7 @@ let PatientProfile = class extends i {
2363
2462
  </div>
2364
2463
 
2365
2464
  <div class="${PREFIX}-patient-profile__action-buttons-container" data-test-id="action-buttons">
2366
- ${this.editButtonVisible || this.editButtonVisible === void 0 ? x`<bcbd-button icon="pencil" size="medium" background-color="black" outlined data-test-id="modify-button" @click=${this.openEditionModal}></bcbd-button>` : E}
2465
+ ${this.editButtonVisible || this.editButtonVisible === void 0 ? b`<bcbd-button icon="pencil" size="medium" background-color="black" outlined data-test-id="modify-button" @click=${this.openEditionModal}></bcbd-button>` : A}
2367
2466
  <bcbd-button icon=${this.moreInformationVisible ? "chevron-up" : "chevron-down"} size="medium" background-color="primary" @click=${this.handleMoreInformation} data-test-id="visible-button"></bcbd-button>
2368
2467
  </div>
2369
2468
  </div>
@@ -2384,10 +2483,7 @@ let PatientProfile = class extends i {
2384
2483
 
2385
2484
  ${this.displayCreatininemieSection()}
2386
2485
 
2387
- <div class="${PREFIX}-patient-profile__second-info" data-test-id="hepatic-insufficiency-section">
2388
- <span class="${PREFIX}-patient-profile__second-info-label">Insuffisance hépatique </span>
2389
- <span class="${PREFIX}-patient-profile__second-info-result">${getPatientHepaticInsufficiencyStade(this.patientProfile)} </span>
2390
- </div>
2486
+ ${this.displayHepaticInsufficiencySection()}
2391
2487
  </div>
2392
2488
  <bcb-patient-profile-edition .patientProfile=${this.patientProfile} .apiUrl=${this.apiUrl} .apiKey=${this.apiKey}
2393
2489
  @editPatientProfile=${this.editProfilePatient}></bcb-patient-profile-edition>