openchs-models 1.32.23 → 1.32.24
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/ProgramEnrolment.js +3 -3
- package/package.json +1 -1
package/dist/ProgramEnrolment.js
CHANGED
|
@@ -465,7 +465,7 @@ class ProgramEnrolment extends _BaseEntity.default {
|
|
|
465
465
|
|
|
466
466
|
for (let i = 0; i < encounters.length; i++) {
|
|
467
467
|
encounter = encounters[i];
|
|
468
|
-
observation = encounters[i].findObservation(conceptNameOrUuid
|
|
468
|
+
observation = encounters[i].findObservation(conceptNameOrUuid, parentConceptNameOrUuid);
|
|
469
469
|
if (!_lodash.default.isNil(observation)) return {
|
|
470
470
|
observation: observation,
|
|
471
471
|
date: encounter.encounterDateTime
|
|
@@ -473,7 +473,7 @@ class ProgramEnrolment extends _BaseEntity.default {
|
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
if (checkInEnrolment) return {
|
|
476
|
-
observation: this.findObservation(conceptNameOrUuid
|
|
476
|
+
observation: this.findObservation(conceptNameOrUuid, parentConceptNameOrUuid),
|
|
477
477
|
date: this.enrolmentDateTime
|
|
478
478
|
};
|
|
479
479
|
return {};
|
|
@@ -487,7 +487,7 @@ class ProgramEnrolment extends _BaseEntity.default {
|
|
|
487
487
|
findObservation(conceptNameOrUuid, parentConceptNameOrUuid) {
|
|
488
488
|
const observations = _lodash.default.isNil(parentConceptNameOrUuid) ? this.observations : this.findGroupedObservation(parentConceptNameOrUuid);
|
|
489
489
|
return _lodash.default.find(observations, observation => {
|
|
490
|
-
return observation.concept.name
|
|
490
|
+
return observation.concept.name === conceptNameOrUuid || observation.concept.uuid === conceptNameOrUuid;
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
493
|
|