From 771ec08ff66d09f35b2dd95037ce027e62c1d0f4 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Thu, 11 Jan 2024 17:40:51 +0530 Subject: [PATCH] #1277 - convert draft encounter obs before saving --- packages/openchs-android/package.json | 2 +- .../openchs-android/src/service/draft/DraftEncounterService.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openchs-android/package.json b/packages/openchs-android/package.json index 0c2bbe310..1531fa478 100644 --- a/packages/openchs-android/package.json +++ b/packages/openchs-android/package.json @@ -57,7 +57,7 @@ "lodash": "4.17.21", "moment": "2.29.4", "native-base": "3.4.9", - "openchs-models": "1.31.14", + "openchs-models": "1.31.16", "prop-types": "15.8.1", "react": "18.2.0", "react-native": "0.72.3", diff --git a/packages/openchs-android/src/service/draft/DraftEncounterService.js b/packages/openchs-android/src/service/draft/DraftEncounterService.js index 8825b60c6..dfc8a7de4 100644 --- a/packages/openchs-android/src/service/draft/DraftEncounterService.js +++ b/packages/openchs-android/src/service/draft/DraftEncounterService.js @@ -25,7 +25,7 @@ class DraftEncounterService extends BaseService { const cleanIndividualFromDB = this.findByUUID(encounter.individual.uuid, Individual.schema.name); draftEncounter.individual = cleanIndividualFromDB; - ObservationsHolder.convertObsForSave(encounter.observations); + ObservationsHolder.convertObsForSave(draftEncounter.observations); return this.db.write(() => { return db.create(DraftEncounter.schema.name, draftEncounter, true);