@openmrs/esm-form-engine-lib 2.1.0-pre.1552 → 2.1.0-pre.1561
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
@@ -55,7 +55,7 @@ export function prepareEncounter(
|
|
55
55
|
if (visit) {
|
56
56
|
encounterForSubmission.visit = visit.uuid;
|
57
57
|
}
|
58
|
-
encounterForSubmission.obs = obsForSubmission
|
58
|
+
encounterForSubmission.obs = obsForSubmission;
|
59
59
|
encounterForSubmission.orders = ordersForSubmission;
|
60
60
|
} else {
|
61
61
|
encounterForSubmission = {
|
@@ -328,14 +328,3 @@ export async function hydrateRepeatField(
|
|
328
328
|
}),
|
329
329
|
).then((results) => results.flat());
|
330
330
|
}
|
331
|
-
|
332
|
-
function transformNestedObsGroups(field: FormField, value: any): any {
|
333
|
-
if (field.type === 'obsGroup' && Array.isArray(field.questions)) {
|
334
|
-
return {
|
335
|
-
groupMembers: field.questions.map((nestedField) => transformNestedObsGroups(nestedField, nestedField.value)),
|
336
|
-
};
|
337
|
-
} else if (Array.isArray(value)) {
|
338
|
-
return value.map((v) => constructObs(field, v));
|
339
|
-
}
|
340
|
-
return constructObs(field, value);
|
341
|
-
}
|