diff --git a/packages/esm-patient-registration-app/src/offline.resources.ts b/packages/esm-patient-registration-app/src/offline.resources.ts index f0d91f3f7..1e36e6ba3 100644 --- a/packages/esm-patient-registration-app/src/offline.resources.ts +++ b/packages/esm-patient-registration-app/src/offline.resources.ts @@ -83,11 +83,13 @@ export async function fetchPatientIdentifierTypesWithSources(): Promise { - const option = find(autoGenOptions.data.results, { source: { uuid: source.uuid } }); - source.autoGenerationOption = option; - return source; - }); + identifierTypes[i].identifierSources = allIdentifierSources + .filter((source) => source.identifierType.uuid === identifierTypes[i].uuid) + .map((source) => { + const option = find(autoGenOptions.data.results, { source: { uuid: source.uuid } }); + source.autoGenerationOption = option; + return source; + }); } return identifierTypes;