@claudebernard/therapeutic-alternative-element 1.0.2 → 1.0.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.
@@ -986,7 +986,7 @@ let TherapeuticAlternative = class extends i$1 {
986
986
  this.searchTherapeuticAlternative();
987
987
  }
988
988
  getIndicationsListForMedication() {
989
- const medicationBcbId = this.medication?.medication.code?.coding?.find((option) => option.system === "https://platform.claudebernard.fr/fhir/CodeSystem/bcb-code")?.code || "";
989
+ const medicationBcbId = this.medication?.medication?.code?.coding?.find((option) => option.system === "https://platform.claudebernard.fr/fhir/CodeSystem/bcb-code")?.code || "";
990
990
  if (medicationBcbId !== "") {
991
991
  this.apiInfoLoading = true;
992
992
  infoApi.searchKeywordByProductIdAndCode({ path: { productIds: [medicationBcbId] }, query: { type: "INDICATIONS" } }).then((response) => {
@@ -1090,10 +1090,10 @@ let TherapeuticAlternative = class extends i$1 {
1090
1090
  this.hasTitle ? "" : `${PREFIX}-therapeutic-alternative__choice-fieldset-without-title`
1091
1091
  ].join(" ");
1092
1092
  let medicationTitle = "";
1093
- if (this.medication?.medication.code?.text) {
1094
- medicationTitle = this.medication?.medication.code.text;
1093
+ if (this.medication?.medication?.code?.text) {
1094
+ medicationTitle = this.medication?.medication?.code?.text;
1095
1095
  } else {
1096
- medicationTitle = this.medication?.medication.code?.coding?.find(
1096
+ medicationTitle = this.medication?.medication?.code?.coding?.find(
1097
1097
  (coding) => coding.system === "https://platform.claudebernard.fr/fhir/CodeSystem/bcb-code"
1098
1098
  )?.display || "";
1099
1099
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudebernard/therapeutic-alternative-element",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/therapeutic-alternative.es.js",
5
5
  "module": "dist/therapeutic-alternative.es.js",
6
6
  "types": "dist/therapeutic-alternative.d.ts",