Split custom Medplum search parameter definitions into separate file - #2178
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
codyebberson
left a comment
There was a problem hiding this comment.
Nice, this is a good change.
If you grep for readJson('fhir/r4/search-parameters.json'), there are quite a few places in the code base where we would need to add search-parameters-medplum.json too. Probably not all of the tests, but we should add them to the packages/generator/src/ files (docs.ts, migrate.ts, searchparams.ts, storybook.ts).
| * @see {@link IndexedStructureDefinition} for more details on indexed StructureDefinitions. | ||
| */ | ||
| export function indexSearchParameter(searchParam: SearchParameter): void { | ||
| if (!searchParam.base) { |
There was a problem hiding this comment.
Why this change? If base is undefined, then the function is a no-op, yeah?
There was a problem hiding this comment.
I kept it as a no-op, just streamlined the undefined check so it would instead iterate over an empty array
| for (const entry of searchParams.entry as BundleEntry<SearchParameter>[]) { | ||
| indexSearchParameter(entry.resource as SearchParameter); | ||
| } | ||
| indexSearchParameterBundle(readJson('fhir/r4/search-parameters.json') as Bundle<SearchParameter>); |
|
|
||
| const config = await loadConfig(configName); | ||
|
|
||
| // Preload the schema |
There was a problem hiding this comment.
Oy, we were double loading the schema? 🤦♂️ Nice catch.
IIRC, we did intentionally load the schema before initializing express, to the case where we lazy load the schema inside an HTTP request. Maybe we were doing that anyway (sigh 🤦♂️), but I think the theory still holds? So might be worth adding getStructureDefinitions() here?
|
Kudos, SonarCloud Quality Gate passed! |
Update client-cloudwatch-logs manual mock to use aws-sdk-client-mock (#2342) Log resource for validator latency warning (#2338) Minor tweaks to aws init tool and docs (#2340) Allow contentReference elements to override cardinality rules (#2339) Fixes #2315 - allow bot success without return value (#2336) Fix app env vars in publish job (#2335) Fixes #2310 - CLI rest with --fhir-url-path (#2313) Unify all of the sleep helper functions (#2331) Increase Fargate health check grace period (#2330) Remove PWA and service worker (#2329) Updating subscription documentation to reflect behavior when resources are deleted (#2328) Add app to publish.sh (#2326) Fixes #2306 - remove console.log from export tests due to race conditions (#2322) Fixed landing page for storybook (#2323) Bring back sourcemaps (#2309) Split custom Medplum search parameter definitions into separate file (#2178) Poll status follow Location header (#2307) Copy .env.defaults to .env if not exists (#2308) Allow extra URL path content with Bot execute (#2305) Fixes #2182- All Patient Export (#2293) Strict validation of property cardinality (#2300) Request from ACN (#2299) Fixed CLI shebang (#2301) ESBuild (#2298) Add logs and parity tests for new validator (#2291) Fixes #2277 - Updated access policies docs (#2292) Add non-null requirements to values in GraphQL array types (#2290) Validating Fixed and Pattern Values (#2288) Fixes #2195 - updated cdk init docs (#2289)
Update client-cloudwatch-logs manual mock to use aws-sdk-client-mock (#2342) Log resource for validator latency warning (#2338) Minor tweaks to aws init tool and docs (#2340) Allow contentReference elements to override cardinality rules (#2339) Fixes #2315 - allow bot success without return value (#2336) Fix app env vars in publish job (#2335) Fixes #2310 - CLI rest with --fhir-url-path (#2313) Unify all of the sleep helper functions (#2331) Increase Fargate health check grace period (#2330) Remove PWA and service worker (#2329) Updating subscription documentation to reflect behavior when resources are deleted (#2328) Add app to publish.sh (#2326) Fixes #2306 - remove console.log from export tests due to race conditions (#2322) Fixed landing page for storybook (#2323) Bring back sourcemaps (#2309) Split custom Medplum search parameter definitions into separate file (#2178) Poll status follow Location header (#2307) Copy .env.defaults to .env if not exists (#2308) Allow extra URL path content with Bot execute (#2305) Fixes #2182- All Patient Export (#2293) Strict validation of property cardinality (#2300) Request from ACN (#2299) Fixed CLI shebang (#2301) ESBuild (#2298) Add logs and parity tests for new validator (#2291) Fixes #2277 - Updated access policies docs (#2292) Add non-null requirements to values in GraphQL array types (#2290) Validating Fixed and Pattern Values (#2288) Fixes #2195 - updated cdk init docs (#2289)
|
Related:#2006 |








No description provided.