Skip to content
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

Alex/more zambdas cleanup #1645

Merged
merged 9 commits into from
Mar 26, 2025
Merged

Alex/more zambdas cleanup #1645

merged 9 commits into from
Mar 26, 2025

Conversation

alexwillingham
Copy link
Contributor

No description provided.

@alexwillingham alexwillingham changed the base branch from main to develop March 25, 2025 20:16
@@ -47,8 +47,8 @@ const GET_PATIENT_PROFILE_PHOTO_URL_ZAMBDA_ID = import.meta.env.VITE_APP_GET_PAT
const SAVE_PATIENT_FOLLOWUP_ZAMBDA_ID = import.meta.env.VITE_APP_SAVE_PATIENT_FOLLOWUP_ZAMBDA_ID;
const CREATE_LAB_ORDER_ZAMBDA_ID = import.meta.env.VITE_APP_CREATE_LAB_ORDER_ZAMBDA_ID;

function chooseJson(json: any, isLocal: string): any {
return isLocal === 'true' ? json : json.output;
export function chooseJson(json: any): any {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it can be renamed now to something like this?

Suggested change
export function chooseJson(json: any): any {
export function getZambdaOutput(json: any): any {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also this function can be moved to utils and then we can remove duplicate from apps/intake/src/api/zapehrApi.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function should actually be removed entirely, but there is a tweak needed in the SDK. This function is serving the purpose of casting json.output to any because the SDK has a bug that has the type on zambda execute result being string. When that is fixed, we can delete this function and wherever it was used just inline json.output. So I'll come back through to remove this function soon entirely enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i went ahead and consolidated to just one of those functions, in utils.

@alexwillingham alexwillingham requested a review from VladMstv March 26, 2025 01:23
@alexwillingham alexwillingham merged commit 56c425c into develop Mar 26, 2025
3 of 4 checks passed
@alexwillingham alexwillingham deleted the alex/more-zambdas-cleanup branch March 26, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants