From 916ea8c1dd8285c7523e37045872c90387b7816b Mon Sep 17 00:00:00 2001 From: huang0h Date: Mon, 3 Feb 2025 17:57:56 -0500 Subject: [PATCH] fix modality processing; add keys to filters --- .../src/workflows/postPendingPractitioner.ts | 7 +++---- .../src/app/components/AgeFilter/index.tsx | 2 +- .../src/app/components/LanguageFilter/index.tsx | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/monarch/monarch-backend/src/workflows/postPendingPractitioner.ts b/apps/monarch/monarch-backend/src/workflows/postPendingPractitioner.ts index 1e2d8aa..2a4d2b7 100644 --- a/apps/monarch/monarch-backend/src/workflows/postPendingPractitioner.ts +++ b/apps/monarch/monarch-backend/src/workflows/postPendingPractitioner.ts @@ -49,12 +49,11 @@ function getPractitionerInfo(webhookRequest): Omit { practitionerInfo.fullName = `${webhookRequest[FIELD_NAMES.FULL_NAME].first} ${webhookRequest[FIELD_NAMES.FULL_NAME].last}`; practitionerInfo.languagesList = ['English'].concat(webhookRequest[FIELD_NAMES.LANGUAGES].split('\r\n')); - const modalities = webhookRequest[FIELD_NAMES.MODALITY].split('\r\n') - practitionerInfo.modality = modalities.join(', '); - + practitionerInfo.modality = webhookRequest[FIELD_NAMES.MODALITY].join(', '); + const rawAddress = webhookRequest[FIELD_NAMES.BUSINESS_LOCATION]; // e.g. 123 Main Street, Boston, MA 123456 - practitionerInfo.businessLocation = `${rawAddress['addr_line1']} ${rawAddress['city']}, ${rawAddress['state']} ${rawAddress['postal']}}`; + practitionerInfo.businessLocation = `${rawAddress['addr_line1']} ${rawAddress['city']}, ${rawAddress['state']} ${rawAddress['postal']}`; return practitionerInfo; } diff --git a/apps/monarch/monarch-frontend/src/app/components/AgeFilter/index.tsx b/apps/monarch/monarch-frontend/src/app/components/AgeFilter/index.tsx index 0d2a5bf..7cddd22 100644 --- a/apps/monarch/monarch-frontend/src/app/components/AgeFilter/index.tsx +++ b/apps/monarch/monarch-frontend/src/app/components/AgeFilter/index.tsx @@ -42,7 +42,7 @@ const AgeFilter: React.FC = () => { maxW={600} > {AGE_MARKS.map((mark: number) => ( - + {mark}+ years ))} diff --git a/apps/monarch/monarch-frontend/src/app/components/LanguageFilter/index.tsx b/apps/monarch/monarch-frontend/src/app/components/LanguageFilter/index.tsx index 2b98f5d..eff6286 100644 --- a/apps/monarch/monarch-frontend/src/app/components/LanguageFilter/index.tsx +++ b/apps/monarch/monarch-frontend/src/app/components/LanguageFilter/index.tsx @@ -27,7 +27,7 @@ const LanguageFilter: React.FC = () => { }} > {availableLanguages.map((language) => { - return {language}; + return {language}; })}