@claudebernard/patient-profile-element 0.8.1-beta.1 → 0.9.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +750 -724
- package/dist/patient-profile.d.ts +6 -6
- package/dist/patient-profile.es.js +20 -14
- package/package.json +5 -5
|
@@ -113,42 +113,42 @@ declare global {
|
|
|
113
113
|
|
|
114
114
|
declare global {
|
|
115
115
|
interface HTMLElementTagNameMap {
|
|
116
|
-
"bcb-patient-
|
|
116
|
+
"bcb-patient-demographics-form": PatientDemographicsForm;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
declare global {
|
|
122
122
|
interface HTMLElementTagNameMap {
|
|
123
|
-
"bcb-patient-
|
|
123
|
+
"bcb-patient-reproductive-form": PatientReproductiveForm;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
declare global {
|
|
129
129
|
interface HTMLElementTagNameMap {
|
|
130
|
-
"bcb-patient-
|
|
130
|
+
"bcb-patient-allergies-form": PatientAllergiesForm;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
declare global {
|
|
136
136
|
interface HTMLElementTagNameMap {
|
|
137
|
-
"bcb-patient-
|
|
137
|
+
"bcb-patient-pathologies-form": PatientPathologiesForm;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
declare global {
|
|
143
143
|
interface HTMLElementTagNameMap {
|
|
144
|
-
"bcb-patient-
|
|
144
|
+
"bcb-patient-renal-form": PatientRenalForm;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
declare global {
|
|
150
150
|
interface HTMLElementTagNameMap {
|
|
151
|
-
"bcb-patient-
|
|
151
|
+
"bcb-patient-hepatic-form": PatientHepaticForm;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -399,6 +399,9 @@ function setPatientAmenorrheaStatus(bundle, weeks) {
|
|
|
399
399
|
false
|
|
400
400
|
);
|
|
401
401
|
}
|
|
402
|
+
function deletePatientAmenorrheaStatus(bundle) {
|
|
403
|
+
removeObservationByCode(bundle, AMENORRHEA_LOINC_CODE);
|
|
404
|
+
}
|
|
402
405
|
const BREASTFEEDING_LOINC_CODE = "63895-7";
|
|
403
406
|
const BREASTFEEDING_SNOMED_CODE = "69840006";
|
|
404
407
|
function getPatientBreastfeedingStatus(bundle) {
|
|
@@ -1378,7 +1381,7 @@ function e$1(e2, r2) {
|
|
|
1378
1381
|
};
|
|
1379
1382
|
}
|
|
1380
1383
|
const o = (o2) => o2 ?? A;
|
|
1381
|
-
const patientProfileCSS = '@charset "UTF-8";\n.claudebernard-patient-profile {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n
|
|
1384
|
+
const patientProfileCSS = '@charset "UTF-8";\n.claudebernard-patient-profile {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n box-shadow: 0 1px 2px rgba(27, 42, 50, 0.05), 0 6px 18px rgba(27, 42, 50, 0.06);\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 min-width: 0;\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 1 auto;\n max-width: 100%;\n align-items: center;\n }\n}\n.claudebernard-patient-profile__name-info {\n font-size: 1rem;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\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}';
|
|
1382
1385
|
const e = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
|
|
1383
1386
|
let i$1 = class i2 {
|
|
1384
1387
|
constructor(t2) {
|
|
@@ -1714,7 +1717,7 @@ let PatientReproductiveForm = class extends i$2 {
|
|
|
1714
1717
|
this.visible = false;
|
|
1715
1718
|
this.isPregnant = false;
|
|
1716
1719
|
this.breastfeeding = false;
|
|
1717
|
-
this._amenorrheaWeeks =
|
|
1720
|
+
this._amenorrheaWeeks = "";
|
|
1718
1721
|
this._amenorrheaDate = "";
|
|
1719
1722
|
}
|
|
1720
1723
|
updated(changedProperties) {
|
|
@@ -1723,8 +1726,8 @@ let PatientReproductiveForm = class extends i$2 {
|
|
|
1723
1726
|
}
|
|
1724
1727
|
this.breastfeeding = getPatientBreastfeedingStatus(this.patientProfile);
|
|
1725
1728
|
this.isPregnant = getPatientPregnancyStatus(this.patientProfile);
|
|
1726
|
-
this._amenorrheaWeeks = getPatientAmenorrheaStatus(this.patientProfile) ??
|
|
1727
|
-
this._amenorrheaDate = this.calculateAmenorrheaDate(this._amenorrheaWeeks);
|
|
1729
|
+
this._amenorrheaWeeks = getPatientAmenorrheaStatus(this.patientProfile) ?? "";
|
|
1730
|
+
this._amenorrheaDate = this._amenorrheaWeeks === "" ? "" : this.calculateAmenorrheaDate(this._amenorrheaWeeks);
|
|
1728
1731
|
this.updateGestationalWeeksWarning(this._amenorrheaWeeks);
|
|
1729
1732
|
}
|
|
1730
1733
|
handlePregnancy(event) {
|
|
@@ -1763,12 +1766,13 @@ let PatientReproductiveForm = class extends i$2 {
|
|
|
1763
1766
|
}
|
|
1764
1767
|
getValue() {
|
|
1765
1768
|
if (!this.visible) {
|
|
1766
|
-
return { isPregnant: false, breastfeeding: false, gestationalWeeks: 0 };
|
|
1769
|
+
return { isPregnant: false, breastfeeding: false, gestationalWeeks: void 0 };
|
|
1767
1770
|
}
|
|
1771
|
+
const weeksValue = this.gestationalWeeksInput?.value ?? "";
|
|
1768
1772
|
return {
|
|
1769
1773
|
isPregnant: this.isPregnant,
|
|
1770
1774
|
breastfeeding: this.breastfeeding,
|
|
1771
|
-
gestationalWeeks:
|
|
1775
|
+
gestationalWeeks: weeksValue === "" ? void 0 : Number(weeksValue)
|
|
1772
1776
|
};
|
|
1773
1777
|
}
|
|
1774
1778
|
render() {
|
|
@@ -1784,7 +1788,7 @@ let PatientReproductiveForm = class extends i$2 {
|
|
|
1784
1788
|
<div class="${PREFIX}-edition-modal-pregnant-div__inputs">
|
|
1785
1789
|
<div class="${PREFIX}-edition-modal-pregnant-div-section">
|
|
1786
1790
|
<span>Date de l'aménorrhée</span>
|
|
1787
|
-
<bcbd-input data-test-id="amenorrhea-date-input" id="amenorrheaDateInput" type="date" .value=${this._amenorrheaDate} aria-label="Date de l'aménorrhée" warning-msg="" @change=${this.handleAmenorrheaDateInputChange}></bcbd-input>
|
|
1791
|
+
<bcbd-input data-test-id="amenorrhea-date-input" id="amenorrheaDateInput" type="date" .value=${this._amenorrheaDate} aria-label="Date de l'aménorrhée" warning-msg="" date-picker-placement="bottom" @change=${this.handleAmenorrheaDateInputChange}></bcbd-input>
|
|
1788
1792
|
</div>
|
|
1789
1793
|
<div class="${PREFIX}-edition-modal-pregnant-div-section ${PREFIX}-edition-modal-pregnant-div__gestational">
|
|
1790
1794
|
<span>Nombre de semaines d'aménorrhée</span>
|
|
@@ -2635,7 +2639,7 @@ function random(size) {
|
|
|
2635
2639
|
}
|
|
2636
2640
|
const COMPONENT_HEADERS = {
|
|
2637
2641
|
"Bcb-Web-Component-Package": "@claudebernard/patient-profile-element",
|
|
2638
|
-
"Bcb-Web-Component-Version": "0.
|
|
2642
|
+
"Bcb-Web-Component-Version": "0.9"
|
|
2639
2643
|
};
|
|
2640
2644
|
function makeTraceparent() {
|
|
2641
2645
|
return make().child().toString();
|
|
@@ -3974,8 +3978,10 @@ let PatientProfileEdition = class extends i$2 {
|
|
|
3974
3978
|
} else {
|
|
3975
3979
|
deletePatientHepaticInsufficiencyStatus(this.patientProfile);
|
|
3976
3980
|
}
|
|
3977
|
-
if (reproductive.isPregnant) {
|
|
3978
|
-
setPatientAmenorrheaStatus(this.patientProfile,
|
|
3981
|
+
if (reproductive.isPregnant && reproductive.gestationalWeeks !== void 0 && !isNaN(reproductive.gestationalWeeks)) {
|
|
3982
|
+
setPatientAmenorrheaStatus(this.patientProfile, reproductive.gestationalWeeks);
|
|
3983
|
+
} else {
|
|
3984
|
+
deletePatientAmenorrheaStatus(this.patientProfile);
|
|
3979
3985
|
}
|
|
3980
3986
|
setPatientBreastfeedingStatus(this.patientProfile, reproductive.breastfeeding);
|
|
3981
3987
|
setPatientPregnancyStatus(this.patientProfile, reproductive.isPregnant);
|
|
@@ -4015,9 +4021,9 @@ let PatientProfileEdition = class extends i$2 {
|
|
|
4015
4021
|
</div>
|
|
4016
4022
|
</div>
|
|
4017
4023
|
<div slot="actions" class="${PREFIX}-edition-modal-action-buttons" data-test-id="action-buttons">
|
|
4024
|
+
<bcbd-button data-test-id="cancel-button" background-color="secondary" @click=${this.handleCancel}>Annuler</bcbd-button>
|
|
4018
4025
|
<bcbd-button ?disabled=${this.demographicsHasError}
|
|
4019
4026
|
data-test-id="save-button" background-color="primary" @click=${this.validateForm}>Valider</bcbd-button>
|
|
4020
|
-
<bcbd-button data-test-id="cancel-button" outlined background-color="primary" @click=${this.handleCancel}>Annuler</bcbd-button>
|
|
4021
4027
|
</div>
|
|
4022
4028
|
`)}
|
|
4023
4029
|
</bcbd-modal>`;
|
|
@@ -4296,7 +4302,7 @@ let PatientProfile = class extends i$2 {
|
|
|
4296
4302
|
<div class="${PREFIX}-patient-profile__no-profile__first">Aucun profil patient renseigné</div>
|
|
4297
4303
|
<div class="${PREFIX}-patient-profile__no-profile__second">Veuillez remplir le formulaire</div>
|
|
4298
4304
|
</div>
|
|
4299
|
-
${this.preferences?.overview?.editButton?.display !== false ? b`<bcbd-button icon="pencil" size="medium" background-color="
|
|
4305
|
+
${this.preferences?.overview?.editButton?.display !== false ? b`<bcbd-button icon-color="black" icon="pencil" size="medium" background-color="transparent" aria-label="Modifier le profil patient" data-test-id="modify-button" @click=${this.openEditionModal}></bcbd-button>` : A}
|
|
4300
4306
|
` : b`
|
|
4301
4307
|
<div class="${PREFIX}-patient-profile__id-info-container">
|
|
4302
4308
|
<div class="${PREFIX}-patient-profile__name-info" data-test-id="patient-name" title=${o(getPatientName(this.patientProfile))}>
|
|
@@ -4353,11 +4359,11 @@ let PatientProfile = class extends i$2 {
|
|
|
4353
4359
|
<div class="${PREFIX}-patient-profile__action-buttons-container" data-test-id="action-buttons">
|
|
4354
4360
|
${this.preferences?.overview?.editButton?.display !== false ? b`
|
|
4355
4361
|
<bcbd-tooltip content="Editer le profil patient" placement="top">
|
|
4356
|
-
<bcbd-button icon="pencil" size="medium" background-color="
|
|
4362
|
+
<bcbd-button icon-color="black" icon="pencil" size="medium" background-color="transparent" aria-label="Editer le profil patient" data-test-id="modify-button" @click=${this.openEditionModal}></bcbd-button>
|
|
4357
4363
|
</bcbd-tooltip>
|
|
4358
4364
|
` : A}
|
|
4359
4365
|
<bcbd-tooltip content="Déplier le profil patient" placement="top">
|
|
4360
|
-
<bcbd-button icon=${this.moreInformationVisible ? "chevron-up" : "chevron-down"} size="medium" background-color="
|
|
4366
|
+
<bcbd-button icon-color="black" icon=${this.moreInformationVisible ? "chevron-up" : "chevron-down"} size="medium" background-color="transparent" aria-label=${this.moreInformationVisible ? "Masquer les informations supplémentaires" : "Afficher les informations supplémentaires"} @click=${this.handleMoreInformation} data-test-id="visible-button"></bcbd-button>
|
|
4361
4367
|
</bcbd-tooltip>
|
|
4362
4368
|
</div>`}
|
|
4363
4369
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudebernard/patient-profile-element",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0-beta.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",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@types/fhir": "^0.0.41",
|
|
66
66
|
"@types/he": "^1.2.3",
|
|
67
67
|
"@types/node": "^24.9.2",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
69
|
-
"@typescript-eslint/parser": "8.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "8.72.1",
|
|
69
|
+
"@typescript-eslint/parser": "8.72.1",
|
|
70
70
|
"@vitest/browser-playwright": "^4.0.5",
|
|
71
71
|
"@vitest/coverage-v8": "^4.0.5",
|
|
72
72
|
"@webcomponents/webcomponentsjs": "^2.8.0",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"vitest": "^4.0.7"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@claudebernard/design-system": "^2.
|
|
91
|
-
"@claudebernard/types": "^0.35.0 || ^0.36.0"
|
|
90
|
+
"@claudebernard/design-system": "^2.40.0",
|
|
91
|
+
"@claudebernard/types": "^0.35.0 || ^0.36.0 || ^0.37.0"
|
|
92
92
|
},
|
|
93
93
|
"customElements": "dist/custom-elements.json",
|
|
94
94
|
"publishConfig": {
|