-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix-3807 rectify fhirpath exists
and empty
#3808
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@dillonstreator is attempting to deploy a commit to the Medplum Team on Vercel. A member of the Team first needs to authorize it. |
@@ -34,7 +34,7 @@ export const functions: Record<string, FhirPathFunction> = { | |||
* @returns True if the input collection is empty ({ }) and false otherwise. | |||
*/ | |||
empty: (_context: AtomContext, input: TypedValue[]): TypedValue[] => { | |||
return booleanToTypedValue(input.length === 0); | |||
return booleanToTypedValue(input.length === 0 || input.every((e) => isEmpty(e.value))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is effectively the same as the following:
return booleanToTypedValue(input.every((e) => isEmpty(e.value)));
However, the current change is a bit more obvious IMO. Defer to maintainers on preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that case be added to isEmpty()
directly? 🤔
exists
and empty
HI @dillonstreator, if you'd like to fix the prettier errors and fix conflicts, we can take another look |
fix-3885 propagate `traceId` through asynchronous jobs (#3886) Expand profile operation (#3875) feat: Support OperationDefinition inputs for patient-everything (#3908) Remove TURBO_REMOTE_ONLY from build step (#3907) Server config setting for accurate count threshold (#3902) Remove global systemRepo (#3884) Maintain full `traceparent` header value for `traceId` (#3877) fix-3807 rectify fhirpath `exists` and `empty` (#3808) Fix return documentation for client read methods (#3891) Document how to switch to super admin project in projects (#3873) Refactor elements context and slicing logic (#3869) Dependency upgrades (#3874) No longer need to build core for @medplum/react npm run dev (#3871) Fixes to ResourceDiffTable with arrays (#3870) feat(agent): add `ping` via `Agent/$push` (#3846) Fix token search with pipe in value (#3867) Revert nested transactions (#3866) Evict connection on rollback (#3865)
fix-3885 propagate `traceId` through asynchronous jobs (#3886) Expand profile operation (#3875) feat: Support OperationDefinition inputs for patient-everything (#3908) Remove TURBO_REMOTE_ONLY from build step (#3907) Server config setting for accurate count threshold (#3902) Remove global systemRepo (#3884) Maintain full `traceparent` header value for `traceId` (#3877) fix-3807 rectify fhirpath `exists` and `empty` (#3808) Fix return documentation for client read methods (#3891) Document how to switch to super admin project in projects (#3873) Refactor elements context and slicing logic (#3869) Dependency upgrades (#3874) No longer need to build core for @medplum/react npm run dev (#3871) Fixes to ResourceDiffTable with arrays (#3870) feat(agent): add `ping` via `Agent/$push` (#3846) Fix token search with pipe in value (#3867) Revert nested transactions (#3866) Evict connection on rollback (#3865)
Fixes #3807