Skip to content

generate script to remove paired dataElements#584

Merged
Ramon-Jimenez merged 9 commits into
feature/new-dashboard-logic-869cfc51ufrom
feature/remove-paired-dataelements
Jun 17, 2026
Merged

generate script to remove paired dataElements#584
Ramon-Jimenez merged 9 commits into
feature/new-dashboard-logic-869cfc51ufrom
feature/remove-paired-dataelements

Conversation

@eperedo

@eperedo eperedo commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

📌 References

📝 Implementation

Restoring paired indicators: "B060300", "B060500", "B061000", "B130200", "B130400", "B130600"

(Only for test environment)

npx tsx src/scripts/restore-paired-data-elements-to-projects.ts --url=http://user:password@localhost:8080 --persist
  • Get paired indicators from: "B060300", "B060500", "B061000", "B130200", "B130400", "B130600"
  • For each paired indicator get sub indicators:
B060300 → P060400 (eaSaFDCJJ5A)
  - P060401 # of people provided with outpatient antenatal consultations (iQYbMelX1S1)
  - P060402 # of people provided with outpatient newborn consultations within three days of birth (CIawf1RwUhU)
  - P060403 # of people provided with outpatient consultations for treatment of definitive TB diagnosis (maoLtUEhHCC)
  - P060404 # of people provided with outpatient communicable disease consultations (Wayu8KYftDj)
  - P060405 # of people provided with outpatient consultations for delivery provided by skilled health personnel (Co00LfH1Jnk)
  - P060406 # of people provided with outpatient consultations for noncommunicable diseases (CoyQTaNQdE8)
  - P060407 # of people provided with outpatient consultations for any mental health condition (m2UNI7jfN5V)
  - P060408 # of people provided with outpatient consultations for trauma-related injuries (u6m2wBChTgw)
  - P060409 # of people provided with outpatient consultations for non-traumatic medical presentation (GuozyubVBZP)
  - P060410 # of people provided with outpatient case support for sexual violence that was treated medically (CYMv53h7bTm)
  - P060411 # of people provided with outpatient consultations for other (specify) diseases/ conditions (i4gxfSt7A87)
B060500 → P060600 (SysxWzx4KXX)
  - P060601 # of children under five years of age provided with community-based treatment for common childhood illnesses (eQe0z9SXqm6)
  - P060602 # of people provided with community-based newborn consultations within three days of birth (Oog3ay5wQ8n)
  - P060603 # of people provided with community-based antenatal consultations (mwoRWmp5FQc)
  - P060604 # of people provided with community-based consultations for treatment of definitive TB diagnosis (qSkP0W5i6ds)
  - P060605 # of people provided with community-based communicable disease consultations (qmW2zE1ONWN)
  - P060606 # of people provided with community-based consultations for delivery provided by skilled health personnel (quk3JQrF0Vb)
  - P060607 # of people provided with community-based consultations for noncommunicable diseases (ugA5YKLmYfV)
  - P060608 # of people provided with community-based consultations for any mental health condition (Ck0YFFjEoyo)
  - P060609 # of people provided with community-based consultations for trauma-related injuries (uYG4SKGuqrV)
  - P060610 # of people provided with community-based consultations for non-traumatic medical presentation (mYAB3bCK8Nz)
  - P060611 # of people provided with community-based case support for sexual violence that was treated medically (yCWee9GmYYS)
  - P060612 # of people provided with community-based consultations for other (specify) diseases/ conditions (aiwtm4CJKyx)
B061000 → P061100 (eoEtWMiPJ54)
  - P061101 # of people provided with inpatient antenatal consultations (yeeMeFfZUfi)
  - P061102 # of people provided with inpatient newborn consultations within three days of birth (W0SCUw6KViC)
  - P061103 # of people provided with inpatient consultations for treatment of definitive TB diagnosis (OwG0d1xRQzS)
  - P061104 # of people provided with inpatient communicable disease consultations (CacPEBF0aKo)
  - P061105 # of people provided with inpatient consultations for delivery provided by skilled health personnel (iW2ZQqy7pHo)
  - P061106 # of people provided with inpatient consultations for noncommunicable diseases (mI0SRjrLyXT)
  - P061107 # of people provided with inpatient consultations for any mental health condition (umeoo1RP3HI)
  - P061108 # of people provided with inpatient consultations for trauma-related injuries (yY8LM2Sx4bu)
  - P061109 # of people provided with inpatient consultations for non-traumatic medical presentation (yy0KNDBMMJy)
  - P061110 # of people provided with inpatient case support for sexual violence that was treated medically (yqcXYH5BZhD)
  - P061111 # of people provided with inpatient consultations for other (specify) diseases/ conditions (uEQFDwsnWeu)
B130200 → P130300 (OymUIzWpKNr)
  (no sub indicators found)
B130400 → P130500 (yaeeFvRaQyC)
  (no sub indicators found)
B130600 → P130700 (Omobz0poEAJ)
  (no sub indicators found)
  • Get all projects and remove sub indicators
  • Remove sub indicators from "sub" dataElementGroup to remove from UI in project wizard
npx tsx src/scripts/remove-paired-sub-indicators-from-projects.ts --url=http://user:password@localhost:8080 --persist

🔥 Notes for the reviewer

🎨 Screenshots

Before

image

After

image

@eperedo eperedo requested a review from Ramon-Jimenez April 22, 2026 01:38
@bundlemon

bundlemon Bot commented Apr 22, 2026

Copy link
Copy Markdown

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
5.51MB (+17.46KB +0.31%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@eperedo eperedo changed the title Feature/remove paired dataelements generate script to remove paired dataElements Apr 22, 2026
@eperedo eperedo changed the base branch from development to feature/new-dashboard-logic-869cfc51u May 25, 2026 00:53
@Ramon-Jimenez Ramon-Jimenez merged commit 5869ff6 into feature/new-dashboard-logic-869cfc51u Jun 17, 2026
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