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

(feat) registered a helper function to form engine, to auto generate … #24

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

Herobiam
Copy link
Collaborator

@Herobiam Herobiam commented Oct 10, 2023

…infant ptracker id

OHRI-1819: Child(s) PTracker ID in L&D form Validated or autopulated based on the birth count form engine helper function

This PR add support to auto populate the PTRacker ID for the Child in full based on the birth count and the mother’s ID i.e. the system should assign PTracker ID to the babies for baby number 1 mothers' ID and 1 for child 1 and 2 for child 2 and add three for child 3 etc

Screen.Recording.2023-10-09.at.10.41.53.AM.mov

@Herobiam Herobiam requested review from pirupius and ODORA0 October 10, 2023 08:42
Comment on lines 2 to 14
if (!fieldId || !motherPtrackerId) return;

return fieldId === 'infantPtrackerid'
? motherPtrackerId + '1'
: fieldId.includes('_')
? motherPtrackerId.concat(fieldId.split('_')[1])
: undefined;
};





Copy link
Contributor

Choose a reason for hiding this comment

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

Please configure ur linter to run on save to remove extra lines as well as fix indenting

@pirupius pirupius merged commit c8df42b into UCSF-IGHS:main Oct 10, 2023
3 checks passed
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.

2 participants