@claudebernard/patient-profile-element 0.4.3 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,22 +8,6 @@ function calculateBMI(weight, height) {
8
8
  const heightInMeters = height / 100;
9
9
  return Math.round(weight / (heightInMeters * heightInMeters) * 10) / 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
- }
27
11
  const isStrTagged = (val) => typeof val !== "string" && "strTag" in val;
28
12
  const joinStringsAndValues = (strings, values, valueOrder) => {
29
13
  let concat = strings[0];
@@ -824,17 +808,6 @@ function umolLToMgl(umolL) {
824
808
  function round2(n3) {
825
809
  return Math.round(n3 * 100) / 100;
826
810
  }
827
- function getPatientHepaticInsufficiencyScore(bundle) {
828
- const obs = bundle?.entry?.find(
829
- (entry) => entry.resource?.resourceType === "Observation" && entry.resource.code?.coding?.some(
830
- (coding) => coding.code === "98152-2"
831
- )
832
- )?.resource;
833
- if (obs?.valueQuantity?.value) {
834
- return obs?.valueQuantity?.value;
835
- }
836
- return null;
837
- }
838
811
  function getPatientHepaticInsufficiencyStade(bundle) {
839
812
  const obs = bundle?.entry?.find(
840
813
  (entry) => entry.resource?.resourceType === "Observation" && entry.resource.code?.coding?.some(
@@ -898,77 +871,12 @@ function setPatientHepaticInsufficiencyStatus(bundle, stade, score) {
898
871
  bundle.entry.push({ fullUrl: `Observation/${obsId}`, resource: obs });
899
872
  } else {
900
873
  obs.valueCodeableConcept = stadeConcept;
901
- if (!score) {
874
+ {
902
875
  delete obs.valueQuantity;
903
- } else {
904
- const stadeOfScore = childPughScore(score).replace("Stade ", "");
905
- if (stadeOfScore === stade) {
906
- obs.valueQuantity = {
907
- value: score,
908
- unit: "score",
909
- system: "http://unitsofmeasure.org",
910
- code: "{score}"
911
- };
912
- } else {
913
- delete obs.valueQuantity;
914
- }
915
876
  }
916
877
  }
917
878
  return;
918
879
  }
919
- if (typeof score === "number" && !isNaN(score)) {
920
- const newObsValueQuantity = {
921
- value: score,
922
- unit: "score",
923
- system: "http://unitsofmeasure.org",
924
- code: "{score}"
925
- };
926
- const stadeLabel = childPughScore(score);
927
- const stadeLetter = stadeLabel.replace("Stade ", "");
928
- const snomedCode = childPughStadeToSnomedMap[stadeLetter];
929
- const stadeConcept = snomedCode ? {
930
- coding: [
931
- {
932
- system: "http://snomed.info/sct",
933
- code: snomedCode,
934
- display: `Child-Pugh score class ${stadeLetter}`
935
- }
936
- ],
937
- text: `Stade ${stadeLetter}`
938
- } : void 0;
939
- if (!obs) {
940
- const obsId = generateUUID();
941
- obs = {
942
- resourceType: "Observation",
943
- id: obsId,
944
- status: "final",
945
- code: {
946
- coding: [
947
- {
948
- system: "http://loinc.org",
949
- code: "98152-2",
950
- display: "Child-Pugh score"
951
- }
952
- ],
953
- text: "Score de Child-Pugh"
954
- },
955
- subject: {
956
- reference: getPatientFullUrl(bundle)
957
- },
958
- valueQuantity: newObsValueQuantity,
959
- ...stadeConcept ? { valueCodeableConcept: stadeConcept } : {}
960
- };
961
- bundle.entry = bundle.entry || [];
962
- bundle.entry.push({ fullUrl: `Observation/${obsId}`, resource: obs });
963
- } else {
964
- obs.valueQuantity = newObsValueQuantity;
965
- if (stadeConcept) {
966
- obs.valueCodeableConcept = stadeConcept;
967
- } else {
968
- delete obs.valueCodeableConcept;
969
- }
970
- }
971
- }
972
880
  }
973
881
  function deletePatientHepaticInsufficiencyStatus(bundle) {
974
882
  bundle.entry = bundle.entry?.filter((entry) => !(entry.resource?.resourceType === "Observation" && entry.resource.code?.coding?.some(
@@ -1127,16 +1035,6 @@ function childPughScore(score) {
1127
1035
  }
1128
1036
  return msg("Stade C");
1129
1037
  }
1130
- function calculateGFRFromCreatinine(age, isFemale, creatinine) {
1131
- const sexFactor = isFemale ? 0.742 : 1;
1132
- const gfr = 186 * (creatinine * 0.0113) ** -1.154 * age ** -0.203 * sexFactor;
1133
- return round2(gfr);
1134
- }
1135
- function calculateCreatinineFromGFR(age, isFemale, gfr) {
1136
- const sexFactor = isFemale ? 0.742 : 1;
1137
- const creatinine = 1 / 0.0113 * (gfr / (sexFactor * 186 * age ** -0.203)) ** (-1 / 1.154);
1138
- return round2(creatinine);
1139
- }
1140
1038
  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();
1141
1039
  let n$3 = class n {
1142
1040
  constructor(t2, e2, o2) {
@@ -1696,6 +1594,20 @@ const ageOptions = [
1696
1594
  { value: "ans", label: "Ans" },
1697
1595
  { value: "mois", label: "Mois" }
1698
1596
  ];
1597
+ const convertRenalInsufficiency = async (type, value, patient, apiUrl) => {
1598
+ const response = await fetch(`${apiUrl}/prescription/patient/fhir/renal-insufficiency-conversion`, {
1599
+ method: "POST",
1600
+ headers: {
1601
+ "Content-Type": "application/json"
1602
+ },
1603
+ body: JSON.stringify({
1604
+ typeEntree: type,
1605
+ valeur: value,
1606
+ patient
1607
+ })
1608
+ });
1609
+ return response.json();
1610
+ };
1699
1611
  const fetchPathologiesByTerm = async (term, typePathology, params, apiUrl) => {
1700
1612
  const response = await fetch(`${apiUrl}/search/pathologies/?term=${term}&typePathology=${typePathology}`, {
1701
1613
  method: "POST",
@@ -1730,10 +1642,9 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
1730
1642
  let PatientProfileEdition = class extends i {
1731
1643
  constructor() {
1732
1644
  super(...arguments);
1645
+ this.apiUrl = "https://api-dev.claudebernard.fr";
1733
1646
  this.patientAge = 0;
1734
1647
  this.patientUnitAge = "ans";
1735
- this.patientWeight = 0;
1736
- this.patientHeight = 0;
1737
1648
  this.creatinineByMg = 0;
1738
1649
  this.creatinineByUmol = 0;
1739
1650
  this.clairanceCreatinine = 0;
@@ -1750,7 +1661,6 @@ let PatientProfileEdition = class extends i {
1750
1661
  this.pathologiesApiErrorMessage = "";
1751
1662
  this.allergiesApiErrorMessage = "";
1752
1663
  this.renalLackInformationErrorMessage = "";
1753
- this.childPughErrorMessage = "";
1754
1664
  this.pathologyOptions = [];
1755
1665
  this.allergyOptions = [];
1756
1666
  this.selectedPathologyOptions = [];
@@ -1781,7 +1691,9 @@ let PatientProfileEdition = class extends i {
1781
1691
  this.breastfeeding = getPatientBreastfeedingStatus(this.patientProfile);
1782
1692
  this.isPregnant = getPatientPregnancyStatus(this.patientProfile);
1783
1693
  const birthDate = getPatientBirthDate(this.patientProfile);
1694
+ this.isPregnancyDivVisible = false;
1784
1695
  if (birthDate) {
1696
+ this.ageInput.setAttribute("warning-msg", "");
1785
1697
  const today = /* @__PURE__ */ new Date();
1786
1698
  const yearsDiff = today.getFullYear() - birthDate.getFullYear();
1787
1699
  const monthsDiff = today.getMonth() - birthDate.getMonth();
@@ -1793,7 +1705,9 @@ let PatientProfileEdition = class extends i {
1793
1705
  } else {
1794
1706
  this.patientAge = Math.floor(monthsDifference / 12);
1795
1707
  this.patientUnitAge = "ans";
1796
- this.isPregnancyDivVisible = true;
1708
+ if (this.defaultPatientSex.value !== "male") {
1709
+ this.isPregnancyDivVisible = true;
1710
+ }
1797
1711
  }
1798
1712
  this.defaultPatientUnitAge = {
1799
1713
  value: this.patientUnitAge,
@@ -1889,128 +1803,52 @@ let PatientProfileEdition = class extends i {
1889
1803
  handleBreastfeeding(event) {
1890
1804
  this.breastfeeding = event.detail;
1891
1805
  }
1806
+ async handleRenalConversion(type, value) {
1807
+ if (isNaN(value) || value <= 0) {
1808
+ return;
1809
+ }
1810
+ try {
1811
+ const result = await convertRenalInsufficiency(
1812
+ type,
1813
+ value,
1814
+ this.patientProfile,
1815
+ this.apiUrl
1816
+ );
1817
+ if (result.error) {
1818
+ this.renalLackInformationErrorMessage = result.error;
1819
+ return;
1820
+ }
1821
+ this.renalLackInformationErrorMessage = "";
1822
+ if (type !== 1) {
1823
+ this.creatinineByUmol = Math.round(result.creatinineUmolL * 100) / 100;
1824
+ }
1825
+ if (type !== 2) {
1826
+ this.creatinineByMg = Math.round(result.creatinineMgL * 100) / 100;
1827
+ }
1828
+ if (type !== 3) {
1829
+ this.clairanceCreatinine = Math.round(result.creatinineClearance * 100) / 100;
1830
+ }
1831
+ if (type !== 4) {
1832
+ this.dfg = Math.round(result.gfr * 100) / 100;
1833
+ }
1834
+ } catch {
1835
+ this.renalLackInformationErrorMessage = "Erreur lors de la conversion de l'insuffisance rénale";
1836
+ }
1837
+ }
1892
1838
  recalculateRenalValues() {
1893
1839
  const creatinineUmol = Number(this.creatinineUmolInput?.value ?? "");
1894
1840
  const creatinineMg = Number(this.creatinineMgLInput?.value ?? "");
1895
1841
  const clairance = Number(this.clairanceCreatinineInput?.value ?? "");
1896
1842
  const dfg = Number(this.dfgInput?.value ?? "");
1897
1843
  if (!isNaN(creatinineUmol) && creatinineUmol > 0) {
1898
- this.setFormWithCreatinineUmol();
1844
+ this.handleRenalConversion(1, creatinineUmol);
1899
1845
  } else if (!isNaN(creatinineMg) && creatinineMg > 0) {
1900
- this.setFormWithCreatinineMgL();
1846
+ this.handleRenalConversion(2, creatinineMg);
1901
1847
  } else if (!isNaN(clairance) && clairance > 0) {
1902
- this.setFormWithClairance();
1848
+ this.handleRenalConversion(3, clairance);
1903
1849
  } else if (!isNaN(dfg) && dfg > 0) {
1904
- this.setFormWithDFG();
1905
- }
1906
- }
1907
- setFormWithCreatinineUmol() {
1908
- const inputValue = Number(this.creatinineUmolInput?.value ?? "");
1909
- if (isNaN(inputValue) || inputValue <= 0) {
1910
- this.renalLackInformationErrorMessage = "";
1911
- return;
1912
- }
1913
- this.creatinineByUmol = inputValue;
1914
- const scrMgdl = convertCreatinineUmolToMgdL(inputValue);
1915
- if (scrMgdl <= 0) {
1916
- return;
1917
- }
1918
- const age = Number(this.ageInput?.value);
1919
- const weight = Number(this.weightInput?.value);
1920
- const gender = this.genderSelect?.value;
1921
- if (!age || !weight || !gender) {
1922
- this.clairanceCreatinine = 0;
1923
- this.creatinineByMg = 0;
1924
- this.renalLackInformationErrorMessage = "Pour faire les calculs à partir des données de l'insuffisance rénale, il faut que l'âge, le poids et le sexe soient renseignés. Les informations contenues dans cette partie ne seront pas pris en compte.";
1925
- return;
1926
- }
1927
- const isFemale = gender === "Femme";
1928
- const clearance = calculateCreatinineClearance(age, weight, scrMgdl, isFemale);
1929
- this.clairanceCreatinine = Math.round(clearance);
1930
- const scrMgl = convertCreatinineMgdLToMgL(scrMgdl);
1931
- this.creatinineByMg = Math.round(scrMgl);
1932
- this.dfg = Math.round(calculateGFRFromCreatinine(age, isFemale, inputValue));
1933
- this.renalLackInformationErrorMessage = "";
1934
- }
1935
- setFormWithCreatinineMgL() {
1936
- const inputValue = Number(this.creatinineMgLInput?.value ?? "");
1937
- if (isNaN(inputValue) || inputValue <= 0) {
1938
- this.renalLackInformationErrorMessage = "";
1939
- return;
1940
- }
1941
- this.creatinineByMg = inputValue;
1942
- const scrMgdl = convertCreatinineMgLToMgdL(inputValue);
1943
- if (scrMgdl <= 0) {
1944
- return;
1850
+ this.handleRenalConversion(4, dfg);
1945
1851
  }
1946
- const age = Number(this.ageInput?.value);
1947
- const weight = Number(this.weightInput?.value);
1948
- const gender = this.genderSelect?.value;
1949
- const isFemale = gender === "Femme";
1950
- if (!age || !weight || !gender) {
1951
- this.clairanceCreatinine = 0;
1952
- this.creatinineByUmol = 0;
1953
- this.renalLackInformationErrorMessage = "Pour faire les calculs à partir des données de l'insuffisance rénale, il faut que l'âge, le poids et le sexe soient renseignés. Les informations contenues dans cette partie ne seront pas pris en compte.";
1954
- return;
1955
- }
1956
- const clearance = calculateCreatinineClearance(age, weight, scrMgdl, isFemale);
1957
- this.clairanceCreatinine = Math.round(clearance);
1958
- const scrUmolL = convertCreatinineMgdLToUmol(scrMgdl);
1959
- this.creatinineByUmol = Math.round(scrUmolL);
1960
- this.dfg = Math.round(calculateGFRFromCreatinine(age, isFemale, scrUmolL));
1961
- this.renalLackInformationErrorMessage = "";
1962
- }
1963
- setFormWithClairance() {
1964
- const inputValue = Number(this.clairanceCreatinineInput?.value ?? "");
1965
- if (isNaN(inputValue) || inputValue <= 0) {
1966
- this.renalLackInformationErrorMessage = "";
1967
- return;
1968
- }
1969
- this.clairanceCreatinine = inputValue;
1970
- const age = Number(this.ageInput?.value);
1971
- const weight = Number(this.weightInput?.value);
1972
- const gender = this.genderSelect?.value;
1973
- if (!age || !weight || !gender) {
1974
- this.creatinineByMg = 0;
1975
- this.creatinineByUmol = 0;
1976
- this.renalLackInformationErrorMessage = "Pour faire les calculs à partir des données de l'insuffisance rénale, il faut que l'âge, le poids et le sexe soient renseignés. Les informations contenues dans cette partie ne seront pas pris en compte.";
1977
- return;
1978
- }
1979
- const isFemale = gender === "Femme";
1980
- const computed = computeCreatinineFromClearance(inputValue, age, weight, isFemale);
1981
- const creatinineByMg = computed.find((c2) => c2.unit?.toLowerCase() === "mg/l");
1982
- const creatinineByUmol = computed.find((c2) => c2.unit === "μmol/L");
1983
- this.creatinineByMg = creatinineByMg?.value ?? 0;
1984
- this.creatinineByMg = Math.round(this.creatinineByMg);
1985
- this.creatinineByUmol = creatinineByUmol?.value ?? 0;
1986
- this.creatinineByUmol = Math.round(this.creatinineByUmol);
1987
- this.dfg = Math.round(calculateGFRFromCreatinine(age, isFemale, creatinineByUmol?.value ?? 0));
1988
- this.renalLackInformationErrorMessage = "";
1989
- }
1990
- setFormWithDFG() {
1991
- const inputValue = Number(this.dfgInput?.value ?? "");
1992
- if (isNaN(inputValue) || inputValue <= 0) {
1993
- this.renalLackInformationErrorMessage = "";
1994
- return;
1995
- }
1996
- this.dfg = inputValue;
1997
- const age = Number(this.ageInput?.value);
1998
- const weight = Number(this.weightInput?.value);
1999
- const gender = this.genderSelect?.value;
2000
- if (!age || !weight || !gender) {
2001
- this.creatinineByMg = 0;
2002
- this.creatinineByUmol = 0;
2003
- this.renalLackInformationErrorMessage = "Pour faire les calculs à partir des données de l'insuffisance rénale, il faut que l'âge, le poids et le sexe soient renseignés. Les informations contenues dans cette partie ne seront pas pris en compte.";
2004
- return;
2005
- }
2006
- const isFemale = gender === "Femme";
2007
- const creatinine = calculateCreatinineFromGFR(age, isFemale, this.dfg);
2008
- this.creatinineByUmol = Math.round(creatinine);
2009
- const scrMgdl = convertCreatinineUmolToMgdL(creatinine);
2010
- this.creatinineByMg = Math.round(convertCreatinineMgdLToMgL(scrMgdl));
2011
- const clearance = calculateCreatinineClearance(age, weight, scrMgdl, isFemale);
2012
- this.clairanceCreatinine = Math.round(clearance);
2013
- this.renalLackInformationErrorMessage = "";
2014
1852
  }
2015
1853
  apiReturntoSelectOption(pathology) {
2016
1854
  return {
@@ -2070,27 +1908,6 @@ let PatientProfileEdition = class extends i {
2070
1908
  this.selectedAllergyOptions = [...updatedSelections, ...newSelections];
2071
1909
  this.allergyOptions = [];
2072
1910
  }
2073
- handleHepaticStade() {
2074
- this.childPughInput.value = "";
2075
- }
2076
- handleHepaticScore() {
2077
- const childPughInputScore = Number(this.childPughInput?.value ?? "");
2078
- if (isNaN(childPughInputScore) || childPughInputScore <= 0) {
2079
- this.defaultHepaticStade = {};
2080
- this.childPughErrorMessage = "";
2081
- } else {
2082
- if (childPughInputScore < 5 || childPughInputScore > 15) {
2083
- this.childPughErrorMessage = "Le score Child-Pugh doit être compris entre 5 et 15";
2084
- } else {
2085
- this.childPughErrorMessage = "";
2086
- }
2087
- const stade = childPughScore(childPughInputScore);
2088
- const selectedOption = hepaticStadeOptions.find((option) => option.label === stade);
2089
- if (selectedOption) {
2090
- this.defaultHepaticStade = { value: selectedOption.value, label: selectedOption.label };
2091
- }
2092
- }
2093
- }
2094
1911
  // eslint-disable-next-line complexity
2095
1912
  validateForm() {
2096
1913
  if (!this.patientProfile || Object.keys(this.patientProfile).length === 0) {
@@ -2107,7 +1924,6 @@ let PatientProfileEdition = class extends i {
2107
1924
  const dfg = Number(this.dfgInput?.value ?? "");
2108
1925
  const gestationalWeeks = Number(this.gestationalWeeksInput?.value ?? "");
2109
1926
  const hepaticStade = this.hepaticStadeSelect?.value ?? "";
2110
- const childPughScore2 = Number(this.childPughInput?.value ?? "");
2111
1927
  if (age > 0) {
2112
1928
  setPatientAge(this.patientProfile, age, ageUnit);
2113
1929
  }
@@ -2133,7 +1949,7 @@ let PatientProfileEdition = class extends i {
2133
1949
  setPatientGFRByBSA(this.patientProfile, dfg);
2134
1950
  }
2135
1951
  if (hepaticStade === "A" || hepaticStade === "B" || hepaticStade === "C") {
2136
- setPatientHepaticInsufficiencyStatus(this.patientProfile, hepaticStade, childPughScore2);
1952
+ setPatientHepaticInsufficiencyStatus(this.patientProfile, hepaticStade);
2137
1953
  } else {
2138
1954
  deletePatientHepaticInsufficiencyStatus(this.patientProfile);
2139
1955
  }
@@ -2225,21 +2041,21 @@ let PatientProfileEdition = class extends i {
2225
2041
  <div class="${PREFIX}-edition-modal-information-section">
2226
2042
  <div class="${PREFIX}-edition-modal-little-section">
2227
2043
  <span>Créatininémie (μmol/L)</span>
2228
- <bcbd-input data-test-id="creatinine-umol-input" id="creatinineUmolInput" type="number" aria-label="Créatininémie (μmol/L)" .value=${this.creatinineByUmol <= 0 ? "" : this.creatinineByUmol} warning-msg="" @change=${this.setFormWithCreatinineUmol}></bcbd-input>
2044
+ <bcbd-input data-test-id="creatinine-umol-input" id="creatinineUmolInput" type="number" aria-label="Créatininémie (μmol/L)" .value=${this.creatinineByUmol <= 0 ? "" : this.creatinineByUmol} warning-msg="" @change=${() => this.handleRenalConversion(1, Number(this.creatinineUmolInput?.value ?? 0))}></bcbd-input>
2229
2045
  </div>
2230
2046
  <div class="${PREFIX}-edition-modal-little-section">
2231
2047
  <span>Créatininémie (mg/L)</span>
2232
- <bcbd-input data-test-id="creatinine-mgl-input" id="creatininemgLInput" type="number" aria-label="Créatininémie (mg/L)" .value=${this.creatinineByMg <= 0 ? "" : this.creatinineByMg} warning-msg="" @change=${this.setFormWithCreatinineMgL}></bcbd-input>
2048
+ <bcbd-input data-test-id="creatinine-mgl-input" id="creatininemgLInput" type="number" aria-label="Créatininémie (mg/L)" .value=${this.creatinineByMg <= 0 ? "" : this.creatinineByMg} warning-msg="" @change=${() => this.handleRenalConversion(2, Number(this.creatinineMgLInput?.value ?? 0))}></bcbd-input>
2233
2049
  </div>
2234
2050
  </div>
2235
2051
  <div class="${PREFIX}-edition-modal-information-section">
2236
2052
  <div class="${PREFIX}-edition-modal-little-section">
2237
2053
  <span>Clairance créatinine (ml/min)</span>
2238
- <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.setFormWithClairance}></bcbd-input>
2054
+ <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>
2239
2055
  </div>
2240
2056
  <div class="${PREFIX}-edition-modal-little-section">
2241
2057
  <span>DFG (mL/min/1.73.m2)</span>
2242
- <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.setFormWithDFG}></bcbd-input>
2058
+ <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>
2243
2059
  </div>
2244
2060
  </div>
2245
2061
  </fieldset>
@@ -2252,16 +2068,9 @@ let PatientProfileEdition = class extends i {
2252
2068
  <div class="${PREFIX}-edition-modal-little-section">
2253
2069
  <span>Stade de l'insuffisance hépatique</span>
2254
2070
  <bcbd-select data-test-id="hepatic-stade-select" id="hepaticStadeSelect"
2255
- .options=${hepaticStadeOptions} .selectedOptions=${this.defaultHepaticStade} clearable
2256
- @change=${this.handleHepaticStade}>
2071
+ .options=${hepaticStadeOptions} .selectedOptions=${this.defaultHepaticStade} clearable>
2257
2072
  </bcbd-select>
2258
2073
  </div>
2259
- <div class="${PREFIX}-edition-modal-little-section">
2260
- <span>Score de Child-Pugh</span>
2261
- <bcbd-input data-test-id="hepatic-score-input" id="childPughInput" type="number" aria-label="Score de Child-Pugh" warning-msg=""
2262
- .value=${getPatientHepaticInsufficiencyScore(this.patientProfile)} @change=${this.handleHepaticScore}></bcbd-input>
2263
- ${this.childPughErrorMessage !== "" ? b`<span class="${PREFIX}-edition-modal-error-message">${this.childPughErrorMessage}</span>` : b` `}
2264
- </div>
2265
2074
  </div>
2266
2075
  </fieldset>
2267
2076
 
@@ -2270,7 +2079,7 @@ let PatientProfileEdition = class extends i {
2270
2079
  </div>
2271
2080
 
2272
2081
  <div class="${PREFIX}-edition-modal-action-buttons" data-test-id="action-buttons">
2273
- <bcbd-button ?disabled=${this.ageErrorMessageInput !== "" || this.sizeErrorMessageInput !== "" || this.weightErrorMessageInput !== "" || this.childPughErrorMessage !== ""}
2082
+ <bcbd-button ?disabled=${this.ageErrorMessageInput !== "" || this.sizeErrorMessageInput !== "" || this.weightErrorMessageInput !== ""}
2274
2083
  data-test-id="save-button" background-color="primary" @click=${this.validateForm}>Valider</bcbd-button>
2275
2084
  <bcbd-button data-test-id="cancel-button" outlined background-color="black" @click=${() => this.editionModalElement.close()}>Annuler</bcbd-button>
2276
2085
  </div>
@@ -2297,12 +2106,6 @@ __decorateClass$1([
2297
2106
  __decorateClass$1([
2298
2107
  r()
2299
2108
  ], PatientProfileEdition.prototype, "patientUnitAge", 2);
2300
- __decorateClass$1([
2301
- r()
2302
- ], PatientProfileEdition.prototype, "patientWeight", 2);
2303
- __decorateClass$1([
2304
- r()
2305
- ], PatientProfileEdition.prototype, "patientHeight", 2);
2306
2109
  __decorateClass$1([
2307
2110
  r()
2308
2111
  ], PatientProfileEdition.prototype, "creatinineByMg", 2);
@@ -2351,9 +2154,6 @@ __decorateClass$1([
2351
2154
  __decorateClass$1([
2352
2155
  r()
2353
2156
  ], PatientProfileEdition.prototype, "renalLackInformationErrorMessage", 2);
2354
- __decorateClass$1([
2355
- r()
2356
- ], PatientProfileEdition.prototype, "childPughErrorMessage", 2);
2357
2157
  __decorateClass$1([
2358
2158
  r()
2359
2159
  ], PatientProfileEdition.prototype, "pathologyOptions", 2);
@@ -2402,9 +2202,6 @@ __decorateClass$1([
2402
2202
  __decorateClass$1([
2403
2203
  e("#hepaticStadeSelect")
2404
2204
  ], PatientProfileEdition.prototype, "hepaticStadeSelect", 2);
2405
- __decorateClass$1([
2406
- e("#childPughInput")
2407
- ], PatientProfileEdition.prototype, "childPughInput", 2);
2408
2205
  __decorateClass$1([
2409
2206
  e("#ageUnitSelect")
2410
2207
  ], PatientProfileEdition.prototype, "ageUnitSelect", 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudebernard/patient-profile-element",
3
- "version": "0.4.3",
3
+ "version": "0.5.1",
4
4
  "main": "dist/patient-profile.es.js",
5
5
  "module": "dist/patient-profile.es.js",
6
6
  "types": "dist/patient-profile.d.ts",