@openmrs/esm-form-engine-lib 3.1.5-pre.2011 → 3.1.5-pre.2012
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/package.json
CHANGED
@@ -160,23 +160,13 @@ export function saveAttachments(fields: FormField[], encounter: OpenmrsEncounter
|
|
160
160
|
}
|
161
161
|
|
162
162
|
export function getMutableSessionProps(context: FormContextProps) {
|
163
|
-
const {
|
164
|
-
formFields,
|
165
|
-
location,
|
166
|
-
currentProvider,
|
167
|
-
sessionDate,
|
168
|
-
customDependencies,
|
169
|
-
domainObjectValue: encounter,
|
170
|
-
} = context;
|
163
|
+
const { formFields, location, currentProvider, customDependencies, domainObjectValue: encounter } = context;
|
171
164
|
const { defaultEncounterRole } = customDependencies;
|
172
165
|
const encounterRole =
|
173
166
|
formFields.find((field) => field.type === 'encounterRole')?.meta.submission?.newValue || defaultEncounterRole?.uuid;
|
174
167
|
const encounterProvider =
|
175
168
|
formFields.find((field) => field.type === 'encounterProvider')?.meta.submission?.newValue || currentProvider.uuid;
|
176
|
-
const encounterDate =
|
177
|
-
formFields.find((field) => field.type === 'encounterDatetime')?.meta.submission?.newValue ||
|
178
|
-
encounter?.encounterDatetime ||
|
179
|
-
sessionDate;
|
169
|
+
const encounterDate = formFields.find((field) => field.type === 'encounterDatetime')?.meta.submission?.newValue;
|
180
170
|
const encounterLocation =
|
181
171
|
formFields.find((field) => field.type === 'encounterLocation')?.meta.submission?.newValue ||
|
182
172
|
encounter?.location?.uuid ||
|