Skip to content

Conversation

Irfan778899
Copy link
Contributor

fix: Approve/Reject changes for nested observations

@mujeerhashmi
Copy link
Contributor

mujeerhashmi commented Oct 6, 2025

This feature will help us in designing observation packages.
@Irfan778899 can you kindly update the screen recording of the feature.
@Sajinsr Kindly review

@Irfan778899
Copy link
Contributor Author

Nested.Observations.mp4

@Sajinsr
Copy link
Collaborator

Sajinsr commented Oct 7, 2025

Hi @Irfan778899,

Thanks for the PR. I noticed a few issues in this PR that need to be addressed before we can proceed:

  1. There’s no validation to prevent self referencing — for example, a template can currently be added as its own child or within its nested templates, which causes the sample collection creation to fail..
  2. There’s no limit set for nested components, which could break the diagnostic report ui.
  3. In the sample collection, only node templates are displayed. For example, when selecting a template like Lipid Profile, it currently shows all child components instead of showing Lipid Profile itself. The row already includes a button to view and collect its component observations, so this needs to be corrected.
  4. There are some linter issues and test failures that need to be fixed.

Please address these points and update the PR accordingly.

@Irfan778899 Irfan778899 force-pushed the feat_allow_grp_obsn_tmplates_as_components_in_obsn_tmplates branch 2 times, most recently from 98fd596 to e5d85f7 Compare October 14, 2025 09:40
@Irfan778899 Irfan778899 force-pushed the feat_allow_grp_obsn_tmplates_as_components_in_obsn_tmplates branch 8 times, most recently from e231ba0 to d73d247 Compare October 15, 2025 15:02
…ents in observation template

fix: Approve/Reject changes for nested observations
@Irfan778899 Irfan778899 force-pushed the feat_allow_grp_obsn_tmplates_as_components_in_obsn_tmplates branch from d73d247 to 9472b6e Compare October 15, 2025 15:06
@Irfan778899
Copy link
Contributor Author

Irfan778899 commented Oct 15, 2025

Hi @Sajinsr

As per the above comments,

  1. Added validation to prevent self-referencing — a template can no longer be added as its own child or within its nested
    templates.
  2. Implemented a limit of three levels of nesting under the parent template.
  3. Updated the logic so that only group templates are added to the Sample Collection document when group templates exist,
    instead of adding individual child templates.
  4. Linter issues have been resolved.

Please review and let me know if any further changes are needed.

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