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) add helper function to auto generate infant ptracker id #129

Closed
wants to merge 1 commit into from

Conversation

Herobiam
Copy link
Contributor

@Herobiam Herobiam commented Oct 9, 2023

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

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

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

Screenshots

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

Related Issue

Other

…based on the birth count form engine helper function
@Herobiam Herobiam changed the title OHRI-1819: Child(s) PTracker ID in L&D form Validated or autopulated … (feat) add helper function to auto generate infant ptracker id Oct 10, 2023
Copy link
Member

@ODORA0 ODORA0 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -280,6 +280,17 @@ export class CommonExpressionHelpers {
return daySinceLastObs === '' ? '0' : daySinceLastObs;
};

generateInfantPTrackerId = (fieldId: string, motherPtrackerId: string): string | undefined => {
Copy link
Member

Choose a reason for hiding this comment

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

Aren't these supported from individual esms? This looks specific to an implementation

Copy link
Collaborator

@kajambiya kajambiya left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@pirupius pirupius left a comment

Choose a reason for hiding this comment

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

Hold this off for now

@ODORA0
Copy link
Member

ODORA0 commented Oct 10, 2023

@pirupius Since this is implementation specific this can be closed and added to the right esm

@pirupius
Copy link
Member

Closing as this is being moved to implementer esm

@pirupius pirupius closed this Oct 10, 2023
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.

4 participants