diff --git a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card.html b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card.html
index 07836c5496..b672b05710 100644
--- a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card.html
+++ b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card.html
@@ -27,10 +27,41 @@
Dernière modification
-
-
-
-
-
+
+
+
+ Nom du médicament |
+ Dosage |
+ Commentaire |
+ Voie et localisation |
+
+
+ Matin |
+ Midi |
+ Soir |
+ Nuit |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Aucun traitement |
+
+
+
+
diff --git a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card_fragments.html b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card_fragments.html
index 647d5fff78..97002c9c2b 100644
--- a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card_fragments.html
+++ b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr-narrative/src/main/resources/narrative/templates/medication_card_fragments.html
@@ -7,33 +7,6 @@
~ on the basis of the eHealth Connector opensource project from June 28, 2021,
~ whereas medshare GmbH is the initial and main contributor/author of the eHealth Connector.
*/-->
-
-
-
- Nom du médicament |
- Dosage |
- Commentaire |
- Voie et localisation |
-
-
- Matin |
- Midi |
- Soir |
- Nuit |
-
-
-
-
-
-
-
-
- Aucun traitement |
-
-
-
-
-
@@ -45,11 +18,37 @@
- |
+ |
-
- [[${medStmt.resolveMedication().resolveMedicationName()}]]
+ |
+ [[${medication.resolveMedicationName()}]]
+
+
+
+ -
+ [[${activeIngredient.resolveActiveIngredient().getDisplayName(lang.getLanguageCode())}]]
+
+
+
+
+
+ À prendre du
+
+ au
+
+
+
+ À prendre dès le
+
+
+
+ À prendre jusqu'au
+
+
+
+
+
|
@@ -66,10 +65,14 @@
|
- |
+
+ *** par jour ***
+ |
- |
+
+ *** ***
+ |
@@ -89,24 +92,4 @@
th:text="${fopase.getMessage(dosage.routeOfAdministration(), lang)}"/>
-
-
-
- À prendre du
-
- au
-
-
-
- À prendre dès le
-
-
-
- À prendre jusqu'au
-
-
-
-
- |
-
diff --git a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedication.java b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedication.java
index 2a1e3668ff..7bce6a9ab8 100644
--- a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedication.java
+++ b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedication.java
@@ -12,7 +12,6 @@
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import org.checkerframework.checker.nullness.qual.Nullable;
-import org.hl7.fhir.r4.model.CodeableConcept;
import org.hl7.fhir.r4.model.Coding;
import org.hl7.fhir.r4.model.Medication;
import org.hl7.fhir.r4.model.UriType;
@@ -211,8 +210,10 @@ public PharmaceuticalDoseFormEdqm resolveForm() throws InvalidEmedContentExcepti
public List resolveActiveIngredients() {
return this.getIngredient().stream()
.filter(MedicationIngredientComponent::getIsActive)
- .filter(ChEmedEprMedicationIngredient.class::isInstance)
- .map(ChEmedEprMedicationIngredient.class::cast)
+ .map(ingredient -> {
+ if (ingredient instanceof ChEmedEprMedicationIngredient chEmedEprIngredient) return chEmedEprIngredient;
+ else return new ChEmedEprMedicationIngredient(ingredient);
+ })
.toList();
}
diff --git a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedicationIngredient.java b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedicationIngredient.java
index 8ae45e0253..3ab87c7c64 100644
--- a/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedicationIngredient.java
+++ b/husky-fhir/husky-fhir-emed-ch/husky-fhir-emed-ch-epr/src/main/java/org/projecthusky/fhir/emed/ch/epr/resource/ChEmedEprMedicationIngredient.java
@@ -22,6 +22,14 @@ public ChEmedEprMedicationIngredient() {
super();
}
+ /**
+ * Constructor from {@link Medication.MedicationIngredientComponent} object.
+ * @param ingredientComponent the ingredient
+ */
+ public ChEmedEprMedicationIngredient(final Medication.MedicationIngredientComponent ingredientComponent) {
+ ingredientComponent.copyValues(this);
+ }
+
/**
* Resolves the dose per unit.
*